more boxes and GUI textures

This commit is contained in:
Boblet 2022-08-11 16:46:01 +02:00
parent 1e1dac2f11
commit 4605a24c32
17 changed files with 34 additions and 5 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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) });

View File

@ -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){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 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.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 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: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB