Optimize CPacketFluidUpdate (#177)

This commit is contained in:
TechnicianLP authored and GitHub committed 2023-12-14 17:06:26 +01:00
1 parent 4e3c073fef
commit 1372804bc9
8 files changed
+377 -386

No files matched your search

@@ -229,8 +229,7 @@ public final class Util {
}
public static AEFluidStack getAEFluidFromItem(ItemStack stack) {
if (stack != null
&& (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack))) {
if (stack != null) {
if (stack.getItem() instanceof IFluidContainerItem) {
FluidStack fluid = ((IFluidContainerItem) stack.getItem()).getFluid(stack);
if (fluid != null) {
@@ -252,8 +251,7 @@ public final class Util {
}
public static FluidStack getFluidFromItem(ItemStack stack) {
if (stack != null
&& (stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack))) {
if (stack != null) {
if (stack.getItem() instanceof IFluidContainerItem) {
FluidStack fluid = ((IFluidContainerItem) stack.getItem()).getFluid(stack);
if (fluid != null) {