Expose RenderGlobal.field_72738_E (breakingBlocks) and fire OnBreak for items broken in itemUseFirst on the server. Both for Elo

This commit is contained in:
Christian committed 2012-10-04 18:05:58 -04:00
1 parent 641a7b033f
commit 72c19f335b
2 files changed
+4 -2

No files matched your search

+1
View File
@@ -24,6 +24,7 @@ public avb.h # theWorld
public avb.i # renderEngine
public avb.q # mc
public avb.r # globalRenderBlocks
public avb.E # damagedBlocks
# SoundManager
public ayq.a # sndSystem
public ayq.b # soundPoolSounds
@@ -133,7 +133,7 @@
}
return true;
@@ -318,29 +366,55 @@
@@ -318,29 +366,56 @@
*/
public boolean activateBlockOrUseItem(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
@@ -147,6 +147,7 @@
+ Item item = (par3ItemStack != null ? par3ItemStack.getItem() : null);
+ if (item != null && item.onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7, par8, par9, par10))
+ {
+ if (par3ItemStack.stackSize <= 0) ForgeEventFactory.onPlayerDestroyItem(thisPlayerMP, par3ItemStack);
+ return true;
+ }
+
@@ -211,7 +212,7 @@
}
/**
@@ -350,4 +424,13 @@
@@ -350,4 +425,13 @@
{
this.theWorld = par1WorldServer;
}