Move energy item capacity to a constant
This commit is contained in:
@@ -28,7 +28,7 @@ public class CapabilityProviderEnergy implements ICapabilityProvider {
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
|
||||
if (capability == CapabilityEnergy.ENERGY) {
|
||||
return CapabilityEnergy.ENERGY.cast(new ItemEnergyForge(stack, 3200));
|
||||
return CapabilityEnergy.ENERGY.cast(new ItemEnergyForge(stack, ItemEnergyItem.CAPACITY));
|
||||
}
|
||||
|
||||
if (IntegrationTesla.isLoaded()) {
|
||||
|
||||
@@ -23,7 +23,7 @@ public abstract class ItemBlockEnergyItem extends ItemBlockBase {
|
||||
public ItemBlockEnergyItem(Block block, Direction direction) {
|
||||
super(block, direction, true);
|
||||
|
||||
setMaxDamage(3200);
|
||||
setMaxDamage(ItemEnergyItem.CAPACITY);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,15 @@ import net.minecraftforge.energy.IEnergyStorage;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ItemEnergyItem extends ItemBase {
|
||||
public static final int CAPACITY = 3200;
|
||||
|
||||
public static final int TYPE_NORMAL = 0;
|
||||
public static final int TYPE_CREATIVE = 1;
|
||||
|
||||
public ItemEnergyItem(String name) {
|
||||
super(name);
|
||||
|
||||
setMaxDamage(3200);
|
||||
setMaxDamage(CAPACITY);
|
||||
setMaxStackSize(1);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.raoulvdberge.refinedstorage.inventory.ItemHandlerBase;
|
||||
import com.raoulvdberge.refinedstorage.inventory.ItemHandlerFilter;
|
||||
import com.raoulvdberge.refinedstorage.inventory.ItemHandlerListenerTile;
|
||||
import com.raoulvdberge.refinedstorage.item.ItemBlockPortableGrid;
|
||||
import com.raoulvdberge.refinedstorage.item.ItemEnergyItem;
|
||||
import com.raoulvdberge.refinedstorage.item.ItemWirelessGrid;
|
||||
import com.raoulvdberge.refinedstorage.item.filter.Filter;
|
||||
import com.raoulvdberge.refinedstorage.item.filter.FilterTab;
|
||||
@@ -146,7 +147,7 @@ public class TilePortableGrid extends TileBase implements IGrid, IPortableGrid,
|
||||
|
||||
private static final String NBT_ENERGY = "Energy";
|
||||
|
||||
private EnergyForge energyStorage = new EnergyForge(3200);
|
||||
private EnergyForge energyStorage = new EnergyForge(ItemEnergyItem.CAPACITY);
|
||||
private PortableGridType type;
|
||||
|
||||
private RedstoneMode redstoneMode = RedstoneMode.IGNORE;
|
||||
|
||||
Reference in New Issue
Block a user