fixed bug that prevented plants from resetting age

This commit is contained in:
2023-10-07 03:26:54 +02:00
parent 6ac6455f2d
commit d9cfdb218e
2 changed files with 5 additions and 4 deletions

View File

@ -36,9 +36,12 @@ public class replanting {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[0]));
}
for(int i = 0; i < amount[1]; i++) {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[1]));
if (amount.length > 1) {
for (int i = 0; i < amount[1]; i++) {
target.getLocation().getWorld().dropItem(loc, new ItemStack(item[1]));
}
}
crop.setAge(0);
target.setBlockData(crop);
}