diff --git a/src/main/java/org/embeddedt/vintagefix/mixin/blockstates/BlockStateContainerMixin.java b/src/main/java/org/embeddedt/vintagefix/mixin/blockstates/BlockStateContainerMixin.java index f2ed135..8943f5e 100644 --- a/src/main/java/org/embeddedt/vintagefix/mixin/blockstates/BlockStateContainerMixin.java +++ b/src/main/java/org/embeddedt/vintagefix/mixin/blockstates/BlockStateContainerMixin.java @@ -1,6 +1,7 @@ package org.embeddedt.vintagefix.mixin.blockstates; import com.google.common.collect.ImmutableSortedMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.BlockStateContainer; import org.embeddedt.vintagefix.fastmap.FakeStateMap; @@ -18,6 +19,11 @@ public class BlockStateContainerMixin { @Final private ImmutableSortedMap> properties; + @ModifyVariable(method = "(Lnet/minecraft/block/Block;[Lnet/minecraft/block/properties/IProperty;Lcom/google/common/collect/ImmutableMap;)V", at = @At(value = "INVOKE_ASSIGN", target = "Lcom/google/common/collect/Maps;newHashMap()Ljava/util/HashMap;"), ordinal = 0, index = 4) + private Map> useFastUtilMap(Map> map) { + return new Object2ObjectOpenHashMap<>(map); + } + @ModifyVariable(method = "(Lnet/minecraft/block/Block;[Lnet/minecraft/block/properties/IProperty;Lcom/google/common/collect/ImmutableMap;)V", at = @At(value = "INVOKE_ASSIGN", target = "Lcom/google/common/collect/Maps;newLinkedHashMap()Ljava/util/LinkedHashMap;"), ordinal = 1, index = 5) private Map, Comparable>, BlockStateContainer.StateImplementation> useArrayMap(Map, Comparable>, BlockStateContainer.StateImplementation> in) { int numStates = 1;