fixed infinite stress

This commit is contained in:
khj xiaogu 2021-12-24 15:53:57 +08:00
parent d87270001e
commit c10e3a34e6
No known key found for this signature in database
GPG key ID: DEA172814EAFF426

View file

@ -25,10 +25,6 @@ public abstract class MixinFlywheel extends GeneratingKineticTileEntity{
@Inject(at=@At("HEAD"),method="tick")
public void sp$tick(CallbackInfo cbi) {
Direction at=FlywheelBlock.getConnection(getBlockState());
KineticNetwork nw=this.getOrCreateNetwork();
if(nw!=null) {
nw.updateCapacityFor(this,this.capacity);
}
if(at!=null) {
if(!(this.getWorld().getBlockState(this.getBlockPos().relative(at,2)).getBlock() instanceof EngineBlock)) {
FlywheelBlock.setConnection(getWorld(),getBlockPos(),getBlockState(),null);