mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 15:22:57 +00:00
Prevent farms from accidentally destroying anything but farmland.
This commit is contained in:
1 parent
7ae094ab72
commit
3bb0acc04c
2 files changed
+25
-9
No files matched your search
@@ -16,7 +16,6 @@ import forestry.core.utils.BlockUtil;
|
||||
import forestry.core.utils.StackUtils;
|
||||
import forestry.core.utils.Vect;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -79,8 +78,8 @@ public abstract class FarmLogicHomogeneous extends FarmLogic {
|
||||
for (int i = 0; i < extent; i++) {
|
||||
Vect position = translateWithOffset(x, yGround, z, direction, i);
|
||||
|
||||
ItemStack block = getAsItemStack(position);
|
||||
if (isAcceptedGround(block))
|
||||
ItemStack stack = getAsItemStack(position);
|
||||
if (isAcceptedGround(stack) || !canBreakGround(getBlock(position)))
|
||||
continue;
|
||||
|
||||
produce.addAll(BlockUtil.getBlockItemStack(getWorld(), position));
|
||||
|
||||
Reference in new issue
Block a user