diff --git a/changelog.md b/changelog.md index 04b80d9d..b1485e37 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ ## Ex Deorum 1.15 - Fixed not being able to enchant sieve meshes in the Enchanting Table. +- Fixed Barrels not rendering their contents properly - Improved appearance of witch water to better match water so that the transformation animation looks smoother. ## Ex Deorum 1.14 diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java index d3f2b37f..a121bdba 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java @@ -22,6 +22,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.FriendlyByteBuf; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.FluidTags; @@ -129,6 +130,28 @@ public class BarrelBlockEntity extends EBlockEntity { this.b = nbt.getShort("b"); } + @Override + public void writeVisualData(FriendlyByteBuf buffer) { + buffer.writeItem(this.item.getStackInSlot(0)); + buffer.writeFluidStack(this.tank.getFluid()); + buffer.writeShort(this.compost); + buffer.writeFloat(this.progress); + buffer.writeShort(this.r); + buffer.writeShort(this.g); + buffer.writeShort(this.b); + } + + @Override + public void readVisualData(FriendlyByteBuf buffer) { + this.item.setStackInSlot(0, buffer.readItem()); + this.tank.setFluid(buffer.readFluidStack()); + this.compost = buffer.readShort(); + this.progress = buffer.readFloat(); + this.r = buffer.readShort(); + this.g = buffer.readShort(); + this.b = buffer.readShort(); + } + public boolean isBrewing() { return this.tank.getFluidAmount() == 1000 && this.progress != 0.0f && !isBurning(); } diff --git a/src/main/resources/assets/exdeorum/textures/block/compost_dirt.png b/src/main/resources/assets/exdeorum/textures/block/compost_dirt.png index 94a8e294..0a52a21d 100644 Binary files a/src/main/resources/assets/exdeorum/textures/block/compost_dirt.png and b/src/main/resources/assets/exdeorum/textures/block/compost_dirt.png differ