Fix Certus Quartz fluid flickering and sometimes rendering an incorrect amount of fluid, optimize packet sending and ticking (#348)

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
danyadevandMartin Robertz authored and GitHub committed 2025-11-14 23:20:19 +01:00
1 parent 219f8c313a
commit 2e6bfe6aac
4 files changed
+62 -98

No files matched your search

@@ -138,19 +138,14 @@ public class ItemCertusQuartzTank extends BaseItemBlockContainer implements IFlu
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
float hitX, float hitY, float hitZ, int metadata) {
if (!world.setBlock(x, y, z, this.field_150939_a, metadata, 3)) {
if (!super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata)) {
return false;
}
if (world.getBlock(x, y, z) == this.field_150939_a) {
this.field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack);
this.field_150939_a.onPostBlockPlaced(world, x, y, z, metadata);
if (stack != null) {
((TileCertusQuartzTank) world.getTileEntity(x, y, z)).readFromItemNBT(stack.getTagCompound());
}
if (stack != null && stack.hasTagCompound()) {
((TileCertusQuartzTank) world.getTileEntity(x, y, z))
.readFromNBTWithoutCoords(stack.getTagCompound().getCompoundTag("tileEntity"));
}
return true;
}
}