Fixes condenser dupe bug
This commit is contained in:
@@ -1,5 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.me.storage;
|
package appeng.me.storage;
|
||||||
|
|
||||||
|
|
||||||
import appeng.api.config.AccessRestriction;
|
import appeng.api.config.AccessRestriction;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
@@ -9,18 +28,23 @@ import appeng.api.storage.data.IAEFluidStack;
|
|||||||
import appeng.api.storage.data.IItemList;
|
import appeng.api.storage.data.IItemList;
|
||||||
import appeng.tile.misc.TileCondenser;
|
import appeng.tile.misc.TileCondenser;
|
||||||
|
|
||||||
|
|
||||||
public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
||||||
{
|
{
|
||||||
|
|
||||||
final TileCondenser target;
|
final TileCondenser target;
|
||||||
|
|
||||||
public VoidFluidInventory(TileCondenser te) {
|
public VoidFluidInventory( TileCondenser te )
|
||||||
|
{
|
||||||
target = te;
|
target = te;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IAEFluidStack injectItems(IAEFluidStack input, Actionable mode, BaseActionSource src)
|
public IAEFluidStack injectItems( IAEFluidStack input, Actionable mode, BaseActionSource src )
|
||||||
{
|
{
|
||||||
|
if ( mode == Actionable.SIMULATE )
|
||||||
|
return null;
|
||||||
|
|
||||||
if ( input != null )
|
if ( input != null )
|
||||||
target.addPower( input.getStackSize() / 1000.0 );
|
target.addPower( input.getStackSize() / 1000.0 );
|
||||||
return null;
|
return null;
|
||||||
@@ -33,13 +57,13 @@ public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IAEFluidStack extractItems(IAEFluidStack request, Actionable mode, BaseActionSource src)
|
public IAEFluidStack extractItems( IAEFluidStack request, Actionable mode, BaseActionSource src )
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemList<IAEFluidStack> getAvailableItems(IItemList out)
|
public IItemList<IAEFluidStack> getAvailableItems( IItemList out )
|
||||||
{
|
{
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@@ -51,13 +75,13 @@ public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPrioritized(IAEFluidStack input)
|
public boolean isPrioritized( IAEFluidStack input )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canAccept(IAEFluidStack input)
|
public boolean canAccept( IAEFluidStack input )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -75,7 +99,7 @@ public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean validForPass(int i)
|
public boolean validForPass( int i )
|
||||||
{
|
{
|
||||||
return i == 2;
|
return i == 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.me.storage;
|
package appeng.me.storage;
|
||||||
|
|
||||||
|
|
||||||
import appeng.api.config.AccessRestriction;
|
import appeng.api.config.AccessRestriction;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
@@ -9,18 +28,23 @@ import appeng.api.storage.data.IAEItemStack;
|
|||||||
import appeng.api.storage.data.IItemList;
|
import appeng.api.storage.data.IItemList;
|
||||||
import appeng.tile.misc.TileCondenser;
|
import appeng.tile.misc.TileCondenser;
|
||||||
|
|
||||||
|
|
||||||
public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
||||||
{
|
{
|
||||||
|
|
||||||
final TileCondenser target;
|
final TileCondenser target;
|
||||||
|
|
||||||
public VoidItemInventory(TileCondenser te) {
|
public VoidItemInventory( TileCondenser te )
|
||||||
|
{
|
||||||
target = te;
|
target = te;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IAEItemStack injectItems(IAEItemStack input, Actionable mode, BaseActionSource src)
|
public IAEItemStack injectItems( IAEItemStack input, Actionable mode, BaseActionSource src )
|
||||||
{
|
{
|
||||||
|
if ( mode == Actionable.SIMULATE )
|
||||||
|
return null;
|
||||||
|
|
||||||
if ( input != null )
|
if ( input != null )
|
||||||
target.addPower( input.getStackSize() );
|
target.addPower( input.getStackSize() );
|
||||||
return null;
|
return null;
|
||||||
@@ -33,13 +57,13 @@ public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
public IAEItemStack extractItems( IAEItemStack request, Actionable mode, BaseActionSource src )
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
public IItemList<IAEItemStack> getAvailableItems( IItemList out )
|
||||||
{
|
{
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@@ -51,13 +75,13 @@ public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPrioritized(IAEItemStack input)
|
public boolean isPrioritized( IAEItemStack input )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canAccept(IAEItemStack input)
|
public boolean canAccept( IAEItemStack input )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -75,7 +99,7 @@ public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean validForPass(int i)
|
public boolean validForPass( int i )
|
||||||
{
|
{
|
||||||
return i == 2;
|
return i == 2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user