Added Scrapboxinator, reverted yellow energy outlines, added grinder textures

This commit is contained in:
TheDoctorSoda 2016-03-14 21:53:05 -07:00
parent 5c07626959
commit e90592403b
38 changed files with 556 additions and 172 deletions

View file

@ -0,0 +1,62 @@
package techreborn.blocks.machine;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.blocks.IRotationTexture;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileScrapboxinator;
import techreborn.tiles.teir1.TileRecycler;
public class BlockScrapboxinator extends BlockMachineBase implements IRotationTexture{
public BlockScrapboxinator(Material material) {
super();
setUnlocalizedName("techreborn.scrapboxinator");
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileScrapboxinator();
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if (!player.isSneaking()){
player.openGui(Core.INSTANCE, GuiHandler.scrapboxinatorID, world, x, y, z);
}
return true;
}
private final String prefix = "techreborn:blocks/machine/greg_machines/";
@Override
public String getFrontOff() {
return prefix + "scrapboxinator_front_off";
}
@Override
public String getFrontOn() {
return prefix + "scrapboxinator_front_on";
}
@Override
public String getSide() {
return prefix + "machine_side";
}
@Override
public String getTop() {
return prefix + "machine_top";
}
@Override
public String getBottom() {
return prefix + "machine_bottom";
}
}

View file

@ -52,12 +52,12 @@ public class BlockAESU extends BlockMachineBase implements IRotationTexture {
@Override
public String getTop() {
return prefix + "aesu_side";
return prefix + "aesu_top";
}
@Override
public String getBottom() {
return prefix + "aesu_side";
return prefix + "aesu_bottom";
}
}

View file

@ -63,12 +63,12 @@ public class BlockIDSU extends BlockMachineBase implements IAdvancedRotationText
@Override
public String getTop(boolean isActive) {
return prefix + "idsu_side";
return prefix + "idsu_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "idsu_side";
return prefix + "idsu_bottom";
}
}

View file

@ -50,12 +50,12 @@ public class BlockLESU extends BlockMachineBase implements IAdvancedRotationText
@Override
public String getTop(boolean isActive) {
return prefix + "lesu_side";
return prefix + "lesu_top";
}
@Override
public String getBottom(boolean isActive) {
return prefix + "lesu_side";
return prefix + "lesu_bottom";
}
}

View file

@ -23,7 +23,7 @@ public class BlockMFSU extends BlockBatBox {
@Override
public String getFrontOff() {
return prefix + "mfsubatbox_front";
return prefix + "mfsu_front";
}
@Override

View file

@ -4,108 +4,15 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;
import techreborn.client.container.ContainerAesu;
import techreborn.client.container.ContainerAlloyFurnace;
import techreborn.client.container.ContainerAlloySmelter;
import techreborn.client.container.ContainerAssemblingMachine;
import techreborn.client.container.ContainerBlastFurnace;
import techreborn.client.container.ContainerCentrifuge;
import techreborn.client.container.ContainerChargeBench;
import techreborn.client.container.ContainerChemicalReactor;
import techreborn.client.container.ContainerChunkloader;
import techreborn.client.container.ContainerCompressor;
import techreborn.client.container.ContainerDestructoPack;
import techreborn.client.container.ContainerDieselGenerator;
import techreborn.client.container.ContainerDigitalChest;
import techreborn.client.container.ContainerElectricFurnace;
import techreborn.client.container.ContainerExtractor;
import techreborn.client.container.ContainerFusionReactor;
import techreborn.client.container.ContainerGasTurbine;
import techreborn.client.container.ContainerGenerator;
import techreborn.client.container.ContainerGrinder;
import techreborn.client.container.ContainerIDSU;
import techreborn.client.container.ContainerImplosionCompressor;
import techreborn.client.container.ContainerIndustrialElectrolyzer;
import techreborn.client.container.ContainerIndustrialGrinder;
import techreborn.client.container.ContainerIndustrialSawmill;
import techreborn.client.container.ContainerIronFurnace;
import techreborn.client.container.ContainerLesu;
import techreborn.client.container.ContainerMatterFabricator;
import techreborn.client.container.ContainerQuantumChest;
import techreborn.client.container.ContainerQuantumTank;
import techreborn.client.container.ContainerRecycler;
import techreborn.client.container.ContainerRollingMachine;
import techreborn.client.container.ContainerSemifluidGenerator;
import techreborn.client.container.ContainerThermalGenerator;
import techreborn.client.container.ContainerVacuumFreezer;
import techreborn.client.gui.GuiAesu;
import techreborn.client.gui.GuiAlloyFurnace;
import techreborn.client.gui.GuiAlloySmelter;
import techreborn.client.gui.GuiAssemblingMachine;
import techreborn.client.gui.GuiBlastFurnace;
import techreborn.client.gui.GuiCentrifuge;
import techreborn.client.gui.GuiChargeBench;
import techreborn.client.gui.GuiChemicalReactor;
import techreborn.client.gui.GuiChunkLoader;
import techreborn.client.gui.GuiCompressor;
import techreborn.client.gui.GuiDestructoPack;
import techreborn.client.gui.GuiDieselGenerator;
import techreborn.client.gui.GuiDigitalChest;
import techreborn.client.gui.GuiElectricFurnace;
import techreborn.client.gui.GuiExtractor;
import techreborn.client.gui.GuiFusionReactor;
import techreborn.client.gui.GuiGasTurbine;
import techreborn.client.gui.GuiGenerator;
import techreborn.client.gui.GuiGrinder;
import techreborn.client.gui.GuiIDSU;
import techreborn.client.gui.GuiImplosionCompressor;
import techreborn.client.gui.GuiIndustrialElectrolyzer;
import techreborn.client.gui.GuiIndustrialGrinder;
import techreborn.client.gui.GuiIndustrialSawmill;
import techreborn.client.gui.GuiIronFurnace;
import techreborn.client.gui.GuiLesu;
import techreborn.client.gui.GuiMatterFabricator;
import techreborn.client.gui.GuiQuantumChest;
import techreborn.client.gui.GuiQuantumTank;
import techreborn.client.gui.GuiRecycler;
import techreborn.client.gui.GuiRollingMachine;
import techreborn.client.gui.GuiSemifluidGenerator;
import techreborn.client.gui.GuiThermalGenerator;
import techreborn.client.gui.GuiVacuumFreezer;
import techreborn.client.container.*;
import techreborn.client.gui.*;
import techreborn.manual.GuiManual;
import techreborn.tiles.TileAesu;
import techreborn.tiles.TileAlloyFurnace;
import techreborn.tiles.TileAlloySmelter;
import techreborn.tiles.TileAssemblingMachine;
import techreborn.tiles.TileBlastFurnace;
import techreborn.tiles.TileCentrifuge;
import techreborn.tiles.TileChargeBench;
import techreborn.tiles.TileChemicalReactor;
import techreborn.tiles.TileChunkLoader;
import techreborn.tiles.TileDigitalChest;
import techreborn.tiles.TileImplosionCompressor;
import techreborn.tiles.TileIndustrialElectrolyzer;
import techreborn.tiles.TileIndustrialGrinder;
import techreborn.tiles.TileIndustrialSawmill;
import techreborn.tiles.TileIronFurnace;
import techreborn.tiles.TileMatterFabricator;
import techreborn.tiles.TileQuantumChest;
import techreborn.tiles.TileQuantumTank;
import techreborn.tiles.TileRollingMachine;
import techreborn.tiles.TileVacuumFreezer;
import techreborn.tiles.*;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
import techreborn.tiles.generator.TileDieselGenerator;
import techreborn.tiles.generator.TileGasTurbine;
import techreborn.tiles.generator.TileGenerator;
import techreborn.tiles.generator.TileSemifluidGenerator;
import techreborn.tiles.generator.TileThermalGenerator;
import techreborn.tiles.generator.*;
import techreborn.tiles.idsu.TileIDSU;
import techreborn.tiles.lesu.TileLesu;
import techreborn.tiles.teir1.TileCompressor;
import techreborn.tiles.teir1.TileElectricFurnace;
import techreborn.tiles.teir1.TileExtractor;
import techreborn.tiles.teir1.TileGrinder;
import techreborn.tiles.teir1.TileRecycler;
import techreborn.tiles.teir1.*;
public class GuiHandler implements IGuiHandler {
@ -144,6 +51,7 @@ public class GuiHandler implements IGuiHandler {
public static final int electricFurnaceID = 35;
public static final int ironFurnace = 36;
public static final int recyclerID = 37;
public static final int scrapboxinatorID = 38;
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
@ -238,6 +146,8 @@ public class GuiHandler implements IGuiHandler {
return new ContainerIronFurnace((TileIronFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
}else if (ID == recyclerID) {
return new ContainerRecycler((TileRecycler) world.getTileEntity(new BlockPos(x, y, z)), player);
}else if (ID == scrapboxinatorID) {
return new ContainerScrapboxinator((TileScrapboxinator) world.getTileEntity(new BlockPos(x, y, z)), player);
}
return null;
}
@ -336,6 +246,8 @@ public class GuiHandler implements IGuiHandler {
return new GuiIronFurnace(player, (TileIronFurnace) world.getTileEntity(new BlockPos(x, y, z)));
}else if (ID == recyclerID) {
return new GuiRecycler(player, (TileRecycler) world.getTileEntity(new BlockPos(x, y, z)));
} else if (ID == scrapboxinatorID) {
return new GuiScrapboxinator(player, (TileScrapboxinator) world.getTileEntity(new BlockPos(x, y, z)));
}
return null;
}

View file

@ -0,0 +1,63 @@
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.SlotOutput;
import reborncore.common.container.RebornContainer;
import techreborn.api.SlotUpgrade;
import techreborn.tiles.TileScrapboxinator;
public class ContainerScrapboxinator extends RebornContainer {
EntityPlayer player;
TileScrapboxinator tile;
public int connectionStatus;
public ContainerScrapboxinator(TileScrapboxinator tileScrapboxinator, EntityPlayer player) {
super();
tile = tileScrapboxinator;
this.player = player;
// input
this.addSlotToContainer(new SlotScrapbox(tileScrapboxinator.inventory, 0, 56, 34));
this.addSlotToContainer(new SlotOutput(tileScrapboxinator.inventory, 1, 116, 34));
// upgrades
this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 2, 152, 8));
this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 3, 152, 26));
this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 4, 152, 44));
this.addSlotToContainer(new SlotUpgrade(tileScrapboxinator.inventory, 5, 152, 62));
int i;
for (i = 0; i < 3; ++i) {
for (int j = 0; j < 9; ++j) {
this.addSlotToContainer(new Slot(player.inventory, j + i * 9
+ 9, 8 + j * 18, 84 + i * 18));
}
}
for (i = 0; i < 9; ++i) {
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18,
142));
}
}
@Override
public boolean canInteractWith(EntityPlayer p_75145_1_) {
return true;
}
@SideOnly(Side.CLIENT)
@Override
public void updateProgressBar(int id, int value) {
if (id == 10) {
this.connectionStatus = value;
}
}
}

View file

@ -0,0 +1,24 @@
package techreborn.client.container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import techreborn.init.ModItems;
public class SlotScrapbox extends Slot {
public SlotScrapbox(IInventory par1iInventory, int par2, int par3, int par4) {
super(par1iInventory, par2, par3, par4);
}
public boolean isItemValid(ItemStack par1ItemStack) {
if(par1ItemStack.getItem()==ModItems.scrapBox){
return true;
}
return false;
}
public int getSlotStackLimit() {
return 64;
}
}

View file

@ -0,0 +1,54 @@
package techreborn.client.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import techreborn.client.container.ContainerScrapboxinator;
import techreborn.tiles.TileScrapboxinator;
public class GuiScrapboxinator extends GuiContainer {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/scrapboxinator.png");
TileScrapboxinator tile;
ContainerScrapboxinator containerScrapboxinator;
public GuiScrapboxinator(EntityPlayer player, TileScrapboxinator tileScrapboxinator) {
super(new ContainerScrapboxinator(tileScrapboxinator, player));
this.xSize = 176;
this.ySize = 167;
tile = tileScrapboxinator;
containerScrapboxinator = (ContainerScrapboxinator) this.inventorySlots;
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = tile.gaugeProgressScaled(24);
// System.out.println(compressor.gaugeProgressScaled(10));
if (j > 0) {
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = tile.getEnergyScaled(12);
if (j > 0) {
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
}
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
String name = StatCollector.translateToLocal("tile.techreborn.scrapboxinator.name");
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
}
}

View file

@ -10,81 +10,23 @@ import reborncore.common.tile.TileMachineBase;
import techreborn.Core;
import techreborn.blocks.*;
import techreborn.blocks.advanced_machine.*;
import techreborn.blocks.generator.BlockDieselGenerator;
import techreborn.blocks.generator.BlockDragonEggSiphoner;
import techreborn.blocks.generator.BlockGasTurbine;
import techreborn.blocks.generator.BlockGenerator;
import techreborn.blocks.generator.BlockHeatGenerator;
import techreborn.blocks.generator.BlockLightningRod;
import techreborn.blocks.generator.BlockMagicEnergyAbsorber;
import techreborn.blocks.generator.BlockMagicEnergyConverter;
import techreborn.blocks.generator.BlockPlasmaGenerator;
import techreborn.blocks.generator.BlockSemiFluidGenerator;
import techreborn.blocks.generator.BlockSolarPanel;
import techreborn.blocks.generator.BlockThermalGenerator;
import techreborn.blocks.generator.BlockWaterMill;
import techreborn.blocks.generator.BlockWindMill;
import techreborn.blocks.generator.*;
import techreborn.blocks.iron_machines.BlockAlloyFurnace;
import techreborn.blocks.iron_machines.BlockIronFurnace;
import techreborn.blocks.machine.*;
import techreborn.blocks.storage.*;
import techreborn.blocks.tier1.*;
import techreborn.itemblocks.ItemBlockAesu;
import techreborn.itemblocks.ItemBlockDigitalChest;
import techreborn.itemblocks.ItemBlockMachineCasing;
import techreborn.itemblocks.ItemBlockMachineFrame;
import techreborn.itemblocks.ItemBlockOre;
import techreborn.itemblocks.ItemBlockOre2;
import techreborn.itemblocks.ItemBlockPlayerDetector;
import techreborn.itemblocks.ItemBlockQuantumChest;
import techreborn.itemblocks.ItemBlockQuantumTank;
import techreborn.itemblocks.ItemBlockRubberSapling;
import techreborn.itemblocks.ItemBlockStorage;
import techreborn.itemblocks.ItemBlockStorage2;
import techreborn.tiles.TileAesu;
import techreborn.tiles.TileAlloyFurnace;
import techreborn.tiles.TileAlloySmelter;
import techreborn.tiles.TileAssemblingMachine;
import techreborn.tiles.TileBlastFurnace;
import techreborn.tiles.TileCentrifuge;
import techreborn.tiles.TileChargeBench;
import techreborn.tiles.TileChemicalReactor;
import techreborn.tiles.TileChunkLoader;
import techreborn.tiles.TileDigitalChest;
import techreborn.tiles.TileImplosionCompressor;
import techreborn.tiles.TileIndustrialElectrolyzer;
import techreborn.tiles.TileIndustrialGrinder;
import techreborn.tiles.TileIndustrialSawmill;
import techreborn.tiles.TileIronFurnace;
import techreborn.tiles.TileMachineCasing;
import techreborn.tiles.TileMatterFabricator;
import techreborn.tiles.TilePlayerDectector;
import techreborn.tiles.TileQuantumChest;
import techreborn.tiles.TileQuantumTank;
import techreborn.tiles.TileRollingMachine;
import techreborn.tiles.TileVacuumFreezer;
import techreborn.itemblocks.*;
import techreborn.tiles.*;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
import techreborn.tiles.generator.TileDieselGenerator;
import techreborn.tiles.generator.TileDragonEggSiphoner;
import techreborn.tiles.generator.TileGasTurbine;
import techreborn.tiles.generator.TileGenerator;
import techreborn.tiles.generator.TileHeatGenerator;
import techreborn.tiles.generator.TileSemifluidGenerator;
import techreborn.tiles.generator.TileSolarPanel;
import techreborn.tiles.generator.TileThermalGenerator;
import techreborn.tiles.generator.TileWaterMill;
import techreborn.tiles.generator.TileWindMill;
import techreborn.tiles.generator.*;
import techreborn.tiles.idsu.TileIDSU;
import techreborn.tiles.lesu.TileLesu;
import techreborn.tiles.lesu.TileLesuStorage;
import techreborn.tiles.storage.TileBatBox;
import techreborn.tiles.storage.TileMFE;
import techreborn.tiles.storage.TileMFSU;
import techreborn.tiles.teir1.TileCompressor;
import techreborn.tiles.teir1.TileElectricFurnace;
import techreborn.tiles.teir1.TileExtractor;
import techreborn.tiles.teir1.TileGrinder;
import techreborn.tiles.teir1.TileRecycler;
import techreborn.tiles.teir1.*;
public class ModBlocks {
@ -141,6 +83,7 @@ public class ModBlocks {
public static Block batBox;
public static Block mfe;
public static Block mfsu;
public static Block scrapboxinator;
public static BlockOre ore;
public static BlockOre2 ore2;
@ -402,6 +345,10 @@ public class ModBlocks {
nuke = new BlockNuke();
GameRegistry.registerBlock(nuke, "nuke");
scrapboxinator = new BlockScrapboxinator(Material.iron);
GameRegistry.registerBlock(scrapboxinator, "scrapboxinator");
GameRegistry.registerTileEntity(TileScrapboxinator.class, "TileScrapboxinatorTR");
registerOreDict();
Core.logHelper.info("TechReborns Blocks Loaded");

View file

@ -0,0 +1,294 @@
package techreborn.tiles;
import java.util.Random;
import ic2.api.tile.IWrenchable;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IChatComponent;
import reborncore.api.power.EnumPowerTier;
import reborncore.common.blocks.BlockMachineBase;
import reborncore.common.powerSystem.TilePowerAcceptor;
import reborncore.common.util.Inventory;
import techreborn.api.ScrapboxList;
import techreborn.init.ModBlocks;
import techreborn.init.ModItems;
import techreborn.items.ItemParts;
public class TileScrapboxinator extends TilePowerAcceptor implements IWrenchable, IInventory, ISidedInventory {
public Inventory inventory = new Inventory(6, "TileScrapboxinator", 64, this);
public int capacity = 1000;
public int cost = 20;
public int progress;
public int time = 200;
public int chance = 4;
public int random;
public int input1 = 0;
public int output = 1;
public TileScrapboxinator() {
super(1);
}
public int gaugeProgressScaled(int scale) {
return (progress * scale) / time;
}
@Override
public void updateEntity() {
boolean burning = isBurning();
boolean updateInventory = false;
if (getEnergy() <= cost && canOpen()) {
if (getEnergy() > cost) {
updateInventory = true;
}
}
if (isBurning() && canOpen()) {
updateState();
progress++;
if (progress >= time) {
progress = 0;
recycleItems();
updateInventory = true;
}
} else {
progress = 0;
updateState();
}
if (burning != isBurning()) {
updateInventory = true;
}
if (updateInventory) {
markDirty();
}
}
public void recycleItems() {
if (this.canOpen() && !worldObj.isRemote) {
int random = new Random().nextInt(ScrapboxList.stacks.size());
ItemStack out = ScrapboxList.stacks.get(random).copy();
if (getStackInSlot(output) == null) {
useEnergy(cost);
setInventorySlotContents(output, out);
}
if (getStackInSlot(input1).stackSize > 1) {
useEnergy(cost);
this.decrStackSize(input1, 1);
} else {
useEnergy(cost);
setInventorySlotContents(input1, null);
}
}
}
public boolean canOpen() {
if (getStackInSlot(input1) != null && getStackInSlot(output) == null) {
return true;
}
return false;
}
public boolean isBurning() {
return getEnergy() > cost;
}
public void updateState() {
IBlockState blockState = worldObj.getBlockState(pos);
if (blockState.getBlock() instanceof BlockMachineBase) {
BlockMachineBase blockMachineBase = (BlockMachineBase) blockState.getBlock();
if (blockState.getValue(BlockMachineBase.ACTIVE) != progress > 0)
blockMachineBase.setActive(progress > 0, worldObj, pos);
}
}
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, EnumFacing side) {
return false;
}
@Override
public EnumFacing getFacing() {
return getFacingEnum();
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
if (entityPlayer.isSneaking()) {
return true;
}
return false;
}
@Override
public float getWrenchDropRate() {
return 1.0F;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
return new ItemStack(ModBlocks.scrapboxinator, 1);
}
public boolean isComplete() {
return false;
}
@Override
public void readFromNBT(NBTTagCompound tagCompound) {
super.readFromNBT(tagCompound);
inventory.readFromNBT(tagCompound);
}
@Override
public void writeToNBT(NBTTagCompound tagCompound) {
super.writeToNBT(tagCompound);
inventory.writeToNBT(tagCompound);
}
@Override
public int getSizeInventory() {
return inventory.getSizeInventory();
}
@Override
public ItemStack getStackInSlot(int slot) {
return inventory.getStackInSlot(slot);
}
@Override
public ItemStack decrStackSize(int slot, int amount) {
return inventory.decrStackSize(slot, amount);
}
@Override
public ItemStack removeStackFromSlot(int slot) {
return inventory.removeStackFromSlot(slot);
}
@Override
public void setInventorySlotContents(int slot, ItemStack stack) {
inventory.setInventorySlotContents(slot, stack);
}
@Override
public int getInventoryStackLimit() {
return inventory.getInventoryStackLimit();
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
return inventory.isUseableByPlayer(player);
}
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
return inventory.isItemValidForSlot(slot, stack);
}
// ISidedInventory
@Override
public int[] getSlotsForFace(EnumFacing side) {
return side == EnumFacing.DOWN ? new int[] { 0, 1, 2 } : new int[] { 0, 1, 2 };
}
@Override
public boolean canInsertItem(int slotIndex, ItemStack itemStack, EnumFacing side) {
if (slotIndex == 2)
return false;
if (slotIndex == 1) {
if (itemStack.getItem() == ModItems.scrapBox) {
return true;
}
}
return isItemValidForSlot(slotIndex, itemStack);
}
@Override
public boolean canExtractItem(int slotIndex, ItemStack itemStack, EnumFacing side) {
return slotIndex == 2;
}
@Override
public double getMaxPower() {
return capacity;
}
@Override
public boolean canAcceptEnergy(EnumFacing direction) {
return true;
}
@Override
public boolean canProvideEnergy(EnumFacing direction) {
return false;
}
@Override
public double getMaxOutput() {
return 0;
}
@Override
public double getMaxInput() {
return 32;
}
@Override
public EnumPowerTier getTier() {
return EnumPowerTier.MEDIUM;
}
@Override
public void openInventory(EntityPlayer player) {
inventory.openInventory(player);
}
@Override
public void closeInventory(EntityPlayer player) {
inventory.closeInventory(player);
}
@Override
public int getField(int id) {
return inventory.getField(id);
}
@Override
public void setField(int id, int value) {
inventory.setField(id, value);
}
@Override
public int getFieldCount() {
return inventory.getFieldCount();
}
@Override
public void clear() {
inventory.clear();
}
@Override
public String getName() {
return inventory.getName();
}
@Override
public boolean hasCustomName() {
return inventory.hasCustomName();
}
@Override
public IChatComponent getDisplayName() {
return inventory.getDisplayName();
}
}

View file

@ -1,3 +1,9 @@
item.missingRecipe.name=Missing Recipe Placeholder
itemGroup.techreborn=Tech Reborn
#machines
@ -69,6 +75,12 @@ tile.techreborn.watermill.name=Water Mill
tile.techreborn.windmill.name=Wind Mill
tile.techreborn.ironfurnace.name=Iron Furnace
tile.techreborn.recycler.name=Recycler
tile.techreborn.scrapboxinator.name=Scrapbox-inator
tile.techreborn.batBox.name=Battery Box
tile.techreborn.mfe.name=MFE
tile.techreborn.mfsu.name=MFSU
tile.techreborn.reinforcedglass.name=Reinforced Glass
tile.techreborn.nuke.name=Nuke
#Blocks
tile.techreborn.rubberlog.name=Rubber Wood
@ -270,6 +282,7 @@ item.techreborn.dust.zinc.name=Zinc Dust
item.techreborn.dust.galena.name=Galena Dust
item.techreborn.dust.greenSapphire.name=Green Sapphire Dust
item.techreborn.dust.sawDust.name=Saw Dust
item.techreborn.dust.olivine.name=Olivine Dust
item.techreborn.lapotroncrystal.name=Lapotron Crystal
item.techreborn.energycrystal.name=Energy Crystal
item.techreborn.ingot.refinediron.name=Refined Iron Ingot
@ -375,6 +388,7 @@ item.techreborn.dustsmall.Voidstone.name=Small Pile of Voidstone Dust
item.techreborn.dustsmall.YellowGarnet.name=Small Pile of Yellow Garnet Dust
item.techreborn.dustsmall.Zinc.name=Small Pile of Zinc Dust
item.techreborn.dustsmall.Galena.name=Small Pile of Galena Dust
item.techreborn.dustsmall.Olivine.name=Small Pile of Olivine Dust
#Cells
item.techreborn.cell.Berylium.name=Berylium Cell
@ -415,7 +429,9 @@ item.techreborn.cell.empty.name=Empty Cell
item.techreborn.cell.water.name=Water Cell
item.techreborn.cell.lava.name=Lava Cell
item.techreborn.rebattery.name=Battery
item.techreborn.treetap.name=Tree Tap
item.techreborn.lithiumBattery.name=Lithium Battery
item.techreborn.treetap.name=Treetap
item.techreborn.nanosaber.name=Nanosaber
#Gems
item.techreborn.gem.ruby.name=Ruby
@ -607,9 +623,6 @@ item.techreborn.part.advancedCircuit.name=Advanced Electronic Circuit
item.techreborn.part.pump.name=Pump
item.techreborn.part.teleporter.name=Teleporter
item.techreborn.part.advancedAlloy.name=Advanced Alloy
item.techreborn.part.lvTransformer.name=LV Transformer
item.techreborn.part.mvTransformer.name=MV Transformer
item.techreborn.part.hvTransformer.name=HV Transformer
#Tools
item.techreborn.rockcutter.name=Rockcutter

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,008 B

View file

@ -0,0 +1,5 @@
{
"animation":{
"frametime":2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

View file

@ -0,0 +1,5 @@
{
"animation":{
"frametime":2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

View file

@ -0,0 +1,5 @@
{
"animation":{
"frametime":2
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB