Don't interact with energy net on client side (#111)

This commit is contained in:
attempt0 authored and GitHub committed 2026-08-09 18:17:36 +02:00
1 parent 0b7ae46d2e
commit 0d6d7ff9aa
1 file changed
+5 -2
@@ -5,6 +5,7 @@ import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
@@ -152,7 +153,8 @@ public class ComponentPowerReceptor extends MachineComponent
}
private void addToEnergyNet() {
if (getMachine().getWorld() == null) {
World world = getMachine().getWorld();
if (world == null || world.isRemote) {
return;
}
if (Mods.ic2.active()) {
@@ -161,7 +163,8 @@ public class ComponentPowerReceptor extends MachineComponent
}
private void removeFromEnergyNet() {
if (getMachine().getWorld() == null) {
World world = getMachine().getWorld();
if (world == null || world.isRemote) {
return;
}
if (Mods.ic2.active()) {