mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
28 lines
567 B
Java
28 lines
567 B
Java
package com.hbm.tileentity.network;
|
|
|
|
import api.hbm.fluid.PipeNet;
|
|
|
|
public class TileEntityFluidValve extends TileEntityPipeBaseNT {
|
|
|
|
@Override
|
|
public boolean canUpdate() {
|
|
return this.worldObj != null && this.getBlockMetadata() == 1 && super.canUpdate();
|
|
}
|
|
|
|
public void updateState() {
|
|
|
|
if(this.getBlockMetadata() == 0 && this.network != null) {
|
|
this.network.destroy();
|
|
this.network = null;
|
|
}
|
|
|
|
if(this.getBlockMetadata() == 1) {
|
|
this.connect();
|
|
|
|
if(this.getPipeNet(type) == null) {
|
|
new PipeNet(type).joinLink(this);
|
|
}
|
|
}
|
|
}
|
|
}
|