diff --git a/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemBus.java b/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemBus.java index 2fecf000..dd7e9298 100644 --- a/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemBus.java +++ b/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemBus.java @@ -1,17 +1,7 @@ package github.kasuminova.mmce.common.block.appeng; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import javax.annotation.Nonnull; - public abstract class BlockMEItemBus extends BlockMEMachineComponent { - @Override - public void dropBlockAsItemWithChance(@Nonnull final World worldIn, @Nonnull final BlockPos pos, @Nonnull final IBlockState state, final float chance, final int fortune) { - } - // @Override // public boolean hasComparatorInputOverride(@Nonnull IBlockState state) { // return true; diff --git a/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemInputBus.java b/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemInputBus.java index e7fe4b3a..d13c4728 100644 --- a/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemInputBus.java +++ b/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemInputBus.java @@ -42,6 +42,10 @@ public TileEntity createTileEntity(final World world, final IBlockState state) { return new MEItemInputBus(); } + @Override + public void dropBlockAsItemWithChance(@Nonnull final World worldIn, @Nonnull final BlockPos pos, @Nonnull final IBlockState state, final float chance, final int fortune) { + } + @Override public void breakBlock(final World worldIn, @Nonnull final BlockPos pos, @@ -50,16 +54,17 @@ public void breakBlock(final World worldIn, TileEntity te = worldIn.getTileEntity(pos); if (te == null) { - super.breakBlock(worldIn, pos, state); + super.dropBlockAsItemWithChance(worldIn, pos, state, 1.0F, 0); + worldIn.removeTileEntity(pos); return; } if (!(te instanceof final MEItemInputBus bus)) { - super.breakBlock(worldIn, pos, state); + worldIn.removeTileEntity(pos); return; } if (!bus.hasItem() && !bus.configInvHasItem()) { - super.breakBlock(worldIn, pos, state); + worldIn.removeTileEntity(pos); return; } diff --git a/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemOutputBus.java b/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemOutputBus.java index a5ac41fe..19a8bf7a 100644 --- a/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemOutputBus.java +++ b/src/main/java/github/kasuminova/mmce/common/block/appeng/BlockMEItemOutputBus.java @@ -43,6 +43,10 @@ public TileEntity createTileEntity(final World world, final IBlockState state) { return new MEItemOutputBus(); } + @Override + public void dropBlockAsItemWithChance(@Nonnull final World worldIn, @Nonnull final BlockPos pos, @Nonnull final IBlockState state, final float chance, final int fortune) { + } + @Override public void breakBlock(final World worldIn, @Nonnull final BlockPos pos, @@ -52,16 +56,19 @@ public void breakBlock(final World worldIn, TileEntity te = worldIn.getTileEntity(pos); if (te == null) { - super.breakBlock(worldIn, pos, state); + super.dropBlockAsItemWithChance(worldIn, pos, state, 1.0F, 0); + worldIn.removeTileEntity(pos); return; } if (!(te instanceof final MEItemOutputBus bus)) { - super.breakBlock(worldIn, pos, state); + super.dropBlockAsItemWithChance(worldIn, pos, state, 1.0F, 0); + worldIn.removeTileEntity(pos); return; } if (!bus.hasItem()) { - super.breakBlock(worldIn, pos, state); + super.dropBlockAsItemWithChance(worldIn, pos, state, 1.0F, 0); + worldIn.removeTileEntity(pos); return; } diff --git a/src/main/java/github/kasuminova/mmce/common/concurrent/TaskExecutor.java b/src/main/java/github/kasuminova/mmce/common/concurrent/TaskExecutor.java index c754bd25..17f4f12e 100644 --- a/src/main/java/github/kasuminova/mmce/common/concurrent/TaskExecutor.java +++ b/src/main/java/github/kasuminova/mmce/common/concurrent/TaskExecutor.java @@ -47,6 +47,8 @@ public class TaskExecutor { private final MpscLinkedAtomicQueue mainThreadActions = new MpscLinkedAtomicQueue<>(); private final MpscLinkedAtomicQueue requireUpdateTEQueue = new MpscLinkedAtomicQueue<>(); + private final MpscLinkedAtomicQueue requireMarkNoUpdateTEQueue = new MpscLinkedAtomicQueue<>(); + private final TaskSubmitter submitter = new TaskSubmitter(); private volatile boolean inTick = false; @@ -141,7 +143,7 @@ private int spinAwaitActionExecutor() { } private void updateTileEntity() { - if (requireUpdateTEQueue.isEmpty()) { + if (requireUpdateTEQueue.isEmpty() && requireMarkNoUpdateTEQueue.isEmpty()) { return; } @@ -149,6 +151,10 @@ private void updateTileEntity() { while ((te = requireUpdateTEQueue.poll()) != null) { te.markForUpdate(); } + + while ((te = requireMarkNoUpdateTEQueue.poll()) != null) { + te.markNoUpdate(); + } } /** @@ -193,6 +199,10 @@ public void addTEUpdateTask(final TileEntitySynchronized te) { requireUpdateTEQueue.offer(te); } + public void addTEMarkNoUpdateTask(final TileEntitySynchronized te) { + requireMarkNoUpdateTEQueue.offer(te); + } + private synchronized void submitTask() { ActionExecutor executor; while ((executor = executors.poll()) != null) { diff --git a/src/main/java/github/kasuminova/mmce/common/handler/EventHandler.java b/src/main/java/github/kasuminova/mmce/common/handler/EventHandler.java index f1b86103..d1c0f7a5 100644 --- a/src/main/java/github/kasuminova/mmce/common/handler/EventHandler.java +++ b/src/main/java/github/kasuminova/mmce/common/handler/EventHandler.java @@ -15,7 +15,6 @@ import net.minecraft.inventory.Container; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; @@ -29,7 +28,7 @@ @SuppressWarnings("MethodMayBeStatic") public class EventHandler { /** - *

当玩家对打开控制器界面时更新控制器的信息,以避免某些消息不同步的问题。

+ *

当玩家对某些方块实体右击时更新方块实体,以避免某些消息不同步的问题。

*

Update the controller's information when the player interacts with the controller, * Avoid the problem of some messages being out of sync.

*/ @@ -41,13 +40,12 @@ public void onPlayerRightClickBlock(PlayerInteractEvent.RightClickBlock event) { } TileEntity te = world.getTileEntity(event.getPos()); - if (!(te instanceof SelectiveUpdateTileEntity)) { + if (!(te instanceof SelectiveUpdateTileEntity) || !(te instanceof final TileEntitySynchronized teSync)) { return; } - SPacketUpdateTileEntity packet = ((SelectiveUpdateTileEntity) te).getTrueUpdatePacket(); - if (event.getEntityPlayer() instanceof EntityPlayerMP) { - ((EntityPlayerMP) event.getEntityPlayer()).connection.sendPacket(packet); - } + + // 触发更新,并使其同步至客户端。 + teSync.notifyUpdate(); } /** @@ -74,7 +72,7 @@ public void onPlayerTick(TickEvent.PlayerTickEvent event) { } } - if (!(te instanceof SelectiveUpdateTileEntity) || !(te instanceof TileEntitySynchronized)) { + if (!(te instanceof SelectiveUpdateTileEntity) || !(te instanceof final TileEntitySynchronized teSync)) { return; } @@ -83,12 +81,13 @@ public void onPlayerTick(TickEvent.PlayerTickEvent event) { return; } + teSync.markForUpdateSync(); + ModularMachinery.EXECUTE_MANAGER.addSyncTask(() -> { if (event.player instanceof EntityPlayerMP) { EntityPlayerMP playerMP = (EntityPlayerMP) player; - TileEntitySynchronized teSynchronized = (TileEntitySynchronized) te; - if (teSynchronized.getLastUpdateTick() + 1 >= playerMP.world.getTotalWorldTime()) { - playerMP.connection.sendPacket(((SelectiveUpdateTileEntity) te).getTrueUpdatePacket()); + if (teSync.getLastUpdateTick() + 1 >= playerMP.world.getTotalWorldTime()) { + teSync.notifyUpdate(); } World world = event.player.getEntityWorld(); diff --git a/src/main/java/github/kasuminova/mmce/common/tile/base/MEMachineComponent.java b/src/main/java/github/kasuminova/mmce/common/tile/base/MEMachineComponent.java index 71847aa7..0d508fc6 100644 --- a/src/main/java/github/kasuminova/mmce/common/tile/base/MEMachineComponent.java +++ b/src/main/java/github/kasuminova/mmce/common/tile/base/MEMachineComponent.java @@ -22,7 +22,6 @@ import hellfirepvp.modularmachinery.common.tiles.base.TileColorableMachineComponent; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraftforge.fml.common.FMLCommonHandler; import javax.annotation.Nonnull; @@ -55,16 +54,6 @@ public void writeCustomNBT(final NBTTagCompound compound) { proxy.writeToNBT(compound); } - @Override - public SPacketUpdateTileEntity getUpdatePacket() { - return null; - } - - @Override - public SPacketUpdateTileEntity getTrueUpdatePacket() { - return super.getUpdatePacket(); - } - // AppEng Compat @MENetworkEventSubscribe diff --git a/src/main/java/hellfirepvp/modularmachinery/common/crafting/requirement/RequirementEnergy.java b/src/main/java/hellfirepvp/modularmachinery/common/crafting/requirement/RequirementEnergy.java index dacf6e6c..e4073a05 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/crafting/requirement/RequirementEnergy.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/crafting/requirement/RequirementEnergy.java @@ -156,8 +156,9 @@ private CraftCheck doEnergyIO(final List> components, final RecipeCraftingContext context, final float durationMultiplier) { - float mul = doEnergyIOInternal(components, context, parallelism * durationMultiplier); - if (mul < parallelism) { + float maxMultiplier = parallelism * durationMultiplier; + float mul = doEnergyIOInternal(components, context, maxMultiplier); + if (mul < maxMultiplier) { return switch (actionType) { case INPUT -> CraftCheck.failure("craftcheck.failure.energy.input"); case OUTPUT -> CraftCheck.failure("craftcheck.failure.energy.output.space"); diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemInputBus.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemInputBus.java index 408ec108..30a6f341 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemInputBus.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemInputBus.java @@ -122,7 +122,7 @@ private void inputFromExternal(IItemHandler external) { if (successAtLeastOnce) { incrementSuccessCounter(maxWorkDelay, minWorkDelay); - markForUpdate(); + markNoUpdate(); } else { decrementSuccessCounter(); } diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemOutputBus.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemOutputBus.java index 7ef89faa..ae4a479a 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemOutputBus.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileItemOutputBus.java @@ -125,15 +125,15 @@ private void outputToExternal(IItemHandler external) { if (successAtLeastOnce) { incrementSuccessCounter(maxWorkDelay, minWorkDelay); - super.markForUpdate(); + super.markNoUpdate(); } else { decrementSuccessCounter(); } } @Override - public void markForUpdate() { - super.markForUpdate(); + public void markNoUpdate() { + super.markNoUpdate(); inventoryChanged = true; } diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileUpgradeBus.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileUpgradeBus.java index e5484457..9892586c 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileUpgradeBus.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/TileUpgradeBus.java @@ -18,7 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; @@ -150,16 +149,6 @@ public void writeCustomNBT(final NBTTagCompound compound) { } } - @Override - public SPacketUpdateTileEntity getUpdatePacket() { - return null; - } - - @Override - public SPacketUpdateTileEntity getTrueUpdatePacket() { - return super.getUpdatePacket(); - } - public class UpgradeBusProvider extends MachineComponent { public UpgradeBusProvider() { diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/GTEnergyContainer.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/GTEnergyContainer.java index 406f0ebd..123d788e 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/GTEnergyContainer.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/GTEnergyContainer.java @@ -57,7 +57,7 @@ public long acceptEnergyFromNetwork(EnumFacing side, long voltage, long amperage long acceptingAmperage = Math.min(availableSpace / voltage, maxAmperage); if (acceptingAmperage > 0) { hatch.setCurrentEnergy(hatch.getCurrentEnergy() + ((acceptingAmperage * voltage) * 4L)); - hatch.markForUpdate(); + hatch.markNoUpdate(); return acceptingAmperage; } } diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/SelectiveUpdateTileEntity.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/SelectiveUpdateTileEntity.java index 58799829..7352d924 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/SelectiveUpdateTileEntity.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/SelectiveUpdateTileEntity.java @@ -1,8 +1,11 @@ package hellfirepvp.modularmachinery.common.tiles.base; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; - +/** + *

仅作为识别用的接口实现,一定程度上缓解过大的带宽占用问题。

+ *

如果你想知道更多原因,请查看此链接

+ *

Alleviate excessive bandwidth usage to a certain extent

+ *

If you want to know more about why, please See This Link.

+ */ public interface SelectiveUpdateTileEntity { - SPacketUpdateTileEntity getTrueUpdatePacket(); } diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileColorableMachineComponent.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileColorableMachineComponent.java index ea8d540b..c621470b 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileColorableMachineComponent.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileColorableMachineComponent.java @@ -34,7 +34,7 @@ public void setMachineColor(int newColor) { } this.definedColor = newColor; - this.markForUpdate(); + this.markForUpdateSync(); } @Override diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEnergyHatch.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEnergyHatch.java index 013ddc8d..dde81d94 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEnergyHatch.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEnergyHatch.java @@ -20,7 +20,6 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTPrimitive; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; @@ -136,7 +135,7 @@ public int receiveEnergy(int maxReceive, boolean simulate) { insertable = Math.min(insertable, convertDownEnergy(size.transferLimit)); if (!simulate) { this.energy.set(MiscUtils.clamp(this.energy.get() + insertable, 0, this.size.maxEnergy)); - markForUpdate(); + markNoUpdate(); } return insertable; } @@ -150,7 +149,7 @@ public int extractEnergy(int maxExtract, boolean simulate) { extractable = Math.min(extractable, convertDownEnergy(size.transferLimit)); if (!simulate) { this.energy.set(MiscUtils.clamp(this.energy.get() - extractable, 0, this.size.maxEnergy)); - markForUpdate(); + markNoUpdate(); } return extractable; } @@ -194,16 +193,6 @@ public T getCapability(@Nonnull Capability capability, @Nullable EnumFaci return super.getCapability(capability, facing); } - @Override - public SPacketUpdateTileEntity getUpdatePacket() { - return null; - } - - @Override - public SPacketUpdateTileEntity getTrueUpdatePacket() { - return super.getUpdatePacket(); - } - @Override public void readCustomNBT(NBTTagCompound compound) { super.readCustomNBT(compound); diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEntitySynchronized.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEntitySynchronized.java index a05173dc..996fdaec 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEntitySynchronized.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileEntitySynchronized.java @@ -26,6 +26,8 @@ */ public class TileEntitySynchronized extends TileEntity { private boolean inUpdateTask = false; + private boolean inMarkTask = false; + private long lastUpdateTick = 0; public final void readFromNBT(NBTTagCompound compound) { @@ -52,6 +54,7 @@ public void writeCustomNBT(NBTTagCompound compound) { public void writeNetNBT(NBTTagCompound compound) { } + @Nonnull @Override public SPacketUpdateTileEntity getUpdatePacket() { NBTTagCompound compound = new NBTTagCompound(); @@ -76,13 +79,30 @@ public final void onDataPacket(@Nonnull NetworkManager manager, @Nonnull SPacket readNetNBT(packet.getNbtCompound()); } + public void markNoUpdate() { + markDirty(); + inMarkTask = false; + lastUpdateTick = getWorld().getTotalWorldTime(); + } + public void markForUpdate() { + markNoUpdate(); + notifyUpdate(); + } + + public void notifyUpdate() { IBlockState state = world.getBlockState(pos); - world.notifyBlockUpdate(pos, state, state, 3); - markDirty(); + world.notifyBlockUpdate(pos, state, state, 3); inUpdateTask = false; - lastUpdateTick = getWorld().getTotalWorldTime(); + } + + public void markNoUpdateSync() { + if (inMarkTask) { + return; + } + ModularMachinery.EXECUTE_MANAGER.addTEMarkNoUpdateTask(this); + inMarkTask = true; } /** @@ -90,11 +110,16 @@ public void markForUpdate() { *

*** 只能保证 MMCE 自身对世界的线程安全 ***

*/ public void markForUpdateSync() { + if (this instanceof SelectiveUpdateTileEntity) { + markNoUpdateSync(); + return; + } if (inUpdateTask) { return; } ModularMachinery.EXECUTE_MANAGER.addTEUpdateTask(this); inUpdateTask = true; + inMarkTask = true; } public boolean isInUpdateTask() { diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileFluidTank.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileFluidTank.java index 0e58268f..36d8909b 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileFluidTank.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileFluidTank.java @@ -19,7 +19,6 @@ import mekanism.api.gas.IGasHandler; import mekanism.api.gas.ITubeConnection; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.MathHelper; import net.minecraftforge.common.capabilities.Capability; @@ -99,16 +98,6 @@ public T getCapability(Capability capability, @Nullable EnumFacing facing return super.getCapability(capability, facing); } - @Override - public SPacketUpdateTileEntity getUpdatePacket() { - return null; - } - - @Override - public SPacketUpdateTileEntity getTrueUpdatePacket() { - return super.getUpdatePacket(); - } - @Override public void readCustomNBT(NBTTagCompound compound) { super.readCustomNBT(compound); diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileItemBus.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileItemBus.java index 032619a6..d37fc3b5 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileItemBus.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileItemBus.java @@ -10,7 +10,6 @@ import hellfirepvp.modularmachinery.common.block.prop.ItemBusSize; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.util.math.MathHelper; /** @@ -67,16 +66,6 @@ public ItemBusSize getSize() { return size; } - @Override - public SPacketUpdateTileEntity getUpdatePacket() { - return null; - } - - @Override - public SPacketUpdateTileEntity getTrueUpdatePacket() { - return super.getUpdatePacket(); - } - @Override public void readCustomNBT(NBTTagCompound compound) { super.readCustomNBT(compound); diff --git a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileMultiblockMachineController.java b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileMultiblockMachineController.java index 082f8ffe..d5f4aa27 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileMultiblockMachineController.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/tiles/base/TileMultiblockMachineController.java @@ -43,7 +43,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; @@ -1022,22 +1021,6 @@ protected void readMachineNBT(NBTTagCompound compound) { } } - /** - *

一定程度上缓解过大的带宽占用问题。

- *

如果你想知道更多原因,请查看此链接

- *

Alleviate excessive bandwidth usage to a certain extent

- *

If you want to know more about why, please See This Link.

- */ - @Override - public SPacketUpdateTileEntity getUpdatePacket() { - return null; - } - - @Override - public SPacketUpdateTileEntity getTrueUpdatePacket() { - return super.getUpdatePacket(); - } - @Nullable @Override @SuppressWarnings("unchecked") diff --git a/src/main/java/hellfirepvp/modularmachinery/common/util/HybridFluidUtils.java b/src/main/java/hellfirepvp/modularmachinery/common/util/HybridFluidUtils.java index e8cde772..236bfa9f 100644 --- a/src/main/java/hellfirepvp/modularmachinery/common/util/HybridFluidUtils.java +++ b/src/main/java/hellfirepvp/modularmachinery/common/util/HybridFluidUtils.java @@ -144,6 +144,7 @@ public static List castFluidHandlerComponents(final List castGasHandlerComponents(final List> components) { List list = new ArrayList<>(); for (ProcessingComponent component : components) { @@ -171,6 +172,7 @@ public static List> copyFluidHandlerComponents(final List @Nonnull @SuppressWarnings("unchecked") + @Optional.Method(modid = "mekanism") public static List> copyGasHandlerComponents(final List> components) { List> list = new ArrayList<>(); for (ProcessingComponent component : components) {