Skip to content

Commit

Permalink
Fixed buggy fruit tree saplings that appear normal creating buggy fru…
Browse files Browse the repository at this point in the history
…it tree logs.
  • Loading branch information
Kittychanley committed Sep 11, 2015
1 parent 14a2354 commit 8eaccfe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Common/com/bioxx/tfc/Items/ItemFruitTreeSapling.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world,
world.isAirBlock(x, y + 1, z) && !world.isRemote)
{

world.setBlock(x, y + 1, z, TFCBlocks.fruitTreeWood, stack.getItemDamage(), 0x2);
int damage = stack.getItemDamage();
if (damage >= metaNames.length)
{
damage -= 8;
stack.setItemDamage(damage);
}
world.setBlock(x, y + 1, z, TFCBlocks.fruitTreeWood, damage, 0x2);

((TEFruitTreeWood)world.getTileEntity(x, y + 1, z)).setTrunk(true);
((TEFruitTreeWood)world.getTileEntity(x, y + 1, z)).setHeight(0);
Expand Down

0 comments on commit 8eaccfe

Please sign in to comment.