mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 18:44:42 +00:00
add 5 type fluid cell
This commit is contained in:
1 parent
96c7032523
commit
4f54c9bb28
21 files changed
+380
-152
No files matched your search
@@ -6,22 +6,28 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.IncludeExclude;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.contents.CellConfig;
|
||||
import appeng.items.contents.CellUpgrades;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
|
||||
@@ -30,74 +36,43 @@ import com.glodblock.github.common.storage.CellType;
|
||||
import com.glodblock.github.common.storage.IFluidCellInventory;
|
||||
import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
|
||||
import com.glodblock.github.common.storage.IStorageFluidCell;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.ModAndClassUtil;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public abstract class FCBaseItemCell extends AEBaseItem implements IStorageFluidCell {
|
||||
|
||||
protected final CellType component;
|
||||
protected final long totalBytes;
|
||||
protected final int perType;
|
||||
protected final double idleDrain;
|
||||
protected CellType component;
|
||||
protected long totalBytes;
|
||||
protected int perType;
|
||||
protected double idleDrain;
|
||||
protected int maxType = 1;
|
||||
private final ReadableNumberConverter format = ReadableNumberConverter.INSTANCE;
|
||||
|
||||
@SuppressWarnings("Guava")
|
||||
public FCBaseItemCell(long bytes, int perType, double drain) {
|
||||
public FCBaseItemCell(long bytes, int perType, int totalType, double drain) {
|
||||
super(Optional.of(bytes / 1024 + "k"));
|
||||
this.setFeature(EnumSet.of(AEFeature.StorageCells));
|
||||
this.setMaxStackSize(1);
|
||||
this.totalBytes = bytes;
|
||||
this.perType = perType;
|
||||
this.idleDrain = drain;
|
||||
this.maxType = totalType;
|
||||
this.component = null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("Guava")
|
||||
public FCBaseItemCell(final CellType whichCell, final long kilobytes) {
|
||||
super(Optional.of(kilobytes + "k"));
|
||||
this.setFeature(EnumSet.of(AEFeature.StorageCells));
|
||||
this.setMaxStackSize(1);
|
||||
this.totalBytes = kilobytes * 1024;
|
||||
this.component = whichCell;
|
||||
@SuppressWarnings("all")
|
||||
public FCBaseItemCell(final Optional<String> subName) {
|
||||
super(subName);
|
||||
}
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart:
|
||||
this.idleDrain = 0.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell4kPart:
|
||||
this.idleDrain = 1.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell16kPart:
|
||||
this.idleDrain = 1.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell64kPart:
|
||||
this.idleDrain = 2.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell256kPart:
|
||||
this.idleDrain = 2.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell1024kPart:
|
||||
this.idleDrain = 3.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell4096kPart:
|
||||
this.idleDrain = 3.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell16384kPart:
|
||||
this.idleDrain = 4.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
default:
|
||||
this.idleDrain = 0.0;
|
||||
this.perType = 8;
|
||||
}
|
||||
public ItemStack getHousing() {
|
||||
return ItemAndBlockHolder.CELL_HOUSING.stack();
|
||||
}
|
||||
|
||||
public ItemStack getComponent() {
|
||||
return component.stack(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -206,7 +181,7 @@ public abstract class FCBaseItemCell extends AEBaseItem implements IStorageFluid
|
||||
|
||||
@Override
|
||||
public int getTotalTypes(final ItemStack cellItem) {
|
||||
return 1;
|
||||
return this.maxType;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -239,6 +214,52 @@ public abstract class FCBaseItemCell extends AEBaseItem implements IStorageFluid
|
||||
Platform.openNbtData(is).setString("FuzzyMode", fzMode.name());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected boolean disassembleDrive(final ItemStack stack, final World world, final EntityPlayer player) {
|
||||
if (player.isSneaking()) {
|
||||
if (Platform.isClient()) {
|
||||
return false;
|
||||
}
|
||||
final InventoryPlayer playerInventory = player.inventory;
|
||||
final IMEInventoryHandler<?> inv = AEApi.instance().registries().cell()
|
||||
.getCellInventory(stack, null, StorageChannel.FLUIDS);
|
||||
if (inv != null && playerInventory.getCurrentItem() == stack) {
|
||||
final InventoryAdaptor ia = InventoryAdaptor.getAdaptor(player, ForgeDirection.UNKNOWN);
|
||||
final IItemList<IAEFluidStack> list = inv.getAvailableItems(StorageChannel.FLUIDS.createList());
|
||||
if (list.isEmpty() && ia != null) {
|
||||
playerInventory.setInventorySlotContents(playerInventory.currentItem, null);
|
||||
|
||||
// drop core
|
||||
final ItemStack extraB = ia.addItems(this.component.stack(1));
|
||||
if (extraB != null) {
|
||||
player.dropPlayerItemWithRandomChoice(extraB, false);
|
||||
}
|
||||
|
||||
// drop upgrades
|
||||
final IInventory upgradesInventory = this.getUpgradesInventory(stack);
|
||||
for (int upgradeIndex = 0; upgradeIndex < upgradesInventory.getSizeInventory(); upgradeIndex++) {
|
||||
final ItemStack upgradeStack = upgradesInventory.getStackInSlot(upgradeIndex);
|
||||
final ItemStack leftStack = ia.addItems(upgradeStack);
|
||||
if (leftStack != null && upgradeStack.getItem() instanceof IUpgradeModule) {
|
||||
player.dropPlayerItemWithRandomChoice(upgradeStack, false);
|
||||
}
|
||||
}
|
||||
|
||||
// drop empty storage cell case
|
||||
final ItemStack extraA = ia.addItems(this.getHousing());
|
||||
if (extraA != null) {
|
||||
player.dropPlayerItemWithRandomChoice(this.getHousing(), false);
|
||||
}
|
||||
if (player.inventoryContainer != null) {
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public ItemStack stack(int size) {
|
||||
return new ItemStack(this, size);
|
||||
}
|
||||
|
||||
@@ -1,30 +1,20 @@
|
||||
package com.glodblock.github.common.item;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.exceptions.MissingDefinition;
|
||||
import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.Config;
|
||||
@@ -32,7 +22,9 @@ import com.glodblock.github.common.storage.CellType;
|
||||
import com.glodblock.github.common.storage.IStorageFluidCell;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.loader.IRegister;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -42,18 +34,60 @@ public class ItemBasicFluidStorageCell extends FCBaseItemCell
|
||||
implements IStorageFluidCell, IRegister<ItemBasicFluidStorageCell> {
|
||||
|
||||
private static final HashMap<Integer, IIcon> icon = new HashMap<>();
|
||||
private final int housingValue;
|
||||
|
||||
public ItemBasicFluidStorageCell(final CellType whichCell, final long kilobytes) {
|
||||
super(whichCell, kilobytes);
|
||||
@SuppressWarnings("Guava")
|
||||
public ItemBasicFluidStorageCell(final CellType whichCell, final int housingValue, final long kilobytes) {
|
||||
super(Optional.of(kilobytes + "k"));
|
||||
this.setFeature(EnumSet.of(AEFeature.StorageCells));
|
||||
this.setMaxStackSize(1);
|
||||
this.totalBytes = kilobytes * 1024;
|
||||
this.component = whichCell;
|
||||
this.housingValue = housingValue;
|
||||
setUnlocalizedName(NameConst.ITEM_FLUID_STORAGE + kilobytes);
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart:
|
||||
this.idleDrain = 0.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell4kPart:
|
||||
this.idleDrain = 1.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell16kPart:
|
||||
this.idleDrain = 1.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell64kPart:
|
||||
this.idleDrain = 2.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell256kPart:
|
||||
this.idleDrain = 2.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell1024kPart:
|
||||
this.idleDrain = 3.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell4096kPart:
|
||||
this.idleDrain = 3.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell16384kPart:
|
||||
this.idleDrain = 4.0;
|
||||
this.perType = 8;
|
||||
break;
|
||||
default:
|
||||
this.idleDrain = 0.0;
|
||||
this.perType = 8;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getComponent() {
|
||||
return component.stack(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getHousing() {
|
||||
return component.getHousing(1);
|
||||
return ItemAndBlockHolder.CELL_HOUSING.stack(1, this.housingValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -86,52 +120,6 @@ public class ItemBasicFluidStorageCell extends FCBaseItemCell
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean disassembleDrive(final ItemStack stack, final World world, final EntityPlayer player) {
|
||||
if (player.isSneaking()) {
|
||||
if (Platform.isClient()) {
|
||||
return false;
|
||||
}
|
||||
final InventoryPlayer playerInventory = player.inventory;
|
||||
final IMEInventoryHandler<?> inv = AEApi.instance().registries().cell()
|
||||
.getCellInventory(stack, null, StorageChannel.FLUIDS);
|
||||
if (inv != null && playerInventory.getCurrentItem() == stack) {
|
||||
final InventoryAdaptor ia = InventoryAdaptor.getAdaptor(player, ForgeDirection.UNKNOWN);
|
||||
final IItemList<IAEFluidStack> list = inv.getAvailableItems(StorageChannel.FLUIDS.createList());
|
||||
if (list.isEmpty() && ia != null) {
|
||||
playerInventory.setInventorySlotContents(playerInventory.currentItem, null);
|
||||
|
||||
// drop core
|
||||
final ItemStack extraB = ia.addItems(this.component.stack(1));
|
||||
if (extraB != null) {
|
||||
player.dropPlayerItemWithRandomChoice(extraB, false);
|
||||
}
|
||||
|
||||
// drop upgrades
|
||||
final IInventory upgradesInventory = this.getUpgradesInventory(stack);
|
||||
for (int upgradeIndex = 0; upgradeIndex < upgradesInventory.getSizeInventory(); upgradeIndex++) {
|
||||
final ItemStack upgradeStack = upgradesInventory.getStackInSlot(upgradeIndex);
|
||||
final ItemStack leftStack = ia.addItems(upgradeStack);
|
||||
if (leftStack != null && upgradeStack.getItem() instanceof IUpgradeModule) {
|
||||
player.dropPlayerItemWithRandomChoice(upgradeStack, false);
|
||||
}
|
||||
}
|
||||
|
||||
// drop empty storage cell case
|
||||
final ItemStack extraA = ia.addItems(this.component.getHousing(1));
|
||||
if (extraA != null) {
|
||||
player.dropPlayerItemWithRandomChoice(this.component.getHousing(1), false);
|
||||
}
|
||||
if (player.inventoryContainer != null) {
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(final ItemStack stack, final EntityPlayer player, final World world, final int x,
|
||||
final int y, final int z, final int side, final float hitX, final float hitY, final float hitZ) {
|
||||
|
||||
@@ -16,8 +16,8 @@ public class ItemFluidExtremeStorageCell extends FCBaseItemCell
|
||||
|
||||
private final String name;
|
||||
|
||||
public ItemFluidExtremeStorageCell(String name, long bytes, int perType, double drain) {
|
||||
super(bytes, perType, drain);
|
||||
public ItemFluidExtremeStorageCell(String name, long bytes, int perType, int totalTypes, double drain) {
|
||||
super(bytes, perType, totalTypes, drain);
|
||||
setUnlocalizedName(name);
|
||||
this.name = name;
|
||||
setTextureName(FluidCraft.resource(name).toString());
|
||||
|
||||
@@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemFluidStorageHousing extends FCBaseItem {
|
||||
|
||||
public static final int types = 2;
|
||||
public static final int types = 4;
|
||||
private static final HashMap<Integer, IIcon> icon = new HashMap<>();
|
||||
|
||||
public ItemFluidStorageHousing() {
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.glodblock.github.common.item;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
|
||||
import appeng.api.exceptions.MissingDefinition;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.features.AEFeature;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.Config;
|
||||
import com.glodblock.github.common.storage.CellType;
|
||||
import com.glodblock.github.common.storage.IStorageFluidCell;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.loader.IRegister;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMultiFluidStorageCell extends FCBaseItemCell
|
||||
implements IStorageFluidCell, IRegister<ItemMultiFluidStorageCell> {
|
||||
|
||||
private static final HashMap<Integer, IIcon> icon = new HashMap<>();
|
||||
private final int housingValue;
|
||||
|
||||
@SuppressWarnings("Guava")
|
||||
public ItemMultiFluidStorageCell(final CellType whichCell, final int housingValue, final long kilobytes) {
|
||||
super(Optional.of(kilobytes + "k"));
|
||||
this.setFeature(EnumSet.of(AEFeature.StorageCells));
|
||||
this.setMaxStackSize(1);
|
||||
this.totalBytes = kilobytes * 1024;
|
||||
this.component = whichCell;
|
||||
this.housingValue = housingValue;
|
||||
this.maxType = 5;
|
||||
setUnlocalizedName(NameConst.ITEM_MULTI_FLUID_STORAGE + kilobytes);
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart:
|
||||
this.idleDrain = 0.5;
|
||||
this.perType = 8;
|
||||
break;
|
||||
case Cell4kPart:
|
||||
this.idleDrain = 1.0;
|
||||
this.perType = 32;
|
||||
break;
|
||||
case Cell16kPart:
|
||||
this.idleDrain = 1.5;
|
||||
this.perType = 128;
|
||||
break;
|
||||
case Cell64kPart:
|
||||
this.idleDrain = 2.0;
|
||||
this.perType = 512;
|
||||
break;
|
||||
case Cell256kPart:
|
||||
this.idleDrain = 2.5;
|
||||
this.perType = 2048;
|
||||
break;
|
||||
case Cell1024kPart:
|
||||
this.idleDrain = 3.0;
|
||||
this.perType = 8192;
|
||||
break;
|
||||
case Cell4096kPart:
|
||||
this.idleDrain = 3.5;
|
||||
this.perType = 32768;
|
||||
break;
|
||||
case Cell16384kPart:
|
||||
this.idleDrain = 4.0;
|
||||
this.perType = 131072;
|
||||
break;
|
||||
default:
|
||||
this.idleDrain = 0.0;
|
||||
this.perType = 8;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getHousing() {
|
||||
return ItemAndBlockHolder.CELL_HOUSING.stack(1, this.housingValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return StatCollector.translateToLocalFormatted(
|
||||
"item.multi_fluid_storage." + this.totalBytes / 1024 + ".name",
|
||||
CellType.getTypeColor(this.component),
|
||||
EnumChatFormatting.RESET);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon.put(
|
||||
(int) (this.totalBytes / 1024),
|
||||
iconRegister.registerIcon(
|
||||
NameConst.RES_KEY + NameConst.ITEM_MULTI_FLUID_STORAGE + "." + this.totalBytes / 1024));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int id = (int) (this.totalBytes / 1024);
|
||||
return icon.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer player) {
|
||||
this.disassembleDrive(stack, world, player);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(final ItemStack stack, final EntityPlayer player, final World world, final int x,
|
||||
final int y, final int z, final int side, final float hitX, final float hitY, final float hitZ) {
|
||||
if (ForgeEventFactory.onItemUseStart(player, stack, 1) <= 0) return true;
|
||||
return this.disassembleDrive(stack, world, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem(final ItemStack stack) {
|
||||
return AEConfig.instance.isFeatureEnabled(AEFeature.EnableDisassemblyCrafting);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(final ItemStack itemStack) {
|
||||
if (this.getHousing() != null) {
|
||||
return this.getHousing();
|
||||
}
|
||||
throw new MissingDefinition("Tried to use empty storage cells while basic storage cells are defined.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemMultiFluidStorageCell register() {
|
||||
if (!Config.fluidCells) return null;
|
||||
GameRegistry.registerItem(this, NameConst.ITEM_MULTI_FLUID_STORAGE + this.totalBytes / 1024, FluidCraft.MODID);
|
||||
setCreativeTab(FluidCraftingTabs.INSTANCE);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,6 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
|
||||
public enum CellType {
|
||||
|
||||
Cell1kPart(0, AEFeature.StorageCells),
|
||||
@@ -24,7 +22,6 @@ public enum CellType {
|
||||
private final EnumSet<AEFeature> features;
|
||||
private int damageValue;
|
||||
private Item itemInstance;
|
||||
private int housingValue;
|
||||
|
||||
CellType(final int metaValue, final AEFeature part) {
|
||||
this.setDamageValue(metaValue);
|
||||
@@ -39,14 +36,6 @@ public enum CellType {
|
||||
this.damageValue = damageValue;
|
||||
}
|
||||
|
||||
public int getHousingValue() {
|
||||
return this.housingValue;
|
||||
}
|
||||
|
||||
public void setHousingValue(final int housingValue) {
|
||||
this.housingValue = housingValue;
|
||||
}
|
||||
|
||||
EnumSet<AEFeature> getFeature() {
|
||||
return this.features;
|
||||
}
|
||||
@@ -55,10 +44,6 @@ public enum CellType {
|
||||
return new ItemStack(this.getItemInstance(), size, this.getDamageValue());
|
||||
}
|
||||
|
||||
public ItemStack getHousing(final int size) {
|
||||
return new ItemStack(ItemAndBlockHolder.CELL_HOUSING, size, this.getHousingValue());
|
||||
}
|
||||
|
||||
public Item getItemInstance() {
|
||||
return this.itemInstance;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user