Fixed sunflower and highrass placement for the sake of it

This commit is contained in:
Adubbz 2013-12-28 11:34:59 +11:00
parent 2c7cd8e8a3
commit 690ea1504a
2 changed files with 22 additions and 0 deletions

View File

@ -129,4 +129,15 @@ public class ItemBlockFlower extends ItemBlock
--par1ItemStack.stackSize;
}
}
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
{
if (metadata == 13)
{
if (!placeBlockAt(stack, player, world, x, y + 1, z, side, hitX, hitY + 1, hitZ, SUNFLOWERTOP)) return false;
}
return super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);
}
}

View File

@ -123,4 +123,15 @@ public class ItemBlockFoliage extends ItemColored
return itemStack;
}
}
@Override
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
{
if (metadata == 3)
{
if (!placeBlockAt(stack, player, world, x, y + 1, z, side, hitX, hitY + 1, hitZ, GRASSTOP)) return false;
}
return super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);
}
}