diff options
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r-- | src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index ef17e4f433..142a3d9c07 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -861,6 +861,8 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L), ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), 600, 24); } + private static boolean bw = Loader.isModLoaded("bartworks"); + public boolean onEntityItemUpdate(EntityItem aItemEntity) { int aDamage = aItemEntity.getEntityItem().getItemDamage(); if ((aDamage < 32000) && (aDamage >= 0) && (!aItemEntity.worldObj.isRemote)) { @@ -874,11 +876,23 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { + + if (bw) { + if (aMaterial == Materials.Osmium) + aMaterial = GT_BartWorks_Compat.getBartWorksMaterialByID(69); + else if (aMaterial == Materials.Iridium) + aMaterial = GT_BartWorks_Compat.getBartWorksMaterialByID(70); + else if (aMaterial == Materials.Platinum) + aMaterial = GT_BartWorks_Compat.getBartWorksMaterialByID(47); + else if (aMaterial == Materials.Palladium) + aMaterial = GT_BartWorks_Compat.getBartWorksMaterialByID(53); + } + aItemEntity.setEntityItemStack(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); return true; } - }else if (aPrefix == OrePrefixes.crushed) { + } else if (aPrefix == OrePrefixes.crushed) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { @@ -886,7 +900,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); return true; } - }else if(aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat){ + } else if(aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { |