29 lines
1.4 KiB
Diff
29 lines
1.4 KiB
Diff
--- ../src_base/minecraft/net/minecraft/src/PlayerControllerCreative.java 0000-00-00 00:00:00.000000000 -0000
|
|
+++ ../src_work/minecraft/net/minecraft/src/PlayerControllerCreative.java 0000-00-00 00:00:00.000000000 -0000
|
|
@@ -52,6 +52,11 @@
|
|
*/
|
|
public static void clickBlockCreative(Minecraft par0Minecraft, PlayerController par1PlayerController, int par2, int par3, int par4, int par5)
|
|
{
|
|
+ ItemStack itemstack = par0Minecraft.thePlayer.getCurrentEquippedItem();
|
|
+ if (itemstack != null && itemstack.getItem().onBlockStartBreak(itemstack, par2, par3, par4, par0Minecraft.thePlayer))
|
|
+ {
|
|
+ return;
|
|
+ }
|
|
if (!par0Minecraft.theWorld.func_48457_a(par0Minecraft.thePlayer, par2, par3, par4, par5))
|
|
{
|
|
par1PlayerController.onPlayerDestroyBlock(par2, par3, par4, par5);
|
|
@@ -63,6 +68,13 @@
|
|
*/
|
|
public boolean onPlayerRightClick(EntityPlayer par1EntityPlayer, World par2World, ItemStack par3ItemStack, int par4, int par5, int par6, int par7)
|
|
{
|
|
+ if (par3ItemStack != null &&
|
|
+ par3ItemStack.getItem() != null &&
|
|
+ par3ItemStack.getItem().onItemUseFirst(par3ItemStack, par1EntityPlayer, par2World, par4, par5, par6, par7))
|
|
+ {
|
|
+ return true;
|
|
+ }
|
|
+
|
|
int var8 = par2World.getBlockId(par4, par5, par6);
|
|
|
|
if (var8 > 0 && Block.blocksList[var8].blockActivated(par2World, par4, par5, par6, par1EntityPlayer))
|