Boblet c16818c15d i can hear satan's voice, he's telling me to invest in apple.
what does this mean? why does he want me to buy apples??
2024-04-11 16:08:04 +02:00

27 lines
737 B
Java

package com.hbm.tileentity.network;
import api.hbm.energymk2.Nodespace;
public class TileEntityCableSwitch extends TileEntityCableBaseNT {
@Override
public boolean canUpdate() {
return this.worldObj != null && this.getBlockMetadata() == 1 && super.canUpdate();
}
public void updateState() {
//if the meta is 0 (OFF) and there is a net present, destroy and de-reference it.
//that should be all, since the state being 0 also prevents the TE from updating and joining the new net.
if(this.getBlockMetadata() == 0 && this.node != null) {
Nodespace.destroyNode(worldObj, xCoord, yCoord, zCoord);
this.node = null;
}
}
@Override
public boolean shouldCreateNode() {
return this.getBlockMetadata() == 1;
}
}