diff --git a/src/main/java/cn/nukkit/AdventureSettings.java b/src/main/java/cn/nukkit/AdventureSettings.java index 11970b6ade4..40ac3636022 100644 --- a/src/main/java/cn/nukkit/AdventureSettings.java +++ b/src/main/java/cn/nukkit/AdventureSettings.java @@ -1,6 +1,5 @@ package cn.nukkit; -import cn.nukkit.network.protocol.AdventureSettingsPacket; import cn.nukkit.network.protocol.UpdateAbilitiesPacket; import cn.nukkit.network.protocol.UpdateAdventureSettingsPacket; import cn.nukkit.network.protocol.types.AbilityLayer; @@ -147,51 +146,40 @@ void update(boolean reset) { * List of adventure settings */ public enum Type { - WORLD_IMMUTABLE(AdventureSettingsPacket.WORLD_IMMUTABLE, null, false), - NO_PVM(AdventureSettingsPacket.NO_PVM, null, false), - NO_MVP(AdventureSettingsPacket.NO_MVP, PlayerAbility.INVULNERABLE, false), - SHOW_NAME_TAGS(AdventureSettingsPacket.SHOW_NAME_TAGS, null, false), - AUTO_JUMP(AdventureSettingsPacket.AUTO_JUMP, null, true), - ALLOW_FLIGHT(AdventureSettingsPacket.ALLOW_FLIGHT, PlayerAbility.MAY_FLY, false), - NO_CLIP(AdventureSettingsPacket.NO_CLIP, PlayerAbility.NO_CLIP, false), - WORLD_BUILDER(AdventureSettingsPacket.WORLD_BUILDER, PlayerAbility.WORLD_BUILDER, false), - FLYING(AdventureSettingsPacket.FLYING, PlayerAbility.FLYING, false), - MUTED(AdventureSettingsPacket.MUTED, PlayerAbility.MUTED, false), - MINE(AdventureSettingsPacket.MINE, PlayerAbility.MINE, true), - DOORS_AND_SWITCHED(AdventureSettingsPacket.DOORS_AND_SWITCHES, PlayerAbility.DOORS_AND_SWITCHES, true), - OPEN_CONTAINERS(AdventureSettingsPacket.OPEN_CONTAINERS, PlayerAbility.OPEN_CONTAINERS, true), - ATTACK_PLAYERS(AdventureSettingsPacket.ATTACK_PLAYERS, PlayerAbility.ATTACK_PLAYERS, true), - ATTACK_MOBS(AdventureSettingsPacket.ATTACK_MOBS, PlayerAbility.ATTACK_MOBS, true), - OPERATOR(AdventureSettingsPacket.OPERATOR, PlayerAbility.OPERATOR_COMMANDS, false), - TELEPORT(AdventureSettingsPacket.TELEPORT, PlayerAbility.TELEPORT, false), - BUILD(AdventureSettingsPacket.BUILD, PlayerAbility.BUILD, true), - PRIVILEGED_BUILDER(0, PlayerAbility.PRIVILEGED_BUILDER, false), + WORLD_IMMUTABLE(null, false), + NO_PVM(null, false), + NO_MVP(PlayerAbility.INVULNERABLE, false), + SHOW_NAME_TAGS(null, false), + AUTO_JUMP(null, true), + ALLOW_FLIGHT(PlayerAbility.MAY_FLY, false), + NO_CLIP(PlayerAbility.NO_CLIP, false), + WORLD_BUILDER(PlayerAbility.WORLD_BUILDER, false), + FLYING(PlayerAbility.FLYING, false), + MUTED(PlayerAbility.MUTED, false), + MINE(PlayerAbility.MINE, true), + DOORS_AND_SWITCHED(PlayerAbility.DOORS_AND_SWITCHES, true), + OPEN_CONTAINERS(PlayerAbility.OPEN_CONTAINERS, true), + ATTACK_PLAYERS(PlayerAbility.ATTACK_PLAYERS, true), + ATTACK_MOBS(PlayerAbility.ATTACK_MOBS, true), + OPERATOR(PlayerAbility.OPERATOR_COMMANDS, false), + TELEPORT(PlayerAbility.TELEPORT, false), + BUILD(PlayerAbility.BUILD, true), + PRIVILEGED_BUILDER(PlayerAbility.PRIVILEGED_BUILDER, false), // For backwards compatibility @Deprecated - BUILD_AND_MINE(0, null, true), + BUILD_AND_MINE(null, true), @Deprecated - DEFAULT_LEVEL_PERMISSIONS(AdventureSettingsPacket.DEFAULT_LEVEL_PERMISSIONS, null, false); + DEFAULT_LEVEL_PERMISSIONS(null, false); - private final int id; private final PlayerAbility ability; private final boolean defaultValue; - Type(int id, PlayerAbility ability, boolean defaultValue) { - this.id = id; + Type(PlayerAbility ability, boolean defaultValue) { this.ability = ability; this.defaultValue = defaultValue; } - /** - * Legacy: Get adventure setting ID if available - * - * @return adventure setting ID - */ - public int getId() { - return this.id; - } - /** * Get default value * diff --git a/src/main/java/cn/nukkit/Nukkit.java b/src/main/java/cn/nukkit/Nukkit.java index 6cef1c2cdb3..bf5c0e5f929 100644 --- a/src/main/java/cn/nukkit/Nukkit.java +++ b/src/main/java/cn/nukkit/Nukkit.java @@ -130,7 +130,7 @@ public static void main(String[] args) { } } - ServerKiller killer = new ServerKiller(8); + ServerKiller killer = new ServerKiller(10); killer.start(); if (TITLE) { diff --git a/src/main/java/cn/nukkit/Player.java b/src/main/java/cn/nukkit/Player.java index 1c9706e558b..9927d9b4afc 100644 --- a/src/main/java/cn/nukkit/Player.java +++ b/src/main/java/cn/nukkit/Player.java @@ -540,7 +540,7 @@ public void setAllowInteract(boolean value, boolean containers) { } /** - * Set auto jump adventure setting + * Set auto jump adventure setting (adventureSettings.set(Type.AUTO_JUMP) + adventureSettings.update()) * @param value auto jump enabled */ @Deprecated @@ -550,7 +550,7 @@ public void setAutoJump(boolean value) { } /** - * Check wether auto jump adventure setting is enabled + * Check whether auto jump adventure setting is enabled (adventureSettings.get(Type.AUTO_JUMP)) * @return auto jump enabled */ @Deprecated @@ -1638,7 +1638,7 @@ public boolean setGamemode(int gamemode, boolean clientSide, AdventureSettings n } /** - * Send adventure settings + * Send adventure settings (adventureSettings.update()) */ @Deprecated public void sendSettings() { diff --git a/src/main/java/cn/nukkit/Server.java b/src/main/java/cn/nukkit/Server.java index 839168172fc..449a694a8db 100644 --- a/src/main/java/cn/nukkit/Server.java +++ b/src/main/java/cn/nukkit/Server.java @@ -2530,7 +2530,7 @@ public boolean isWhitelisted(String name) { * @return is operator */ public boolean isOp(String name) { - return this.operators.exists(name, true); + return name != null && this.operators.exists(name, true); } /** @@ -2836,7 +2836,7 @@ private void loadSettings() { this.queryPlugins = this.getConfig("settings.query-plugins", true); this.networkCompressionThreshold = this.getConfig("network.batch-threshold", 256); - this.networkCompressionLevel = Math.max(Math.min(this.getConfig("network.compression-level", 4), 9), 0); + this.networkCompressionLevel = Math.max(Math.min(this.getConfig("network.compression-level", 5), 9), 0); this.encryptionEnabled = this.getConfig("network.encryption", false); this.autoTickRate = this.getConfig("level-settings.auto-tick-rate", true); diff --git a/src/main/java/cn/nukkit/block/BlockItemFrame.java b/src/main/java/cn/nukkit/block/BlockItemFrame.java index df1f715c4b2..785c4c98481 100644 --- a/src/main/java/cn/nukkit/block/BlockItemFrame.java +++ b/src/main/java/cn/nukkit/block/BlockItemFrame.java @@ -16,10 +16,7 @@ */ public class BlockItemFrame extends BlockTransparentMeta implements Faceable { - protected final static int[] FACING = {4, 5, 3, 2, 1, 0}; - - private final static int FACING_BITMASK = 0b0111; - //private final static int MAP_BIT = 0b1000; + protected final static int[] FACING = {8, 9, 3, 2, 1, 0}; public BlockItemFrame() { this(0); @@ -142,22 +139,26 @@ public int getComparatorInputOverride() { } public BlockFace getFacing() { - switch (this.getDamage() & FACING_BITMASK) { + switch (this.getDamage()) { case 0: + case 4: return BlockFace.WEST; case 1: + case 5: return BlockFace.EAST; case 2: + case 6: return BlockFace.NORTH; case 3: + case 7: return BlockFace.SOUTH; - case 4: + case 8: return BlockFace.UP; - case 5: + case 9: return BlockFace.DOWN; } - return null; + return BlockFace.UP; } @Override diff --git a/src/main/java/cn/nukkit/block/custom/comparator/AlphabetPaletteComparator.java b/src/main/java/cn/nukkit/block/custom/comparator/AlphabetPaletteComparator.java deleted file mode 100644 index 419cdfed2e0..00000000000 --- a/src/main/java/cn/nukkit/block/custom/comparator/AlphabetPaletteComparator.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.nukkit.block.custom.comparator; - -import org.cloudburstmc.nbt.NbtMap; - -import java.util.Comparator; - -public class AlphabetPaletteComparator implements Comparator { - public static final AlphabetPaletteComparator INSTANCE = new AlphabetPaletteComparator(); - - @Override - public int compare(NbtMap o1, NbtMap o2) { - return getIdentifier(o1).compareToIgnoreCase(getIdentifier(o2)); - } - - private String getIdentifier(NbtMap state) { - return state.getString("name"); - } -} diff --git a/src/main/java/cn/nukkit/blockentity/BlockEntityShulkerBox.java b/src/main/java/cn/nukkit/blockentity/BlockEntityShulkerBox.java index 6c31564c036..bd5f512851a 100644 --- a/src/main/java/cn/nukkit/blockentity/BlockEntityShulkerBox.java +++ b/src/main/java/cn/nukkit/blockentity/BlockEntityShulkerBox.java @@ -129,11 +129,6 @@ public BaseInventory getInventory() { return this.inventory; } - @Deprecated - public ShulkerBoxInventory getRealInventory() { - return (ShulkerBoxInventory) this.getInventory(); - } - @Override public String getName() { return this.hasName() ? this.namedTag.getString("CustomName") : "Shulker Box"; diff --git a/src/main/java/cn/nukkit/command/defaults/DefaultGamemodeCommand.java b/src/main/java/cn/nukkit/command/defaults/DefaultGamemodeCommand.java index 97595989101..bd2333ea268 100644 --- a/src/main/java/cn/nukkit/command/defaults/DefaultGamemodeCommand.java +++ b/src/main/java/cn/nukkit/command/defaults/DefaultGamemodeCommand.java @@ -8,6 +8,7 @@ import cn.nukkit.command.data.CommandParameter; import cn.nukkit.lang.TranslationContainer; import cn.nukkit.network.protocol.SetDefaultGameTypePacket; +import cn.nukkit.utils.TextFormat; /** * Created on 2015/11/12 by xtypr. @@ -47,7 +48,7 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args) gameTypePacket.gamemode = sender.getServer().getDefaultGamemode(); Server.broadcastPacket(sender.getServer().getOnlinePlayers().values(), gameTypePacket); } else { - sender.sendMessage("Unknown game mode"); + sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.gamemode.fail.invalid", args[0])); } return true; } diff --git a/src/main/java/cn/nukkit/command/defaults/GamemodeCommand.java b/src/main/java/cn/nukkit/command/defaults/GamemodeCommand.java index 15d66b7e3ab..e22a00484ff 100644 --- a/src/main/java/cn/nukkit/command/defaults/GamemodeCommand.java +++ b/src/main/java/cn/nukkit/command/defaults/GamemodeCommand.java @@ -44,7 +44,7 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args) int gameMode = Server.getGamemodeFromString(args[0]); if (gameMode == -1) { - sender.sendMessage("Unknown game mode"); + sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.gamemode.fail.invalid", args[0])); return true; } diff --git a/src/main/java/cn/nukkit/command/defaults/SummonCommand.java b/src/main/java/cn/nukkit/command/defaults/SummonCommand.java index 2516d528a99..d596c44fa2b 100644 --- a/src/main/java/cn/nukkit/command/defaults/SummonCommand.java +++ b/src/main/java/cn/nukkit/command/defaults/SummonCommand.java @@ -6,6 +6,7 @@ import cn.nukkit.command.data.CommandParamType; import cn.nukkit.command.data.CommandParameter; import cn.nukkit.entity.Entity; +import cn.nukkit.lang.TranslationContainer; import cn.nukkit.level.Position; import cn.nukkit.network.protocol.AddEntityPacket; import cn.nukkit.utils.TextFormat; @@ -36,16 +37,23 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args) } if (args.length == 0 || (args.length == 1 && !(sender instanceof Player))) { + sender.sendMessage(new TranslationContainer("commands.generic.usage", this.usageMessage)); return false; } + String mob = args[0]; + // Convert Minecraft format to the format what Nukkit uses - String mob = Character.toUpperCase(args[0].charAt(0)) + args[0].substring(1); - int max = mob.length() - 1; - for (int x = 2; x < max; x++) { - if (mob.charAt(x) == '_') { - mob = mob.substring(0, x) + Character.toUpperCase(mob.charAt(x + 1)) + mob.substring(x + 2); + if (!Entity.isKnown(mob)) { + mob = Character.toUpperCase(args[0].charAt(0)) + args[0].substring(1); + StringBuilder sb = new StringBuilder(mob); + for (int x = 2; x < sb.length() - 1; x++) { + if (sb.charAt(x) == '_') { + sb.setCharAt(x + 1, Character.toUpperCase(sb.charAt(x + 1))); + sb.deleteCharAt(x); + } } + mob = sb.toString(); } Player playerThatSpawns; @@ -57,16 +65,16 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args) } if (playerThatSpawns != null) { - Position pos = playerThatSpawns.getPosition().floor().add(0.5, 0, 0.5); + Position pos = playerThatSpawns.floor().add(0.5, 0, 0.5); Entity ent; if ((ent = Entity.createEntity(mob, pos)) != null) { ent.spawnToAll(); - sender.sendMessage("§6Spawned " + mob + " to " + playerThatSpawns.getName()); + sender.sendMessage(new TranslationContainer("%commands.summon.success")); } else { - sender.sendMessage(TextFormat.RED + "Unable to spawn " + mob); + sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.summon.failed")); } } else { - sender.sendMessage(TextFormat.RED + "Unknown player " + (args.length == 2 ? args[1] : sender.getName())); + sender.sendMessage(new TranslationContainer(TextFormat.RED + "%commands.generic.player.notFound")); } return true; diff --git a/src/main/java/cn/nukkit/dispenser/FlintAndSteelDispenseBehavior.java b/src/main/java/cn/nukkit/dispenser/FlintAndSteelDispenseBehavior.java index 9281153a8d2..599251f29d0 100644 --- a/src/main/java/cn/nukkit/dispenser/FlintAndSteelDispenseBehavior.java +++ b/src/main/java/cn/nukkit/dispenser/FlintAndSteelDispenseBehavior.java @@ -14,10 +14,11 @@ public Item dispense(BlockDispenser block, BlockFace face, Item item) { if (target.getId() == BlockID.AIR) { Block down = target.down(); - if (down.getId() != BlockID.OBSIDIAN || !down.level.createPortal(down, false)) { + if (down.getId() != BlockID.OBSIDIAN || !down.level.createPortal(down)) { boolean soulFire = down.getId() == Block.SOUL_SAND || down.getId() == Block.SOUL_SOIL; block.level.setBlock(target, Block.get(soulFire ? BlockID.SOUL_FIRE : BlockID.FIRE)); } + down.level.addSound(down, cn.nukkit.level.Sound.MOB_GHAST_FIREBALL); item.useOn(target); } else if (target.getId() == BlockID.TNT) { target.onActivate(item); diff --git a/src/main/java/cn/nukkit/entity/Entity.java b/src/main/java/cn/nukkit/entity/Entity.java index 51de82fca75..b0ed653d2bf 100644 --- a/src/main/java/cn/nukkit/entity/Entity.java +++ b/src/main/java/cn/nukkit/entity/Entity.java @@ -372,7 +372,12 @@ public abstract class Entity extends Location implements Metadatable { public double lastPitch; public double lastHeadYaw; - public double entityCollisionReduction = 0; // Higher than 0.9 will result a fast collisions + @Deprecated + public double PitchDelta; + @Deprecated + public double YawDelta; + + public double entityCollisionReduction; // Higher than 0.9 will result a fast collisions public AxisAlignedBB boundingBox; public boolean onGround; @Deprecated @@ -381,25 +386,25 @@ public abstract class Entity extends Location implements Metadatable { public boolean positionChanged; @Deprecated public boolean motionChanged; - public int deadTicks = 0; - public int age = 0; - public int ticksLived = 0; + public int deadTicks; + public int age; + public int ticksLived; protected int airTicks = 400; protected boolean noFallDamage; protected float health = 20; protected int maxHealth = 20; - protected float absorption = 0; + protected float absorption; - protected float ySize = 0; + protected float ySize; public boolean keepMovement; - public float fallDistance = 0; + public float fallDistance; public int lastUpdate; - public int fireTicks = 0; - public int inPortalTicks = 0; - public int inEndPortalTicks = 0; + public int fireTicks; + public int inPortalTicks; + public int inEndPortalTicks; protected Position portalPos; public boolean noClip; public float scale = 1; @@ -433,7 +438,8 @@ public abstract class Entity extends Location implements Metadatable { public boolean closed; - public final boolean isPlayer; + @Deprecated + public final boolean isPlayer = this instanceof Player; private volatile boolean init; private volatile boolean initEntity; @@ -481,8 +487,7 @@ protected float getBaseOffset() { } public Entity(FullChunk chunk, CompoundTag nbt) { - this.isPlayer = this instanceof Player; - if (!this.isPlayer) { + if (!(this instanceof Player)) { this.init(chunk, nbt); } } @@ -1044,6 +1049,10 @@ private static Entity createEntity0(Class clazz, FullChunk chu return entity; } + public static boolean isKnown(String name) { + return knownEntities.containsKey(name); + } + public static boolean registerEntity(String name, Class clazz) { return registerEntity(name, clazz, false); } @@ -2575,6 +2584,10 @@ public boolean teleport(Location location) { } public boolean teleport(Location location, PlayerTeleportEvent.TeleportCause cause) { + if (!this.server.isPrimaryThread()) { + this.server.getLogger().warning("Entity teleported asynchronously: " + this.getClass().getSimpleName()); + } + double yaw = location.yaw; double pitch = location.pitch; @@ -2845,23 +2858,6 @@ public int hashCode() { return (int) (203 + this.id); } - public static Entity create(Object type, Position source, Object... args) { - FullChunk chunk = source.getLevel().getChunk((int) source.x >> 4, (int) source.z >> 4, true); - if (!chunk.isGenerated()) { - chunk.setGenerated(); - } - if (!chunk.isPopulated()) { - chunk.setPopulated(); - } - - CompoundTag nbt = new CompoundTag().putList(new ListTag("Pos").add(new DoubleTag("", source.x)).add(new DoubleTag("", source.y)).add(new DoubleTag("", source.z))) - .putList(new ListTag("Motion").add(new DoubleTag("", 0)).add(new DoubleTag("", 0)).add(new DoubleTag("", 0))) - .putList(new ListTag("Rotation").add(new FloatTag("", source instanceof Location ? (float) ((Location) source).yaw : 0)) - .add(new FloatTag("", source instanceof Location ? (float) ((Location) source).pitch : 0))); - - return Entity.createEntity(type.toString(), chunk, nbt, args); - } - public boolean isOnLadder() { int b = this.level.getBlockIdAt(this.chunk, this.getFloorX(), this.getFloorY(), this.getFloorZ()); return b == Block.LADDER || b == Block.VINES || b == Block.TWISTING_VINES || b == Block.WEEPING_VINES || b == Block.CAVE_VINES_BODY_WITH_BERRIES || b == Block.CAVE_VINES_HEAD_WITH_BERRIES; diff --git a/src/main/java/cn/nukkit/entity/EntityHumanType.java b/src/main/java/cn/nukkit/entity/EntityHumanType.java index 5d302e89f97..ab67441fbf5 100644 --- a/src/main/java/cn/nukkit/entity/EntityHumanType.java +++ b/src/main/java/cn/nukkit/entity/EntityHumanType.java @@ -54,6 +54,7 @@ protected void initEntity() { for (CompoundTag item : inventoryList.getAll()) { int slot = item.getByte("Slot"); if (slot >= 0 && slot < 9) { + // Old hotbar saving stuff, remove it (useless now) inventoryList.remove(item); } else if (slot >= 100 && slot < 104) { this.inventory.setItem(this.inventory.getSize() + slot - 100, NBTIO.getItemHelper(item)); @@ -96,7 +97,7 @@ public void saveNBT() { ); } - int slotCount = 45; + int slotCount = 45; // SURVIVAL_SLOTS + 9 for (int slot = 9; slot < slotCount; ++slot) { Item item = this.inventory.getItem(slot - 9); inventoryTag.add(NBTIO.putItemHelper(item, slot)); diff --git a/src/main/java/cn/nukkit/entity/item/EntityFallingBlock.java b/src/main/java/cn/nukkit/entity/item/EntityFallingBlock.java index 33403c2fe31..ad5b7f9aef2 100644 --- a/src/main/java/cn/nukkit/entity/item/EntityFallingBlock.java +++ b/src/main/java/cn/nukkit/entity/item/EntityFallingBlock.java @@ -158,7 +158,7 @@ public boolean onUpdate(int currentTick) { if (onGround && !closed) { close(); - Block floorBlock = level.getBlock(this); + Block floorBlock = level.getBlock(this.add(0, 0.0001, 0)); if (this.getBlock() == Block.SNOW_LAYER && floorBlock.getId() == Block.SNOW_LAYER && (floorBlock.getDamage() & 0x7) != 0x7) { int mergedHeight = (floorBlock.getDamage() & 0x7) + 1 + (this.getDamage() & 0x7) + 1; if (mergedHeight > 8) { @@ -188,7 +188,7 @@ public boolean onUpdate(int currentTick) { if (this.getBlock() != Block.SNOW_LAYER ? this.level.getGameRules().getBoolean(GameRule.DO_ENTITY_DROPS) : this.level.getGameRules().getBoolean(GameRule.DO_TILE_DROPS)) { getLevel().dropItem(this, Item.get(this.blockId, this.damage, 1)); } - } else { + } else if (floorBlock.getId() == 0) { EntityBlockChangeEvent event = new EntityBlockChangeEvent(this, floorBlock, Block.get(blockId, damage)); server.getPluginManager().callEvent(event); if (!event.isCancelled()) { diff --git a/src/main/java/cn/nukkit/entity/weather/EntityLightning.java b/src/main/java/cn/nukkit/entity/weather/EntityLightning.java index 906e025a2a8..5228093a62c 100644 --- a/src/main/java/cn/nukkit/entity/weather/EntityLightning.java +++ b/src/main/java/cn/nukkit/entity/weather/EntityLightning.java @@ -20,7 +20,7 @@ public class EntityLightning extends Entity implements EntityLightningStrike { public static final int NETWORK_ID = 93; - private boolean isEffect = true; + protected boolean isEffect = true; public int state; public int liveTime; diff --git a/src/main/java/cn/nukkit/event/player/PlayerKickEvent.java b/src/main/java/cn/nukkit/event/player/PlayerKickEvent.java index 45e43b80c50..d1d2943e0e2 100644 --- a/src/main/java/cn/nukkit/event/player/PlayerKickEvent.java +++ b/src/main/java/cn/nukkit/event/player/PlayerKickEvent.java @@ -47,14 +47,14 @@ public PlayerKickEvent(Player player, String reason, TextContainer quitMessage) this(player, Reason.UNKNOWN, reason, quitMessage); } - public PlayerKickEvent(Player player, Reason reason, TextContainer quitMessage) { - this(player, reason, reason.toString(), quitMessage); - } - public PlayerKickEvent(Player player, Reason reason, String quitMessage) { this(player, reason, new TextContainer(quitMessage)); } + public PlayerKickEvent(Player player, Reason reason, TextContainer quitMessage) { + this(player, reason, reason.toString(), quitMessage); + } + public PlayerKickEvent(Player player, Reason reason, String reasonString, TextContainer quitMessage) { this.player = player; this.quitMessage = quitMessage; diff --git a/src/main/java/cn/nukkit/event/server/BatchPacketsEvent.java b/src/main/java/cn/nukkit/event/server/BatchPacketsEvent.java index 9aa06826ca7..efa2e162df3 100644 --- a/src/main/java/cn/nukkit/event/server/BatchPacketsEvent.java +++ b/src/main/java/cn/nukkit/event/server/BatchPacketsEvent.java @@ -16,12 +16,9 @@ public static HandlerList getHandlers() { private final Player[] players; private final DataPacket[] packets; - private final boolean forceSync; - public BatchPacketsEvent(Player[] players, DataPacket[] packets, boolean forceSync) { this.players = players; this.packets = packets; - this.forceSync = forceSync; } public Player[] getPlayers() { @@ -34,6 +31,6 @@ public DataPacket[] getPackets() { @Deprecated public boolean isForceSync() { - return forceSync; + return true; } } diff --git a/src/main/java/cn/nukkit/form/element/ElementDropdown.java b/src/main/java/cn/nukkit/form/element/ElementDropdown.java index 9b3a5fb5add..4cfd810e057 100644 --- a/src/main/java/cn/nukkit/form/element/ElementDropdown.java +++ b/src/main/java/cn/nukkit/form/element/ElementDropdown.java @@ -8,7 +8,7 @@ public class ElementDropdown extends Element { @SuppressWarnings("unused") - private final String type = "dropdown"; + private final String type = "dropdown"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String text = ""; @SuppressWarnings("FieldMayBeFinal") private List options; diff --git a/src/main/java/cn/nukkit/form/element/ElementInput.java b/src/main/java/cn/nukkit/form/element/ElementInput.java index c5a33043661..18b3f9c8bda 100644 --- a/src/main/java/cn/nukkit/form/element/ElementInput.java +++ b/src/main/java/cn/nukkit/form/element/ElementInput.java @@ -5,7 +5,7 @@ public class ElementInput extends Element { @SuppressWarnings("unused") - private final String type = "input"; + private final String type = "input"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String text = ""; private String placeholder = ""; @SerializedName("default") diff --git a/src/main/java/cn/nukkit/form/element/ElementLabel.java b/src/main/java/cn/nukkit/form/element/ElementLabel.java index 2f3a165fe82..a14a322cc3a 100644 --- a/src/main/java/cn/nukkit/form/element/ElementLabel.java +++ b/src/main/java/cn/nukkit/form/element/ElementLabel.java @@ -3,7 +3,7 @@ public class ElementLabel extends Element { @SuppressWarnings("unused") - private final String type = "label"; + private final String type = "label"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String text = ""; public ElementLabel(String text) { diff --git a/src/main/java/cn/nukkit/form/element/ElementSlider.java b/src/main/java/cn/nukkit/form/element/ElementSlider.java index 3b11f376c7d..1f1c6e39f45 100644 --- a/src/main/java/cn/nukkit/form/element/ElementSlider.java +++ b/src/main/java/cn/nukkit/form/element/ElementSlider.java @@ -5,7 +5,7 @@ public class ElementSlider extends Element { @SuppressWarnings("unused") - private final String type = "slider"; + private final String type = "slider"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String text = ""; private float min = 0f; private float max = 100f; @@ -25,8 +25,8 @@ public ElementSlider(String text, float min, float max, int step, float defaultV this.text = text; this.min = Math.max(min, 0f); this.max = Math.max(max, this.min); - if (step != -1.0f && step > 0) this.step = step; - if (defaultValue != -1.0f) this.defaultValue = defaultValue; + if (step != -1f && step > 0) this.step = step; + if (defaultValue != -1f) this.defaultValue = defaultValue; } public String getText() { diff --git a/src/main/java/cn/nukkit/form/element/ElementStepSlider.java b/src/main/java/cn/nukkit/form/element/ElementStepSlider.java index 7f510f3360f..ef942764cc6 100644 --- a/src/main/java/cn/nukkit/form/element/ElementStepSlider.java +++ b/src/main/java/cn/nukkit/form/element/ElementStepSlider.java @@ -8,7 +8,7 @@ public class ElementStepSlider extends Element { @SuppressWarnings("unused") - private final String type = "step_slider"; + private final String type = "step_slider"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String text = ""; @SuppressWarnings("FieldMayBeFinal") private List steps; diff --git a/src/main/java/cn/nukkit/form/element/ElementToggle.java b/src/main/java/cn/nukkit/form/element/ElementToggle.java index c2fc4f55754..eb24b24fa16 100644 --- a/src/main/java/cn/nukkit/form/element/ElementToggle.java +++ b/src/main/java/cn/nukkit/form/element/ElementToggle.java @@ -5,7 +5,7 @@ public class ElementToggle extends Element { @SuppressWarnings("unused") - private final String type = "toggle"; + private final String type = "toggle"; //This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String text; @SerializedName("default") private boolean defaultValue; diff --git a/src/main/java/cn/nukkit/form/handler/FormResponseHandler.java b/src/main/java/cn/nukkit/form/handler/FormResponseHandler.java index effc95ca7d7..5d52099c67a 100644 --- a/src/main/java/cn/nukkit/form/handler/FormResponseHandler.java +++ b/src/main/java/cn/nukkit/form/handler/FormResponseHandler.java @@ -6,11 +6,9 @@ public interface FormResponseHandler { - static FormResponseHandler withoutPlayer(IntConsumer formIDConsumer) { return (player, formID) -> formIDConsumer.accept(formID); } - void handle(Player player, int formID); } diff --git a/src/main/java/cn/nukkit/form/window/FormWindowCustom.java b/src/main/java/cn/nukkit/form/window/FormWindowCustom.java index f7682ee7ba5..756b16eaab4 100644 --- a/src/main/java/cn/nukkit/form/window/FormWindowCustom.java +++ b/src/main/java/cn/nukkit/form/window/FormWindowCustom.java @@ -12,7 +12,7 @@ public class FormWindowCustom extends FormWindow { @SuppressWarnings("unused") - private final String type = "custom_form"; + private final String type = "custom_form"; // This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String title = ""; private ElementButtonImageData icon; @SuppressWarnings("FieldMayBeFinal") diff --git a/src/main/java/cn/nukkit/form/window/FormWindowModal.java b/src/main/java/cn/nukkit/form/window/FormWindowModal.java index cb58679c9d9..63da91229d8 100644 --- a/src/main/java/cn/nukkit/form/window/FormWindowModal.java +++ b/src/main/java/cn/nukkit/form/window/FormWindowModal.java @@ -5,7 +5,7 @@ public class FormWindowModal extends FormWindow { @SuppressWarnings("unused") - private final String type = "modal"; + private final String type = "modal"; // This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String title = ""; private String content = ""; private String button1 = ""; diff --git a/src/main/java/cn/nukkit/form/window/FormWindowSimple.java b/src/main/java/cn/nukkit/form/window/FormWindowSimple.java index 5731a7745ae..0b4e63f73f7 100644 --- a/src/main/java/cn/nukkit/form/window/FormWindowSimple.java +++ b/src/main/java/cn/nukkit/form/window/FormWindowSimple.java @@ -9,7 +9,7 @@ public class FormWindowSimple extends FormWindow { @SuppressWarnings("unused") - private final String type = "form"; + private final String type = "form"; // This variable is used for JSON import operations. Do NOT delete :) -- @Snake1999 private String title = ""; private String content = ""; @SuppressWarnings("FieldMayBeFinal") diff --git a/src/main/java/cn/nukkit/inventory/transaction/action/CraftingTransferMaterialAction.java b/src/main/java/cn/nukkit/inventory/transaction/action/CraftingTransferMaterialAction.java index 46fc91701d7..137b86839ea 100644 --- a/src/main/java/cn/nukkit/inventory/transaction/action/CraftingTransferMaterialAction.java +++ b/src/main/java/cn/nukkit/inventory/transaction/action/CraftingTransferMaterialAction.java @@ -10,12 +10,8 @@ */ public class CraftingTransferMaterialAction extends InventoryAction { - //private int slot; - public CraftingTransferMaterialAction(Item sourceItem, Item targetItem, int slot) { super(sourceItem, targetItem); - - //this.slot = slot; } @Override diff --git a/src/main/java/cn/nukkit/item/Item.java b/src/main/java/cn/nukkit/item/Item.java index 66fef103a53..ed302006196 100644 --- a/src/main/java/cn/nukkit/item/Item.java +++ b/src/main/java/cn/nukkit/item/Item.java @@ -399,12 +399,12 @@ public static void addCreativeItem(Item item) { public static void removeCreativeItem(Item item) { int index = getCreativeItemIndex(item); if (index != -1) { - getCreativeItems().remove(index); + Item.CREATIVE_ITEMS.remove(index); } } public static boolean isCreativeItem(Item item) { - for (Item aCreative : getCreativeItems()) { + for (Item aCreative : Item.CREATIVE_ITEMS) { if (item.equals(aCreative, !item.isTool())) { return true; } @@ -413,12 +413,12 @@ public static boolean isCreativeItem(Item item) { } public static Item getCreativeItem(int index) { - ArrayList items = getCreativeItems(); + List items = Item.CREATIVE_ITEMS; return (index >= 0 && index < items.size()) ? items.get(index) : null; } public static int getCreativeItemIndex(Item item) { - ArrayList items = getCreativeItems(); + List items = Item.CREATIVE_ITEMS; for (int i = 0; i < items.size(); i++) { if (item.equals(items.get(i), !item.isTool())) { return i; diff --git a/src/main/java/cn/nukkit/item/ItemBucket.java b/src/main/java/cn/nukkit/item/ItemBucket.java index 3c586fc6ab6..976cdf99bc2 100644 --- a/src/main/java/cn/nukkit/item/ItemBucket.java +++ b/src/main/java/cn/nukkit/item/ItemBucket.java @@ -292,7 +292,7 @@ public boolean onActivate(Level level, Player player, Block block, Block target, player.setNeedSendInventory(true); } } else if (targetBlock instanceof BlockPowderSnow) { - if (player.getLevel().getProvider() instanceof Anvil) { + if (player.getLevel().getProvider() instanceof Anvil || !block.canBeReplaced()) { return false; } diff --git a/src/main/java/cn/nukkit/item/ItemCoal.java b/src/main/java/cn/nukkit/item/ItemCoal.java index 46bf7064d85..7bd76f1bf17 100644 --- a/src/main/java/cn/nukkit/item/ItemCoal.java +++ b/src/main/java/cn/nukkit/item/ItemCoal.java @@ -15,9 +15,6 @@ public ItemCoal(Integer meta) { } public ItemCoal(Integer meta, int count) { - super(COAL, meta, count, "Coal"); - if (this.meta == 1) { - this.name = "Charcoal"; - } + super(COAL, meta, count, meta != null && meta == 1 ? "Charcoal" : "Coal"); } } diff --git a/src/main/java/cn/nukkit/item/ItemFireCharge.java b/src/main/java/cn/nukkit/item/ItemFireCharge.java index 092595faa60..4ef3be088d2 100644 --- a/src/main/java/cn/nukkit/item/ItemFireCharge.java +++ b/src/main/java/cn/nukkit/item/ItemFireCharge.java @@ -35,7 +35,8 @@ public boolean onActivate(Level level, Player player, Block block, Block target, if (block.getId() == AIR && (target instanceof BlockSolid || target instanceof BlockSolidMeta || target instanceof BlockLeaves)) { if (target.getId() == OBSIDIAN) { - if (level.createPortal(target, true)) { + if (level.createPortal(target)) { + level.addSound(target, Sound.MOB_GHAST_FIREBALL); return true; } } diff --git a/src/main/java/cn/nukkit/item/ItemFlintSteel.java b/src/main/java/cn/nukkit/item/ItemFlintSteel.java index a5dd0473275..e3170f6a6ce 100644 --- a/src/main/java/cn/nukkit/item/ItemFlintSteel.java +++ b/src/main/java/cn/nukkit/item/ItemFlintSteel.java @@ -42,7 +42,8 @@ public boolean onActivate(Level level, Player player, Block block, Block target, // 1.18 vanilla allows flint & steel to be used even if fire exists if ((block.getId() == AIR || block.getId() == FIRE || block.getId() == SOUL_FIRE) && (target instanceof BlockSolid || target instanceof BlockSolidMeta || target instanceof BlockLeaves)) { if (target.getId() == OBSIDIAN) { - if (level.createPortal(target, false)) { + if (level.createPortal(target)) { + level.addLevelSoundEvent(target, LevelSoundEventPacket.SOUND_IGNITE); return true; } } diff --git a/src/main/java/cn/nukkit/item/enchantment/EnchantmentSoulSpeed.java b/src/main/java/cn/nukkit/item/enchantment/EnchantmentSoulSpeed.java index e5d8e1356b2..0fbfa0a3837 100644 --- a/src/main/java/cn/nukkit/item/enchantment/EnchantmentSoulSpeed.java +++ b/src/main/java/cn/nukkit/item/enchantment/EnchantmentSoulSpeed.java @@ -15,4 +15,9 @@ public int getMinEnchantAbility(int level) { public int getMaxLevel() { return 3; } + + @Override + public boolean isTreasure() { + return true; + } } diff --git a/src/main/java/cn/nukkit/level/BlockPalette.java b/src/main/java/cn/nukkit/level/BlockPalette.java index ea1d77cf425..19feea03d92 100644 --- a/src/main/java/cn/nukkit/level/BlockPalette.java +++ b/src/main/java/cn/nukkit/level/BlockPalette.java @@ -43,25 +43,6 @@ public void registerState(int blockId, int data, int runtimeId, CompoundTag bloc this.legacyToRuntimeId.put(legacyId, runtimeId); this.runtimeIdToLegacy.putIfAbsent(runtimeId, legacyId); this.stateToLegacy.putIfAbsent(blockState, legacyId); - - // Hack: Map IDs for item frame up & down states - if (blockId == BlockID.ITEM_FRAME_BLOCK || blockId == BlockID.GLOW_FRAME) { - if (data == 7) { - int offset = 5; - - runtimeId = runtimeId + offset; - legacyId = blockId << 6 | 5; // Up - this.legacyToRuntimeId.put(legacyId, runtimeId); - this.runtimeIdToLegacy.putIfAbsent(runtimeId, legacyId); - - int offset2 = 0; - - runtimeId = runtimeId + offset + offset2; - legacyId = blockId << 6 | 4; // Down - this.legacyToRuntimeId.put(legacyId, runtimeId); - this.runtimeIdToLegacy.putIfAbsent(runtimeId, legacyId); - } - } } public void lock() { diff --git a/src/main/java/cn/nukkit/level/Level.java b/src/main/java/cn/nukkit/level/Level.java index 3cff8535ff8..742273e6345 100644 --- a/src/main/java/cn/nukkit/level/Level.java +++ b/src/main/java/cn/nukkit/level/Level.java @@ -66,7 +66,6 @@ import java.lang.ref.SoftReference; import java.util.*; import java.util.concurrent.*; -import java.util.function.Predicate; /** @@ -319,13 +318,13 @@ public Level(Server server, String name, String path, Class 0 && sleeping / players * 100 >= gameRules.getInteger(GameRule.PLAYERS_SLEEPING_PERCENTAGE)) { + if (playerCount > 0 && sleepingPlayerCount / playerCount * 100 >= gameRules.getInteger(GameRule.PLAYERS_SLEEPING_PERCENTAGE)) { int time = this.getTime() % Level.TIME_FULL; if ((time >= Level.TIME_NIGHT && time < Level.TIME_SUNRISE) || this.isThundering()) { @@ -1107,9 +1106,7 @@ public void sendBlocks(Player[] target, Vector3[] blocks, int flags, boolean opt throw new IllegalStateException("Unable to create BlockUpdatePacket at (" + b.x + ", " + b.y + ", " + b.z + ") in " + getName()); } - for (Player player : target) { - player.dataPacket(packet); - } + Server.broadcastPacket(target, packet); } } @@ -1419,10 +1416,6 @@ public Block[] getCollisionBlocks(AxisAlignedBB bb, boolean targetFirst) { } public Block[] getCollisionBlocks(Entity entity, AxisAlignedBB bb, boolean targetFirst) { - return getCollisionBlocks(entity, bb, targetFirst, block -> block.getId() != 0); - } - - public Block[] getCollisionBlocks(Entity entity, AxisAlignedBB bb, boolean targetFirst, Predicate condition) { int minX = NukkitMath.floorDouble(bb.getMinX()); int minY = NukkitMath.floorDouble(bb.getMinY()); int minZ = NukkitMath.floorDouble(bb.getMinZ()); @@ -1437,7 +1430,7 @@ public Block[] getCollisionBlocks(Entity entity, AxisAlignedBB bb, boolean targe for (int x = minX; x <= maxX; ++x) { for (int y = minY; y <= maxY; ++y) { Block block = this.getBlock(entity == null ? null : entity.chunk, x, y, z, false); - if (block != null && condition.test(block) && block.collidesWithBB(bb)) { + if (block != null && block.getId() != 0 && block.collidesWithBB(bb)) { return new Block[]{block}; } } @@ -1448,7 +1441,7 @@ public Block[] getCollisionBlocks(Entity entity, AxisAlignedBB bb, boolean targe for (int x = minX; x <= maxX; ++x) { for (int y = minY; y <= maxY; ++y) { Block block = this.getBlock(entity == null ? null : entity.chunk, x, y, z, false); - if (block != null && condition.test(block) && block.collidesWithBB(bb)) { + if (block != null && block.getId() != 0 && block.collidesWithBB(bb)) { collides.add(block); } } @@ -2821,14 +2814,6 @@ public void setHeightMap(int x, int z, int value) { this.getChunk(x >> 4, z >> 4, true).setHeightMap(x & 0x0f, z & 0x0f, value & 0x0f); } - public int getBiomeColor(int x, int z) { - return this.getChunk(x >> 4, z >> 4, true).getBiomeColor(x & 0x0f, z & 0x0f); - } - - public void setBiomeColor(int x, int z, int R, int G, int B) { - this.getChunk(x >> 4, z >> 4, true).setBiomeColor(x & 0x0f, z & 0x0f, R, G, B); - } - public Map getChunks() { return provider.getLoadedChunks(); } @@ -3765,9 +3750,7 @@ public void addEntityMovement(Entity entity, double x, double y, double z, doubl pk.pitch = pitch; pk.onGround = entity.onGround; - for (Player p : entity.getViewers().values()) { - p.dataPacket(pk); - } + Server.broadcastPacket(entity.getViewers().values(), pk); } public boolean isRaining() { @@ -3794,7 +3777,7 @@ public boolean setRaining(boolean raining) { setRainTime(time); } else { pk.evid = LevelEventPacket.EVENT_STOP_RAIN; - setRainTime(Utils.random.nextInt(168000) + 12000); + setRainTime(ThreadLocalRandom.current().nextInt(168000) + 12000); } Server.broadcastPacket(this.getPlayers().values(), pk); @@ -3837,7 +3820,7 @@ public boolean setThundering(boolean thundering) { setThunderTime(time); } else { pk.evid = LevelEventPacket.EVENT_STOP_THUNDER; - setThunderTime(Utils.random.nextInt(168000) + 12000); + setThunderTime(ThreadLocalRandom.current().nextInt(168000) + 12000); } Server.broadcastPacket(this.getPlayers().values(), pk); @@ -4008,7 +3991,7 @@ public boolean isAnimalSpawningAllowedByTime() { return time < 13184 || time > 22800; } - public boolean createPortal(Block target, boolean fireCharge) { + public boolean createPortal(Block target) { if (this.getDimension() == DIMENSION_THE_END) return false; final int maxPortalSize = 23; final int targX = target.getFloorX(); @@ -4135,11 +4118,6 @@ public boolean createPortal(Block target, boolean fireCharge) { } } - if (fireCharge) { - this.addSound(target, cn.nukkit.level.Sound.MOB_GHAST_FIREBALL); - } else { - this.addLevelSoundEvent(target, LevelSoundEventPacket.SOUND_IGNITE); - } return true; } else if (sizeZ >= 2 && sizeZ <= maxPortalSize) { //start scan from 1 block above base @@ -4221,11 +4199,6 @@ public boolean createPortal(Block target, boolean fireCharge) { } } - if (fireCharge) { - this.addSound(target, cn.nukkit.level.Sound.MOB_GHAST_FIREBALL); - } else { - this.addLevelSoundEvent(target, LevelSoundEventPacket.SOUND_IGNITE); - } return true; } diff --git a/src/main/java/cn/nukkit/level/format/FullChunk.java b/src/main/java/cn/nukkit/level/format/FullChunk.java index 7678a47276c..a8ed539a1b4 100644 --- a/src/main/java/cn/nukkit/level/format/FullChunk.java +++ b/src/main/java/cn/nukkit/level/format/FullChunk.java @@ -124,9 +124,6 @@ default int getBiomeId(int x, int y, int z) { return this.getBiomeId(x, z); } - @Deprecated - void setBiomeIdAndColor(int x, int z, int idAndColor); - default void setBiomeId(int x, int y, int z, int biomeId) { this.setBiomeId(x, y, z, (byte) biomeId); } @@ -145,10 +142,6 @@ default void setBiome(int x, int z, cn.nukkit.level.biome.Biome biome) { setBiomeId(x, z, biome.getId()); } - int getBiomeColor(int x, int z); - - void setBiomeColor(int x, int z, int r, int g, int b); - boolean isLightPopulated(); void setLightPopulated(); @@ -199,9 +192,6 @@ default void setBiome(int x, int z, cn.nukkit.level.biome.Biome biome) { void setBiomeIdArray(byte[] biomeIdArray); - @Deprecated - int[] getBiomeColorArray(); - byte[] getHeightMapArray(); @Deprecated diff --git a/src/main/java/cn/nukkit/level/format/generic/BaseFullChunk.java b/src/main/java/cn/nukkit/level/format/generic/BaseFullChunk.java index 0baf128db99..71a37a24696 100644 --- a/src/main/java/cn/nukkit/level/format/generic/BaseFullChunk.java +++ b/src/main/java/cn/nukkit/level/format/generic/BaseFullChunk.java @@ -231,19 +231,6 @@ public void setBiomeId(int x, int z, int biomeId) { this.biomes[(x << 4) | z] = (byte) biomeId; } - @Override - public int getBiomeColor(int x, int z) { - return 0; - } - - @Override - public void setBiomeIdAndColor(int x, int z, int idAndColor) { - } - - @Override - public void setBiomeColor(int x, int z, int r, int g, int b) { - } - @Override public int getHeightMap(int x, int z) { return this.heightMap[(z << 4) | x] & 0xFF; @@ -515,11 +502,6 @@ public void setBiomeIdArray(byte[] biomeIdArray) { this.biomes = biomeIdArray; } - @Override - public int[] getBiomeColorArray() { - return new int[0]; - } - @Override public byte[] getHeightMapArray() { return this.heightMap; diff --git a/src/main/java/cn/nukkit/level/generator/object/tree/ObjectSpruceTree.java b/src/main/java/cn/nukkit/level/generator/object/tree/ObjectSpruceTree.java index d8eb0ef97e2..30d776da8a6 100644 --- a/src/main/java/cn/nukkit/level/generator/object/tree/ObjectSpruceTree.java +++ b/src/main/java/cn/nukkit/level/generator/object/tree/ObjectSpruceTree.java @@ -3,6 +3,7 @@ import cn.nukkit.block.Block; import cn.nukkit.block.BlockWood; import cn.nukkit.level.ChunkManager; +import cn.nukkit.level.biome.Biome; import cn.nukkit.math.NukkitRandom; /** @@ -49,6 +50,8 @@ public void placeLeaves(ChunkManager level, int topSize, int lRadius, int x, int int maxR = 1; int minR = 0; + boolean createSnow = this.canCreateSnow && Biome.getBiome(level.getChunk(x >> 4, z >> 4).getBiomeId(x & 0x0f, z & 0x0f)).isFreezing(); + for (int yy = 0; yy <= topSize; ++yy) { int yyy = y + this.treeHeight - yy; @@ -63,7 +66,7 @@ public void placeLeaves(ChunkManager level, int topSize, int lRadius, int x, int if (!Block.isBlockSolidById(level.getBlockIdAt(xx, yyy, zz))) { level.setBlockAt(xx, yyy, zz, this.getLeafBlock(), this.getType()); - if (this.canCreateSnow) { + if (createSnow) { if (level.getBlockIdAt(xx, yyy + 1, zz) == Block.AIR && level.getBlockIdAt(xx, yyy + 2, zz) == Block.AIR) { level.setBlockAt(xx, yyy + 1, zz, Block.SNOW_LAYER, 0); } diff --git a/src/main/java/cn/nukkit/math/MathHelper.java b/src/main/java/cn/nukkit/math/MathHelper.java index e9a6ed5380a..bb69aef37ec 100644 --- a/src/main/java/cn/nukkit/math/MathHelper.java +++ b/src/main/java/cn/nukkit/math/MathHelper.java @@ -90,7 +90,7 @@ public static int ceil(float floatNumber) { } public static int clamp(int check, int min, int max) { - return check > max ? max : (Math.max(check, min)); + return check > max ? max : (check < min ? min : check); } public static double denormalizeClamp(double lowerBnd, double upperBnd, double slide) { diff --git a/src/main/java/cn/nukkit/nbt/tag/ByteArrayTag.java b/src/main/java/cn/nukkit/nbt/tag/ByteArrayTag.java index 7ab7dee8c6d..762bdbfb587 100644 --- a/src/main/java/cn/nukkit/nbt/tag/ByteArrayTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/ByteArrayTag.java @@ -21,7 +21,7 @@ public ByteArrayTag(String name, byte[] data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { if (data == null) { dos.writeInt(0); return; diff --git a/src/main/java/cn/nukkit/nbt/tag/ByteTag.java b/src/main/java/cn/nukkit/nbt/tag/ByteTag.java index b64fea4c379..2105ab5183c 100644 --- a/src/main/java/cn/nukkit/nbt/tag/ByteTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/ByteTag.java @@ -29,7 +29,7 @@ public ByteTag(String name, int data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeByte(data); } diff --git a/src/main/java/cn/nukkit/nbt/tag/CompoundTag.java b/src/main/java/cn/nukkit/nbt/tag/CompoundTag.java index e3fa54c1522..8e4cfacfd42 100644 --- a/src/main/java/cn/nukkit/nbt/tag/CompoundTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/CompoundTag.java @@ -24,7 +24,7 @@ public CompoundTag(String name) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { for (Map.Entry entry : this.tags.entrySet()) { Tag.writeNamedTag(entry.getValue(), entry.getKey(), dos); } diff --git a/src/main/java/cn/nukkit/nbt/tag/DoubleTag.java b/src/main/java/cn/nukkit/nbt/tag/DoubleTag.java index f9c592e6dd0..aa83d87bced 100644 --- a/src/main/java/cn/nukkit/nbt/tag/DoubleTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/DoubleTag.java @@ -29,7 +29,7 @@ public DoubleTag(String name, double data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeDouble(data); } diff --git a/src/main/java/cn/nukkit/nbt/tag/EndTag.java b/src/main/java/cn/nukkit/nbt/tag/EndTag.java index dde6093a682..9c5665e3939 100644 --- a/src/main/java/cn/nukkit/nbt/tag/EndTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/EndTag.java @@ -16,7 +16,7 @@ public void load(NBTInputStream dis) throws IOException { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { } @Override diff --git a/src/main/java/cn/nukkit/nbt/tag/FloatTag.java b/src/main/java/cn/nukkit/nbt/tag/FloatTag.java index 8c628fa322b..cb52a9d7508 100644 --- a/src/main/java/cn/nukkit/nbt/tag/FloatTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/FloatTag.java @@ -29,7 +29,7 @@ public FloatTag(String name, float data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeFloat(data); } diff --git a/src/main/java/cn/nukkit/nbt/tag/IntArrayTag.java b/src/main/java/cn/nukkit/nbt/tag/IntArrayTag.java index 37303d7200c..dce99f7c1ed 100644 --- a/src/main/java/cn/nukkit/nbt/tag/IntArrayTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/IntArrayTag.java @@ -20,7 +20,7 @@ public IntArrayTag(String name, int[] data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeInt(data.length); for (int aData : data) { dos.writeInt(aData); diff --git a/src/main/java/cn/nukkit/nbt/tag/IntTag.java b/src/main/java/cn/nukkit/nbt/tag/IntTag.java index 84a4edbfff7..d309322cc8d 100644 --- a/src/main/java/cn/nukkit/nbt/tag/IntTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/IntTag.java @@ -29,7 +29,7 @@ public IntTag(String name, int data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeInt(data); } diff --git a/src/main/java/cn/nukkit/nbt/tag/ListTag.java b/src/main/java/cn/nukkit/nbt/tag/ListTag.java index fd9f87a46f1..073326cdd9b 100644 --- a/src/main/java/cn/nukkit/nbt/tag/ListTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/ListTag.java @@ -25,7 +25,7 @@ public ListTag(String name) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { if (!list.isEmpty()) type = list.get(0).getId(); else type = 1; diff --git a/src/main/java/cn/nukkit/nbt/tag/LongTag.java b/src/main/java/cn/nukkit/nbt/tag/LongTag.java index de08af0b7b7..6f37370a14b 100644 --- a/src/main/java/cn/nukkit/nbt/tag/LongTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/LongTag.java @@ -29,7 +29,7 @@ public LongTag(String name, long data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeLong(data); } diff --git a/src/main/java/cn/nukkit/nbt/tag/ShortTag.java b/src/main/java/cn/nukkit/nbt/tag/ShortTag.java index 9b9cc9b532f..a10ee20069c 100644 --- a/src/main/java/cn/nukkit/nbt/tag/ShortTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/ShortTag.java @@ -29,7 +29,7 @@ public ShortTag(String name, int data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeShort(data); } diff --git a/src/main/java/cn/nukkit/nbt/tag/StringTag.java b/src/main/java/cn/nukkit/nbt/tag/StringTag.java index 3c3d022b42d..7798406410e 100644 --- a/src/main/java/cn/nukkit/nbt/tag/StringTag.java +++ b/src/main/java/cn/nukkit/nbt/tag/StringTag.java @@ -20,7 +20,7 @@ public StringTag(String name, String data) { } @Override - public void write(NBTOutputStream dos) throws IOException { + void write(NBTOutputStream dos) throws IOException { dos.writeUTF(data); } diff --git a/src/main/java/cn/nukkit/network/CompressionProvider.java b/src/main/java/cn/nukkit/network/CompressionProvider.java index 17c4fa769b8..f8a78cc5f89 100644 --- a/src/main/java/cn/nukkit/network/CompressionProvider.java +++ b/src/main/java/cn/nukkit/network/CompressionProvider.java @@ -37,7 +37,7 @@ public byte[] compress(BinaryStream packet, int level) throws Exception { @Override public byte[] decompress(byte[] compressed) throws Exception { - return Zlib.inflate(compressed, 4194304); + return Zlib.inflate(compressed, 6291456); } @Override @@ -54,7 +54,7 @@ public byte[] compress(BinaryStream packet, int level) throws Exception { @Override public byte[] decompress(byte[] compressed) throws Exception { - return Zlib.inflateRaw(compressed, 4194304); + return Zlib.inflateRaw(compressed, 6291456); } @Override @@ -76,7 +76,7 @@ public byte[] compress(BinaryStream packet, int level) throws Exception { @Override public byte[] decompress(byte[] compressed) throws Exception { - return SnappyCompression.decompress(compressed, 4194304); + return SnappyCompression.decompress(compressed, 6291456); } @Override diff --git a/src/main/java/cn/nukkit/network/Network.java b/src/main/java/cn/nukkit/network/Network.java index 992b50f1f65..71e4b4506de 100644 --- a/src/main/java/cn/nukkit/network/Network.java +++ b/src/main/java/cn/nukkit/network/Network.java @@ -44,19 +44,23 @@ public Network(Server server) { this.server = server; } + @Deprecated public void addStatistics(double upload, double download) { this.upload += upload; this.download += download; } + @Deprecated public double getUpload() { return upload; } + @Deprecated public double getDownload() { return download; } + @Deprecated public void resetStatistics() { this.upload = 0; this.download = 0; diff --git a/src/main/java/cn/nukkit/network/protocol/DataPacket.java b/src/main/java/cn/nukkit/network/protocol/DataPacket.java index 47af7e3acca..1c3d89a4886 100644 --- a/src/main/java/cn/nukkit/network/protocol/DataPacket.java +++ b/src/main/java/cn/nukkit/network/protocol/DataPacket.java @@ -14,9 +14,6 @@ public abstract class DataPacket extends BinaryStream implements Cloneable { public volatile boolean isEncoded = false; - @Deprecated - private int channel; - public abstract byte pid(); public abstract void decode(); @@ -37,12 +34,11 @@ public DataPacket reset() { @Deprecated public void setChannel(int channel) { - this.channel = channel; } @Deprecated public int getChannel() { - return channel; + return 0; } public DataPacket clean() { diff --git a/src/main/java/cn/nukkit/scheduler/ServerScheduler.java b/src/main/java/cn/nukkit/scheduler/ServerScheduler.java index a3d23087a5c..7d4213a093e 100644 --- a/src/main/java/cn/nukkit/scheduler/ServerScheduler.java +++ b/src/main/java/cn/nukkit/scheduler/ServerScheduler.java @@ -3,10 +3,10 @@ import cn.nukkit.Server; import cn.nukkit.plugin.Plugin; import cn.nukkit.utils.PluginException; +import cn.nukkit.utils.Utils; +import java.util.ArrayDeque; import java.util.Map; -import java.util.Optional; -import java.util.PriorityQueue; import java.util.Queue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; @@ -22,22 +22,16 @@ public class ServerScheduler { private final AsyncPool asyncPool; private final Queue pending; - private final Queue queue; + private final Map> queueMap; private final Map taskMap; private final AtomicInteger currentTaskId; - private volatile int currentTick; + private volatile int currentTick = -1; public ServerScheduler() { this.pending = new ConcurrentLinkedQueue<>(); this.currentTaskId = new AtomicInteger(); - this.queue = new PriorityQueue<>(11, (left, right) -> { - int i = left.getNextRunTick() - right.getNextRunTick(); - if (i == 0) { - return left.getTaskId() - right.getTaskId(); - } - return i; - }); + this.queueMap = new ConcurrentHashMap<>(); this.taskMap = new ConcurrentHashMap<>(); this.asyncPool = new AsyncPool(Server.getInstance(), WORKERS); } @@ -224,7 +218,7 @@ public void cancelAllTasks() { } } this.taskMap.clear(); - this.queue.clear(); + this.queueMap .clear(); this.currentTaskId.set(0); } @@ -260,47 +254,67 @@ private TaskHandler addTask(Plugin plugin, Runnable task, int delay, int period, } public void mainThreadHeartbeat(int currentTick) { - this.currentTick = currentTick; - // Accepts pending - while (!pending.isEmpty()) { - queue.offer(pending.poll()); + // Accepts pending. + TaskHandler task; + while ((task = pending.poll()) != null) { + int tick = Math.max(currentTick, task.getNextRunTick()); // Do not schedule in the past + ArrayDeque queue = Utils.getOrCreate(queueMap, ArrayDeque.class, tick); + queue.add(task); } - // Main heart beat - while (isReady(currentTick)) { - TaskHandler taskHandler = queue.poll(); - if (taskHandler.isCancelled()) { - taskMap.remove(taskHandler.getTaskId()); - continue; - } else if (taskHandler.isAsynchronous()) { - asyncPool.execute(taskHandler.getTask()); - } else { - try { - taskHandler.run(currentTick); - } catch (Throwable e) { - Server.getInstance().getLogger().critical("Could not execute taskHandler " + taskHandler.getTaskId() + ": " + e.getMessage()); - Server.getInstance().getLogger().logException(e instanceof Exception ? e : new RuntimeException(e)); + if (currentTick - this.currentTick > queueMap.size()) { // A large number of ticks have passed since the last execution + for (Map.Entry> entry : queueMap.entrySet()) { + int tick = entry.getKey(); + if (tick <= currentTick) { + runTasks(tick); } } - if (taskHandler.isRepeating()) { - taskHandler.setNextRunTick(currentTick + taskHandler.getPeriod()); - pending.offer(taskHandler); - } else { - try { - Optional.ofNullable(taskMap.remove(taskHandler.getTaskId())).ifPresent(TaskHandler::cancel); - } catch (RuntimeException ex) { - Server.getInstance().getLogger().critical("Exception while invoking onCancel", ex); - } + } else { // Normal server tick + for (int i = this.currentTick + 1; i <= currentTick; i++) { + runTasks(currentTick); } } + this.currentTick = currentTick; AsyncTask.collectTask(); } - public int getQueueSize() { - return queue.size() + pending.size(); + private void runTasks(int currentTick) { + ArrayDeque queue = queueMap.remove(currentTick); + if (queue != null) { + for (TaskHandler taskHandler : queue) { + if (taskHandler.isCancelled()) { + taskMap.remove(taskHandler.getTaskId()); + continue; + } else if (taskHandler.isAsynchronous()) { + asyncPool.execute(taskHandler.getTask()); + } else { + try { + taskHandler.run(currentTick); + } catch (Throwable e) { + Server.getInstance().getLogger().critical("Could not execute taskHandler " + taskHandler.getTaskId() + ": " + e.getMessage(), + e instanceof Exception ? e : new RuntimeException(e)); + } + } + if (taskHandler.isRepeating()) { + taskHandler.setNextRunTick(currentTick + taskHandler.getPeriod()); + pending.offer(taskHandler); + } else { + try { + TaskHandler removed = taskMap.remove(taskHandler.getTaskId()); + if (removed != null) removed.cancel(); + } catch (RuntimeException ex) { + Server.getInstance().getLogger().critical("Exception while invoking onCancel", ex); + } + } + } + } } - private boolean isReady(int currentTick) { - return this.queue.peek() != null && this.queue.peek().getNextRunTick() <= currentTick; + public int getQueueSize() { + int size = pending.size(); + for (ArrayDeque queue : queueMap.values()) { + size += queue.size(); + } + return size; } private int nextTaskId() { diff --git a/src/main/java/cn/nukkit/utils/LogLevel.java b/src/main/java/cn/nukkit/utils/LogLevel.java index 0d4ee19399e..599d410798c 100644 --- a/src/main/java/cn/nukkit/utils/LogLevel.java +++ b/src/main/java/cn/nukkit/utils/LogLevel.java @@ -25,6 +25,7 @@ public enum LogLevel implements Comparable { /** * Default logging level: INFO */ + @Deprecated public static final LogLevel DEFAULT_LEVEL = INFO; private final BiConsumer logTo; diff --git a/src/main/java/cn/nukkit/utils/ServerKiller.java b/src/main/java/cn/nukkit/utils/ServerKiller.java index b03a8b8c6e5..8ff264c580e 100644 --- a/src/main/java/cn/nukkit/utils/ServerKiller.java +++ b/src/main/java/cn/nukkit/utils/ServerKiller.java @@ -26,6 +26,7 @@ public void run() { try { sleep(sleepTime); } catch (InterruptedException ignored) {} + System.out.println("Took too long to stop, server was killed forcefully!"); System.exit(1); } } diff --git a/src/main/java/cn/nukkit/utils/SimpleConfig.java b/src/main/java/cn/nukkit/utils/SimpleConfig.java index 985d7b324b3..01d188a4b99 100644 --- a/src/main/java/cn/nukkit/utils/SimpleConfig.java +++ b/src/main/java/cn/nukkit/utils/SimpleConfig.java @@ -19,6 +19,7 @@ *

* Added 11/02/2016 by fromgate */ +@SuppressWarnings("unused") public abstract class SimpleConfig { private final File configFile; diff --git a/src/main/java/cn/nukkit/utils/ThreadCache.java b/src/main/java/cn/nukkit/utils/ThreadCache.java index ac639a59860..c9546606b80 100644 --- a/src/main/java/cn/nukkit/utils/ThreadCache.java +++ b/src/main/java/cn/nukkit/utils/ThreadCache.java @@ -9,18 +9,29 @@ */ public class ThreadCache { + @Deprecated + public static void clean() { + } + + @Deprecated public static final ThreadLocal idArray = ThreadLocal.withInitial(() -> new byte[16][]); + @Deprecated public static final ThreadLocal dataArray = ThreadLocal.withInitial(() -> new byte[16][]); + @Deprecated public static final ThreadLocal byteCache6144 = ThreadLocal.withInitial(() -> new byte[6144]); + @Deprecated public static final ThreadLocal byteCache256 = ThreadLocal.withInitial(() -> new byte[256]); + @Deprecated public static final ThreadLocal boolCache4096 = ThreadLocal.withInitial(() -> new BitSet(4096)); + @Deprecated public static final ThreadLocal charCache4096v2 = ThreadLocal.withInitial(() -> new char[4096]); + @Deprecated public static final ThreadLocal charCache4096 = ThreadLocal.withInitial(() -> new char[4096]); public static final ThreadLocal intCache256 = ThreadLocal.withInitial(() -> new int[256]); diff --git a/src/main/resources/command_default.json b/src/main/resources/command_default.json deleted file mode 100644 index 99f67e9c6f8..00000000000 --- a/src/main/resources/command_default.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "aliases": [], - "description": "insert_description_here", - "overloads": { - "default": { - "input": { - "parameters": [ - { - "name": "args", - "type": "rawtext", - "optional": true - } - ] - }, - "output": {} - } - }, - "permission": "any" -} \ No newline at end of file diff --git a/src/main/resources/item_tags.json b/src/main/resources/item_tags.json index 7786d739f7d..735fbac6b3d 100644 --- a/src/main/resources/item_tags.json +++ b/src/main/resources/item_tags.json @@ -1,748 +1 @@ -{ - "minecraft:arrow": [ - "minecraft:arrow" - ], - "minecraft:banner": [ - "minecraft:banner" - ], - "minecraft:boat": [ - "minecraft:acacia_boat", - "minecraft:acacia_chest_boat", - "minecraft:bamboo_chest_raft", - "minecraft:bamboo_raft", - "minecraft:birch_boat", - "minecraft:birch_chest_boat", - "minecraft:cherry_boat", - "minecraft:cherry_chest_boat", - "minecraft:dark_oak_boat", - "minecraft:dark_oak_chest_boat", - "minecraft:jungle_boat", - "minecraft:jungle_chest_boat", - "minecraft:mangrove_boat", - "minecraft:mangrove_chest_boat", - "minecraft:oak_boat", - "minecraft:oak_chest_boat", - "minecraft:spruce_boat", - "minecraft:spruce_chest_boat" - ], - "minecraft:boats": [ - "minecraft:acacia_boat", - "minecraft:acacia_chest_boat", - "minecraft:bamboo_chest_raft", - "minecraft:bamboo_raft", - "minecraft:birch_boat", - "minecraft:birch_chest_boat", - "minecraft:cherry_boat", - "minecraft:cherry_chest_boat", - "minecraft:dark_oak_boat", - "minecraft:dark_oak_chest_boat", - "minecraft:jungle_boat", - "minecraft:jungle_chest_boat", - "minecraft:mangrove_boat", - "minecraft:mangrove_chest_boat", - "minecraft:oak_boat", - "minecraft:oak_chest_boat", - "minecraft:spruce_boat", - "minecraft:spruce_chest_boat" - ], - "minecraft:bookshelf_books": [ - "minecraft:book", - "minecraft:enchanted_book", - "minecraft:writable_book", - "minecraft:written_book" - ], - "minecraft:chainmail_tier": [ - "minecraft:chainmail_boots", - "minecraft:chainmail_chestplate", - "minecraft:chainmail_helmet", - "minecraft:chainmail_leggings" - ], - "minecraft:coals": [ - "minecraft:charcoal", - "minecraft:coal" - ], - "minecraft:crimson_stems": [ - "minecraft:crimson_hyphae", - "minecraft:crimson_stem", - "minecraft:stripped_crimson_hyphae", - "minecraft:stripped_crimson_stem" - ], - "minecraft:decorated_pot_sherds": [ - "minecraft:angler_pottery_sherd", - "minecraft:archer_pottery_sherd", - "minecraft:arms_up_pottery_sherd", - "minecraft:blade_pottery_sherd", - "minecraft:brewer_pottery_sherd", - "minecraft:brick", - "minecraft:burn_pottery_sherd", - "minecraft:danger_pottery_sherd", - "minecraft:explorer_pottery_sherd", - "minecraft:friend_pottery_sherd", - "minecraft:heart_pottery_sherd", - "minecraft:heartbreak_pottery_sherd", - "minecraft:howl_pottery_sherd", - "minecraft:miner_pottery_sherd", - "minecraft:mourner_pottery_sherd", - "minecraft:plenty_pottery_sherd", - "minecraft:prize_pottery_sherd", - "minecraft:sheaf_pottery_sherd", - "minecraft:shelter_pottery_sherd", - "minecraft:skull_pottery_sherd", - "minecraft:snort_pottery_sherd" - ], - "minecraft:diamond_tier": [ - "minecraft:diamond_axe", - "minecraft:diamond_boots", - "minecraft:diamond_chestplate", - "minecraft:diamond_helmet", - "minecraft:diamond_hoe", - "minecraft:diamond_leggings", - "minecraft:diamond_pickaxe", - "minecraft:diamond_shovel", - "minecraft:diamond_sword" - ], - "minecraft:digger": [ - "minecraft:diamond_axe", - "minecraft:diamond_hoe", - "minecraft:diamond_pickaxe", - "minecraft:diamond_shovel", - "minecraft:golden_axe", - "minecraft:golden_hoe", - "minecraft:golden_pickaxe", - "minecraft:golden_shovel", - "minecraft:iron_axe", - "minecraft:iron_hoe", - "minecraft:iron_pickaxe", - "minecraft:iron_shovel", - "minecraft:netherite_axe", - "minecraft:netherite_hoe", - "minecraft:netherite_pickaxe", - "minecraft:netherite_shovel", - "minecraft:stone_axe", - "minecraft:stone_hoe", - "minecraft:stone_pickaxe", - "minecraft:stone_shovel", - "minecraft:wooden_axe", - "minecraft:wooden_hoe", - "minecraft:wooden_pickaxe", - "minecraft:wooden_shovel" - ], - "minecraft:door": [ - "minecraft:acacia_door", - "minecraft:bamboo_door", - "minecraft:birch_door", - "minecraft:cherry_door", - "minecraft:crimson_door", - "minecraft:dark_oak_door", - "minecraft:iron_door", - "minecraft:jungle_door", - "minecraft:mangrove_door", - "minecraft:spruce_door", - "minecraft:warped_door", - "minecraft:wooden_door" - ], - "minecraft:golden_tier": [ - "minecraft:golden_axe", - "minecraft:golden_boots", - "minecraft:golden_chestplate", - "minecraft:golden_helmet", - "minecraft:golden_hoe", - "minecraft:golden_leggings", - "minecraft:golden_pickaxe", - "minecraft:golden_shovel", - "minecraft:golden_sword" - ], - "minecraft:hanging_actor": [ - "minecraft:painting" - ], - "minecraft:hanging_sign": [ - "minecraft:acacia_hanging_sign", - "minecraft:bamboo_hanging_sign", - "minecraft:birch_hanging_sign", - "minecraft:cherry_hanging_sign", - "minecraft:crimson_hanging_sign", - "minecraft:dark_oak_hanging_sign", - "minecraft:jungle_hanging_sign", - "minecraft:mangrove_hanging_sign", - "minecraft:oak_hanging_sign", - "minecraft:spruce_hanging_sign", - "minecraft:warped_hanging_sign" - ], - "minecraft:horse_armor": [ - "minecraft:diamond_horse_armor", - "minecraft:golden_horse_armor", - "minecraft:iron_horse_armor", - "minecraft:leather_horse_armor" - ], - "minecraft:iron_tier": [ - "minecraft:iron_axe", - "minecraft:iron_boots", - "minecraft:iron_chestplate", - "minecraft:iron_helmet", - "minecraft:iron_hoe", - "minecraft:iron_leggings", - "minecraft:iron_pickaxe", - "minecraft:iron_shovel", - "minecraft:iron_sword" - ], - "minecraft:is_armor": [ - "minecraft:chainmail_boots", - "minecraft:chainmail_chestplate", - "minecraft:chainmail_helmet", - "minecraft:chainmail_leggings", - "minecraft:diamond_boots", - "minecraft:diamond_chestplate", - "minecraft:diamond_helmet", - "minecraft:diamond_leggings", - "minecraft:elytra", - "minecraft:golden_boots", - "minecraft:golden_chestplate", - "minecraft:golden_helmet", - "minecraft:golden_leggings", - "minecraft:iron_boots", - "minecraft:iron_chestplate", - "minecraft:iron_helmet", - "minecraft:iron_leggings", - "minecraft:leather_boots", - "minecraft:leather_chestplate", - "minecraft:leather_helmet", - "minecraft:leather_leggings", - "minecraft:netherite_boots", - "minecraft:netherite_chestplate", - "minecraft:netherite_helmet", - "minecraft:netherite_leggings", - "minecraft:turtle_helmet" - ], - "minecraft:is_axe": [ - "minecraft:diamond_axe", - "minecraft:golden_axe", - "minecraft:iron_axe", - "minecraft:netherite_axe", - "minecraft:stone_axe", - "minecraft:wooden_axe" - ], - "minecraft:is_cooked": [ - "minecraft:cooked_beef", - "minecraft:cooked_chicken", - "minecraft:cooked_cod", - "minecraft:cooked_mutton", - "minecraft:cooked_porkchop", - "minecraft:cooked_rabbit", - "minecraft:cooked_salmon", - "minecraft:rabbit_stew" - ], - "minecraft:is_fish": [ - "minecraft:cod", - "minecraft:cooked_cod", - "minecraft:cooked_salmon", - "minecraft:pufferfish", - "minecraft:salmon", - "minecraft:tropical_fish" - ], - "minecraft:is_food": [ - "minecraft:apple", - "minecraft:baked_potato", - "minecraft:beef", - "minecraft:beetroot", - "minecraft:beetroot_soup", - "minecraft:bread", - "minecraft:carrot", - "minecraft:chicken", - "minecraft:cooked_beef", - "minecraft:cooked_chicken", - "minecraft:cooked_mutton", - "minecraft:cooked_porkchop", - "minecraft:cooked_rabbit", - "minecraft:cookie", - "minecraft:dried_kelp", - "minecraft:enchanted_golden_apple", - "minecraft:golden_apple", - "minecraft:golden_carrot", - "minecraft:melon_slice", - "minecraft:mushroom_stew", - "minecraft:mutton", - "minecraft:porkchop", - "minecraft:potato", - "minecraft:pumpkin_pie", - "minecraft:rabbit", - "minecraft:rabbit_stew", - "minecraft:rotten_flesh", - "minecraft:sweet_berries" - ], - "minecraft:is_hoe": [ - "minecraft:diamond_hoe", - "minecraft:golden_hoe", - "minecraft:iron_hoe", - "minecraft:netherite_hoe", - "minecraft:stone_hoe", - "minecraft:wooden_hoe" - ], - "minecraft:is_meat": [ - "minecraft:beef", - "minecraft:chicken", - "minecraft:cooked_beef", - "minecraft:cooked_chicken", - "minecraft:cooked_mutton", - "minecraft:cooked_porkchop", - "minecraft:cooked_rabbit", - "minecraft:mutton", - "minecraft:porkchop", - "minecraft:rabbit", - "minecraft:rabbit_stew", - "minecraft:rotten_flesh" - ], - "minecraft:is_minecart": [ - "minecraft:chest_minecart", - "minecraft:command_block_minecart", - "minecraft:hopper_minecart", - "minecraft:minecart", - "minecraft:tnt_minecart" - ], - "minecraft:is_pickaxe": [ - "minecraft:diamond_pickaxe", - "minecraft:golden_pickaxe", - "minecraft:iron_pickaxe", - "minecraft:netherite_pickaxe", - "minecraft:stone_pickaxe", - "minecraft:wooden_pickaxe" - ], - "minecraft:is_shovel": [ - "minecraft:diamond_shovel", - "minecraft:golden_shovel", - "minecraft:iron_shovel", - "minecraft:netherite_shovel", - "minecraft:stone_shovel", - "minecraft:wooden_shovel" - ], - "minecraft:is_sword": [ - "minecraft:diamond_sword", - "minecraft:golden_sword", - "minecraft:iron_sword", - "minecraft:netherite_sword", - "minecraft:stone_sword", - "minecraft:wooden_sword" - ], - "minecraft:is_tool": [ - "minecraft:diamond_axe", - "minecraft:diamond_hoe", - "minecraft:diamond_pickaxe", - "minecraft:diamond_shovel", - "minecraft:diamond_sword", - "minecraft:golden_axe", - "minecraft:golden_hoe", - "minecraft:golden_pickaxe", - "minecraft:golden_shovel", - "minecraft:golden_sword", - "minecraft:iron_axe", - "minecraft:iron_hoe", - "minecraft:iron_pickaxe", - "minecraft:iron_shovel", - "minecraft:iron_sword", - "minecraft:netherite_axe", - "minecraft:netherite_hoe", - "minecraft:netherite_pickaxe", - "minecraft:netherite_shovel", - "minecraft:netherite_sword", - "minecraft:stone_axe", - "minecraft:stone_hoe", - "minecraft:stone_pickaxe", - "minecraft:stone_shovel", - "minecraft:stone_sword", - "minecraft:wooden_axe", - "minecraft:wooden_hoe", - "minecraft:wooden_pickaxe", - "minecraft:wooden_shovel", - "minecraft:wooden_sword" - ], - "minecraft:is_trident": [ - "minecraft:trident" - ], - "minecraft:leather_tier": [ - "minecraft:leather_boots", - "minecraft:leather_chestplate", - "minecraft:leather_helmet", - "minecraft:leather_leggings" - ], - "minecraft:lectern_books": [ - "minecraft:writable_book", - "minecraft:written_book" - ], - "minecraft:logs": [ - "minecraft:acacia_log", - "minecraft:birch_log", - "minecraft:cherry_log", - "minecraft:cherry_wood", - "minecraft:crimson_hyphae", - "minecraft:crimson_stem", - "minecraft:dark_oak_log", - "minecraft:jungle_log", - "minecraft:mangrove_log", - "minecraft:mangrove_wood", - "minecraft:oak_log", - "minecraft:spruce_log", - "minecraft:stripped_acacia_log", - "minecraft:stripped_birch_log", - "minecraft:stripped_cherry_log", - "minecraft:stripped_cherry_wood", - "minecraft:stripped_crimson_hyphae", - "minecraft:stripped_crimson_stem", - "minecraft:stripped_dark_oak_log", - "minecraft:stripped_jungle_log", - "minecraft:stripped_mangrove_log", - "minecraft:stripped_mangrove_wood", - "minecraft:stripped_oak_log", - "minecraft:stripped_spruce_log", - "minecraft:stripped_warped_hyphae", - "minecraft:stripped_warped_stem", - "minecraft:warped_hyphae", - "minecraft:warped_stem", - "minecraft:wood" - ], - "minecraft:logs_that_burn": [ - "minecraft:acacia_log", - "minecraft:birch_log", - "minecraft:cherry_log", - "minecraft:cherry_wood", - "minecraft:dark_oak_log", - "minecraft:jungle_log", - "minecraft:mangrove_log", - "minecraft:mangrove_wood", - "minecraft:oak_log", - "minecraft:spruce_log", - "minecraft:stripped_acacia_log", - "minecraft:stripped_birch_log", - "minecraft:stripped_cherry_log", - "minecraft:stripped_cherry_wood", - "minecraft:stripped_dark_oak_log", - "minecraft:stripped_jungle_log", - "minecraft:stripped_mangrove_log", - "minecraft:stripped_mangrove_wood", - "minecraft:stripped_oak_log", - "minecraft:stripped_spruce_log", - "minecraft:wood" - ], - "minecraft:mangrove_logs": [ - "minecraft:mangrove_log", - "minecraft:mangrove_wood", - "minecraft:stripped_mangrove_log", - "minecraft:stripped_mangrove_wood" - ], - "minecraft:music_disc": [ - "minecraft:music_disc_11", - "minecraft:music_disc_13", - "minecraft:music_disc_5", - "minecraft:music_disc_blocks", - "minecraft:music_disc_cat", - "minecraft:music_disc_chirp", - "minecraft:music_disc_far", - "minecraft:music_disc_mall", - "minecraft:music_disc_mellohi", - "minecraft:music_disc_otherside", - "minecraft:music_disc_pigstep", - "minecraft:music_disc_relic", - "minecraft:music_disc_stal", - "minecraft:music_disc_strad", - "minecraft:music_disc_wait", - "minecraft:music_disc_ward" - ], - "minecraft:netherite_tier": [ - "minecraft:netherite_axe", - "minecraft:netherite_boots", - "minecraft:netherite_chestplate", - "minecraft:netherite_helmet", - "minecraft:netherite_hoe", - "minecraft:netherite_leggings", - "minecraft:netherite_pickaxe", - "minecraft:netherite_shovel", - "minecraft:netherite_sword" - ], - "minecraft:planks": [ - "minecraft:bamboo_planks", - "minecraft:cherry_planks", - "minecraft:crimson_planks", - "minecraft:mangrove_planks", - "minecraft:planks", - "minecraft:warped_planks" - ], - "minecraft:sand": [ - "minecraft:sand" - ], - "minecraft:sign": [ - "minecraft:acacia_hanging_sign", - "minecraft:acacia_sign", - "minecraft:bamboo_hanging_sign", - "minecraft:bamboo_sign", - "minecraft:birch_hanging_sign", - "minecraft:birch_sign", - "minecraft:cherry_hanging_sign", - "minecraft:cherry_sign", - "minecraft:crimson_hanging_sign", - "minecraft:crimson_sign", - "minecraft:dark_oak_hanging_sign", - "minecraft:dark_oak_sign", - "minecraft:jungle_hanging_sign", - "minecraft:jungle_sign", - "minecraft:mangrove_hanging_sign", - "minecraft:mangrove_sign", - "minecraft:oak_hanging_sign", - "minecraft:oak_sign", - "minecraft:spruce_hanging_sign", - "minecraft:spruce_sign", - "minecraft:warped_hanging_sign", - "minecraft:warped_sign" - ], - "minecraft:soul_fire_base_blocks": [ - "minecraft:soul_sand", - "minecraft:soul_soil" - ], - "minecraft:spawn_egg": [ - "minecraft:agent_spawn_egg", - "minecraft:allay_spawn_egg", - "minecraft:axolotl_spawn_egg", - "minecraft:bat_spawn_egg", - "minecraft:bee_spawn_egg", - "minecraft:blaze_spawn_egg", - "minecraft:camel_spawn_egg", - "minecraft:cat_spawn_egg", - "minecraft:cave_spider_spawn_egg", - "minecraft:chicken_spawn_egg", - "minecraft:cod_spawn_egg", - "minecraft:cow_spawn_egg", - "minecraft:creeper_spawn_egg", - "minecraft:dolphin_spawn_egg", - "minecraft:donkey_spawn_egg", - "minecraft:drowned_spawn_egg", - "minecraft:elder_guardian_spawn_egg", - "minecraft:ender_dragon_spawn_egg", - "minecraft:enderman_spawn_egg", - "minecraft:endermite_spawn_egg", - "minecraft:evoker_spawn_egg", - "minecraft:fox_spawn_egg", - "minecraft:frog_spawn_egg", - "minecraft:ghast_spawn_egg", - "minecraft:glow_squid_spawn_egg", - "minecraft:goat_spawn_egg", - "minecraft:guardian_spawn_egg", - "minecraft:hoglin_spawn_egg", - "minecraft:horse_spawn_egg", - "minecraft:husk_spawn_egg", - "minecraft:iron_golem_spawn_egg", - "minecraft:llama_spawn_egg", - "minecraft:magma_cube_spawn_egg", - "minecraft:mooshroom_spawn_egg", - "minecraft:mule_spawn_egg", - "minecraft:npc_spawn_egg", - "minecraft:ocelot_spawn_egg", - "minecraft:panda_spawn_egg", - "minecraft:parrot_spawn_egg", - "minecraft:phantom_spawn_egg", - "minecraft:pig_spawn_egg", - "minecraft:piglin_brute_spawn_egg", - "minecraft:piglin_spawn_egg", - "minecraft:pillager_spawn_egg", - "minecraft:polar_bear_spawn_egg", - "minecraft:pufferfish_spawn_egg", - "minecraft:rabbit_spawn_egg", - "minecraft:ravager_spawn_egg", - "minecraft:salmon_spawn_egg", - "minecraft:sheep_spawn_egg", - "minecraft:shulker_spawn_egg", - "minecraft:silverfish_spawn_egg", - "minecraft:skeleton_horse_spawn_egg", - "minecraft:skeleton_spawn_egg", - "minecraft:slime_spawn_egg", - "minecraft:sniffer_spawn_egg", - "minecraft:snow_golem_spawn_egg", - "minecraft:spawn_egg", - "minecraft:spider_spawn_egg", - "minecraft:squid_spawn_egg", - "minecraft:stray_spawn_egg", - "minecraft:strider_spawn_egg", - "minecraft:tadpole_spawn_egg", - "minecraft:trader_llama_spawn_egg", - "minecraft:tropical_fish_spawn_egg", - "minecraft:turtle_spawn_egg", - "minecraft:vex_spawn_egg", - "minecraft:villager_spawn_egg", - "minecraft:vindicator_spawn_egg", - "minecraft:wandering_trader_spawn_egg", - "minecraft:warden_spawn_egg", - "minecraft:witch_spawn_egg", - "minecraft:wither_skeleton_spawn_egg", - "minecraft:wither_spawn_egg", - "minecraft:wolf_spawn_egg", - "minecraft:zoglin_spawn_egg", - "minecraft:zombie_horse_spawn_egg", - "minecraft:zombie_pigman_spawn_egg", - "minecraft:zombie_spawn_egg", - "minecraft:zombie_villager_spawn_egg" - ], - "minecraft:stone_bricks": [ - "minecraft:stonebrick" - ], - "minecraft:stone_crafting_materials": [ - "minecraft:blackstone", - "minecraft:cobbled_deepslate", - "minecraft:cobblestone" - ], - "minecraft:stone_tier": [ - "minecraft:stone_axe", - "minecraft:stone_hoe", - "minecraft:stone_pickaxe", - "minecraft:stone_shovel", - "minecraft:stone_sword" - ], - "minecraft:stone_tool_materials": [ - "minecraft:blackstone", - "minecraft:cobbled_deepslate", - "minecraft:cobblestone" - ], - "minecraft:transform_materials": [ - "minecraft:netherite_ingot" - ], - "minecraft:transform_templates": [ - "minecraft:netherite_upgrade_smithing_template" - ], - "minecraft:transformable_items": [ - "minecraft:diamond_axe", - "minecraft:diamond_boots", - "minecraft:diamond_chestplate", - "minecraft:diamond_helmet", - "minecraft:diamond_hoe", - "minecraft:diamond_leggings", - "minecraft:diamond_pickaxe", - "minecraft:diamond_shovel", - "minecraft:diamond_sword", - "minecraft:golden_boots" - ], - "minecraft:trim_materials": [ - "minecraft:amethyst_shard", - "minecraft:copper_ingot", - "minecraft:diamond", - "minecraft:emerald", - "minecraft:gold_ingot", - "minecraft:iron_ingot", - "minecraft:lapis_lazuli", - "minecraft:netherite_ingot", - "minecraft:quartz", - "minecraft:redstone" - ], - "minecraft:trim_templates": [ - "minecraft:coast_armor_trim_smithing_template", - "minecraft:dune_armor_trim_smithing_template", - "minecraft:eye_armor_trim_smithing_template", - "minecraft:host_armor_trim_smithing_template", - "minecraft:raiser_armor_trim_smithing_template", - "minecraft:rib_armor_trim_smithing_template", - "minecraft:sentry_armor_trim_smithing_template", - "minecraft:shaper_armor_trim_smithing_template", - "minecraft:silence_armor_trim_smithing_template", - "minecraft:snout_armor_trim_smithing_template", - "minecraft:spire_armor_trim_smithing_template", - "minecraft:tide_armor_trim_smithing_template", - "minecraft:vex_armor_trim_smithing_template", - "minecraft:ward_armor_trim_smithing_template", - "minecraft:wayfinder_armor_trim_smithing_template", - "minecraft:wild_armor_trim_smithing_template" - ], - "minecraft:trimmable_armors": [ - "minecraft:chainmail_boots", - "minecraft:chainmail_chestplate", - "minecraft:chainmail_helmet", - "minecraft:chainmail_leggings", - "minecraft:diamond_boots", - "minecraft:diamond_chestplate", - "minecraft:diamond_helmet", - "minecraft:diamond_leggings", - "minecraft:golden_boots", - "minecraft:golden_chestplate", - "minecraft:golden_helmet", - "minecraft:golden_leggings", - "minecraft:iron_boots", - "minecraft:iron_chestplate", - "minecraft:iron_helmet", - "minecraft:iron_leggings", - "minecraft:leather_boots", - "minecraft:leather_chestplate", - "minecraft:leather_helmet", - "minecraft:leather_leggings", - "minecraft:netherite_boots", - "minecraft:netherite_chestplate", - "minecraft:netherite_helmet", - "minecraft:netherite_leggings", - "minecraft:turtle_helmet" - ], - "minecraft:vibration_damper": [ - "minecraft:black_carpet", - "minecraft:black_wool", - "minecraft:blue_carpet", - "minecraft:blue_wool", - "minecraft:brown_carpet", - "minecraft:brown_wool", - "minecraft:cyan_carpet", - "minecraft:cyan_wool", - "minecraft:gray_carpet", - "minecraft:gray_wool", - "minecraft:green_carpet", - "minecraft:green_wool", - "minecraft:light_blue_carpet", - "minecraft:light_blue_wool", - "minecraft:light_gray_carpet", - "minecraft:light_gray_wool", - "minecraft:lime_carpet", - "minecraft:lime_wool", - "minecraft:magenta_carpet", - "minecraft:magenta_wool", - "minecraft:orange_carpet", - "minecraft:orange_wool", - "minecraft:pink_carpet", - "minecraft:pink_wool", - "minecraft:purple_carpet", - "minecraft:purple_wool", - "minecraft:red_carpet", - "minecraft:red_wool", - "minecraft:white_carpet", - "minecraft:white_wool", - "minecraft:yellow_carpet", - "minecraft:yellow_wool" - ], - "minecraft:warped_stems": [ - "minecraft:stripped_warped_hyphae", - "minecraft:stripped_warped_stem", - "minecraft:warped_hyphae", - "minecraft:warped_stem" - ], - "minecraft:wooden_slabs": [ - "minecraft:bamboo_slab", - "minecraft:cherry_slab", - "minecraft:crimson_slab", - "minecraft:mangrove_slab", - "minecraft:warped_slab", - "minecraft:wooden_slab" - ], - "minecraft:wooden_tier": [ - "minecraft:wooden_axe", - "minecraft:wooden_hoe", - "minecraft:wooden_pickaxe", - "minecraft:wooden_shovel", - "minecraft:wooden_sword" - ], - "minecraft:wool": [ - "minecraft:black_wool", - "minecraft:blue_wool", - "minecraft:brown_wool", - "minecraft:cyan_wool", - "minecraft:gray_wool", - "minecraft:green_wool", - "minecraft:light_blue_wool", - "minecraft:light_gray_wool", - "minecraft:lime_wool", - "minecraft:magenta_wool", - "minecraft:orange_wool", - "minecraft:pink_wool", - "minecraft:purple_wool", - "minecraft:red_wool", - "minecraft:white_wool", - "minecraft:yellow_wool" - ] -} +{"minecraft:arrow":["minecraft:arrow"],"minecraft:banner":["minecraft:banner"],"minecraft:boat":["minecraft:acacia_boat","minecraft:acacia_chest_boat","minecraft:bamboo_chest_raft","minecraft:bamboo_raft","minecraft:birch_boat","minecraft:birch_chest_boat","minecraft:cherry_boat","minecraft:cherry_chest_boat","minecraft:dark_oak_boat","minecraft:dark_oak_chest_boat","minecraft:jungle_boat","minecraft:jungle_chest_boat","minecraft:mangrove_boat","minecraft:mangrove_chest_boat","minecraft:oak_boat","minecraft:oak_chest_boat","minecraft:spruce_boat","minecraft:spruce_chest_boat"],"minecraft:boats":["minecraft:acacia_boat","minecraft:acacia_chest_boat","minecraft:bamboo_chest_raft","minecraft:bamboo_raft","minecraft:birch_boat","minecraft:birch_chest_boat","minecraft:cherry_boat","minecraft:cherry_chest_boat","minecraft:dark_oak_boat","minecraft:dark_oak_chest_boat","minecraft:jungle_boat","minecraft:jungle_chest_boat","minecraft:mangrove_boat","minecraft:mangrove_chest_boat","minecraft:oak_boat","minecraft:oak_chest_boat","minecraft:spruce_boat","minecraft:spruce_chest_boat"],"minecraft:bookshelf_books":["minecraft:book","minecraft:enchanted_book","minecraft:writable_book","minecraft:written_book"],"minecraft:chainmail_tier":["minecraft:chainmail_boots","minecraft:chainmail_chestplate","minecraft:chainmail_helmet","minecraft:chainmail_leggings"],"minecraft:coals":["minecraft:charcoal","minecraft:coal"],"minecraft:crimson_stems":["minecraft:crimson_hyphae","minecraft:crimson_stem","minecraft:stripped_crimson_hyphae","minecraft:stripped_crimson_stem"],"minecraft:decorated_pot_sherds":["minecraft:angler_pottery_sherd","minecraft:archer_pottery_sherd","minecraft:arms_up_pottery_sherd","minecraft:blade_pottery_sherd","minecraft:brewer_pottery_sherd","minecraft:brick","minecraft:burn_pottery_sherd","minecraft:danger_pottery_sherd","minecraft:explorer_pottery_sherd","minecraft:friend_pottery_sherd","minecraft:heart_pottery_sherd","minecraft:heartbreak_pottery_sherd","minecraft:howl_pottery_sherd","minecraft:miner_pottery_sherd","minecraft:mourner_pottery_sherd","minecraft:plenty_pottery_sherd","minecraft:prize_pottery_sherd","minecraft:sheaf_pottery_sherd","minecraft:shelter_pottery_sherd","minecraft:skull_pottery_sherd","minecraft:snort_pottery_sherd"],"minecraft:diamond_tier":["minecraft:diamond_axe","minecraft:diamond_boots","minecraft:diamond_chestplate","minecraft:diamond_helmet","minecraft:diamond_hoe","minecraft:diamond_leggings","minecraft:diamond_pickaxe","minecraft:diamond_shovel","minecraft:diamond_sword"],"minecraft:digger":["minecraft:diamond_axe","minecraft:diamond_hoe","minecraft:diamond_pickaxe","minecraft:diamond_shovel","minecraft:golden_axe","minecraft:golden_hoe","minecraft:golden_pickaxe","minecraft:golden_shovel","minecraft:iron_axe","minecraft:iron_hoe","minecraft:iron_pickaxe","minecraft:iron_shovel","minecraft:netherite_axe","minecraft:netherite_hoe","minecraft:netherite_pickaxe","minecraft:netherite_shovel","minecraft:stone_axe","minecraft:stone_hoe","minecraft:stone_pickaxe","minecraft:stone_shovel","minecraft:wooden_axe","minecraft:wooden_hoe","minecraft:wooden_pickaxe","minecraft:wooden_shovel"],"minecraft:door":["minecraft:acacia_door","minecraft:bamboo_door","minecraft:birch_door","minecraft:cherry_door","minecraft:crimson_door","minecraft:dark_oak_door","minecraft:iron_door","minecraft:jungle_door","minecraft:mangrove_door","minecraft:spruce_door","minecraft:warped_door","minecraft:wooden_door"],"minecraft:golden_tier":["minecraft:golden_axe","minecraft:golden_boots","minecraft:golden_chestplate","minecraft:golden_helmet","minecraft:golden_hoe","minecraft:golden_leggings","minecraft:golden_pickaxe","minecraft:golden_shovel","minecraft:golden_sword"],"minecraft:hanging_actor":["minecraft:painting"],"minecraft:hanging_sign":["minecraft:acacia_hanging_sign","minecraft:bamboo_hanging_sign","minecraft:birch_hanging_sign","minecraft:cherry_hanging_sign","minecraft:crimson_hanging_sign","minecraft:dark_oak_hanging_sign","minecraft:jungle_hanging_sign","minecraft:mangrove_hanging_sign","minecraft:oak_hanging_sign","minecraft:spruce_hanging_sign","minecraft:warped_hanging_sign"],"minecraft:horse_armor":["minecraft:diamond_horse_armor","minecraft:golden_horse_armor","minecraft:iron_horse_armor","minecraft:leather_horse_armor"],"minecraft:iron_tier":["minecraft:iron_axe","minecraft:iron_boots","minecraft:iron_chestplate","minecraft:iron_helmet","minecraft:iron_hoe","minecraft:iron_leggings","minecraft:iron_pickaxe","minecraft:iron_shovel","minecraft:iron_sword"],"minecraft:is_armor":["minecraft:chainmail_boots","minecraft:chainmail_chestplate","minecraft:chainmail_helmet","minecraft:chainmail_leggings","minecraft:diamond_boots","minecraft:diamond_chestplate","minecraft:diamond_helmet","minecraft:diamond_leggings","minecraft:elytra","minecraft:golden_boots","minecraft:golden_chestplate","minecraft:golden_helmet","minecraft:golden_leggings","minecraft:iron_boots","minecraft:iron_chestplate","minecraft:iron_helmet","minecraft:iron_leggings","minecraft:leather_boots","minecraft:leather_chestplate","minecraft:leather_helmet","minecraft:leather_leggings","minecraft:netherite_boots","minecraft:netherite_chestplate","minecraft:netherite_helmet","minecraft:netherite_leggings","minecraft:turtle_helmet"],"minecraft:is_axe":["minecraft:diamond_axe","minecraft:golden_axe","minecraft:iron_axe","minecraft:netherite_axe","minecraft:stone_axe","minecraft:wooden_axe"],"minecraft:is_cooked":["minecraft:cooked_beef","minecraft:cooked_chicken","minecraft:cooked_cod","minecraft:cooked_mutton","minecraft:cooked_porkchop","minecraft:cooked_rabbit","minecraft:cooked_salmon","minecraft:rabbit_stew"],"minecraft:is_fish":["minecraft:cod","minecraft:cooked_cod","minecraft:cooked_salmon","minecraft:pufferfish","minecraft:salmon","minecraft:tropical_fish"],"minecraft:is_food":["minecraft:apple","minecraft:baked_potato","minecraft:beef","minecraft:beetroot","minecraft:beetroot_soup","minecraft:bread","minecraft:carrot","minecraft:chicken","minecraft:cooked_beef","minecraft:cooked_chicken","minecraft:cooked_mutton","minecraft:cooked_porkchop","minecraft:cooked_rabbit","minecraft:cookie","minecraft:dried_kelp","minecraft:enchanted_golden_apple","minecraft:golden_apple","minecraft:golden_carrot","minecraft:melon_slice","minecraft:mushroom_stew","minecraft:mutton","minecraft:porkchop","minecraft:potato","minecraft:pumpkin_pie","minecraft:rabbit","minecraft:rabbit_stew","minecraft:rotten_flesh","minecraft:sweet_berries"],"minecraft:is_hoe":["minecraft:diamond_hoe","minecraft:golden_hoe","minecraft:iron_hoe","minecraft:netherite_hoe","minecraft:stone_hoe","minecraft:wooden_hoe"],"minecraft:is_meat":["minecraft:beef","minecraft:chicken","minecraft:cooked_beef","minecraft:cooked_chicken","minecraft:cooked_mutton","minecraft:cooked_porkchop","minecraft:cooked_rabbit","minecraft:mutton","minecraft:porkchop","minecraft:rabbit","minecraft:rabbit_stew","minecraft:rotten_flesh"],"minecraft:is_minecart":["minecraft:chest_minecart","minecraft:command_block_minecart","minecraft:hopper_minecart","minecraft:minecart","minecraft:tnt_minecart"],"minecraft:is_pickaxe":["minecraft:diamond_pickaxe","minecraft:golden_pickaxe","minecraft:iron_pickaxe","minecraft:netherite_pickaxe","minecraft:stone_pickaxe","minecraft:wooden_pickaxe"],"minecraft:is_shovel":["minecraft:diamond_shovel","minecraft:golden_shovel","minecraft:iron_shovel","minecraft:netherite_shovel","minecraft:stone_shovel","minecraft:wooden_shovel"],"minecraft:is_sword":["minecraft:diamond_sword","minecraft:golden_sword","minecraft:iron_sword","minecraft:netherite_sword","minecraft:stone_sword","minecraft:wooden_sword"],"minecraft:is_tool":["minecraft:diamond_axe","minecraft:diamond_hoe","minecraft:diamond_pickaxe","minecraft:diamond_shovel","minecraft:diamond_sword","minecraft:golden_axe","minecraft:golden_hoe","minecraft:golden_pickaxe","minecraft:golden_shovel","minecraft:golden_sword","minecraft:iron_axe","minecraft:iron_hoe","minecraft:iron_pickaxe","minecraft:iron_shovel","minecraft:iron_sword","minecraft:netherite_axe","minecraft:netherite_hoe","minecraft:netherite_pickaxe","minecraft:netherite_shovel","minecraft:netherite_sword","minecraft:stone_axe","minecraft:stone_hoe","minecraft:stone_pickaxe","minecraft:stone_shovel","minecraft:stone_sword","minecraft:wooden_axe","minecraft:wooden_hoe","minecraft:wooden_pickaxe","minecraft:wooden_shovel","minecraft:wooden_sword"],"minecraft:is_trident":["minecraft:trident"],"minecraft:leather_tier":["minecraft:leather_boots","minecraft:leather_chestplate","minecraft:leather_helmet","minecraft:leather_leggings"],"minecraft:lectern_books":["minecraft:writable_book","minecraft:written_book"],"minecraft:logs":["minecraft:acacia_log","minecraft:birch_log","minecraft:cherry_log","minecraft:cherry_wood","minecraft:crimson_hyphae","minecraft:crimson_stem","minecraft:dark_oak_log","minecraft:jungle_log","minecraft:mangrove_log","minecraft:mangrove_wood","minecraft:oak_log","minecraft:spruce_log","minecraft:stripped_acacia_log","minecraft:stripped_birch_log","minecraft:stripped_cherry_log","minecraft:stripped_cherry_wood","minecraft:stripped_crimson_hyphae","minecraft:stripped_crimson_stem","minecraft:stripped_dark_oak_log","minecraft:stripped_jungle_log","minecraft:stripped_mangrove_log","minecraft:stripped_mangrove_wood","minecraft:stripped_oak_log","minecraft:stripped_spruce_log","minecraft:stripped_warped_hyphae","minecraft:stripped_warped_stem","minecraft:warped_hyphae","minecraft:warped_stem","minecraft:wood"],"minecraft:logs_that_burn":["minecraft:acacia_log","minecraft:birch_log","minecraft:cherry_log","minecraft:cherry_wood","minecraft:dark_oak_log","minecraft:jungle_log","minecraft:mangrove_log","minecraft:mangrove_wood","minecraft:oak_log","minecraft:spruce_log","minecraft:stripped_acacia_log","minecraft:stripped_birch_log","minecraft:stripped_cherry_log","minecraft:stripped_cherry_wood","minecraft:stripped_dark_oak_log","minecraft:stripped_jungle_log","minecraft:stripped_mangrove_log","minecraft:stripped_mangrove_wood","minecraft:stripped_oak_log","minecraft:stripped_spruce_log","minecraft:wood"],"minecraft:mangrove_logs":["minecraft:mangrove_log","minecraft:mangrove_wood","minecraft:stripped_mangrove_log","minecraft:stripped_mangrove_wood"],"minecraft:music_disc":["minecraft:music_disc_11","minecraft:music_disc_13","minecraft:music_disc_5","minecraft:music_disc_blocks","minecraft:music_disc_cat","minecraft:music_disc_chirp","minecraft:music_disc_far","minecraft:music_disc_mall","minecraft:music_disc_mellohi","minecraft:music_disc_otherside","minecraft:music_disc_pigstep","minecraft:music_disc_relic","minecraft:music_disc_stal","minecraft:music_disc_strad","minecraft:music_disc_wait","minecraft:music_disc_ward"],"minecraft:netherite_tier":["minecraft:netherite_axe","minecraft:netherite_boots","minecraft:netherite_chestplate","minecraft:netherite_helmet","minecraft:netherite_hoe","minecraft:netherite_leggings","minecraft:netherite_pickaxe","minecraft:netherite_shovel","minecraft:netherite_sword"],"minecraft:planks":["minecraft:bamboo_planks","minecraft:cherry_planks","minecraft:crimson_planks","minecraft:mangrove_planks","minecraft:planks","minecraft:warped_planks"],"minecraft:sand":["minecraft:sand"],"minecraft:sign":["minecraft:acacia_hanging_sign","minecraft:acacia_sign","minecraft:bamboo_hanging_sign","minecraft:bamboo_sign","minecraft:birch_hanging_sign","minecraft:birch_sign","minecraft:cherry_hanging_sign","minecraft:cherry_sign","minecraft:crimson_hanging_sign","minecraft:crimson_sign","minecraft:dark_oak_hanging_sign","minecraft:dark_oak_sign","minecraft:jungle_hanging_sign","minecraft:jungle_sign","minecraft:mangrove_hanging_sign","minecraft:mangrove_sign","minecraft:oak_hanging_sign","minecraft:oak_sign","minecraft:spruce_hanging_sign","minecraft:spruce_sign","minecraft:warped_hanging_sign","minecraft:warped_sign"],"minecraft:soul_fire_base_blocks":["minecraft:soul_sand","minecraft:soul_soil"],"minecraft:spawn_egg":["minecraft:agent_spawn_egg","minecraft:allay_spawn_egg","minecraft:axolotl_spawn_egg","minecraft:bat_spawn_egg","minecraft:bee_spawn_egg","minecraft:blaze_spawn_egg","minecraft:camel_spawn_egg","minecraft:cat_spawn_egg","minecraft:cave_spider_spawn_egg","minecraft:chicken_spawn_egg","minecraft:cod_spawn_egg","minecraft:cow_spawn_egg","minecraft:creeper_spawn_egg","minecraft:dolphin_spawn_egg","minecraft:donkey_spawn_egg","minecraft:drowned_spawn_egg","minecraft:elder_guardian_spawn_egg","minecraft:ender_dragon_spawn_egg","minecraft:enderman_spawn_egg","minecraft:endermite_spawn_egg","minecraft:evoker_spawn_egg","minecraft:fox_spawn_egg","minecraft:frog_spawn_egg","minecraft:ghast_spawn_egg","minecraft:glow_squid_spawn_egg","minecraft:goat_spawn_egg","minecraft:guardian_spawn_egg","minecraft:hoglin_spawn_egg","minecraft:horse_spawn_egg","minecraft:husk_spawn_egg","minecraft:iron_golem_spawn_egg","minecraft:llama_spawn_egg","minecraft:magma_cube_spawn_egg","minecraft:mooshroom_spawn_egg","minecraft:mule_spawn_egg","minecraft:npc_spawn_egg","minecraft:ocelot_spawn_egg","minecraft:panda_spawn_egg","minecraft:parrot_spawn_egg","minecraft:phantom_spawn_egg","minecraft:pig_spawn_egg","minecraft:piglin_brute_spawn_egg","minecraft:piglin_spawn_egg","minecraft:pillager_spawn_egg","minecraft:polar_bear_spawn_egg","minecraft:pufferfish_spawn_egg","minecraft:rabbit_spawn_egg","minecraft:ravager_spawn_egg","minecraft:salmon_spawn_egg","minecraft:sheep_spawn_egg","minecraft:shulker_spawn_egg","minecraft:silverfish_spawn_egg","minecraft:skeleton_horse_spawn_egg","minecraft:skeleton_spawn_egg","minecraft:slime_spawn_egg","minecraft:sniffer_spawn_egg","minecraft:snow_golem_spawn_egg","minecraft:spawn_egg","minecraft:spider_spawn_egg","minecraft:squid_spawn_egg","minecraft:stray_spawn_egg","minecraft:strider_spawn_egg","minecraft:tadpole_spawn_egg","minecraft:trader_llama_spawn_egg","minecraft:tropical_fish_spawn_egg","minecraft:turtle_spawn_egg","minecraft:vex_spawn_egg","minecraft:villager_spawn_egg","minecraft:vindicator_spawn_egg","minecraft:wandering_trader_spawn_egg","minecraft:warden_spawn_egg","minecraft:witch_spawn_egg","minecraft:wither_skeleton_spawn_egg","minecraft:wither_spawn_egg","minecraft:wolf_spawn_egg","minecraft:zoglin_spawn_egg","minecraft:zombie_horse_spawn_egg","minecraft:zombie_pigman_spawn_egg","minecraft:zombie_spawn_egg","minecraft:zombie_villager_spawn_egg"],"minecraft:stone_bricks":["minecraft:stonebrick"],"minecraft:stone_crafting_materials":["minecraft:blackstone","minecraft:cobbled_deepslate","minecraft:cobblestone"],"minecraft:stone_tier":["minecraft:stone_axe","minecraft:stone_hoe","minecraft:stone_pickaxe","minecraft:stone_shovel","minecraft:stone_sword"],"minecraft:stone_tool_materials":["minecraft:blackstone","minecraft:cobbled_deepslate","minecraft:cobblestone"],"minecraft:transform_materials":["minecraft:netherite_ingot"],"minecraft:transform_templates":["minecraft:netherite_upgrade_smithing_template"],"minecraft:transformable_items":["minecraft:diamond_axe","minecraft:diamond_boots","minecraft:diamond_chestplate","minecraft:diamond_helmet","minecraft:diamond_hoe","minecraft:diamond_leggings","minecraft:diamond_pickaxe","minecraft:diamond_shovel","minecraft:diamond_sword","minecraft:golden_boots"],"minecraft:trim_materials":["minecraft:amethyst_shard","minecraft:copper_ingot","minecraft:diamond","minecraft:emerald","minecraft:gold_ingot","minecraft:iron_ingot","minecraft:lapis_lazuli","minecraft:netherite_ingot","minecraft:quartz","minecraft:redstone"],"minecraft:trim_templates":["minecraft:coast_armor_trim_smithing_template","minecraft:dune_armor_trim_smithing_template","minecraft:eye_armor_trim_smithing_template","minecraft:host_armor_trim_smithing_template","minecraft:raiser_armor_trim_smithing_template","minecraft:rib_armor_trim_smithing_template","minecraft:sentry_armor_trim_smithing_template","minecraft:shaper_armor_trim_smithing_template","minecraft:silence_armor_trim_smithing_template","minecraft:snout_armor_trim_smithing_template","minecraft:spire_armor_trim_smithing_template","minecraft:tide_armor_trim_smithing_template","minecraft:vex_armor_trim_smithing_template","minecraft:ward_armor_trim_smithing_template","minecraft:wayfinder_armor_trim_smithing_template","minecraft:wild_armor_trim_smithing_template"],"minecraft:trimmable_armors":["minecraft:chainmail_boots","minecraft:chainmail_chestplate","minecraft:chainmail_helmet","minecraft:chainmail_leggings","minecraft:diamond_boots","minecraft:diamond_chestplate","minecraft:diamond_helmet","minecraft:diamond_leggings","minecraft:golden_boots","minecraft:golden_chestplate","minecraft:golden_helmet","minecraft:golden_leggings","minecraft:iron_boots","minecraft:iron_chestplate","minecraft:iron_helmet","minecraft:iron_leggings","minecraft:leather_boots","minecraft:leather_chestplate","minecraft:leather_helmet","minecraft:leather_leggings","minecraft:netherite_boots","minecraft:netherite_chestplate","minecraft:netherite_helmet","minecraft:netherite_leggings","minecraft:turtle_helmet"],"minecraft:vibration_damper":["minecraft:black_carpet","minecraft:black_wool","minecraft:blue_carpet","minecraft:blue_wool","minecraft:brown_carpet","minecraft:brown_wool","minecraft:cyan_carpet","minecraft:cyan_wool","minecraft:gray_carpet","minecraft:gray_wool","minecraft:green_carpet","minecraft:green_wool","minecraft:light_blue_carpet","minecraft:light_blue_wool","minecraft:light_gray_carpet","minecraft:light_gray_wool","minecraft:lime_carpet","minecraft:lime_wool","minecraft:magenta_carpet","minecraft:magenta_wool","minecraft:orange_carpet","minecraft:orange_wool","minecraft:pink_carpet","minecraft:pink_wool","minecraft:purple_carpet","minecraft:purple_wool","minecraft:red_carpet","minecraft:red_wool","minecraft:white_carpet","minecraft:white_wool","minecraft:yellow_carpet","minecraft:yellow_wool"],"minecraft:warped_stems":["minecraft:stripped_warped_hyphae","minecraft:stripped_warped_stem","minecraft:warped_hyphae","minecraft:warped_stem"],"minecraft:wooden_slabs":["minecraft:bamboo_slab","minecraft:cherry_slab","minecraft:crimson_slab","minecraft:mangrove_slab","minecraft:warped_slab","minecraft:wooden_slab"],"minecraft:wooden_tier":["minecraft:wooden_axe","minecraft:wooden_hoe","minecraft:wooden_pickaxe","minecraft:wooden_shovel","minecraft:wooden_sword"],"minecraft:wool":["minecraft:black_wool","minecraft:blue_wool","minecraft:brown_wool","minecraft:cyan_wool","minecraft:gray_wool","minecraft:green_wool","minecraft:light_blue_wool","minecraft:light_gray_wool","minecraft:lime_wool","minecraft:magenta_wool","minecraft:orange_wool","minecraft:pink_wool","minecraft:purple_wool","minecraft:red_wool","minecraft:white_wool","minecraft:yellow_wool"]} \ No newline at end of file diff --git a/src/main/resources/lang/ara/nukkit.yml b/src/main/resources/lang/ara/nukkit.yml index 8e187200091..164795a7179 100644 --- a/src/main/resources/lang/ara/nukkit.yml +++ b/src/main/resources/lang/ara/nukkit.yml @@ -22,7 +22,7 @@ network: #Set to 0 to compress everything, -1 to disable batch-threshold: 256 #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/bra/nukkit.yml b/src/main/resources/lang/bra/nukkit.yml index 55b0fb97a39..740a04d726f 100644 --- a/src/main/resources/lang/bra/nukkit.yml +++ b/src/main/resources/lang/bra/nukkit.yml @@ -22,7 +22,7 @@ network: #Coloque 0 para compactar tudo, -1 para desativar. batch-threshold: 256 #Nível de compressão usado pelo Zlib ao enviar packets compactados. Maior = mais uso na CPU, menos bandwidth utilizado. - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/chs/nukkit.yml b/src/main/resources/lang/chs/nukkit.yml index 1deb8ac54d3..df9b6d46c98 100644 --- a/src/main/resources/lang/chs/nukkit.yml +++ b/src/main/resources/lang/chs/nukkit.yml @@ -22,7 +22,7 @@ network: #设为 0 以压缩全部。设为 -1 以禁用此功能 batch-threshold: 256 #压缩等级。等级越高,CPU 占用越高,占用带宽越少 - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/cht/nukkit.yml b/src/main/resources/lang/cht/nukkit.yml index ea6e9e3b5c1..db1d466ba11 100644 --- a/src/main/resources/lang/cht/nukkit.yml +++ b/src/main/resources/lang/cht/nukkit.yml @@ -22,7 +22,7 @@ network: #設為0,壓縮全部。設為-1,停用功能 batch-threshold: 256 #壓縮等級,等級越高,CPU佔用越高,佔用頻寬越少 - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/cze/nukkit.yml b/src/main/resources/lang/cze/nukkit.yml index 3e8c5de924b..f7efc26879b 100644 --- a/src/main/resources/lang/cze/nukkit.yml +++ b/src/main/resources/lang/cze/nukkit.yml @@ -23,7 +23,7 @@ network: #Nastavte na 0, chcete-li vše komprimovat, -1 zakázat batch-threshold: 256 #Compression level používaný Zlib při odesílání dávkových paketů. Vyšší = více CPU, méně využití šířky pásma - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/deu/nukkit.yml b/src/main/resources/lang/deu/nukkit.yml index 6f7c3db40d1..785b6b05418 100644 --- a/src/main/resources/lang/deu/nukkit.yml +++ b/src/main/resources/lang/deu/nukkit.yml @@ -22,7 +22,7 @@ network: #Setze zu 0 to um alles zu komprimieren, -1 um die Komprimierung deaktivieren batch-threshold: 256 #Komprimierungslevel von Zlib wenn eine Menge Pakete/Daten gesendet werden. Höher = mehr CPU, weniger Bandbreitennutzung - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/eng/lang.ini b/src/main/resources/lang/eng/lang.ini index 59a0b3bf4ad..bdb21aded5a 100644 --- a/src/main/resources/lang/eng/lang.ini +++ b/src/main/resources/lang/eng/lang.ini @@ -134,6 +134,9 @@ commands.say.usage=/say commands.seed.usage=/seed commands.seed.success=Seed: {%0} +commands.summon.success=Object successfully summoned +commands.summon.failed=Unable to summon object + commands.ban.success=Banned player {%0} commands.ban.usage=/ban [reason ...] @@ -181,6 +184,7 @@ commands.whitelist.usage=/whitelist commands.gamemode.success.self=Set own game mode to {%0} commands.gamemode.success.other=Set {%0}'s game mode to {%1} +commands.gamemode.fail.invalid=Game mode '{%0}' is invalid commands.gamemode.usage=/gamemode [player] commands.help.header=--- Showing help page {%0} of {%1} (/help ) --- diff --git a/src/main/resources/lang/eng/nukkit.yml b/src/main/resources/lang/eng/nukkit.yml index d1617ab9a08..f6cd617b524 100644 --- a/src/main/resources/lang/eng/nukkit.yml +++ b/src/main/resources/lang/eng/nukkit.yml @@ -22,7 +22,7 @@ network: #Set to 0 to compress everything, -1 to disable batch-threshold: 256 #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/fin/nukkit.yml b/src/main/resources/lang/fin/nukkit.yml index 631a2492fff..700b9fb5646 100644 --- a/src/main/resources/lang/fin/nukkit.yml +++ b/src/main/resources/lang/fin/nukkit.yml @@ -22,7 +22,7 @@ network: #Set to 0 to compress everything, -1 to disable batch-threshold: 256 #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/idn/nukkit.yml b/src/main/resources/lang/idn/nukkit.yml index d1617ab9a08..f6cd617b524 100644 --- a/src/main/resources/lang/idn/nukkit.yml +++ b/src/main/resources/lang/idn/nukkit.yml @@ -22,7 +22,7 @@ network: #Set to 0 to compress everything, -1 to disable batch-threshold: 256 #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/jpn/nukkit.yml b/src/main/resources/lang/jpn/nukkit.yml index dcbee75870a..18893f9d637 100644 --- a/src/main/resources/lang/jpn/nukkit.yml +++ b/src/main/resources/lang/jpn/nukkit.yml @@ -22,7 +22,7 @@ network: #0にするとすべてのパケットを圧縮します, -1 で無効です. batch-threshold: 256 #バッチパケットを送信するときのzlibの圧縮レベルですす。 値を大きくするとcpuに多く負荷かけ、低くすると通信量が増えます。 - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/kor/nukkit.yml b/src/main/resources/lang/kor/nukkit.yml index 9579a00dd9e..a45a5339a12 100644 --- a/src/main/resources/lang/kor/nukkit.yml +++ b/src/main/resources/lang/kor/nukkit.yml @@ -22,7 +22,7 @@ network: #모두 압축하려면 0으로 설정하고, 비활성화하려면 -1으로 설정하세요 batch-threshold: 256 #일괄 처리된 패킷을 전송할 때 Zlib에 사용되는 압축 수준입니다. 높을수록 더 많은 CPU 사용량으로, 적은 대역폭을 사용합니다 - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/ltu/nukkit.yml b/src/main/resources/lang/ltu/nukkit.yml index b6160d57099..b2d8813a894 100644 --- a/src/main/resources/lang/ltu/nukkit.yml +++ b/src/main/resources/lang/ltu/nukkit.yml @@ -22,7 +22,7 @@ network: #Nustatykite 0, jeigu norite suspausti visus paketus, -1, kad išjungti batch-threshold: 256 #Suspaudimo lygis naudojant Zlib kai siunčiami suspausti paketai. Didesnė reikšmė = daugiau CPU, mažiau tinklo naudojimo - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/pol/nukkit.yml b/src/main/resources/lang/pol/nukkit.yml index c159af1e48b..b5268a8de5f 100644 --- a/src/main/resources/lang/pol/nukkit.yml +++ b/src/main/resources/lang/pol/nukkit.yml @@ -22,7 +22,7 @@ network: #Set to 0 to compress everything, -1 to disable. batch-threshold: 256 #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/rus/nukkit.yml b/src/main/resources/lang/rus/nukkit.yml index b20b2056beb..58fe745bf75 100644 --- a/src/main/resources/lang/rus/nukkit.yml +++ b/src/main/resources/lang/rus/nukkit.yml @@ -28,7 +28,7 @@ network: batch-threshold: 256 #Уровень сжатия используется Zlib при отправке сжатых пакетов #Чем больше - тем больше нагрузка на процессор, но меньше нагрузка на сеть - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/spa/nukkit.yml b/src/main/resources/lang/spa/nukkit.yml index 9b5a12e8102..9037352a85c 100644 --- a/src/main/resources/lang/spa/nukkit.yml +++ b/src/main/resources/lang/spa/nukkit.yml @@ -22,7 +22,7 @@ network: #Ajustar a 0 para comprimir todo, -1 para desactivar. batch-threshold: 256 #Nivel de compresion usada para el envió de paquetes. Alta = más CPU, menos banda ancha - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/tur/nukkit.yml b/src/main/resources/lang/tur/nukkit.yml index d1617ab9a08..f6cd617b524 100644 --- a/src/main/resources/lang/tur/nukkit.yml +++ b/src/main/resources/lang/tur/nukkit.yml @@ -22,7 +22,7 @@ network: #Set to 0 to compress everything, -1 to disable batch-threshold: 256 #Compression level used of Zlib when sending batched packets. Higher = more CPU, less bandwidth usage - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/lang/ukr/nukkit.yml b/src/main/resources/lang/ukr/nukkit.yml index 5c9196cc0a2..572dc8c342f 100644 --- a/src/main/resources/lang/ukr/nukkit.yml +++ b/src/main/resources/lang/ukr/nukkit.yml @@ -28,7 +28,7 @@ network: batch-threshold: 256 #Рівень стискання, який використовує Zlib при відправленні пакетів #Чим більше значення - тим більше навантаження на процесор, але менше навантаження на мережу - compression-level: 4 + compression-level: 5 #Enable network encryption encryption: true diff --git a/src/main/resources/runtime_block_states.dat b/src/main/resources/runtime_block_states.dat index 9bc804cc337..4a7e1017962 100644 Binary files a/src/main/resources/runtime_block_states.dat and b/src/main/resources/runtime_block_states.dat differ diff --git a/src/main/resources/runtime_block_states_662.dat b/src/main/resources/runtime_block_states_662.dat index 7edb6d686be..74e5a477a94 100644 Binary files a/src/main/resources/runtime_block_states_662.dat and b/src/main/resources/runtime_block_states_662.dat differ