mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-29 08:42:17 +00:00
Fixed turtle bone meal usage
This commit is contained in:

committed by
David Queneau

parent
d10f297ca0
commit
6cd9fa9fb2
@@ -22,6 +22,7 @@ import dan200.computercraft.shared.util.DirectionUtil;
|
||||
import dan200.computercraft.shared.util.DropConsumer;
|
||||
import dan200.computercraft.shared.util.InventoryUtil;
|
||||
import dan200.computercraft.shared.util.WorldUtil;
|
||||
import net.minecraft.item.*;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
@@ -29,16 +30,6 @@ import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.SignBlockEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.BoatItem;
|
||||
import net.minecraft.item.BucketItem;
|
||||
import net.minecraft.item.GlassBottleItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.item.LilyPadItem;
|
||||
import net.minecraft.item.SignItem;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
@@ -304,11 +295,9 @@ public class TurtlePlaceCommand implements ITurtleCommand {
|
||||
BlockEntity existingTile = turtle.getWorld()
|
||||
.getBlockEntity(position);
|
||||
|
||||
if (placementContext.canPlace()) {
|
||||
if (stackCopy.useOnBlock(context) == ActionResult.SUCCESS) {
|
||||
placed = true;
|
||||
turtlePlayer.loadInventory(stackCopy);
|
||||
}
|
||||
if (stackCopy.useOnBlock(context) == ActionResult.SUCCESS) {
|
||||
placed = true;
|
||||
turtlePlayer.loadInventory(stackCopy);
|
||||
}
|
||||
|
||||
if (!placed && (item instanceof BucketItem || item instanceof BoatItem || item instanceof LilyPadItem || item instanceof GlassBottleItem)) {
|
||||
|
Reference in New Issue
Block a user