Bug Fixes

- Fixed broken serialization of carriage contraptions
- Fixed fluid tags crashing the hose pulley
This commit is contained in:
simibubi 2020-12-19 21:15:04 +01:00
parent 59b033f3be
commit 89ce9ef826
2 changed files with 8 additions and 5 deletions

View file

@ -129,13 +129,16 @@ public class AllTags {
}
private AllFluidTags(NameSpace namespace, String path) {
tag = FluidTags.makeWrapperTag(
new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())).toString());
tag = FluidTags.createOptional(
new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())));
}
public boolean matches(Fluid fluid) {
return fluid != null && fluid.isIn(tag);
}
static void loadClass() {
}
}
public static enum AllBlockTags {
@ -197,5 +200,7 @@ public class AllTags {
AllBlockTags.FAN_TRANSPARENT.add(Blocks.IRON_BARS);
AllBlockTags.FAN_HEATERS.add(Blocks.MAGMA_BLOCK, Blocks.CAMPFIRE, Blocks.LAVA, Blocks.FIRE);
AllFluidTags.loadClass();
}
}

View file

@ -30,7 +30,6 @@ import net.minecraft.item.Items;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
@ -165,8 +164,7 @@ public class OrientedContraptionEntity extends AbstractContraptionEntity {
yaw = compound.getFloat("Yaw");
pitch = compound.getFloat("Pitch");
setCouplingId(
compound.contains("OnCoupling") ? NBTUtil.readUniqueId(compound.getCompound("OnCoupling")) : null);
setCouplingId(compound.contains("OnCoupling") ? compound.getUniqueId("OnCoupling") : null);
}
@Override