diff --git a/com/hbm/handler/ToolAbility.java b/com/hbm/handler/ToolAbility.java index 65cc604f9f..5579df476c 100644 --- a/com/hbm/handler/ToolAbility.java +++ b/com/hbm/handler/ToolAbility.java @@ -14,6 +14,7 @@ import net.minecraft.client.resources.I18n; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.Vec3; @@ -152,6 +153,10 @@ public static class SmelterAbility extends ToolAbility { @Override public void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, ItemToolAbility tool) { + //a band-aid on a gaping wound + if(block == Blocks.lit_redstone_ore) + block = Blocks.redstone_ore; + ItemStack stack = new ItemStack(block, 1, meta); ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack); @@ -177,6 +182,10 @@ public static class ShredderAbility extends ToolAbility { @Override public void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, ItemToolAbility tool) { + //a band-aid on a gaping wound + if(block == Blocks.lit_redstone_ore) + block = Blocks.redstone_ore; + ItemStack stack = new ItemStack(block, 1, meta); ItemStack result = MachineRecipes.getShredderResult(stack); @@ -202,6 +211,10 @@ public static class CentrifugeAbility extends ToolAbility { @Override public void onDig(World world, int x, int y, int z, EntityPlayer player, Block block, int meta, ItemToolAbility tool) { + //a band-aid on a gaping wound + if(block == Blocks.lit_redstone_ore) + block = Blocks.redstone_ore; + ItemStack stack = new ItemStack(block, 1, meta); ItemStack[] result = MachineRecipes.getCentrifugeProcessingResult(stack); diff --git a/com/hbm/inventory/MachineRecipes.java b/com/hbm/inventory/MachineRecipes.java index bb7a0313f3..04bb0567d7 100644 --- a/com/hbm/inventory/MachineRecipes.java +++ b/com/hbm/inventory/MachineRecipes.java @@ -122,6 +122,9 @@ public static ItemStack[] getCentrifugeProcessingResult(ItemStack item) { } public static ItemStack[] getCentrifugeOutput(ItemStack item) { + + if(item == null || item.getItem() == null) + return null; ItemStack[] test = new ItemStack[] { new ItemStack(Items.apple, 3), new ItemStack(Items.leather, 1), new ItemStack(Items.sugar, 3), new ItemStack(Items.blaze_powder, 2) }; @@ -327,7 +330,7 @@ public static ItemStack[] getCentrifugeOutput(ItemStack item) { return copper; } - if (mODE(item, "oreRedstone")) { + if (mODE(item, "oreRedstone") || item.getItem() == Item.getItemFromBlock(Blocks.lit_redstone_ore)) { return redstone; } @@ -2071,6 +2074,9 @@ public Map getShredderRecipes() { public static ItemStack getShredderResult(ItemStack stack) { + if(stack == null || stack.getItem() == null) + return new ItemStack(ModItems.scrap); + ItemStack sta = shredderRecipes.get(new StackWrapper(stack)); /*if(sta != null) diff --git a/com/hbm/items/tool/ItemToolAbility.java b/com/hbm/items/tool/ItemToolAbility.java index 1bac26d6e2..f814f102a7 100644 --- a/com/hbm/items/tool/ItemToolAbility.java +++ b/com/hbm/items/tool/ItemToolAbility.java @@ -30,6 +30,7 @@ import net.minecraft.network.play.client.C07PacketPlayerDigging; import net.minecraft.network.play.server.S23PacketBlockChange; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; @@ -300,7 +301,10 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla setAbility(stack, i % this.breakAbility.size()); if(getCurrentAbility(stack) != null) { - player.addChatComponentMessage(new ChatComponentText("[Enabled " + getCurrentAbility(stack).getFullName() + "]")); + player.addChatComponentMessage( + new ChatComponentText("[Enabled ") + .appendSibling(new ChatComponentTranslation(getCurrentAbility(stack).getName(), new Object[0])) + .appendSibling(new ChatComponentText("]"))); } else { player.addChatComponentMessage(new ChatComponentText("[Tool ability deactivated]")); } diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 8fe3d294a3..0a9aafbb09 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -1330,7 +1330,12 @@ public static void PostLoad(FMLPostInitializationEvent PostEvent) MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.ore_nether_fire), new ItemStack(ModItems.powder_fire, 6)); MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.packed_ice), new ItemStack(ModItems.powder_ice, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_light), new ItemStack(Items.clay_ball, 4)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.concrete), new ItemStack(Blocks.gravel, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.concrete_smooth), new ItemStack(Blocks.gravel, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete), new ItemStack(Blocks.gravel, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete_mossy), new ItemStack(Blocks.gravel, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete_cracked), new ItemStack(Blocks.gravel, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_concrete_broken), new ItemStack(Blocks.gravel, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.brick_obsidian), new ItemStack(ModBlocks.gravel_obsidian, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.obsidian), new ItemStack(ModBlocks.gravel_obsidian, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.stone), new ItemStack(Blocks.gravel, 1)); @@ -1360,6 +1365,12 @@ public static void PostLoad(FMLPostInitializationEvent PostEvent) MachineRecipes.overridePreSetRecipe(new ItemStack(Items.enchanted_book), new ItemStack(ModItems.powder_magic, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.arc_electrode_burnt), new ItemStack(ModItems.powder_coal, 1)); MachineRecipes.overridePreSetRecipe(new ItemStack(ModItems.arc_electrode_desh), new ItemStack(ModItems.powder_desh, 2)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_polished), new ItemStack(ModItems.powder_meteorite, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick), new ItemStack(ModItems.powder_meteorite, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick_mossy), new ItemStack(ModItems.powder_meteorite, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick_cracked), new ItemStack(ModItems.powder_meteorite, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_brick_chiseled), new ItemStack(ModItems.powder_meteorite, 1)); + MachineRecipes.overridePreSetRecipe(new ItemStack(ModBlocks.meteor_pillar), new ItemStack(ModItems.powder_meteorite, 1)); for(int i = 0; i < 16; i++) { MachineRecipes.overridePreSetRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, i), new ItemStack(Items.clay_ball, 4));