Use the declared power drain for p2p tunnels (#4567)
This commit is contained in:
@@ -45,6 +45,11 @@ public class FEP2PTunnelPart extends P2PTunnelPart<FEP2PTunnelPart> {
|
||||
super(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getPowerDrainPerTick() {
|
||||
return 2.0f;
|
||||
}
|
||||
|
||||
@PartModels
|
||||
public static List<IPartModel> getModels() {
|
||||
return MODELS.getModels();
|
||||
|
||||
@@ -54,7 +54,8 @@ public class FluidP2PTunnelPart extends P2PTunnelPart<FluidP2PTunnelPart> {
|
||||
return MODELS.getModels();
|
||||
}
|
||||
|
||||
public float getPowerDrainPerTick() {
|
||||
@Override
|
||||
protected float getPowerDrainPerTick() {
|
||||
return 2.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,11 @@ public class ItemP2PTunnelPart extends P2PTunnelPart<ItemP2PTunnelPart> implemen
|
||||
super(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getPowerDrainPerTick() {
|
||||
return POWER_DRAIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged(IBlockReader w, BlockPos pos, BlockPos neighbor) {
|
||||
this.cachedInv = null;
|
||||
@@ -235,10 +240,6 @@ public class ItemP2PTunnelPart extends P2PTunnelPart<ItemP2PTunnelPart> implemen
|
||||
return this.getDestination().getSlotLimit(slot);
|
||||
}
|
||||
|
||||
public float getPowerDrainPerTick() {
|
||||
return POWER_DRAIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPartModel getStaticModels() {
|
||||
return MODELS.getModel(this.isPowered(), this.isActive());
|
||||
|
||||
@@ -56,6 +56,10 @@ public class LightP2PTunnelPart extends P2PTunnelPart<LightP2PTunnelPart> implem
|
||||
super(is);
|
||||
}
|
||||
|
||||
protected float getPowerDrainPerTick() {
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void chanRender(final MENetworkChannelsChanged c) {
|
||||
this.onTunnelNetworkChange();
|
||||
@@ -186,10 +190,6 @@ public class LightP2PTunnelPart extends P2PTunnelPart<LightP2PTunnelPart> implem
|
||||
return this.doWork() ? TickRateModulation.URGENT : TickRateModulation.SLOWER;
|
||||
}
|
||||
|
||||
public float getPowerDrainPerTick() {
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPartModel getStaticModels() {
|
||||
return MODELS.getModel(this.isPowered(), this.isActive());
|
||||
|
||||
@@ -67,6 +67,11 @@ public class MEP2PTunnelPart extends P2PTunnelPart<MEP2PTunnelPart> implements I
|
||||
this.outerProxy.setFlags(GridFlags.DENSE_CAPACITY, GridFlags.CANNOT_CARRY_COMPRESSED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getPowerDrainPerTick() {
|
||||
return 2.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(final CompoundNBT extra) {
|
||||
super.readFromNBT(extra);
|
||||
|
||||
@@ -61,6 +61,11 @@ public abstract class P2PTunnelPart<T extends P2PTunnelPart> extends BasicStateP
|
||||
|
||||
public P2PTunnelPart(final ItemStack is) {
|
||||
super(is);
|
||||
this.getProxy().setIdlePowerUsage(this.getPowerDrainPerTick());
|
||||
}
|
||||
|
||||
protected float getPowerDrainPerTick() {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
public TunnelCollection<T> getCollection(final Collection<P2PTunnelPart> collection,
|
||||
|
||||
@@ -55,6 +55,11 @@ public class RedstoneP2PTunnelPart extends P2PTunnelPart<RedstoneP2PTunnelPart>
|
||||
super(is);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getPowerDrainPerTick() {
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void changeStateA(final MENetworkBootingStatusChange bs) {
|
||||
this.setNetworkReady();
|
||||
@@ -123,10 +128,6 @@ public class RedstoneP2PTunnelPart extends P2PTunnelPart<RedstoneP2PTunnelPart>
|
||||
this.setNetworkReady();
|
||||
}
|
||||
|
||||
public float getPowerDrainPerTick() {
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged(IBlockReader w, BlockPos pos, BlockPos neighbor) {
|
||||
if (!this.isOutput()) {
|
||||
|
||||
Reference in New Issue
Block a user