TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Fruits get obstructed by branches when harvested from fruit trees

Mithrik opened this issue ยท 1 comments

commented

Describe the bug
Exactly what's in the tin. When harvesting fruits from fruit trees, the items get stuck in the branches instead of falling to the floor. This had been changed from Classic but it's in Build 113.

To Reproduce
Harvest a fruit tree, the fruits from blocks above branches will likely get stuck in said branches.

Meta Info

  • TFC Version: 0.28.2.113
commented

Might harvest the fruit directly to the player's inventory and if not possible just drop on his feet.

if (!worldIn.isRemote)
{
Helpers.spawnItemStack(worldIn, pos, tree.getFoodDrop());
worldIn.setBlockState(pos, worldIn.getBlockState(pos).withProperty(LEAF_STATE, EnumLeafState.NORMAL));
TETickCounter te = Helpers.getTE(worldIn, pos, TETickCounter.class);
if (te != null)
{
te.resetCounter();
}