Fix datagen order of multipart conditions being unstable

This commit is contained in:
tterrag 2020-11-28 21:10:08 -05:00
parent ccb7345084
commit d85ea5a3b0

View file

@ -26,8 +26,8 @@ import java.util.List;
import java.util.Map.Entry; import java.util.Map.Entry;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.google.common.collect.MultimapBuilder;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
@ -74,7 +74,7 @@ public final class MultiPartBlockStateBuilder implements IGeneratedBlockstate {
public class PartBuilder { public class PartBuilder {
public BlockStateProvider.ConfiguredModelList models; public BlockStateProvider.ConfiguredModelList models;
public boolean useOr; public boolean useOr;
public final Multimap<Property<?>, Comparable<?>> conditions = HashMultimap.create(); public final Multimap<Property<?>, Comparable<?>> conditions = MultimapBuilder.linkedHashKeys().arrayListValues().build();
PartBuilder(BlockStateProvider.ConfiguredModelList models) { PartBuilder(BlockStateProvider.ConfiguredModelList models) {
this.models = models; this.models = models;