Make Dough by throwing flour into filled cauldron

This commit is contained in:
Blood-Asp 2016-10-19 18:31:17 +02:00
parent 37f3215d99
commit fdafabf291

View file

@ -793,8 +793,7 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
return true; return true;
} }
} }else if (aPrefix == OrePrefixes.crushed) {
if (aPrefix == OrePrefixes.crushed) {
Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ);
byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ);
if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) {
@ -802,6 +801,14 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
return true; return true;
} }
}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)) {
aItemEntity.setEntityItemStack(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize, new Object[]{}));
aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3);
return true;
}
} }
} }
} }