try to fix energy issues again
fix issue with voiding p2p parts when shift-right clicking with a memory card
This commit is contained in:
+4
-5
@@ -191,6 +191,10 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
@Override
|
||||
public void onUpdateTick()
|
||||
{
|
||||
if( localStorage.stored < MAX_BUFFER_STORAGE - 0.001 )
|
||||
{
|
||||
this.myGrid.postEvent( new MENetworkPowerStorage( localStorage, PowerEventType.REQUEST_POWER ) );
|
||||
}
|
||||
if( !this.interests.isEmpty() )
|
||||
{
|
||||
final double oldPower = this.lastStoredPower;
|
||||
@@ -833,11 +837,6 @@ public class EnergyGridCache implements IEnergyGrid
|
||||
{
|
||||
this.stored -= amount;
|
||||
|
||||
if( this.stored < MAX_BUFFER_STORAGE - 0.001 )
|
||||
{
|
||||
EnergyGridCache.this.myGrid.postEvent( new MENetworkPowerStorage( this, PowerEventType.REQUEST_POWER ) );
|
||||
}
|
||||
|
||||
if( this.stored < 0.01 )
|
||||
{
|
||||
EnergyGridCache.this.ticksSinceHasPowerChange = 0;
|
||||
|
||||
@@ -351,7 +351,7 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
|
||||
{
|
||||
newFreq = this.getProxy().getP2P().newFrequency();
|
||||
|
||||
final ItemStack newType = new ItemStack( data );
|
||||
final ItemStack newType = this.getHost().getPart( this.getSide() ).getItemStack( PartItemStack.WRENCH );
|
||||
|
||||
this.getHost().removePart( this.getSide(), false );
|
||||
final AEPartLocation dir = this.getHost().addPart( newType, this.getSide(), player, hand );
|
||||
|
||||
Reference in New Issue
Block a user