more boxes and GUI textures
@ -2,15 +2,18 @@ package com.hbm.blocks.network;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.network.TileEntityCraneBoxer;
|
||||
import com.hbm.tileentity.network.TileEntityCraneInserter;
|
||||
|
||||
import api.hbm.conveyor.IConveyorItem;
|
||||
import api.hbm.conveyor.IConveyorPackage;
|
||||
import api.hbm.conveyor.IEnterableBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@ -70,6 +73,22 @@ public class CraneBoxer extends BlockCraneBase implements IEnterableBlock {
|
||||
world.spawnEntityInWorld(drop);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||
return Container.calcRedstoneFromInventory((TileEntityCraneInserter)world.getTileEntity(x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
this.dropContents(world, x, y, z, block, meta, 0, 21);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
||||
|
||||
@ -8,6 +8,7 @@ import api.hbm.conveyor.IConveyorPackage;
|
||||
import api.hbm.conveyor.IEnterableBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@ -53,6 +54,12 @@ public class CraneUnboxer extends BlockCraneBase implements IEnterableBlock {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
this.dropContents(world, x, y, z, block, meta, 0, 23);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
|
||||
return false;
|
||||
|
||||
@ -937,6 +937,9 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crane_inserter, amount), new Object[] { "CCC", "C C", "CBC", 'C', casing, 'B', ModBlocks.conveyor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crane_extractor, amount), new Object[] { "CCC", "CPC", "CBC", 'C', casing, 'B', ModBlocks.conveyor, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC) });
|
||||
}
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crane_boxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_PLANKS, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'C', ModBlocks.conveyor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crane_unboxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_STICK, 'P', Items.shears, 'C', ModBlocks.conveyor });
|
||||
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER1), new Object[] { ModItems.ingot_chainsteel, ASBESTOS.ingot(), ModItems.gem_alexandrite });
|
||||
addShapelessAuto(DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER1, 3), new Object[] { DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2) });
|
||||
|
||||
@ -37,8 +37,8 @@ public class TileEntityCraneUnboxer extends TileEntityMachineBase implements IGU
|
||||
|
||||
int delay = 20;
|
||||
|
||||
if(slots[19] != null && slots[19].getItem() == ModItems.upgrade_ejector) {
|
||||
switch(slots[19].getItemDamage()) {
|
||||
if(slots[22] != null && slots[22].getItem() == ModItems.upgrade_ejector) {
|
||||
switch(slots[22].getItemDamage()) {
|
||||
case 0: delay = 10; break;
|
||||
case 1: delay = 5; break;
|
||||
case 2: delay = 2; break;
|
||||
@ -57,8 +57,8 @@ public class TileEntityCraneUnboxer extends TileEntityMachineBase implements IGU
|
||||
if(worldObj.getTotalWorldTime() % delay == 0 && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) {
|
||||
int amount = 1;
|
||||
|
||||
if(slots[18] != null && slots[18].getItem() == ModItems.upgrade_stack) {
|
||||
switch(slots[18].getItemDamage()) {
|
||||
if(slots[21] != null && slots[18].getItem() == ModItems.upgrade_stack) {
|
||||
switch(slots[21].getItemDamage()) {
|
||||
case 0: amount = 4; break;
|
||||
case 1: amount = 16; break;
|
||||
case 2: amount = 64; break;
|
||||
@ -74,7 +74,7 @@ public class TileEntityCraneUnboxer extends TileEntityMachineBase implements IGU
|
||||
|
||||
IConveyorBelt belt = (IConveyorBelt) b;
|
||||
|
||||
for(int i = 9; i < 18; i++) {
|
||||
for(int i = 0; i < 21; i++) {
|
||||
ItemStack stack = slots[i];
|
||||
|
||||
if(stack != null){
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |