mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-12-03 04:48:06 +00:00
Make turtle tools a little more flexible
Turtle tools now accept two additional JSON fields - allowEnchantments: Whether items with enchantments (or any non-standard NBT) can be equipped. - consumesDurability: Whether durability will be consumed. This can be "never" (the current and default behaviour), "always", and "when_enchanted". Closes #1501.
This commit is contained in:
@@ -6,6 +6,7 @@ package dan200.computercraft.shared.platform;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.EntityDimensions;
|
||||
import net.minecraft.world.entity.Pose;
|
||||
@@ -39,4 +40,9 @@ public final class FakePlayer extends net.fabricmc.fabric.api.entity.FakePlayer
|
||||
public double getBlockReach() {
|
||||
return MAX_REACH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean broadcastToPlayer(ServerPlayer player) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user