diff --git a/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/FossilCleanerBlockEntity.java b/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/FossilCleanerBlockEntity.java index 372ee2f..ebd7a4f 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/FossilCleanerBlockEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/FossilCleanerBlockEntity.java @@ -154,11 +154,8 @@ public class FossilCleanerBlockEntity extends BlockEntity implements ExtendedMen tag.putInt("Prog", this.progress); tag.putInt("MaxProg", this.maxProgress); tag.put("Energy", energyStorage.saveNBT()); - tag.remove("Fluid"); if (!fluidStack.isEmpty()) { - CompoundTag fluidTag = new CompoundTag(); - fluidStack.write(registries, fluidTag); - tag.put("Fluid", fluidTag); + tag.put("Fluid", fluidStack.write(registries, new CompoundTag())); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/TankBlockEntity.java b/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/TankBlockEntity.java index 3a10a69..852aa95 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/TankBlockEntity.java +++ b/common/src/main/java/net/cmr/jurassicrevived/block/entity/custom/TankBlockEntity.java @@ -270,11 +270,8 @@ public class TankBlockEntity extends BlockEntity implements ExtendedMenuProvider protected void saveAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) { super.saveAdditional(pTag, pRegistries); pTag.put("Inventory", itemHandler.createTag(pRegistries)); - pTag.remove("Fluid"); if (!fluidStack.isEmpty()) { - CompoundTag fluidTag = new CompoundTag(); - fluidStack.write(pRegistries, fluidTag); - pTag.put("Fluid", fluidTag); + pTag.put("Fluid", fluidStack.write(pRegistries, new CompoundTag())); } } diff --git a/common/src/main/java/net/cmr/jurassicrevived/block/renderer/TankBlockEntityRenderer.java b/common/src/main/java/net/cmr/jurassicrevived/block/renderer/TankBlockEntityRenderer.java index 64e5cc8..2393199 100644 --- a/common/src/main/java/net/cmr/jurassicrevived/block/renderer/TankBlockEntityRenderer.java +++ b/common/src/main/java/net/cmr/jurassicrevived/block/renderer/TankBlockEntityRenderer.java @@ -65,14 +65,14 @@ public class TankBlockEntityRenderer implements BlockEntityRenderer1.20.1 { + /*private static float spriteU(TextureAtlasSprite sprite, float normalizedU) { + return sprite.getU0() + (sprite.getU1() - sprite.getU0()) * normalizedU; + } + + private static float spriteV(TextureAtlasSprite sprite, float normalizedV) { + return sprite.getV0() + (sprite.getV1() - sprite.getV0()) * normalizedV; + } + *///?} else { + private static float spriteU(TextureAtlasSprite sprite, float normalizedU) { + return sprite.getU(normalizedU * 16); + } + + private static float spriteV(TextureAtlasSprite sprite, float normalizedV) { + return sprite.getV(normalizedV * 16); + } + //?} + private static void addQuad(VertexConsumer builder, PoseStack poseStack, float x0, float y0, float z0, float u0, float v0, float x1, float y1, float z1, float u1, float v1,