-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- a/net/minecraft/world/item/HoneycombItem.java | ||
+++ b/net/minecraft/world/item/HoneycombItem.java | ||
@@ -2,6 +_,7 @@ | ||
|
||
import com.google.common.base.Suppliers; | ||
import com.google.common.collect.BiMap; | ||
+import com.google.common.collect.HashBiMap; | ||
import com.google.common.collect.ImmutableBiMap; | ||
import java.util.Optional; | ||
import java.util.function.Supplier; | ||
@@ -21,7 +_,7 @@ | ||
|
||
public class HoneycombItem extends Item implements SignApplicator { | ||
public static final Supplier<BiMap<Block, Block>> WAXABLES = Suppliers.memoize( | ||
- () -> ImmutableBiMap.<Block, Block>builder() | ||
+ () -> HashBiMap.create(ImmutableBiMap.<Block, Block>builder() | ||
.put(Blocks.COPPER_BLOCK, Blocks.WAXED_COPPER_BLOCK) | ||
.put(Blocks.EXPOSED_COPPER, Blocks.WAXED_EXPOSED_COPPER) | ||
.put(Blocks.WEATHERED_COPPER, Blocks.WAXED_WEATHERED_COPPER) | ||
@@ -58,7 +_,7 @@ | ||
.put(Blocks.EXPOSED_COPPER_BULB, Blocks.WAXED_EXPOSED_COPPER_BULB) | ||
.put(Blocks.WEATHERED_COPPER_BULB, Blocks.WAXED_WEATHERED_COPPER_BULB) | ||
.put(Blocks.OXIDIZED_COPPER_BULB, Blocks.WAXED_OXIDIZED_COPPER_BULB) | ||
- .build() | ||
+ .build()) | ||
); | ||
public static final Supplier<BiMap<Block, Block>> WAX_OFF_BY_BLOCK = Suppliers.memoize(() -> WAXABLES.get().inverse()); | ||
|
28 changes: 28 additions & 0 deletions
28
patches/net/minecraft/world/level/block/WeatheringCopper.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- a/net/minecraft/world/level/block/WeatheringCopper.java | ||
+++ b/net/minecraft/world/level/block/WeatheringCopper.java | ||
@@ -2,6 +_,7 @@ | ||
|
||
import com.google.common.base.Suppliers; | ||
import com.google.common.collect.BiMap; | ||
+import com.google.common.collect.HashBiMap; | ||
import com.google.common.collect.ImmutableBiMap; | ||
import com.mojang.serialization.Codec; | ||
import java.util.Optional; | ||
@@ -11,7 +_,7 @@ | ||
|
||
public interface WeatheringCopper extends ChangeOverTimeBlock<WeatheringCopper.WeatherState> { | ||
Supplier<BiMap<Block, Block>> NEXT_BY_BLOCK = Suppliers.memoize( | ||
- () -> ImmutableBiMap.<Block, Block>builder() | ||
+ () -> HashBiMap.create(ImmutableBiMap.<Block, Block>builder() | ||
.put(Blocks.COPPER_BLOCK, Blocks.EXPOSED_COPPER) | ||
.put(Blocks.EXPOSED_COPPER, Blocks.WEATHERED_COPPER) | ||
.put(Blocks.WEATHERED_COPPER, Blocks.OXIDIZED_COPPER) | ||
@@ -39,7 +_,7 @@ | ||
.put(Blocks.COPPER_BULB, Blocks.EXPOSED_COPPER_BULB) | ||
.put(Blocks.EXPOSED_COPPER_BULB, Blocks.WEATHERED_COPPER_BULB) | ||
.put(Blocks.WEATHERED_COPPER_BULB, Blocks.OXIDIZED_COPPER_BULB) | ||
- .build() | ||
+ .build()) | ||
); | ||
Supplier<BiMap<Block, Block>> PREVIOUS_BY_BLOCK = Suppliers.memoize(() -> NEXT_BY_BLOCK.get().inverse()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters