From 6c4b2cb173bb5e36396a3ee031286ee2ab3f8ed4 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Wed, 15 May 2024 13:40:57 -0400 Subject: [PATCH 1/7] Don't create a property manager if an entity has no properties --- .../geysermc/geyser/entity/type/Entity.java | 4 +- .../java/JavaSelectKnownPacksTranslator.java | 62 +++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaSelectKnownPacksTranslator.java diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/Entity.java b/core/src/main/java/org/geysermc/geyser/entity/type/Entity.java index fecd72f67..da9a28451 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/Entity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/Entity.java @@ -134,7 +134,7 @@ public class Entity implements GeyserEntity { this.valid = false; - this.propertyManager = new GeyserEntityPropertyManager(definition.registeredProperties()); + this.propertyManager = definition.registeredProperties() == null ? null : new GeyserEntityPropertyManager(definition.registeredProperties()); setPosition(position); setAirSupply(getMaxAir()); @@ -361,7 +361,7 @@ public class Entity implements GeyserEntity { return; } - if (propertyManager.hasProperties()) { + if (propertyManager != null && propertyManager.hasProperties()) { SetEntityDataPacket entityDataPacket = new SetEntityDataPacket(); entityDataPacket.setRuntimeEntityId(geyserId); propertyManager.applyIntProperties(entityDataPacket.getProperties().getIntProperties()); diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaSelectKnownPacksTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaSelectKnownPacksTranslator.java new file mode 100644 index 000000000..6b1c8c645 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaSelectKnownPacksTranslator.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2019-2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.translator.protocol.java; + +import org.geysermc.geyser.network.GameProtocol; +import org.geysermc.geyser.session.GeyserSession; +import org.geysermc.geyser.translator.protocol.PacketTranslator; +import org.geysermc.geyser.translator.protocol.Translator; +import org.geysermc.mcprotocollib.protocol.data.game.KnownPack; +import org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundSelectKnownPacks; +import org.geysermc.mcprotocollib.protocol.packet.configuration.serverbound.ServerboundSelectKnownPacks; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +@Translator(packet = ClientboundSelectKnownPacks.class) +public class JavaSelectKnownPacksTranslator extends PacketTranslator { + // todo: dump from client? + private static final Set KNOWN_PACK_IDS = Set.of("core", "update_1_21", "bundle", "trade_rebalance"); + + @Override + public void translate(GeyserSession session, ClientboundSelectKnownPacks packet) { + List knownPacks = new ArrayList<>(1); + for (KnownPack pack : packet.getKnownPacks()) { + if ("minecraft".equals(pack.getNamespace()) && GameProtocol.getJavaMinecraftVersion().equals(pack.getVersion())) { + // Implementation note: these won't always necessarily be equal. + // 1.20.5 versus 1.20.6 for example - same protocol version. A vanilla server for either version will gracefully accept either. + // If the versions mismatch, the registry will be sent over the network, though. + // For vanilla compliancy, to minimize network traffic, and for potential future behavior, + // We'll implement how the Java client does it. + if (KNOWN_PACK_IDS.contains(pack.getId())) { + knownPacks.add(pack); + } + } + } + session.sendDownstreamPacket(new ServerboundSelectKnownPacks(knownPacks)); + } +} From 423d2e3a362ccd0cbf5dc0eafaed4b67d3728757 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Wed, 15 May 2024 13:41:31 -0400 Subject: [PATCH 2/7] Emulate vanilla behavior with existing registries --- .../geyser/session/GeyserSession.java | 88 ++++++++++++------- .../geyser/session/cache/RegistryCache.java | 37 +++++++- 2 files changed, 90 insertions(+), 35 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index 617087f71..c0ff1fb71 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -28,35 +28,6 @@ package org.geysermc.geyser.session; import com.github.steveice10.mc.auth.data.GameProfile; import com.github.steveice10.mc.auth.exception.request.RequestException; import com.github.steveice10.mc.auth.service.MsaAuthenticationService; -import org.geysermc.mcprotocollib.protocol.MinecraftConstants; -import org.geysermc.mcprotocollib.protocol.MinecraftProtocol; -import org.geysermc.mcprotocollib.protocol.data.ProtocolState; -import org.geysermc.mcprotocollib.protocol.data.UnexpectedEncryptionException; -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.HandPreference; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerAction; -import org.geysermc.mcprotocollib.protocol.data.game.setting.ChatVisibility; -import org.geysermc.mcprotocollib.protocol.data.game.setting.SkinPart; -import org.geysermc.mcprotocollib.protocol.data.game.statistic.CustomStatistic; -import org.geysermc.mcprotocollib.protocol.data.game.statistic.Statistic; -import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.ServerboundClientInformationPacket; -import org.geysermc.mcprotocollib.protocol.packet.handshake.serverbound.ClientIntentionPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatCommandSignedPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerAbilitiesPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundUseItemPacket; -import org.geysermc.mcprotocollib.protocol.packet.login.serverbound.ServerboundCustomQueryAnswerPacket; -import org.geysermc.mcprotocollib.network.BuiltinFlags; -import org.geysermc.mcprotocollib.network.Session; -import org.geysermc.mcprotocollib.network.event.session.*; -import org.geysermc.mcprotocollib.network.packet.Packet; -import org.geysermc.mcprotocollib.network.tcp.TcpClientSession; -import org.geysermc.mcprotocollib.network.tcp.TcpSession; import io.netty.channel.Channel; import io.netty.channel.EventLoop; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; @@ -145,6 +116,38 @@ import org.geysermc.geyser.util.ChunkUtils; import org.geysermc.geyser.util.DimensionUtils; import org.geysermc.geyser.util.EntityUtils; import org.geysermc.geyser.util.LoginEncryptionUtils; +import org.geysermc.mcprotocollib.network.BuiltinFlags; +import org.geysermc.mcprotocollib.network.Session; +import org.geysermc.mcprotocollib.network.event.session.*; +import org.geysermc.mcprotocollib.network.packet.Packet; +import org.geysermc.mcprotocollib.network.tcp.TcpClientSession; +import org.geysermc.mcprotocollib.network.tcp.TcpSession; +import org.geysermc.mcprotocollib.protocol.ClientListener; +import org.geysermc.mcprotocollib.protocol.MinecraftConstants; +import org.geysermc.mcprotocollib.protocol.MinecraftProtocol; +import org.geysermc.mcprotocollib.protocol.data.ProtocolState; +import org.geysermc.mcprotocollib.protocol.data.UnexpectedEncryptionException; +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.HandPreference; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerAction; +import org.geysermc.mcprotocollib.protocol.data.game.setting.ChatVisibility; +import org.geysermc.mcprotocollib.protocol.data.game.setting.SkinPart; +import org.geysermc.mcprotocollib.protocol.data.game.statistic.CustomStatistic; +import org.geysermc.mcprotocollib.protocol.data.game.statistic.Statistic; +import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.ServerboundClientInformationPacket; +import org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundFinishConfigurationPacket; +import org.geysermc.mcprotocollib.protocol.packet.configuration.serverbound.ServerboundFinishConfigurationPacket; +import org.geysermc.mcprotocollib.protocol.packet.handshake.serverbound.ClientIntentionPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatCommandSignedPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundMovePlayerPosPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerAbilitiesPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundPlayerActionPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.player.ServerboundUseItemPacket; +import org.geysermc.mcprotocollib.protocol.packet.login.serverbound.ServerboundCustomQueryAnswerPacket; import java.net.ConnectException; import java.net.InetSocketAddress; @@ -646,9 +649,6 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { sentSpawnPacket = true; syncEntityProperties(); - // Set the hardcoded shield ID to the ID we just defined in StartGamePacket - // upstream.getSession().getHardcodedBlockingId().set(this.itemMappings.getStoredItems().shield().getBedrockId()); - if (GeyserImpl.getInstance().getConfig().isAddNonBedrockItems()) { ItemComponentPacket componentPacket = new ItemComponentPacket(); componentPacket.getItems().addAll(itemMappings.getComponentItemData()); @@ -875,6 +875,8 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { // Start ticking tickThread = eventLoop.scheduleAtFixedRate(this::tick, 50, 50, TimeUnit.MILLISECONDS); + this.protocol.setUseDefaultListeners(false); + TcpSession downstream; if (geyser.getBootstrap().getSocketAddress() != null) { // We're going to connect through the JVM and not through TCP @@ -904,6 +906,25 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { // Let Geyser handle sending the keep alive downstream.setFlag(MinecraftConstants.AUTOMATIC_KEEP_ALIVE_MANAGEMENT, false); } + // We'll handle this since we have the registry data on hand + downstream.setFlag(MinecraftConstants.SEND_BLANK_KNOWN_PACKS_RESPONSE, false); + + // This isn't a great solution, but... we want to make sure the finish configuration packet cannot be sent + // before the KnownPacks packet. + this.downstream.getSession().addListener(new ClientListener(ProtocolState.LOGIN, loginEvent.transferring()) { + @Override + public void packetReceived(Session session, Packet packet) { + if (protocol.getState() == ProtocolState.CONFIGURATION) { + if (packet instanceof ClientboundFinishConfigurationPacket) { + // Prevent + GeyserSession.this.ensureInEventLoop(() -> GeyserSession.this.sendDownstreamPacket(new ServerboundFinishConfigurationPacket())); + return; + } + } + super.packetReceived(session, packet); + } + }); + downstream.addListener(new SessionAdapter() { @Override public void packetSending(PacketSendingEvent event) { @@ -1543,8 +1564,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { startGamePacket.setEnchantmentSeed(0); startGamePacket.setMultiplayerCorrelationId(""); - startGamePacket.setItemDefinitions(this.itemMappings.getItemDefinitions().values().stream().toList()); // TODO - // startGamePacket.setBlockPalette(this.blockMappings.getBedrockBlockPalette()); + startGamePacket.getItemDefinitions().addAll(this.itemMappings.getItemDefinitions().values()); // Needed for custom block mappings and custom skulls system startGamePacket.getBlockProperties().addAll(this.blockMappings.getBlockProperties()); diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/RegistryCache.java b/core/src/main/java/org/geysermc/geyser/session/cache/RegistryCache.java index 9581df253..fa4503635 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/RegistryCache.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/RegistryCache.java @@ -30,6 +30,8 @@ import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import lombok.AccessLevel; import lombok.Getter; import lombok.experimental.Accessors; +import org.cloudburstmc.nbt.NbtMap; +import org.cloudburstmc.nbt.NbtType; import org.cloudburstmc.protocol.bedrock.data.TrimMaterial; import org.cloudburstmc.protocol.bedrock.data.TrimPattern; import org.geysermc.geyser.GeyserImpl; @@ -42,6 +44,7 @@ import org.geysermc.geyser.session.cache.registry.JavaRegistry; import org.geysermc.geyser.session.cache.registry.SimpleJavaRegistry; import org.geysermc.geyser.text.TextDecoration; import org.geysermc.geyser.translator.level.BiomeTranslator; +import org.geysermc.mcprotocollib.protocol.MinecraftProtocol; import org.geysermc.mcprotocollib.protocol.data.game.RegistryEntry; import org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket; @@ -63,6 +66,7 @@ import java.util.function.ToIntFunction; @Accessors(fluent = true) @Getter public final class RegistryCache { + private static final Map> DEFAULTS; private static final Map>> REGISTRIES = new HashMap<>(); static { @@ -73,6 +77,24 @@ public final class RegistryCache { register("worldgen/biome", (cache, array) -> cache.biomeTranslations = array, BiomeTranslator::loadServerBiome); register("banner_pattern", cache -> cache.bannerPatterns, ($, entry) -> BannerPattern.getByJavaIdentifier(entry.getId())); register("wolf_variant", cache -> cache.wolfVariants, ($, entry) -> WolfEntity.WolfVariant.getByJavaIdentifier(entry.getId())); + + // Load from MCProtocolLib's classloader + NbtMap tag = MinecraftProtocol.loadNetworkCodec(); + Map> defaults = new HashMap<>(); + // Don't create a keySet - no need to create the cached object in HashMap if we don't use it again + REGISTRIES.forEach((key, $) -> { + List rawValues = tag.getCompound(key) + .getList("value", NbtType.COMPOUND); + Map values = new HashMap<>(); + for (NbtMap value : rawValues) { + String name = value.getString("name"); + values.put(name, value.getCompound("element")); + } + // Can make these maps immutable and as efficient as possible after initialization + defaults.put(key, Map.copyOf(values)); + }); + + DEFAULTS = Map.copyOf(defaults); } @Getter(AccessLevel.NONE) @@ -116,13 +138,22 @@ public final class RegistryCache { * @param the class that represents these entries. */ private static void register(String registry, Function> localCacheFunction, BiFunction reader) { - REGISTRIES.put("minecraft:" + registry, (registryCache, entries) -> { + String key = "minecraft:" + registry; + REGISTRIES.put(key, (registryCache, entries) -> { + Map localRegistry = null; JavaRegistry localCache = localCacheFunction.apply(registryCache); // Clear each local cache every time a new registry entry is given to us // (e.g. proxy server switches) List builder = new ArrayList<>(entries.size()); for (int i = 0; i < entries.size(); i++) { RegistryEntry entry = entries.get(i); + // If the data is null, that's the server telling us we need to use our default values. + if (entry.getData() == null) { + if (localRegistry == null) { // Lazy initialize + localRegistry = DEFAULTS.get(key); + } + entry = new RegistryEntry(entry.getId(), localRegistry.get(entry.getId())); + } // This is what Geyser wants to keep as a value for this registry. T cacheEntry = reader.apply(registryCache.session, entry); builder.add(i, cacheEntry); @@ -156,4 +187,8 @@ public final class RegistryCache { localCacheFunction.accept(registryCache, array); }); } + + public static void init() { + // no-op + } } From 9bca012194211b34583e1688bc9e925e138c77f1 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Wed, 15 May 2024 15:31:02 -0400 Subject: [PATCH 3/7] Bump Erosion --- bootstrap/spigot/build.gradle.kts | 6 +++++ .../manager/GeyserSpigotWorldManager.java | 17 ++++++------ .../java/org/geysermc/geyser/GeyserImpl.java | 6 ++++- .../erosion/GeyserboundPacketHandlerImpl.java | 16 +++--------- .../geyser/level/GeyserWorldManager.java | 5 ++-- .../geysermc/geyser/level/WorldManager.java | 26 +++++++++++++++++++ .../protocol/java/JavaLoginTranslator.java | 4 +++ gradle/libs.versions.toml | 7 ++--- 8 files changed, 61 insertions(+), 26 deletions(-) diff --git a/bootstrap/spigot/build.gradle.kts b/bootstrap/spigot/build.gradle.kts index 8143d96a1..7ccb50484 100644 --- a/bootstrap/spigot/build.gradle.kts +++ b/bootstrap/spigot/build.gradle.kts @@ -4,6 +4,12 @@ dependencies { isTransitive = false } + implementation(libs.erosion.bukkit.nms) { + attributes { + attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21) + } + } + implementation(variantOf(libs.adapters.spigot) { classifier("all") // otherwise the unshaded jar is used without the shaded NMS implementations }) diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java index 8a0e0b70d..47086d36c 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java @@ -25,9 +25,7 @@ package org.geysermc.geyser.platform.spigot.world.manager; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityInfo; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.World; @@ -39,6 +37,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; import org.cloudburstmc.nbt.NbtMap; import org.geysermc.erosion.bukkit.BukkitLecterns; import org.geysermc.erosion.bukkit.BukkitUtils; +import org.geysermc.erosion.bukkit.PickBlockUtils; import org.geysermc.erosion.bukkit.SchedulerUtils; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.level.GameRule; @@ -47,6 +46,9 @@ import org.geysermc.geyser.level.block.BlockStateValues; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.util.BlockEntityUtils; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityInfo; import java.util.List; import java.util.Objects; @@ -205,17 +207,16 @@ public class GeyserSpigotWorldManager extends WorldManager { @Override public @NonNull CompletableFuture<@Nullable DataComponents> getPickItemComponents(GeyserSession session, int x, int y, int z, boolean addNbtData) { - CompletableFuture<@Nullable DataComponents> future = new CompletableFuture<>(); Player bukkitPlayer; if ((bukkitPlayer = Bukkit.getPlayer(session.getPlayerEntity().getUuid())) == null) { - future.complete(null); - return future; + return CompletableFuture.completedFuture(null); } + CompletableFuture> future = new CompletableFuture<>(); Block block = bukkitPlayer.getWorld().getBlockAt(x, y, z); // Paper 1.19.3 complains about async access otherwise. // java.lang.IllegalStateException: Tile is null, asynchronous access? - SchedulerUtils.runTask(this.plugin, () -> future.complete(/*PickBlockUtils.pickBlock(block)*/ null), block); // TODO fix erosion once clear how to handle this - return future; + SchedulerUtils.runTask(this.plugin, () -> future.complete(PickBlockUtils.pickBlock(block)), block); + return future.thenApply(RAW_TRANSFORMER); } /** diff --git a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java index d5635acf9..a60a14ea0 100644 --- a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java +++ b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java @@ -45,6 +45,7 @@ import org.cloudburstmc.protocol.bedrock.codec.BedrockCodec; import org.geysermc.api.Geyser; import org.geysermc.cumulus.form.Form; import org.geysermc.cumulus.form.util.FormBuilder; +import org.geysermc.erosion.packet.Packets; import org.geysermc.floodgate.crypto.AesCipher; import org.geysermc.floodgate.crypto.AesKeyProducer; import org.geysermc.floodgate.crypto.Base64Topping; @@ -77,6 +78,7 @@ import org.geysermc.geyser.scoreboard.ScoreboardUpdater; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.PendingMicrosoftAuthentication; import org.geysermc.geyser.session.SessionManager; +import org.geysermc.geyser.session.cache.RegistryCache; import org.geysermc.geyser.skin.FloodgateSkinUploader; import org.geysermc.geyser.skin.ProvidedSkins; import org.geysermc.geyser.skin.SkinProvider; @@ -211,6 +213,8 @@ public class GeyserImpl implements GeyserApi { Registries.init(); BlockRegistries.init(); + RegistryCache.init(); + /* Initialize translators */ EntityDefinitions.init(); MessageTranslator.init(); @@ -383,7 +387,7 @@ public class GeyserImpl implements GeyserApi { this.newsHandler = new NewsHandler(BRANCH, this.buildNumber()); - //Packets.initGeyser(); + Packets.initGeyser(); if (Epoll.isAvailable()) { this.erosionUnixListener = new UnixSocketClientListener(); diff --git a/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java b/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java index a62f9ec49..7d5bba1e8 100644 --- a/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java +++ b/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java @@ -25,8 +25,6 @@ package org.geysermc.geyser.erosion; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.PistonValueType; import io.netty.channel.Channel; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; @@ -43,14 +41,7 @@ import org.geysermc.erosion.packet.ErosionPacketHandler; import org.geysermc.erosion.packet.ErosionPacketSender; import org.geysermc.erosion.packet.backendbound.BackendboundInitializePacket; import org.geysermc.erosion.packet.backendbound.BackendboundPacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundBatchBlockIdPacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundBlockEntityPacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundBlockIdPacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundBlockLookupFailPacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundBlockPlacePacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundHandshakePacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundPickBlockPacket; -import org.geysermc.erosion.packet.geyserbound.GeyserboundPistonEventPacket; +import org.geysermc.erosion.packet.geyserbound.*; import org.geysermc.geyser.level.block.BlockStateValues; import org.geysermc.geyser.level.physics.Direction; import org.geysermc.geyser.network.GameProtocol; @@ -58,6 +49,7 @@ import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.cache.PistonCache; import org.geysermc.geyser.translator.level.block.entity.PistonBlockEntity; import org.geysermc.geyser.util.BlockEntityUtils; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.PistonValueType; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; @@ -71,7 +63,7 @@ public final class GeyserboundPacketHandlerImpl extends AbstractGeyserboundPacke @Setter private CompletableFuture pendingBatchLookup = null; @Setter - private CompletableFuture pickBlockLookup = null; + private CompletableFuture> pickBlockLookup = null; private final AtomicInteger nextTransactionId = new AtomicInteger(1); @@ -147,7 +139,7 @@ public final class GeyserboundPacketHandlerImpl extends AbstractGeyserboundPacke @Override public void handlePickBlock(GeyserboundPickBlockPacket packet) { if (this.pickBlockLookup != null) { - //this.pickBlockLookup.complete(packet.getTag()); // TODO 1.20.5 + this.pickBlockLookup.complete(packet.getComponents()); } } diff --git a/core/src/main/java/org/geysermc/geyser/level/GeyserWorldManager.java b/core/src/main/java/org/geysermc/geyser/level/GeyserWorldManager.java index 08611a5e1..3144f0cb2 100644 --- a/core/src/main/java/org/geysermc/geyser/level/GeyserWorldManager.java +++ b/core/src/main/java/org/geysermc/geyser/level/GeyserWorldManager.java @@ -25,6 +25,7 @@ package org.geysermc.geyser.level; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.objects.Object2ObjectMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectArrayList; @@ -179,9 +180,9 @@ public class GeyserWorldManager extends WorldManager { if (erosionHandler == null) { return super.getPickItemComponents(session, x, y, z, addNbtData); } - CompletableFuture future = new CompletableFuture<>(); + CompletableFuture> future = new CompletableFuture<>(); erosionHandler.setPickBlockLookup(future); erosionHandler.sendPacket(new BackendboundPickBlockPacket(Vector3i.from(x, y, z))); - return future; + return future.thenApply(RAW_TRANSFORMER); } } diff --git a/core/src/main/java/org/geysermc/geyser/level/WorldManager.java b/core/src/main/java/org/geysermc/geyser/level/WorldManager.java index a1b16a1d5..cd6c9e824 100644 --- a/core/src/main/java/org/geysermc/geyser/level/WorldManager.java +++ b/core/src/main/java/org/geysermc/geyser/level/WorldManager.java @@ -25,19 +25,29 @@ package org.geysermc.geyser.level; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; import org.cloudburstmc.math.vector.Vector3i; import org.geysermc.erosion.util.BlockPositionIterator; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType; import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityInfo; import org.geysermc.mcprotocollib.protocol.data.game.setting.Difficulty; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.concurrent.CompletableFuture; +import java.util.function.Function; /** * Class that manages or retrieves various information @@ -223,4 +233,20 @@ public abstract class WorldManager { public CompletableFuture<@Nullable DataComponents> getPickItemComponents(GeyserSession session, int x, int y, int z, boolean addExtraData) { return CompletableFuture.completedFuture(null); } + + protected static final Function, DataComponents> RAW_TRANSFORMER = map -> { + try { + Map, DataComponent> components = new HashMap<>(); + Int2ObjectMaps.fastForEach(map, entry -> { + DataComponentType type = DataComponentType.from(entry.getIntKey()); + ByteBuf buf = Unpooled.wrappedBuffer(entry.getValue()); + DataComponent value = type.readDataComponent(ItemCodecHelper.INSTANCE, buf); + components.put(type, value); + }); + return new DataComponents(components); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + }; } diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaLoginTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaLoginTranslator.java index fe4401dca..33d5a88b9 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaLoginTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaLoginTranslator.java @@ -25,6 +25,7 @@ package org.geysermc.geyser.translator.protocol.java; +import org.geysermc.erosion.Constants; import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo; import org.geysermc.mcprotocollib.protocol.packet.common.serverbound.ServerboundCustomPayloadPacket; import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket; @@ -45,6 +46,8 @@ import org.geysermc.geyser.util.ChunkUtils; import org.geysermc.geyser.util.DimensionUtils; import org.geysermc.geyser.util.EntityUtils; +import java.nio.charset.StandardCharsets; + @Translator(packet = ClientboundLoginPacket.class) public class JavaLoginTranslator extends PacketTranslator { @@ -134,6 +137,7 @@ public class JavaLoginTranslator extends PacketTranslator Date: Thu, 16 May 2024 23:12:06 -0400 Subject: [PATCH 4/7] Block refactory --- .../world/GeyserSpigotBlockPlaceListener.java | 3 +- .../GeyserSpigotNativeWorldManager.java | 3 +- .../manager/GeyserSpigotWorldManager.java | 8 +- .../java/org/geysermc/geyser/GeyserImpl.java | 13 + .../geyser/entity/type/FishingHookEntity.java | 3 +- .../erosion/GeyserboundPacketHandlerImpl.java | 3 +- .../geyser/level/block/BlockStateValues.java | 21 +- .../geysermc/geyser/level/block/Blocks.java | 2820 +++++++++++++++++ .../level/block/property/ChestType.java | 34 + .../level/block/property/Properties.java | 146 + .../geyser/level/block/property/Property.java | 43 + .../geyser/level/block/type/BannerBlock.java | 39 + .../geyser/level/block/type/BedBlock.java | 39 + .../geyser/level/block/type/Block.java | 152 + .../geyser/level/block/type/BlockState.java | 64 + .../geyser/registry/BlockRegistries.java | 12 +- .../geyser/registry/ListRegistry.java | 103 + .../populator/BlockRegistryPopulator.java | 2 - .../geyser/session/GeyserSession.java | 3 - .../geyser/session/cache/ChunkCache.java | 13 +- .../inventory/ShulkerInventoryTranslator.java | 3 +- .../chest/DoubleChestInventoryTranslator.java | 7 +- .../entity/BannerBlockEntityTranslator.java | 10 +- .../entity/BeaconBlockEntityTranslator.java | 3 +- .../entity/BedBlockEntityTranslator.java | 12 +- .../block/entity/BedrockOnlyBlockEntity.java | 3 +- .../block/entity/BlockEntityTranslator.java | 5 +- .../BrushableBlockEntityTranslator.java | 7 +- .../entity/CampfireBlockEntityTranslator.java | 3 +- .../CommandBlockBlockEntityTranslator.java | 7 +- .../DecoratedPotBlockEntityTranslator.java | 3 +- .../DoubleChestBlockEntityTranslator.java | 46 +- .../entity/EmptyBlockEntityTranslator.java | 3 +- .../EndGatewayBlockEntityTranslator.java | 3 +- .../FlowerPotBlockEntityTranslator.java | 7 +- .../JigsawBlockBlockEntityTranslator.java | 5 +- .../level/block/entity/PistonBlockEntity.java | 15 +- .../ShulkerBoxBlockEntityTranslator.java | 12 +- .../entity/SignBlockEntityTranslator.java | 3 +- .../entity/SkullBlockEntityTranslator.java | 15 +- .../entity/SpawnerBlockEntityTranslator.java | 5 +- .../StructureBlockBlockEntityTranslator.java | 5 +- .../TrialSpawnerBlockEntityTranslator.java | 3 +- .../BedrockBlockPickRequestTranslator.java | 3 +- ...BedrockInventoryTransactionTranslator.java | 3 +- .../player/BedrockActionTranslator.java | 3 +- .../level/JavaBlockEntityDataTranslator.java | 11 +- .../java/level/JavaBlockEventTranslator.java | 3 +- .../java/level/JavaExplodeTranslator.java | 3 +- .../JavaLevelChunkWithLightTranslator.java | 13 +- .../org/geysermc/geyser/util/ChunkUtils.java | 14 +- .../org/geysermc/geyser/util/SoundUtils.java | 3 +- .../geysermc/geyser/util/StatisticsUtils.java | 9 +- gradle/libs.versions.toml | 3 +- 54 files changed, 3620 insertions(+), 157 deletions(-) create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/Blocks.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/property/ChestType.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/property/Property.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/type/BannerBlock.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/type/BedBlock.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/type/Block.java create mode 100644 core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java create mode 100644 core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/GeyserSpigotBlockPlaceListener.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/GeyserSpigotBlockPlaceListener.java index 71aba11f9..b5f4bd4f9 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/GeyserSpigotBlockPlaceListener.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/GeyserSpigotBlockPlaceListener.java @@ -34,6 +34,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPlaceEvent; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.platform.spigot.world.manager.GeyserSpigotWorldManager; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.session.GeyserSession; @@ -59,7 +60,7 @@ public class GeyserSpigotBlockPlaceListener implements Listener { event.getBlockPlaced().getX(), event.getBlockPlaced().getY(), event.getBlockPlaced().getZ()))); } else { String javaBlockId = event.getBlockPlaced().getBlockData().getAsString(); - placeBlockSoundPacket.setExtraData(session.getBlockMappings().getBedrockBlockId(BlockRegistries.JAVA_IDENTIFIER_TO_ID.get().getOrDefault(javaBlockId, BlockStateValues.JAVA_AIR_ID))); + placeBlockSoundPacket.setExtraData(session.getBlockMappings().getBedrockBlockId(BlockRegistries.JAVA_IDENTIFIER_TO_ID.get().getOrDefault(javaBlockId, Block.JAVA_AIR_ID))); } placeBlockSoundPacket.setIdentifier(":"); session.sendUpstreamPacket(placeBlockSoundPacket); diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotNativeWorldManager.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotNativeWorldManager.java index 45e84d254..c99ca4e78 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotNativeWorldManager.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotNativeWorldManager.java @@ -34,6 +34,7 @@ import org.geysermc.geyser.adapters.WorldAdapter; import org.geysermc.geyser.adapters.paper.PaperAdapters; import org.geysermc.geyser.adapters.spigot.SpigotAdapters; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.session.GeyserSession; public class GeyserSpigotNativeWorldManager extends GeyserSpigotWorldManager { @@ -52,7 +53,7 @@ public class GeyserSpigotNativeWorldManager extends GeyserSpigotWorldManager { public int getBlockAt(GeyserSession session, int x, int y, int z) { Player player = Bukkit.getPlayer(session.getPlayerEntity().getUsername()); if (player == null) { - return BlockStateValues.JAVA_AIR_ID; + return Block.JAVA_AIR_ID; } return adapter.getBlockAt(player.getWorld(), x, y, z); } diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java index 47086d36c..a04c60126 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotWorldManager.java @@ -70,12 +70,12 @@ public class GeyserSpigotWorldManager extends WorldManager { public int getBlockAt(GeyserSession session, int x, int y, int z) { Player bukkitPlayer; if ((bukkitPlayer = Bukkit.getPlayer(session.getPlayerEntity().getUsername())) == null) { - return BlockStateValues.JAVA_AIR_ID; + return org.geysermc.geyser.level.block.type.Block.JAVA_AIR_ID; } World world = bukkitPlayer.getWorld(); if (!world.isChunkLoaded(x >> 4, z >> 4)) { // If the chunk isn't loaded, how could we even be here? - return BlockStateValues.JAVA_AIR_ID; + return org.geysermc.geyser.level.block.type.Block.JAVA_AIR_ID; } return getBlockNetworkId(world.getBlockAt(x, y, z)); @@ -86,9 +86,9 @@ public class GeyserSpigotWorldManager extends WorldManager { // Terrible behavior, but this is basically what's always been happening behind the scenes anyway. CompletableFuture blockData = new CompletableFuture<>(); Bukkit.getRegionScheduler().execute(this.plugin, block.getLocation(), () -> blockData.complete(block.getBlockData().getAsString())); - return BlockRegistries.JAVA_IDENTIFIER_TO_ID.getOrDefault(blockData.join(), BlockStateValues.JAVA_AIR_ID); + return BlockRegistries.JAVA_IDENTIFIER_TO_ID.getOrDefault(blockData.join(), org.geysermc.geyser.level.block.type.Block.JAVA_AIR_ID); } - return BlockRegistries.JAVA_IDENTIFIER_TO_ID.getOrDefault(block.getBlockData().getAsString(), BlockStateValues.JAVA_AIR_ID); + return BlockRegistries.JAVA_IDENTIFIER_TO_ID.getOrDefault(block.getBlockData().getAsString(), org.geysermc.geyser.level.block.type.Block.JAVA_AIR_ID); } @Override diff --git a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java index a60a14ea0..4f572ef63 100644 --- a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java +++ b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java @@ -69,6 +69,7 @@ import org.geysermc.geyser.event.GeyserEventBus; import org.geysermc.geyser.extension.GeyserExtensionManager; import org.geysermc.geyser.impl.MinecraftVersionImpl; import org.geysermc.geyser.level.WorldManager; +import org.geysermc.geyser.level.block.Blocks; import org.geysermc.geyser.network.GameProtocol; import org.geysermc.geyser.network.netty.GeyserServer; import org.geysermc.geyser.registry.BlockRegistries; @@ -256,6 +257,18 @@ public class GeyserImpl implements GeyserApi { } VersionCheckUtils.checkForOutdatedJava(logger); + + Blocks.VAULT.javaId(); + for (int i = 0; i < BlockRegistries.JAVA_BLOCKS.get().length; i++) { + String cleanIdentifier = BlockRegistries.JAVA_BLOCKS.get(i).getCleanJavaIdentifier(); + String newIdentifier = BlockRegistries.BLOCK_STATES.get(i).block().javaIdentifier(); + if (!cleanIdentifier.equals(newIdentifier)) { + System.out.println("Check block " + BlockRegistries.BLOCK_STATES.get(i).block().javaIdentifier()); + break; + } + } + System.out.println(BlockRegistries.JAVA_BLOCKS.get().length); + System.out.println(BlockRegistries.BLOCK_STATES.get().size()); } private void startInstance() { diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/FishingHookEntity.java b/core/src/main/java/org/geysermc/geyser/entity/type/FishingHookEntity.java index f4c0cea36..26a64bcae 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/FishingHookEntity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/FishingHookEntity.java @@ -33,6 +33,7 @@ import org.geysermc.erosion.util.BlockPositionIterator; import org.geysermc.geyser.entity.EntityDefinitions; import org.geysermc.geyser.entity.type.player.PlayerEntity; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.collision.BlockCollision; @@ -162,7 +163,7 @@ public class FishingHookEntity extends ThrowableEntity { */ protected boolean isInAir() { int block = session.getGeyser().getWorldManager().getBlockAt(session, position.toInt()); - return block == BlockStateValues.JAVA_AIR_ID; + return block == Block.JAVA_AIR_ID; } @Override diff --git a/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java b/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java index 7d5bba1e8..b76dc0b85 100644 --- a/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java +++ b/core/src/main/java/org/geysermc/geyser/erosion/GeyserboundPacketHandlerImpl.java @@ -43,6 +43,7 @@ import org.geysermc.erosion.packet.backendbound.BackendboundInitializePacket; import org.geysermc.erosion.packet.backendbound.BackendboundPacket; import org.geysermc.erosion.packet.geyserbound.*; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.level.physics.Direction; import org.geysermc.geyser.network.GameProtocol; import org.geysermc.geyser.session.GeyserSession; @@ -119,7 +120,7 @@ public final class GeyserboundPacketHandlerImpl extends AbstractGeyserboundPacke } CompletableFuture future = this.asyncPendingLookups.remove(transactionId); if (future != null) { - future.complete(BlockStateValues.JAVA_AIR_ID); + future.complete(Block.JAVA_AIR_ID); } } diff --git a/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java b/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java index 52759c709..205486ced 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java @@ -29,6 +29,7 @@ import com.fasterxml.jackson.databind.JsonNode; import it.unimi.dsi.fastutil.ints.*; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.level.physics.Direction; import org.geysermc.geyser.level.physics.PistonBehavior; import org.geysermc.geyser.registry.BlockRegistries; @@ -48,7 +49,6 @@ public final class BlockStateValues { private static final Int2IntMap BANNER_COLORS = new FixedInt2IntMap(); private static final Int2ByteMap BED_COLORS = new FixedInt2ByteMap(); private static final Int2IntMap BRUSH_PROGRESS = new Int2IntOpenHashMap(); - private static final Int2ByteMap COMMAND_BLOCK_VALUES = new Int2ByteOpenHashMap(); private static final Int2ObjectMap DOUBLE_CHEST_VALUES = new Int2ObjectOpenHashMap<>(); private static final Int2ObjectMap FLOWER_POT_VALUES = new Int2ObjectOpenHashMap<>(); private static final IntSet HORIZONTAL_FACING_JIGSAWS = new IntOpenHashSet(); @@ -110,11 +110,6 @@ public final class BlockStateValues { } } - if (javaId.contains("command_block")) { - COMMAND_BLOCK_VALUES.put(javaBlockState, javaId.contains("conditional=true") ? (byte) 1 : (byte) 0); - return; - } - if (blockData.get("double_chest_position") != null) { boolean isX = (blockData.get("x") != null); boolean isDirectionPositive = ((blockData.get("x") != null && blockData.get("x").asBoolean()) || @@ -277,16 +272,6 @@ public final class BlockStateValues { return ALL_CAULDRONS.contains(state); } - /** - * The block state in Java and Bedrock both contain the conditional bit, however command block block entity tags - * in Bedrock need the conditional information. - * - * @return the list of all command blocks and if they are conditional (1 or 0) - */ - public static Int2ByteMap getCommandBlockValues() { - return COMMAND_BLOCK_VALUES; - } - /** * All double chest values are part of the block state in Java and part of the block entity tag in Bedrock. * This gives the DoubleChestValue that can be calculated into the final tag. @@ -356,7 +341,7 @@ public final class BlockStateValues { * @return Block state for the piston head */ public static int getPistonHead(Direction direction) { - return PISTON_HEADS.getOrDefault(direction, BlockStateValues.JAVA_AIR_ID); + return PISTON_HEADS.getOrDefault(direction, Block.JAVA_AIR_ID); } /** @@ -420,7 +405,7 @@ public final class BlockStateValues { } public static boolean canPistonMoveBlock(int javaId, boolean isPushing) { - if (javaId == JAVA_AIR_ID) { + if (javaId == Block.JAVA_AIR_ID) { return true; } // Pistons can only be moved if they aren't extended diff --git a/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java b/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java new file mode 100644 index 000000000..426895269 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java @@ -0,0 +1,2820 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block; + +import org.geysermc.geyser.level.block.type.BannerBlock; +import org.geysermc.geyser.level.block.type.BedBlock; +import org.geysermc.geyser.level.block.type.Block; +import org.geysermc.geyser.level.physics.Axis; +import org.geysermc.geyser.level.physics.Direction; +import org.geysermc.geyser.registry.BlockRegistries; + +import static org.geysermc.geyser.level.block.property.Properties.*; +import static org.geysermc.geyser.level.block.type.Block.builder; + +@SuppressWarnings("unused") +public final class Blocks { + public static final Block AIR = register(new Block("air", builder())); + public static final Block STONE = register(new Block("stone", builder())); + public static final Block GRANITE = register(new Block("granite", builder())); + public static final Block POLISHED_GRANITE = register(new Block("polished_granite", builder())); + public static final Block DIORITE = register(new Block("diorite", builder())); + public static final Block POLISHED_DIORITE = register(new Block("polished_diorite", builder())); + public static final Block ANDESITE = register(new Block("andesite", builder())); + public static final Block POLISHED_ANDESITE = register(new Block("polished_andesite", builder())); + public static final Block GRASS_BLOCK = register(new Block("grass_block", builder() + .booleanState(SNOWY))); + public static final Block DIRT = register(new Block("dirt", builder())); + public static final Block COARSE_DIRT = register(new Block("coarse_dirt", builder())); + public static final Block PODZOL = register(new Block("podzol", builder() + .booleanState(SNOWY))); + public static final Block COBBLESTONE = register(new Block("cobblestone", builder())); + public static final Block OAK_PLANKS = register(new Block("oak_planks", builder())); + public static final Block SPRUCE_PLANKS = register(new Block("spruce_planks", builder())); + public static final Block BIRCH_PLANKS = register(new Block("birch_planks", builder())); + public static final Block JUNGLE_PLANKS = register(new Block("jungle_planks", builder())); + public static final Block ACACIA_PLANKS = register(new Block("acacia_planks", builder())); + public static final Block CHERRY_PLANKS = register(new Block("cherry_planks", builder())); + public static final Block DARK_OAK_PLANKS = register(new Block("dark_oak_planks", builder())); + public static final Block MANGROVE_PLANKS = register(new Block("mangrove_planks", builder())); + public static final Block BAMBOO_PLANKS = register(new Block("bamboo_planks", builder())); + public static final Block BAMBOO_MOSAIC = register(new Block("bamboo_mosaic", builder())); + public static final Block OAK_SAPLING = register(new Block("oak_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block SPRUCE_SAPLING = register(new Block("spruce_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block BIRCH_SAPLING = register(new Block("birch_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block JUNGLE_SAPLING = register(new Block("jungle_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block ACACIA_SAPLING = register(new Block("acacia_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block CHERRY_SAPLING = register(new Block("cherry_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block DARK_OAK_SAPLING = register(new Block("dark_oak_sapling", builder() + .intState(STAGE, 0, 1))); + public static final Block MANGROVE_PROPAGULE = register(new Block("mangrove_propagule", builder() + .intState(AGE_4, 0, 4) + .booleanState(HANGING) + .intState(STAGE, 0, 1) + .booleanState(WATERLOGGED))); + public static final Block BEDROCK = register(new Block("bedrock", builder())); + public static final Block WATER = register(new Block("water", builder() + .intState(LEVEL, 0, 15))); + public static final Block LAVA = register(new Block("lava", builder() + .intState(LEVEL, 0, 15))); + public static final Block SAND = register(new Block("sand", builder())); + public static final Block SUSPICIOUS_SAND = register(new Block("suspicious_sand", builder() + .intState(DUSTED, 0, 3))); + public static final Block RED_SAND = register(new Block("red_sand", builder())); + public static final Block GRAVEL = register(new Block("gravel", builder())); + public static final Block SUSPICIOUS_GRAVEL = register(new Block("suspicious_gravel", builder() + .intState(DUSTED, 0, 3))); + public static final Block GOLD_ORE = register(new Block("gold_ore", builder())); + public static final Block DEEPSLATE_GOLD_ORE = register(new Block("deepslate_gold_ore", builder())); + public static final Block IRON_ORE = register(new Block("iron_ore", builder())); + public static final Block DEEPSLATE_IRON_ORE = register(new Block("deepslate_iron_ore", builder())); + public static final Block COAL_ORE = register(new Block("coal_ore", builder())); + public static final Block DEEPSLATE_COAL_ORE = register(new Block("deepslate_coal_ore", builder())); + public static final Block NETHER_GOLD_ORE = register(new Block("nether_gold_ore", builder())); + public static final Block OAK_LOG = register(new Block("oak_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block SPRUCE_LOG = register(new Block("spruce_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block BIRCH_LOG = register(new Block("birch_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block JUNGLE_LOG = register(new Block("jungle_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block ACACIA_LOG = register(new Block("acacia_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block CHERRY_LOG = register(new Block("cherry_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block DARK_OAK_LOG = register(new Block("dark_oak_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block MANGROVE_LOG = register(new Block("mangrove_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block MANGROVE_ROOTS = register(new Block("mangrove_roots", builder() + .booleanState(WATERLOGGED))); + public static final Block MUDDY_MANGROVE_ROOTS = register(new Block("muddy_mangrove_roots", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block BAMBOO_BLOCK = register(new Block("bamboo_block", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_SPRUCE_LOG = register(new Block("stripped_spruce_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_BIRCH_LOG = register(new Block("stripped_birch_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_JUNGLE_LOG = register(new Block("stripped_jungle_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_ACACIA_LOG = register(new Block("stripped_acacia_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_CHERRY_LOG = register(new Block("stripped_cherry_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_DARK_OAK_LOG = register(new Block("stripped_dark_oak_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_OAK_LOG = register(new Block("stripped_oak_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_MANGROVE_LOG = register(new Block("stripped_mangrove_log", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_BAMBOO_BLOCK = register(new Block("stripped_bamboo_block", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block OAK_WOOD = register(new Block("oak_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block SPRUCE_WOOD = register(new Block("spruce_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block BIRCH_WOOD = register(new Block("birch_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block JUNGLE_WOOD = register(new Block("jungle_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block ACACIA_WOOD = register(new Block("acacia_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block CHERRY_WOOD = register(new Block("cherry_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block DARK_OAK_WOOD = register(new Block("dark_oak_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block MANGROVE_WOOD = register(new Block("mangrove_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_OAK_WOOD = register(new Block("stripped_oak_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_SPRUCE_WOOD = register(new Block("stripped_spruce_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_BIRCH_WOOD = register(new Block("stripped_birch_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_JUNGLE_WOOD = register(new Block("stripped_jungle_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_ACACIA_WOOD = register(new Block("stripped_acacia_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_CHERRY_WOOD = register(new Block("stripped_cherry_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_DARK_OAK_WOOD = register(new Block("stripped_dark_oak_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_MANGROVE_WOOD = register(new Block("stripped_mangrove_wood", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block OAK_LEAVES = register(new Block("oak_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_LEAVES = register(new Block("spruce_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block BIRCH_LEAVES = register(new Block("birch_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_LEAVES = register(new Block("jungle_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block ACACIA_LEAVES = register(new Block("acacia_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block CHERRY_LEAVES = register(new Block("cherry_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_LEAVES = register(new Block("dark_oak_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_LEAVES = register(new Block("mangrove_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block AZALEA_LEAVES = register(new Block("azalea_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block FLOWERING_AZALEA_LEAVES = register(new Block("flowering_azalea_leaves", builder() + .intState(DISTANCE, 1, 7) + .booleanState(PERSISTENT) + .booleanState(WATERLOGGED))); + public static final Block SPONGE = register(new Block("sponge", builder())); + public static final Block WET_SPONGE = register(new Block("wet_sponge", builder())); + public static final Block GLASS = register(new Block("glass", builder())); + public static final Block LAPIS_ORE = register(new Block("lapis_ore", builder())); + public static final Block DEEPSLATE_LAPIS_ORE = register(new Block("deepslate_lapis_ore", builder())); + public static final Block LAPIS_BLOCK = register(new Block("lapis_block", builder())); + public static final Block DISPENSER = register(new Block("dispenser", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(TRIGGERED))); + public static final Block SANDSTONE = register(new Block("sandstone", builder())); + public static final Block CHISELED_SANDSTONE = register(new Block("chiseled_sandstone", builder())); + public static final Block CUT_SANDSTONE = register(new Block("cut_sandstone", builder())); + public static final Block NOTE_BLOCK = register(new Block("note_block", builder() + .enumState(NOTEBLOCK_INSTRUMENT, "harp", "basedrum", "snare", "hat", "bass", "flute", "bell", "guitar", "chime", "xylophone", "iron_xylophone", "cow_bell", "didgeridoo", "bit", "banjo", "pling", "zombie", "skeleton", "creeper", "dragon", "wither_skeleton", "piglin", "custom_head") + .intState(NOTE, 0, 24) + .booleanState(POWERED))); + public static final Block WHITE_BED = register(new BedBlock("white_bed", 0, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block ORANGE_BED = register(new BedBlock("orange_bed", 1, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block MAGENTA_BED = register(new BedBlock("magenta_bed", 2, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block LIGHT_BLUE_BED = register(new BedBlock("light_blue_bed", 3, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block YELLOW_BED = register(new BedBlock("yellow_bed", 4, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block LIME_BED = register(new BedBlock("lime_bed", 5, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block PINK_BED = register(new BedBlock("pink_bed", 6, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block GRAY_BED = register(new BedBlock("gray_bed", 7, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block LIGHT_GRAY_BED = register(new BedBlock("light_gray_bed", 8, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block CYAN_BED = register(new BedBlock("cyan_bed", 9, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block PURPLE_BED = register(new BedBlock("purple_bed", 10, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block BLUE_BED = register(new BedBlock("blue_bed", 11, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block BROWN_BED = register(new BedBlock("brown_bed", 12, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block GREEN_BED = register(new BedBlock("green_bed", 13, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block RED_BED = register(new BedBlock("red_bed", 14, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block BLACK_BED = register(new BedBlock("black_bed", 15, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OCCUPIED) + .enumState(BED_PART, "head", "foot"))); + public static final Block POWERED_RAIL = register(new Block("powered_rail", builder() + .booleanState(POWERED) + .enumState(RAIL_SHAPE_STRAIGHT, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south") + .booleanState(WATERLOGGED))); + public static final Block DETECTOR_RAIL = register(new Block("detector_rail", builder() + .booleanState(POWERED) + .enumState(RAIL_SHAPE_STRAIGHT, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south") + .booleanState(WATERLOGGED))); + public static final Block STICKY_PISTON = register(new Block("sticky_piston", builder() + .booleanState(EXTENDED) + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block COBWEB = register(new Block("cobweb", builder())); + public static final Block SHORT_GRASS = register(new Block("short_grass", builder())); + public static final Block FERN = register(new Block("fern", builder())); + public static final Block DEAD_BUSH = register(new Block("dead_bush", builder())); + public static final Block SEAGRASS = register(new Block("seagrass", builder())); + public static final Block TALL_SEAGRASS = register(new Block("tall_seagrass", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block PISTON = register(new Block("piston", builder() + .booleanState(EXTENDED) + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block PISTON_HEAD = register(new Block("piston_head", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(SHORT) + .enumState(PISTON_TYPE, "normal", "sticky"))); + public static final Block WHITE_WOOL = register(new Block("white_wool", builder())); + public static final Block ORANGE_WOOL = register(new Block("orange_wool", builder())); + public static final Block MAGENTA_WOOL = register(new Block("magenta_wool", builder())); + public static final Block LIGHT_BLUE_WOOL = register(new Block("light_blue_wool", builder())); + public static final Block YELLOW_WOOL = register(new Block("yellow_wool", builder())); + public static final Block LIME_WOOL = register(new Block("lime_wool", builder())); + public static final Block PINK_WOOL = register(new Block("pink_wool", builder())); + public static final Block GRAY_WOOL = register(new Block("gray_wool", builder())); + public static final Block LIGHT_GRAY_WOOL = register(new Block("light_gray_wool", builder())); + public static final Block CYAN_WOOL = register(new Block("cyan_wool", builder())); + public static final Block PURPLE_WOOL = register(new Block("purple_wool", builder())); + public static final Block BLUE_WOOL = register(new Block("blue_wool", builder())); + public static final Block BROWN_WOOL = register(new Block("brown_wool", builder())); + public static final Block GREEN_WOOL = register(new Block("green_wool", builder())); + public static final Block RED_WOOL = register(new Block("red_wool", builder())); + public static final Block BLACK_WOOL = register(new Block("black_wool", builder())); + public static final Block MOVING_PISTON = register(new Block("moving_piston", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .enumState(PISTON_TYPE, "normal", "sticky"))); + public static final Block DANDELION = register(new Block("dandelion", builder())); + public static final Block TORCHFLOWER = register(new Block("torchflower", builder())); + public static final Block POPPY = register(new Block("poppy", builder())); + public static final Block BLUE_ORCHID = register(new Block("blue_orchid", builder())); + public static final Block ALLIUM = register(new Block("allium", builder())); + public static final Block AZURE_BLUET = register(new Block("azure_bluet", builder())); + public static final Block RED_TULIP = register(new Block("red_tulip", builder())); + public static final Block ORANGE_TULIP = register(new Block("orange_tulip", builder())); + public static final Block WHITE_TULIP = register(new Block("white_tulip", builder())); + public static final Block PINK_TULIP = register(new Block("pink_tulip", builder())); + public static final Block OXEYE_DAISY = register(new Block("oxeye_daisy", builder())); + public static final Block CORNFLOWER = register(new Block("cornflower", builder())); + public static final Block WITHER_ROSE = register(new Block("wither_rose", builder())); + public static final Block LILY_OF_THE_VALLEY = register(new Block("lily_of_the_valley", builder())); + public static final Block BROWN_MUSHROOM = register(new Block("brown_mushroom", builder())); + public static final Block RED_MUSHROOM = register(new Block("red_mushroom", builder())); + public static final Block GOLD_BLOCK = register(new Block("gold_block", builder())); + public static final Block IRON_BLOCK = register(new Block("iron_block", builder())); + public static final Block BRICKS = register(new Block("bricks", builder())); + public static final Block TNT = register(new Block("tnt", builder() + .booleanState(UNSTABLE))); + public static final Block BOOKSHELF = register(new Block("bookshelf", builder())); + public static final Block CHISELED_BOOKSHELF = register(new Block("chiseled_bookshelf", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(CHISELED_BOOKSHELF_SLOT_0_OCCUPIED) + .booleanState(CHISELED_BOOKSHELF_SLOT_1_OCCUPIED) + .booleanState(CHISELED_BOOKSHELF_SLOT_2_OCCUPIED) + .booleanState(CHISELED_BOOKSHELF_SLOT_3_OCCUPIED) + .booleanState(CHISELED_BOOKSHELF_SLOT_4_OCCUPIED) + .booleanState(CHISELED_BOOKSHELF_SLOT_5_OCCUPIED))); + public static final Block MOSSY_COBBLESTONE = register(new Block("mossy_cobblestone", builder())); + public static final Block OBSIDIAN = register(new Block("obsidian", builder())); + public static final Block TORCH = register(new Block("torch", builder())); + public static final Block WALL_TORCH = register(new Block("wall_torch", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block FIRE = register(new Block("fire", builder() + .intState(AGE_15, 0, 15) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WEST))); + public static final Block SOUL_FIRE = register(new Block("soul_fire", builder())); + public static final Block SPAWNER = register(new Block("spawner", builder())); + public static final Block OAK_STAIRS = register(new Block("oak_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block CHEST = register(new Block("chest", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(CHEST_TYPE, "single", "left", "right") + .booleanState(WATERLOGGED))); + public static final Block REDSTONE_WIRE = register(new Block("redstone_wire", builder() + .enumState(EAST_REDSTONE, "up", "side", "none") + .enumState(NORTH_REDSTONE, "up", "side", "none") + .intState(POWER, 0, 15) + .enumState(SOUTH_REDSTONE, "up", "side", "none") + .enumState(WEST_REDSTONE, "up", "side", "none"))); + public static final Block DIAMOND_ORE = register(new Block("diamond_ore", builder())); + public static final Block DEEPSLATE_DIAMOND_ORE = register(new Block("deepslate_diamond_ore", builder())); + public static final Block DIAMOND_BLOCK = register(new Block("diamond_block", builder())); + public static final Block CRAFTING_TABLE = register(new Block("crafting_table", builder())); + public static final Block WHEAT = register(new Block("wheat", builder() + .intState(AGE_7, 0, 7))); + public static final Block FARMLAND = register(new Block("farmland", builder() + .intState(MOISTURE, 0, 7))); + public static final Block FURNACE = register(new Block("furnace", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LIT))); + public static final Block OAK_SIGN = register(new Block("oak_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_SIGN = register(new Block("spruce_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block BIRCH_SIGN = register(new Block("birch_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block ACACIA_SIGN = register(new Block("acacia_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block CHERRY_SIGN = register(new Block("cherry_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_SIGN = register(new Block("jungle_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_SIGN = register(new Block("dark_oak_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_SIGN = register(new Block("mangrove_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_SIGN = register(new Block("bamboo_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block OAK_DOOR = register(new Block("oak_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block LADDER = register(new Block("ladder", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block RAIL = register(new Block("rail", builder() + .enumState(RAIL_SHAPE, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south", "south_east", "south_west", "north_west", "north_east") + .booleanState(WATERLOGGED))); + public static final Block COBBLESTONE_STAIRS = register(new Block("cobblestone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block OAK_WALL_SIGN = register(new Block("oak_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_WALL_SIGN = register(new Block("spruce_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block BIRCH_WALL_SIGN = register(new Block("birch_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block ACACIA_WALL_SIGN = register(new Block("acacia_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block CHERRY_WALL_SIGN = register(new Block("cherry_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_WALL_SIGN = register(new Block("jungle_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_WALL_SIGN = register(new Block("dark_oak_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_WALL_SIGN = register(new Block("mangrove_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_WALL_SIGN = register(new Block("bamboo_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block OAK_HANGING_SIGN = register(new Block("oak_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_HANGING_SIGN = register(new Block("spruce_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block BIRCH_HANGING_SIGN = register(new Block("birch_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block ACACIA_HANGING_SIGN = register(new Block("acacia_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block CHERRY_HANGING_SIGN = register(new Block("cherry_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_HANGING_SIGN = register(new Block("jungle_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_HANGING_SIGN = register(new Block("dark_oak_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block CRIMSON_HANGING_SIGN = register(new Block("crimson_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block WARPED_HANGING_SIGN = register(new Block("warped_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_HANGING_SIGN = register(new Block("mangrove_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_HANGING_SIGN = register(new Block("bamboo_hanging_sign", builder() + .booleanState(ATTACHED) + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block OAK_WALL_HANGING_SIGN = register(new Block("oak_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_WALL_HANGING_SIGN = register(new Block("spruce_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block BIRCH_WALL_HANGING_SIGN = register(new Block("birch_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block ACACIA_WALL_HANGING_SIGN = register(new Block("acacia_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block CHERRY_WALL_HANGING_SIGN = register(new Block("cherry_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_WALL_HANGING_SIGN = register(new Block("jungle_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_WALL_HANGING_SIGN = register(new Block("dark_oak_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_WALL_HANGING_SIGN = register(new Block("mangrove_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block CRIMSON_WALL_HANGING_SIGN = register(new Block("crimson_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block WARPED_WALL_HANGING_SIGN = register(new Block("warped_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_WALL_HANGING_SIGN = register(new Block("bamboo_wall_hanging_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block LEVER = register(new Block("lever", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block STONE_PRESSURE_PLATE = register(new Block("stone_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block IRON_DOOR = register(new Block("iron_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block OAK_PRESSURE_PLATE = register(new Block("oak_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block SPRUCE_PRESSURE_PLATE = register(new Block("spruce_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block BIRCH_PRESSURE_PLATE = register(new Block("birch_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block JUNGLE_PRESSURE_PLATE = register(new Block("jungle_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block ACACIA_PRESSURE_PLATE = register(new Block("acacia_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block CHERRY_PRESSURE_PLATE = register(new Block("cherry_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block DARK_OAK_PRESSURE_PLATE = register(new Block("dark_oak_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block MANGROVE_PRESSURE_PLATE = register(new Block("mangrove_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block BAMBOO_PRESSURE_PLATE = register(new Block("bamboo_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block REDSTONE_ORE = register(new Block("redstone_ore", builder() + .booleanState(LIT))); + public static final Block DEEPSLATE_REDSTONE_ORE = register(new Block("deepslate_redstone_ore", builder() + .booleanState(LIT))); + public static final Block REDSTONE_TORCH = register(new Block("redstone_torch", builder() + .booleanState(LIT))); + public static final Block REDSTONE_WALL_TORCH = register(new Block("redstone_wall_torch", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LIT))); + public static final Block STONE_BUTTON = register(new Block("stone_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block SNOW = register(new Block("snow", builder() + .intState(LAYERS, 1, 8))); + public static final Block ICE = register(new Block("ice", builder())); + public static final Block SNOW_BLOCK = register(new Block("snow_block", builder())); + public static final Block CACTUS = register(new Block("cactus", builder() + .intState(AGE_15, 0, 15))); + public static final Block CLAY = register(new Block("clay", builder())); + public static final Block SUGAR_CANE = register(new Block("sugar_cane", builder() + .intState(AGE_15, 0, 15))); + public static final Block JUKEBOX = register(new Block("jukebox", builder() + .booleanState(HAS_RECORD))); + public static final Block OAK_FENCE = register(new Block("oak_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block NETHERRACK = register(new Block("netherrack", builder())); + public static final Block SOUL_SAND = register(new Block("soul_sand", builder())); + public static final Block SOUL_SOIL = register(new Block("soul_soil", builder())); + public static final Block BASALT = register(new Block("basalt", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block POLISHED_BASALT = register(new Block("polished_basalt", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block SOUL_TORCH = register(new Block("soul_torch", builder())); + public static final Block SOUL_WALL_TORCH = register(new Block("soul_wall_torch", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block GLOWSTONE = register(new Block("glowstone", builder())); + public static final Block NETHER_PORTAL = register(new Block("nether_portal", builder() + .enumState(HORIZONTAL_AXIS, Axis.X, Axis.Z))); + public static final Block CARVED_PUMPKIN = register(new Block("carved_pumpkin", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block JACK_O_LANTERN = register(new Block("jack_o_lantern", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block CAKE = register(new Block("cake", builder() + .intState(BITES, 0, 6))); + public static final Block REPEATER = register(new Block("repeater", builder() + .intState(DELAY, 1, 4) + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LOCKED) + .booleanState(POWERED))); + public static final Block WHITE_STAINED_GLASS = register(new Block("white_stained_glass", builder())); + public static final Block ORANGE_STAINED_GLASS = register(new Block("orange_stained_glass", builder())); + public static final Block MAGENTA_STAINED_GLASS = register(new Block("magenta_stained_glass", builder())); + public static final Block LIGHT_BLUE_STAINED_GLASS = register(new Block("light_blue_stained_glass", builder())); + public static final Block YELLOW_STAINED_GLASS = register(new Block("yellow_stained_glass", builder())); + public static final Block LIME_STAINED_GLASS = register(new Block("lime_stained_glass", builder())); + public static final Block PINK_STAINED_GLASS = register(new Block("pink_stained_glass", builder())); + public static final Block GRAY_STAINED_GLASS = register(new Block("gray_stained_glass", builder())); + public static final Block LIGHT_GRAY_STAINED_GLASS = register(new Block("light_gray_stained_glass", builder())); + public static final Block CYAN_STAINED_GLASS = register(new Block("cyan_stained_glass", builder())); + public static final Block PURPLE_STAINED_GLASS = register(new Block("purple_stained_glass", builder())); + public static final Block BLUE_STAINED_GLASS = register(new Block("blue_stained_glass", builder())); + public static final Block BROWN_STAINED_GLASS = register(new Block("brown_stained_glass", builder())); + public static final Block GREEN_STAINED_GLASS = register(new Block("green_stained_glass", builder())); + public static final Block RED_STAINED_GLASS = register(new Block("red_stained_glass", builder())); + public static final Block BLACK_STAINED_GLASS = register(new Block("black_stained_glass", builder())); + public static final Block OAK_TRAPDOOR = register(new Block("oak_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_TRAPDOOR = register(new Block("spruce_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block BIRCH_TRAPDOOR = register(new Block("birch_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_TRAPDOOR = register(new Block("jungle_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block ACACIA_TRAPDOOR = register(new Block("acacia_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block CHERRY_TRAPDOOR = register(new Block("cherry_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_TRAPDOOR = register(new Block("dark_oak_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_TRAPDOOR = register(new Block("mangrove_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_TRAPDOOR = register(new Block("bamboo_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block STONE_BRICKS = register(new Block("stone_bricks", builder())); + public static final Block MOSSY_STONE_BRICKS = register(new Block("mossy_stone_bricks", builder())); + public static final Block CRACKED_STONE_BRICKS = register(new Block("cracked_stone_bricks", builder())); + public static final Block CHISELED_STONE_BRICKS = register(new Block("chiseled_stone_bricks", builder())); + public static final Block PACKED_MUD = register(new Block("packed_mud", builder())); + public static final Block MUD_BRICKS = register(new Block("mud_bricks", builder())); + public static final Block INFESTED_STONE = register(new Block("infested_stone", builder())); + public static final Block INFESTED_COBBLESTONE = register(new Block("infested_cobblestone", builder())); + public static final Block INFESTED_STONE_BRICKS = register(new Block("infested_stone_bricks", builder())); + public static final Block INFESTED_MOSSY_STONE_BRICKS = register(new Block("infested_mossy_stone_bricks", builder())); + public static final Block INFESTED_CRACKED_STONE_BRICKS = register(new Block("infested_cracked_stone_bricks", builder())); + public static final Block INFESTED_CHISELED_STONE_BRICKS = register(new Block("infested_chiseled_stone_bricks", builder())); + public static final Block BROWN_MUSHROOM_BLOCK = register(new Block("brown_mushroom_block", builder() + .booleanState(DOWN) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WEST))); + public static final Block RED_MUSHROOM_BLOCK = register(new Block("red_mushroom_block", builder() + .booleanState(DOWN) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WEST))); + public static final Block MUSHROOM_STEM = register(new Block("mushroom_stem", builder() + .booleanState(DOWN) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WEST))); + public static final Block IRON_BARS = register(new Block("iron_bars", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block CHAIN = register(new Block("chain", builder() + .enumState(AXIS, Axis.VALUES) + .booleanState(WATERLOGGED))); + public static final Block GLASS_PANE = register(new Block("glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block PUMPKIN = register(new Block("pumpkin", builder())); + public static final Block MELON = register(new Block("melon", builder())); + public static final Block ATTACHED_PUMPKIN_STEM = register(new Block("attached_pumpkin_stem", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block ATTACHED_MELON_STEM = register(new Block("attached_melon_stem", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block PUMPKIN_STEM = register(new Block("pumpkin_stem", builder() + .intState(AGE_7, 0, 7))); + public static final Block MELON_STEM = register(new Block("melon_stem", builder() + .intState(AGE_7, 0, 7))); + public static final Block VINE = register(new Block("vine", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WEST))); + public static final Block GLOW_LICHEN = register(new Block("glow_lichen", builder() + .booleanState(DOWN) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block OAK_FENCE_GATE = register(new Block("oak_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block BRICK_STAIRS = register(new Block("brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block STONE_BRICK_STAIRS = register(new Block("stone_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block MUD_BRICK_STAIRS = register(new Block("mud_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block MYCELIUM = register(new Block("mycelium", builder() + .booleanState(SNOWY))); + public static final Block LILY_PAD = register(new Block("lily_pad", builder())); + public static final Block NETHER_BRICKS = register(new Block("nether_bricks", builder())); + public static final Block NETHER_BRICK_FENCE = register(new Block("nether_brick_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block NETHER_BRICK_STAIRS = register(new Block("nether_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block NETHER_WART = register(new Block("nether_wart", builder() + .intState(AGE_3, 0, 3))); + public static final Block ENCHANTING_TABLE = register(new Block("enchanting_table", builder())); + public static final Block BREWING_STAND = register(new Block("brewing_stand", builder() + .booleanState(HAS_BOTTLE_0) + .booleanState(HAS_BOTTLE_1) + .booleanState(HAS_BOTTLE_2))); + public static final Block CAULDRON = register(new Block("cauldron", builder())); + public static final Block WATER_CAULDRON = register(new Block("water_cauldron", builder() + .intState(LEVEL_CAULDRON, 1, 3))); + public static final Block LAVA_CAULDRON = register(new Block("lava_cauldron", builder())); + public static final Block POWDER_SNOW_CAULDRON = register(new Block("powder_snow_cauldron", builder() + .intState(LEVEL_CAULDRON, 1, 3))); + public static final Block END_PORTAL = register(new Block("end_portal", builder())); + public static final Block END_PORTAL_FRAME = register(new Block("end_portal_frame", builder() + .booleanState(EYE) + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block END_STONE = register(new Block("end_stone", builder())); + public static final Block DRAGON_EGG = register(new Block("dragon_egg", builder())); + public static final Block REDSTONE_LAMP = register(new Block("redstone_lamp", builder() + .booleanState(LIT))); + public static final Block COCOA = register(new Block("cocoa", builder() + .intState(AGE_2, 0, 2) + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block SANDSTONE_STAIRS = register(new Block("sandstone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block EMERALD_ORE = register(new Block("emerald_ore", builder())); + public static final Block DEEPSLATE_EMERALD_ORE = register(new Block("deepslate_emerald_ore", builder())); + public static final Block ENDER_CHEST = register(new Block("ender_chest", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block TRIPWIRE_HOOK = register(new Block("tripwire_hook", builder() + .booleanState(ATTACHED) + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block TRIPWIRE = register(new Block("tripwire", builder() + .booleanState(ATTACHED) + .booleanState(DISARMED) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(POWERED) + .booleanState(SOUTH) + .booleanState(WEST))); + public static final Block EMERALD_BLOCK = register(new Block("emerald_block", builder())); + public static final Block SPRUCE_STAIRS = register(new Block("spruce_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block BIRCH_STAIRS = register(new Block("birch_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_STAIRS = register(new Block("jungle_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block COMMAND_BLOCK = register(new Block("command_block", builder() + .booleanState(CONDITIONAL) + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block BEACON = register(new Block("beacon", builder())); + public static final Block COBBLESTONE_WALL = register(new Block("cobblestone_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block MOSSY_COBBLESTONE_WALL = register(new Block("mossy_cobblestone_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block FLOWER_POT = register(new Block("flower_pot", builder())); + public static final Block POTTED_TORCHFLOWER = register(new Block("potted_torchflower", builder())); + public static final Block POTTED_OAK_SAPLING = register(new Block("potted_oak_sapling", builder())); + public static final Block POTTED_SPRUCE_SAPLING = register(new Block("potted_spruce_sapling", builder())); + public static final Block POTTED_BIRCH_SAPLING = register(new Block("potted_birch_sapling", builder())); + public static final Block POTTED_JUNGLE_SAPLING = register(new Block("potted_jungle_sapling", builder())); + public static final Block POTTED_ACACIA_SAPLING = register(new Block("potted_acacia_sapling", builder())); + public static final Block POTTED_CHERRY_SAPLING = register(new Block("potted_cherry_sapling", builder())); + public static final Block POTTED_DARK_OAK_SAPLING = register(new Block("potted_dark_oak_sapling", builder())); + public static final Block POTTED_MANGROVE_PROPAGULE = register(new Block("potted_mangrove_propagule", builder())); + public static final Block POTTED_FERN = register(new Block("potted_fern", builder())); + public static final Block POTTED_DANDELION = register(new Block("potted_dandelion", builder())); + public static final Block POTTED_POPPY = register(new Block("potted_poppy", builder())); + public static final Block POTTED_BLUE_ORCHID = register(new Block("potted_blue_orchid", builder())); + public static final Block POTTED_ALLIUM = register(new Block("potted_allium", builder())); + public static final Block POTTED_AZURE_BLUET = register(new Block("potted_azure_bluet", builder())); + public static final Block POTTED_RED_TULIP = register(new Block("potted_red_tulip", builder())); + public static final Block POTTED_ORANGE_TULIP = register(new Block("potted_orange_tulip", builder())); + public static final Block POTTED_WHITE_TULIP = register(new Block("potted_white_tulip", builder())); + public static final Block POTTED_PINK_TULIP = register(new Block("potted_pink_tulip", builder())); + public static final Block POTTED_OXEYE_DAISY = register(new Block("potted_oxeye_daisy", builder())); + public static final Block POTTED_CORNFLOWER = register(new Block("potted_cornflower", builder())); + public static final Block POTTED_LILY_OF_THE_VALLEY = register(new Block("potted_lily_of_the_valley", builder())); + public static final Block POTTED_WITHER_ROSE = register(new Block("potted_wither_rose", builder())); + public static final Block POTTED_RED_MUSHROOM = register(new Block("potted_red_mushroom", builder())); + public static final Block POTTED_BROWN_MUSHROOM = register(new Block("potted_brown_mushroom", builder())); + public static final Block POTTED_DEAD_BUSH = register(new Block("potted_dead_bush", builder())); + public static final Block POTTED_CACTUS = register(new Block("potted_cactus", builder())); + public static final Block CARROTS = register(new Block("carrots", builder() + .intState(AGE_7, 0, 7))); + public static final Block POTATOES = register(new Block("potatoes", builder() + .intState(AGE_7, 0, 7))); + public static final Block OAK_BUTTON = register(new Block("oak_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block SPRUCE_BUTTON = register(new Block("spruce_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block BIRCH_BUTTON = register(new Block("birch_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block JUNGLE_BUTTON = register(new Block("jungle_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block ACACIA_BUTTON = register(new Block("acacia_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block CHERRY_BUTTON = register(new Block("cherry_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block DARK_OAK_BUTTON = register(new Block("dark_oak_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block MANGROVE_BUTTON = register(new Block("mangrove_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block BAMBOO_BUTTON = register(new Block("bamboo_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block SKELETON_SKULL = register(new Block("skeleton_skull", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block SKELETON_WALL_SKULL = register(new Block("skeleton_wall_skull", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block WITHER_SKELETON_SKULL = register(new Block("wither_skeleton_skull", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block WITHER_SKELETON_WALL_SKULL = register(new Block("wither_skeleton_wall_skull", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block ZOMBIE_HEAD = register(new Block("zombie_head", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block ZOMBIE_WALL_HEAD = register(new Block("zombie_wall_head", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block PLAYER_HEAD = register(new Block("player_head", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block PLAYER_WALL_HEAD = register(new Block("player_wall_head", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block CREEPER_HEAD = register(new Block("creeper_head", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block CREEPER_WALL_HEAD = register(new Block("creeper_wall_head", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block DRAGON_HEAD = register(new Block("dragon_head", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block DRAGON_WALL_HEAD = register(new Block("dragon_wall_head", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block PIGLIN_HEAD = register(new Block("piglin_head", builder() + .booleanState(POWERED) + .intState(ROTATION_16, 0, 15))); + public static final Block PIGLIN_WALL_HEAD = register(new Block("piglin_wall_head", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block ANVIL = register(new Block("anvil", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block CHIPPED_ANVIL = register(new Block("chipped_anvil", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block DAMAGED_ANVIL = register(new Block("damaged_anvil", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block TRAPPED_CHEST = register(new Block("trapped_chest", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(CHEST_TYPE, "single", "left", "right") + .booleanState(WATERLOGGED))); + public static final Block LIGHT_WEIGHTED_PRESSURE_PLATE = register(new Block("light_weighted_pressure_plate", builder() + .intState(POWER, 0, 15))); + public static final Block HEAVY_WEIGHTED_PRESSURE_PLATE = register(new Block("heavy_weighted_pressure_plate", builder() + .intState(POWER, 0, 15))); + public static final Block COMPARATOR = register(new Block("comparator", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(MODE_COMPARATOR, "compare", "subtract") + .booleanState(POWERED))); + public static final Block DAYLIGHT_DETECTOR = register(new Block("daylight_detector", builder() + .booleanState(INVERTED) + .intState(POWER, 0, 15))); + public static final Block REDSTONE_BLOCK = register(new Block("redstone_block", builder())); + public static final Block NETHER_QUARTZ_ORE = register(new Block("nether_quartz_ore", builder())); + public static final Block HOPPER = register(new Block("hopper", builder() + .booleanState(ENABLED) + .enumState(FACING_HOPPER, Direction.DOWN, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block QUARTZ_BLOCK = register(new Block("quartz_block", builder())); + public static final Block CHISELED_QUARTZ_BLOCK = register(new Block("chiseled_quartz_block", builder())); + public static final Block QUARTZ_PILLAR = register(new Block("quartz_pillar", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block QUARTZ_STAIRS = register(new Block("quartz_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block ACTIVATOR_RAIL = register(new Block("activator_rail", builder() + .booleanState(POWERED) + .enumState(RAIL_SHAPE_STRAIGHT, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south") + .booleanState(WATERLOGGED))); + public static final Block DROPPER = register(new Block("dropper", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(TRIGGERED))); + public static final Block WHITE_TERRACOTTA = register(new Block("white_terracotta", builder())); + public static final Block ORANGE_TERRACOTTA = register(new Block("orange_terracotta", builder())); + public static final Block MAGENTA_TERRACOTTA = register(new Block("magenta_terracotta", builder())); + public static final Block LIGHT_BLUE_TERRACOTTA = register(new Block("light_blue_terracotta", builder())); + public static final Block YELLOW_TERRACOTTA = register(new Block("yellow_terracotta", builder())); + public static final Block LIME_TERRACOTTA = register(new Block("lime_terracotta", builder())); + public static final Block PINK_TERRACOTTA = register(new Block("pink_terracotta", builder())); + public static final Block GRAY_TERRACOTTA = register(new Block("gray_terracotta", builder())); + public static final Block LIGHT_GRAY_TERRACOTTA = register(new Block("light_gray_terracotta", builder())); + public static final Block CYAN_TERRACOTTA = register(new Block("cyan_terracotta", builder())); + public static final Block PURPLE_TERRACOTTA = register(new Block("purple_terracotta", builder())); + public static final Block BLUE_TERRACOTTA = register(new Block("blue_terracotta", builder())); + public static final Block BROWN_TERRACOTTA = register(new Block("brown_terracotta", builder())); + public static final Block GREEN_TERRACOTTA = register(new Block("green_terracotta", builder())); + public static final Block RED_TERRACOTTA = register(new Block("red_terracotta", builder())); + public static final Block BLACK_TERRACOTTA = register(new Block("black_terracotta", builder())); + public static final Block WHITE_STAINED_GLASS_PANE = register(new Block("white_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block ORANGE_STAINED_GLASS_PANE = register(new Block("orange_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block MAGENTA_STAINED_GLASS_PANE = register(new Block("magenta_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block LIGHT_BLUE_STAINED_GLASS_PANE = register(new Block("light_blue_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block YELLOW_STAINED_GLASS_PANE = register(new Block("yellow_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block LIME_STAINED_GLASS_PANE = register(new Block("lime_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block PINK_STAINED_GLASS_PANE = register(new Block("pink_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block GRAY_STAINED_GLASS_PANE = register(new Block("gray_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block LIGHT_GRAY_STAINED_GLASS_PANE = register(new Block("light_gray_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block CYAN_STAINED_GLASS_PANE = register(new Block("cyan_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block PURPLE_STAINED_GLASS_PANE = register(new Block("purple_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block BLUE_STAINED_GLASS_PANE = register(new Block("blue_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block BROWN_STAINED_GLASS_PANE = register(new Block("brown_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block GREEN_STAINED_GLASS_PANE = register(new Block("green_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block RED_STAINED_GLASS_PANE = register(new Block("red_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block BLACK_STAINED_GLASS_PANE = register(new Block("black_stained_glass_pane", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block ACACIA_STAIRS = register(new Block("acacia_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block CHERRY_STAIRS = register(new Block("cherry_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_STAIRS = register(new Block("dark_oak_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_STAIRS = register(new Block("mangrove_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_STAIRS = register(new Block("bamboo_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_MOSAIC_STAIRS = register(new Block("bamboo_mosaic_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block SLIME_BLOCK = register(new Block("slime_block", builder())); + public static final Block BARRIER = register(new Block("barrier", builder() + .booleanState(WATERLOGGED))); + public static final Block LIGHT = register(new Block("light", builder() + .intState(LEVEL, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block IRON_TRAPDOOR = register(new Block("iron_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block PRISMARINE = register(new Block("prismarine", builder())); + public static final Block PRISMARINE_BRICKS = register(new Block("prismarine_bricks", builder())); + public static final Block DARK_PRISMARINE = register(new Block("dark_prismarine", builder())); + public static final Block PRISMARINE_STAIRS = register(new Block("prismarine_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block PRISMARINE_BRICK_STAIRS = register(new Block("prismarine_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block DARK_PRISMARINE_STAIRS = register(new Block("dark_prismarine_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block PRISMARINE_SLAB = register(new Block("prismarine_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block PRISMARINE_BRICK_SLAB = register(new Block("prismarine_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block DARK_PRISMARINE_SLAB = register(new Block("dark_prismarine_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SEA_LANTERN = register(new Block("sea_lantern", builder())); + public static final Block HAY_BLOCK = register(new Block("hay_block", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block WHITE_CARPET = register(new Block("white_carpet", builder())); + public static final Block ORANGE_CARPET = register(new Block("orange_carpet", builder())); + public static final Block MAGENTA_CARPET = register(new Block("magenta_carpet", builder())); + public static final Block LIGHT_BLUE_CARPET = register(new Block("light_blue_carpet", builder())); + public static final Block YELLOW_CARPET = register(new Block("yellow_carpet", builder())); + public static final Block LIME_CARPET = register(new Block("lime_carpet", builder())); + public static final Block PINK_CARPET = register(new Block("pink_carpet", builder())); + public static final Block GRAY_CARPET = register(new Block("gray_carpet", builder())); + public static final Block LIGHT_GRAY_CARPET = register(new Block("light_gray_carpet", builder())); + public static final Block CYAN_CARPET = register(new Block("cyan_carpet", builder())); + public static final Block PURPLE_CARPET = register(new Block("purple_carpet", builder())); + public static final Block BLUE_CARPET = register(new Block("blue_carpet", builder())); + public static final Block BROWN_CARPET = register(new Block("brown_carpet", builder())); + public static final Block GREEN_CARPET = register(new Block("green_carpet", builder())); + public static final Block RED_CARPET = register(new Block("red_carpet", builder())); + public static final Block BLACK_CARPET = register(new Block("black_carpet", builder())); + public static final Block TERRACOTTA = register(new Block("terracotta", builder())); + public static final Block COAL_BLOCK = register(new Block("coal_block", builder())); + public static final Block PACKED_ICE = register(new Block("packed_ice", builder())); + public static final Block SUNFLOWER = register(new Block("sunflower", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block LILAC = register(new Block("lilac", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block ROSE_BUSH = register(new Block("rose_bush", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block PEONY = register(new Block("peony", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block TALL_GRASS = register(new Block("tall_grass", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block LARGE_FERN = register(new Block("large_fern", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block WHITE_BANNER = register(new BannerBlock("white_banner", 0, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block ORANGE_BANNER = register(new BannerBlock("orange_banner", 1, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block MAGENTA_BANNER = register(new BannerBlock("magenta_banner", 2, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block LIGHT_BLUE_BANNER = register(new BannerBlock("light_blue_banner", 3, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block YELLOW_BANNER = register(new BannerBlock("yellow_banner", 4, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block LIME_BANNER = register(new BannerBlock("lime_banner", 5, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block PINK_BANNER = register(new BannerBlock("pink_banner", 6, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block GRAY_BANNER = register(new BannerBlock("gray_banner", 7, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block LIGHT_GRAY_BANNER = register(new BannerBlock("light_gray_banner", 8, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block CYAN_BANNER = register(new BannerBlock("cyan_banner", 9, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block PURPLE_BANNER = register(new BannerBlock("purple_banner", 10, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block BLUE_BANNER = register(new BannerBlock("blue_banner", 11, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block BROWN_BANNER = register(new BannerBlock("brown_banner", 12, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block GREEN_BANNER = register(new BannerBlock("green_banner", 13, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block RED_BANNER = register(new BannerBlock("red_banner", 14, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block BLACK_BANNER = register(new BannerBlock("black_banner", 15, builder() + .intState(ROTATION_16, 0, 15))); + public static final Block WHITE_WALL_BANNER = register(new BannerBlock("white_wall_banner", 0, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block ORANGE_WALL_BANNER = register(new BannerBlock("orange_wall_banner", 1, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block MAGENTA_WALL_BANNER = register(new BannerBlock("magenta_wall_banner", 2, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LIGHT_BLUE_WALL_BANNER = register(new BannerBlock("light_blue_wall_banner", 3, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block YELLOW_WALL_BANNER = register(new BannerBlock("yellow_wall_banner", 4, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LIME_WALL_BANNER = register(new BannerBlock("lime_wall_banner", 5, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block PINK_WALL_BANNER = register(new BannerBlock("pink_wall_banner", 6, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block GRAY_WALL_BANNER = register(new BannerBlock("gray_wall_banner", 7, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LIGHT_GRAY_WALL_BANNER = register(new BannerBlock("light_gray_wall_banner", 8, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block CYAN_WALL_BANNER = register(new BannerBlock("cyan_wall_banner", 9, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block PURPLE_WALL_BANNER = register(new BannerBlock("purple_wall_banner", 10, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BLUE_WALL_BANNER = register(new BannerBlock("blue_wall_banner", 11, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BROWN_WALL_BANNER = register(new BannerBlock("brown_wall_banner", 12, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block GREEN_WALL_BANNER = register(new BannerBlock("green_wall_banner", 13, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block RED_WALL_BANNER = register(new BannerBlock("red_wall_banner", 14, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BLACK_WALL_BANNER = register(new BannerBlock("black_wall_banner", 15, builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block RED_SANDSTONE = register(new Block("red_sandstone", builder())); + public static final Block CHISELED_RED_SANDSTONE = register(new Block("chiseled_red_sandstone", builder())); + public static final Block CUT_RED_SANDSTONE = register(new Block("cut_red_sandstone", builder())); + public static final Block RED_SANDSTONE_STAIRS = register(new Block("red_sandstone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block OAK_SLAB = register(new Block("oak_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SPRUCE_SLAB = register(new Block("spruce_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block BIRCH_SLAB = register(new Block("birch_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block JUNGLE_SLAB = register(new Block("jungle_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block ACACIA_SLAB = register(new Block("acacia_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block CHERRY_SLAB = register(new Block("cherry_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block DARK_OAK_SLAB = register(new Block("dark_oak_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block MANGROVE_SLAB = register(new Block("mangrove_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_SLAB = register(new Block("bamboo_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_MOSAIC_SLAB = register(new Block("bamboo_mosaic_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block STONE_SLAB = register(new Block("stone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_STONE_SLAB = register(new Block("smooth_stone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SANDSTONE_SLAB = register(new Block("sandstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block CUT_SANDSTONE_SLAB = register(new Block("cut_sandstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block PETRIFIED_OAK_SLAB = register(new Block("petrified_oak_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block COBBLESTONE_SLAB = register(new Block("cobblestone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block BRICK_SLAB = register(new Block("brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block STONE_BRICK_SLAB = register(new Block("stone_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block MUD_BRICK_SLAB = register(new Block("mud_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block NETHER_BRICK_SLAB = register(new Block("nether_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block QUARTZ_SLAB = register(new Block("quartz_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block RED_SANDSTONE_SLAB = register(new Block("red_sandstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block CUT_RED_SANDSTONE_SLAB = register(new Block("cut_red_sandstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block PURPUR_SLAB = register(new Block("purpur_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_STONE = register(new Block("smooth_stone", builder())); + public static final Block SMOOTH_SANDSTONE = register(new Block("smooth_sandstone", builder())); + public static final Block SMOOTH_QUARTZ = register(new Block("smooth_quartz", builder())); + public static final Block SMOOTH_RED_SANDSTONE = register(new Block("smooth_red_sandstone", builder())); + public static final Block SPRUCE_FENCE_GATE = register(new Block("spruce_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block BIRCH_FENCE_GATE = register(new Block("birch_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block JUNGLE_FENCE_GATE = register(new Block("jungle_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block ACACIA_FENCE_GATE = register(new Block("acacia_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block CHERRY_FENCE_GATE = register(new Block("cherry_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block DARK_OAK_FENCE_GATE = register(new Block("dark_oak_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block MANGROVE_FENCE_GATE = register(new Block("mangrove_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block BAMBOO_FENCE_GATE = register(new Block("bamboo_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block SPRUCE_FENCE = register(new Block("spruce_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block BIRCH_FENCE = register(new Block("birch_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block JUNGLE_FENCE = register(new Block("jungle_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block ACACIA_FENCE = register(new Block("acacia_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block CHERRY_FENCE = register(new Block("cherry_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block DARK_OAK_FENCE = register(new Block("dark_oak_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block MANGROVE_FENCE = register(new Block("mangrove_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block BAMBOO_FENCE = register(new Block("bamboo_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block SPRUCE_DOOR = register(new Block("spruce_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block BIRCH_DOOR = register(new Block("birch_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block JUNGLE_DOOR = register(new Block("jungle_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block ACACIA_DOOR = register(new Block("acacia_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block CHERRY_DOOR = register(new Block("cherry_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block DARK_OAK_DOOR = register(new Block("dark_oak_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block MANGROVE_DOOR = register(new Block("mangrove_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block BAMBOO_DOOR = register(new Block("bamboo_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block END_ROD = register(new Block("end_rod", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block CHORUS_PLANT = register(new Block("chorus_plant", builder() + .booleanState(DOWN) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WEST))); + public static final Block CHORUS_FLOWER = register(new Block("chorus_flower", builder() + .intState(AGE_5, 0, 5))); + public static final Block PURPUR_BLOCK = register(new Block("purpur_block", builder())); + public static final Block PURPUR_PILLAR = register(new Block("purpur_pillar", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block PURPUR_STAIRS = register(new Block("purpur_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block END_STONE_BRICKS = register(new Block("end_stone_bricks", builder())); + public static final Block TORCHFLOWER_CROP = register(new Block("torchflower_crop", builder() + .intState(AGE_1, 0, 1))); + public static final Block PITCHER_CROP = register(new Block("pitcher_crop", builder() + .intState(AGE_4, 0, 4) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block PITCHER_PLANT = register(new Block("pitcher_plant", builder() + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); + public static final Block BEETROOTS = register(new Block("beetroots", builder() + .intState(AGE_3, 0, 3))); + public static final Block DIRT_PATH = register(new Block("dirt_path", builder())); + public static final Block END_GATEWAY = register(new Block("end_gateway", builder())); + public static final Block REPEATING_COMMAND_BLOCK = register(new Block("repeating_command_block", builder() + .booleanState(CONDITIONAL) + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block CHAIN_COMMAND_BLOCK = register(new Block("chain_command_block", builder() + .booleanState(CONDITIONAL) + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block FROSTED_ICE = register(new Block("frosted_ice", builder() + .intState(AGE_3, 0, 3))); + public static final Block MAGMA_BLOCK = register(new Block("magma_block", builder())); + public static final Block NETHER_WART_BLOCK = register(new Block("nether_wart_block", builder())); + public static final Block RED_NETHER_BRICKS = register(new Block("red_nether_bricks", builder())); + public static final Block BONE_BLOCK = register(new Block("bone_block", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRUCTURE_VOID = register(new Block("structure_void", builder())); + public static final Block OBSERVER = register(new Block("observer", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(POWERED))); + public static final Block SHULKER_BOX = register(new Block("shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block WHITE_SHULKER_BOX = register(new Block("white_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block ORANGE_SHULKER_BOX = register(new Block("orange_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block MAGENTA_SHULKER_BOX = register(new Block("magenta_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block LIGHT_BLUE_SHULKER_BOX = register(new Block("light_blue_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block YELLOW_SHULKER_BOX = register(new Block("yellow_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block LIME_SHULKER_BOX = register(new Block("lime_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block PINK_SHULKER_BOX = register(new Block("pink_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block GRAY_SHULKER_BOX = register(new Block("gray_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block LIGHT_GRAY_SHULKER_BOX = register(new Block("light_gray_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block CYAN_SHULKER_BOX = register(new Block("cyan_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block PURPLE_SHULKER_BOX = register(new Block("purple_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block BLUE_SHULKER_BOX = register(new Block("blue_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block BROWN_SHULKER_BOX = register(new Block("brown_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block GREEN_SHULKER_BOX = register(new Block("green_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block RED_SHULKER_BOX = register(new Block("red_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block BLACK_SHULKER_BOX = register(new Block("black_shulker_box", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); + public static final Block WHITE_GLAZED_TERRACOTTA = register(new Block("white_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block ORANGE_GLAZED_TERRACOTTA = register(new Block("orange_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block MAGENTA_GLAZED_TERRACOTTA = register(new Block("magenta_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LIGHT_BLUE_GLAZED_TERRACOTTA = register(new Block("light_blue_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block YELLOW_GLAZED_TERRACOTTA = register(new Block("yellow_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LIME_GLAZED_TERRACOTTA = register(new Block("lime_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block PINK_GLAZED_TERRACOTTA = register(new Block("pink_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block GRAY_GLAZED_TERRACOTTA = register(new Block("gray_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LIGHT_GRAY_GLAZED_TERRACOTTA = register(new Block("light_gray_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block CYAN_GLAZED_TERRACOTTA = register(new Block("cyan_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block PURPLE_GLAZED_TERRACOTTA = register(new Block("purple_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BLUE_GLAZED_TERRACOTTA = register(new Block("blue_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BROWN_GLAZED_TERRACOTTA = register(new Block("brown_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block GREEN_GLAZED_TERRACOTTA = register(new Block("green_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block RED_GLAZED_TERRACOTTA = register(new Block("red_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BLACK_GLAZED_TERRACOTTA = register(new Block("black_glazed_terracotta", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block WHITE_CONCRETE = register(new Block("white_concrete", builder())); + public static final Block ORANGE_CONCRETE = register(new Block("orange_concrete", builder())); + public static final Block MAGENTA_CONCRETE = register(new Block("magenta_concrete", builder())); + public static final Block LIGHT_BLUE_CONCRETE = register(new Block("light_blue_concrete", builder())); + public static final Block YELLOW_CONCRETE = register(new Block("yellow_concrete", builder())); + public static final Block LIME_CONCRETE = register(new Block("lime_concrete", builder())); + public static final Block PINK_CONCRETE = register(new Block("pink_concrete", builder())); + public static final Block GRAY_CONCRETE = register(new Block("gray_concrete", builder())); + public static final Block LIGHT_GRAY_CONCRETE = register(new Block("light_gray_concrete", builder())); + public static final Block CYAN_CONCRETE = register(new Block("cyan_concrete", builder())); + public static final Block PURPLE_CONCRETE = register(new Block("purple_concrete", builder())); + public static final Block BLUE_CONCRETE = register(new Block("blue_concrete", builder())); + public static final Block BROWN_CONCRETE = register(new Block("brown_concrete", builder())); + public static final Block GREEN_CONCRETE = register(new Block("green_concrete", builder())); + public static final Block RED_CONCRETE = register(new Block("red_concrete", builder())); + public static final Block BLACK_CONCRETE = register(new Block("black_concrete", builder())); + public static final Block WHITE_CONCRETE_POWDER = register(new Block("white_concrete_powder", builder())); + public static final Block ORANGE_CONCRETE_POWDER = register(new Block("orange_concrete_powder", builder())); + public static final Block MAGENTA_CONCRETE_POWDER = register(new Block("magenta_concrete_powder", builder())); + public static final Block LIGHT_BLUE_CONCRETE_POWDER = register(new Block("light_blue_concrete_powder", builder())); + public static final Block YELLOW_CONCRETE_POWDER = register(new Block("yellow_concrete_powder", builder())); + public static final Block LIME_CONCRETE_POWDER = register(new Block("lime_concrete_powder", builder())); + public static final Block PINK_CONCRETE_POWDER = register(new Block("pink_concrete_powder", builder())); + public static final Block GRAY_CONCRETE_POWDER = register(new Block("gray_concrete_powder", builder())); + public static final Block LIGHT_GRAY_CONCRETE_POWDER = register(new Block("light_gray_concrete_powder", builder())); + public static final Block CYAN_CONCRETE_POWDER = register(new Block("cyan_concrete_powder", builder())); + public static final Block PURPLE_CONCRETE_POWDER = register(new Block("purple_concrete_powder", builder())); + public static final Block BLUE_CONCRETE_POWDER = register(new Block("blue_concrete_powder", builder())); + public static final Block BROWN_CONCRETE_POWDER = register(new Block("brown_concrete_powder", builder())); + public static final Block GREEN_CONCRETE_POWDER = register(new Block("green_concrete_powder", builder())); + public static final Block RED_CONCRETE_POWDER = register(new Block("red_concrete_powder", builder())); + public static final Block BLACK_CONCRETE_POWDER = register(new Block("black_concrete_powder", builder())); + public static final Block KELP = register(new Block("kelp", builder() + .intState(AGE_25, 0, 25))); + public static final Block KELP_PLANT = register(new Block("kelp_plant", builder())); + public static final Block DRIED_KELP_BLOCK = register(new Block("dried_kelp_block", builder())); + public static final Block TURTLE_EGG = register(new Block("turtle_egg", builder() + .intState(EGGS, 1, 4) + .intState(HATCH, 0, 2))); + public static final Block SNIFFER_EGG = register(new Block("sniffer_egg", builder() + .intState(HATCH, 0, 2))); + public static final Block DEAD_TUBE_CORAL_BLOCK = register(new Block("dead_tube_coral_block", builder())); + public static final Block DEAD_BRAIN_CORAL_BLOCK = register(new Block("dead_brain_coral_block", builder())); + public static final Block DEAD_BUBBLE_CORAL_BLOCK = register(new Block("dead_bubble_coral_block", builder())); + public static final Block DEAD_FIRE_CORAL_BLOCK = register(new Block("dead_fire_coral_block", builder())); + public static final Block DEAD_HORN_CORAL_BLOCK = register(new Block("dead_horn_coral_block", builder())); + public static final Block TUBE_CORAL_BLOCK = register(new Block("tube_coral_block", builder())); + public static final Block BRAIN_CORAL_BLOCK = register(new Block("brain_coral_block", builder())); + public static final Block BUBBLE_CORAL_BLOCK = register(new Block("bubble_coral_block", builder())); + public static final Block FIRE_CORAL_BLOCK = register(new Block("fire_coral_block", builder())); + public static final Block HORN_CORAL_BLOCK = register(new Block("horn_coral_block", builder())); + public static final Block DEAD_TUBE_CORAL = register(new Block("dead_tube_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_BRAIN_CORAL = register(new Block("dead_brain_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_BUBBLE_CORAL = register(new Block("dead_bubble_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_FIRE_CORAL = register(new Block("dead_fire_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_HORN_CORAL = register(new Block("dead_horn_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block TUBE_CORAL = register(new Block("tube_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block BRAIN_CORAL = register(new Block("brain_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block BUBBLE_CORAL = register(new Block("bubble_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block FIRE_CORAL = register(new Block("fire_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block HORN_CORAL = register(new Block("horn_coral", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_TUBE_CORAL_FAN = register(new Block("dead_tube_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_BRAIN_CORAL_FAN = register(new Block("dead_brain_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_BUBBLE_CORAL_FAN = register(new Block("dead_bubble_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_FIRE_CORAL_FAN = register(new Block("dead_fire_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_HORN_CORAL_FAN = register(new Block("dead_horn_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block TUBE_CORAL_FAN = register(new Block("tube_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block BRAIN_CORAL_FAN = register(new Block("brain_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block BUBBLE_CORAL_FAN = register(new Block("bubble_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block FIRE_CORAL_FAN = register(new Block("fire_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block HORN_CORAL_FAN = register(new Block("horn_coral_fan", builder() + .booleanState(WATERLOGGED))); + public static final Block DEAD_TUBE_CORAL_WALL_FAN = register(new Block("dead_tube_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block DEAD_BRAIN_CORAL_WALL_FAN = register(new Block("dead_brain_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block DEAD_BUBBLE_CORAL_WALL_FAN = register(new Block("dead_bubble_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block DEAD_FIRE_CORAL_WALL_FAN = register(new Block("dead_fire_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block DEAD_HORN_CORAL_WALL_FAN = register(new Block("dead_horn_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block TUBE_CORAL_WALL_FAN = register(new Block("tube_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block BRAIN_CORAL_WALL_FAN = register(new Block("brain_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block BUBBLE_CORAL_WALL_FAN = register(new Block("bubble_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block FIRE_CORAL_WALL_FAN = register(new Block("fire_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block HORN_CORAL_WALL_FAN = register(new Block("horn_coral_wall_fan", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block SEA_PICKLE = register(new Block("sea_pickle", builder() + .intState(PICKLES, 1, 4) + .booleanState(WATERLOGGED))); + public static final Block BLUE_ICE = register(new Block("blue_ice", builder())); + public static final Block CONDUIT = register(new Block("conduit", builder() + .booleanState(WATERLOGGED))); + public static final Block BAMBOO_SAPLING = register(new Block("bamboo_sapling", builder())); + public static final Block BAMBOO = register(new Block("bamboo", builder() + .intState(AGE_1, 0, 1) + .enumState(BAMBOO_LEAVES, "none", "small", "large") + .intState(STAGE, 0, 1))); + public static final Block POTTED_BAMBOO = register(new Block("potted_bamboo", builder())); + public static final Block VOID_AIR = register(new Block("void_air", builder())); + public static final Block CAVE_AIR = register(new Block("cave_air", builder())); + public static final Block BUBBLE_COLUMN = register(new Block("bubble_column", builder() + .booleanState(DRAG))); + public static final Block POLISHED_GRANITE_STAIRS = register(new Block("polished_granite_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_RED_SANDSTONE_STAIRS = register(new Block("smooth_red_sandstone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block MOSSY_STONE_BRICK_STAIRS = register(new Block("mossy_stone_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_DIORITE_STAIRS = register(new Block("polished_diorite_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block MOSSY_COBBLESTONE_STAIRS = register(new Block("mossy_cobblestone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block END_STONE_BRICK_STAIRS = register(new Block("end_stone_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block STONE_STAIRS = register(new Block("stone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_SANDSTONE_STAIRS = register(new Block("smooth_sandstone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_QUARTZ_STAIRS = register(new Block("smooth_quartz_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block GRANITE_STAIRS = register(new Block("granite_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block ANDESITE_STAIRS = register(new Block("andesite_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block RED_NETHER_BRICK_STAIRS = register(new Block("red_nether_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_ANDESITE_STAIRS = register(new Block("polished_andesite_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block DIORITE_STAIRS = register(new Block("diorite_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_GRANITE_SLAB = register(new Block("polished_granite_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_RED_SANDSTONE_SLAB = register(new Block("smooth_red_sandstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block MOSSY_STONE_BRICK_SLAB = register(new Block("mossy_stone_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_DIORITE_SLAB = register(new Block("polished_diorite_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block MOSSY_COBBLESTONE_SLAB = register(new Block("mossy_cobblestone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block END_STONE_BRICK_SLAB = register(new Block("end_stone_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_SANDSTONE_SLAB = register(new Block("smooth_sandstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block SMOOTH_QUARTZ_SLAB = register(new Block("smooth_quartz_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block GRANITE_SLAB = register(new Block("granite_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block ANDESITE_SLAB = register(new Block("andesite_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block RED_NETHER_BRICK_SLAB = register(new Block("red_nether_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_ANDESITE_SLAB = register(new Block("polished_andesite_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block DIORITE_SLAB = register(new Block("diorite_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block BRICK_WALL = register(new Block("brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block PRISMARINE_WALL = register(new Block("prismarine_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block RED_SANDSTONE_WALL = register(new Block("red_sandstone_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block MOSSY_STONE_BRICK_WALL = register(new Block("mossy_stone_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block GRANITE_WALL = register(new Block("granite_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block STONE_BRICK_WALL = register(new Block("stone_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block MUD_BRICK_WALL = register(new Block("mud_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block NETHER_BRICK_WALL = register(new Block("nether_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block ANDESITE_WALL = register(new Block("andesite_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block RED_NETHER_BRICK_WALL = register(new Block("red_nether_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block SANDSTONE_WALL = register(new Block("sandstone_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block END_STONE_BRICK_WALL = register(new Block("end_stone_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block DIORITE_WALL = register(new Block("diorite_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block SCAFFOLDING = register(new Block("scaffolding", builder() + .booleanState(BOTTOM) + .intState(STABILITY_DISTANCE, 0, 7) + .booleanState(WATERLOGGED))); + public static final Block LOOM = register(new Block("loom", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BARREL = register(new Block("barrel", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(OPEN))); + public static final Block SMOKER = register(new Block("smoker", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LIT))); + public static final Block BLAST_FURNACE = register(new Block("blast_furnace", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LIT))); + public static final Block CARTOGRAPHY_TABLE = register(new Block("cartography_table", builder())); + public static final Block FLETCHING_TABLE = register(new Block("fletching_table", builder())); + public static final Block GRINDSTONE = register(new Block("grindstone", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block LECTERN = register(new Block("lectern", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(HAS_BOOK) + .booleanState(POWERED))); + public static final Block SMITHING_TABLE = register(new Block("smithing_table", builder())); + public static final Block STONECUTTER = register(new Block("stonecutter", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); + public static final Block BELL = register(new Block("bell", builder() + .enumState(BELL_ATTACHMENT, "floor", "ceiling", "single_wall", "double_wall") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block LANTERN = register(new Block("lantern", builder() + .booleanState(HANGING) + .booleanState(WATERLOGGED))); + public static final Block SOUL_LANTERN = register(new Block("soul_lantern", builder() + .booleanState(HANGING) + .booleanState(WATERLOGGED))); + public static final Block CAMPFIRE = register(new Block("campfire", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LIT) + .booleanState(SIGNAL_FIRE) + .booleanState(WATERLOGGED))); + public static final Block SOUL_CAMPFIRE = register(new Block("soul_campfire", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(LIT) + .booleanState(SIGNAL_FIRE) + .booleanState(WATERLOGGED))); + public static final Block SWEET_BERRY_BUSH = register(new Block("sweet_berry_bush", builder() + .intState(AGE_3, 0, 3))); + public static final Block WARPED_STEM = register(new Block("warped_stem", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_WARPED_STEM = register(new Block("stripped_warped_stem", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block WARPED_HYPHAE = register(new Block("warped_hyphae", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_WARPED_HYPHAE = register(new Block("stripped_warped_hyphae", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block WARPED_NYLIUM = register(new Block("warped_nylium", builder())); + public static final Block WARPED_FUNGUS = register(new Block("warped_fungus", builder())); + public static final Block WARPED_WART_BLOCK = register(new Block("warped_wart_block", builder())); + public static final Block WARPED_ROOTS = register(new Block("warped_roots", builder())); + public static final Block NETHER_SPROUTS = register(new Block("nether_sprouts", builder())); + public static final Block CRIMSON_STEM = register(new Block("crimson_stem", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_CRIMSON_STEM = register(new Block("stripped_crimson_stem", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block CRIMSON_HYPHAE = register(new Block("crimson_hyphae", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block STRIPPED_CRIMSON_HYPHAE = register(new Block("stripped_crimson_hyphae", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block CRIMSON_NYLIUM = register(new Block("crimson_nylium", builder())); + public static final Block CRIMSON_FUNGUS = register(new Block("crimson_fungus", builder())); + public static final Block SHROOMLIGHT = register(new Block("shroomlight", builder())); + public static final Block WEEPING_VINES = register(new Block("weeping_vines", builder() + .intState(AGE_25, 0, 25))); + public static final Block WEEPING_VINES_PLANT = register(new Block("weeping_vines_plant", builder())); + public static final Block TWISTING_VINES = register(new Block("twisting_vines", builder() + .intState(AGE_25, 0, 25))); + public static final Block TWISTING_VINES_PLANT = register(new Block("twisting_vines_plant", builder())); + public static final Block CRIMSON_ROOTS = register(new Block("crimson_roots", builder())); + public static final Block CRIMSON_PLANKS = register(new Block("crimson_planks", builder())); + public static final Block WARPED_PLANKS = register(new Block("warped_planks", builder())); + public static final Block CRIMSON_SLAB = register(new Block("crimson_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block WARPED_SLAB = register(new Block("warped_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block CRIMSON_PRESSURE_PLATE = register(new Block("crimson_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block WARPED_PRESSURE_PLATE = register(new Block("warped_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block CRIMSON_FENCE = register(new Block("crimson_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block WARPED_FENCE = register(new Block("warped_fence", builder() + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block CRIMSON_TRAPDOOR = register(new Block("crimson_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block WARPED_TRAPDOOR = register(new Block("warped_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block CRIMSON_FENCE_GATE = register(new Block("crimson_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WARPED_FENCE_GATE = register(new Block("warped_fence_gate", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(IN_WALL) + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block CRIMSON_STAIRS = register(new Block("crimson_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block WARPED_STAIRS = register(new Block("warped_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block CRIMSON_BUTTON = register(new Block("crimson_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block WARPED_BUTTON = register(new Block("warped_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block CRIMSON_DOOR = register(new Block("crimson_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WARPED_DOOR = register(new Block("warped_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block CRIMSON_SIGN = register(new Block("crimson_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block WARPED_SIGN = register(new Block("warped_sign", builder() + .intState(ROTATION_16, 0, 15) + .booleanState(WATERLOGGED))); + public static final Block CRIMSON_WALL_SIGN = register(new Block("crimson_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block WARPED_WALL_SIGN = register(new Block("warped_wall_sign", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block STRUCTURE_BLOCK = register(new Block("structure_block", builder() + .enumState(STRUCTUREBLOCK_MODE, "save", "load", "corner", "data"))); + public static final Block JIGSAW = register(new Block("jigsaw", builder() + .enumState(ORIENTATION, "down_east", "down_north", "down_south", "down_west", "up_east", "up_north", "up_south", "up_west", "west_up", "east_up", "north_up", "south_up"))); + public static final Block COMPOSTER = register(new Block("composter", builder() + .intState(LEVEL_COMPOSTER, 0, 8))); + public static final Block TARGET = register(new Block("target", builder() + .intState(POWER, 0, 15))); + public static final Block BEE_NEST = register(new Block("bee_nest", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .intState(LEVEL_HONEY, 0, 5))); + public static final Block BEEHIVE = register(new Block("beehive", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .intState(LEVEL_HONEY, 0, 5))); + public static final Block HONEY_BLOCK = register(new Block("honey_block", builder())); + public static final Block HONEYCOMB_BLOCK = register(new Block("honeycomb_block", builder())); + public static final Block NETHERITE_BLOCK = register(new Block("netherite_block", builder())); + public static final Block ANCIENT_DEBRIS = register(new Block("ancient_debris", builder())); + public static final Block CRYING_OBSIDIAN = register(new Block("crying_obsidian", builder())); + public static final Block RESPAWN_ANCHOR = register(new Block("respawn_anchor", builder() + .intState(RESPAWN_ANCHOR_CHARGES, 0, 4))); + public static final Block POTTED_CRIMSON_FUNGUS = register(new Block("potted_crimson_fungus", builder())); + public static final Block POTTED_WARPED_FUNGUS = register(new Block("potted_warped_fungus", builder())); + public static final Block POTTED_CRIMSON_ROOTS = register(new Block("potted_crimson_roots", builder())); + public static final Block POTTED_WARPED_ROOTS = register(new Block("potted_warped_roots", builder())); + public static final Block LODESTONE = register(new Block("lodestone", builder())); + public static final Block BLACKSTONE = register(new Block("blackstone", builder())); + public static final Block BLACKSTONE_STAIRS = register(new Block("blackstone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block BLACKSTONE_WALL = register(new Block("blackstone_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block BLACKSTONE_SLAB = register(new Block("blackstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_BLACKSTONE = register(new Block("polished_blackstone", builder())); + public static final Block POLISHED_BLACKSTONE_BRICKS = register(new Block("polished_blackstone_bricks", builder())); + public static final Block CRACKED_POLISHED_BLACKSTONE_BRICKS = register(new Block("cracked_polished_blackstone_bricks", builder())); + public static final Block CHISELED_POLISHED_BLACKSTONE = register(new Block("chiseled_polished_blackstone", builder())); + public static final Block POLISHED_BLACKSTONE_BRICK_SLAB = register(new Block("polished_blackstone_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_BLACKSTONE_BRICK_STAIRS = register(new Block("polished_blackstone_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_BLACKSTONE_BRICK_WALL = register(new Block("polished_blackstone_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block GILDED_BLACKSTONE = register(new Block("gilded_blackstone", builder())); + public static final Block POLISHED_BLACKSTONE_STAIRS = register(new Block("polished_blackstone_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_BLACKSTONE_SLAB = register(new Block("polished_blackstone_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_BLACKSTONE_PRESSURE_PLATE = register(new Block("polished_blackstone_pressure_plate", builder() + .booleanState(POWERED))); + public static final Block POLISHED_BLACKSTONE_BUTTON = register(new Block("polished_blackstone_button", builder() + .enumState(ATTACH_FACE, "floor", "wall", "ceiling") + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(POWERED))); + public static final Block POLISHED_BLACKSTONE_WALL = register(new Block("polished_blackstone_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block CHISELED_NETHER_BRICKS = register(new Block("chiseled_nether_bricks", builder())); + public static final Block CRACKED_NETHER_BRICKS = register(new Block("cracked_nether_bricks", builder())); + public static final Block QUARTZ_BRICKS = register(new Block("quartz_bricks", builder())); + public static final Block CANDLE = register(new Block("candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block WHITE_CANDLE = register(new Block("white_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block ORANGE_CANDLE = register(new Block("orange_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block MAGENTA_CANDLE = register(new Block("magenta_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block LIGHT_BLUE_CANDLE = register(new Block("light_blue_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block YELLOW_CANDLE = register(new Block("yellow_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block LIME_CANDLE = register(new Block("lime_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block PINK_CANDLE = register(new Block("pink_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block GRAY_CANDLE = register(new Block("gray_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block LIGHT_GRAY_CANDLE = register(new Block("light_gray_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block CYAN_CANDLE = register(new Block("cyan_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block PURPLE_CANDLE = register(new Block("purple_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block BLUE_CANDLE = register(new Block("blue_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block BROWN_CANDLE = register(new Block("brown_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block GREEN_CANDLE = register(new Block("green_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block RED_CANDLE = register(new Block("red_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block BLACK_CANDLE = register(new Block("black_candle", builder() + .intState(CANDLES, 1, 4) + .booleanState(LIT) + .booleanState(WATERLOGGED))); + public static final Block CANDLE_CAKE = register(new Block("candle_cake", builder() + .booleanState(LIT))); + public static final Block WHITE_CANDLE_CAKE = register(new Block("white_candle_cake", builder() + .booleanState(LIT))); + public static final Block ORANGE_CANDLE_CAKE = register(new Block("orange_candle_cake", builder() + .booleanState(LIT))); + public static final Block MAGENTA_CANDLE_CAKE = register(new Block("magenta_candle_cake", builder() + .booleanState(LIT))); + public static final Block LIGHT_BLUE_CANDLE_CAKE = register(new Block("light_blue_candle_cake", builder() + .booleanState(LIT))); + public static final Block YELLOW_CANDLE_CAKE = register(new Block("yellow_candle_cake", builder() + .booleanState(LIT))); + public static final Block LIME_CANDLE_CAKE = register(new Block("lime_candle_cake", builder() + .booleanState(LIT))); + public static final Block PINK_CANDLE_CAKE = register(new Block("pink_candle_cake", builder() + .booleanState(LIT))); + public static final Block GRAY_CANDLE_CAKE = register(new Block("gray_candle_cake", builder() + .booleanState(LIT))); + public static final Block LIGHT_GRAY_CANDLE_CAKE = register(new Block("light_gray_candle_cake", builder() + .booleanState(LIT))); + public static final Block CYAN_CANDLE_CAKE = register(new Block("cyan_candle_cake", builder() + .booleanState(LIT))); + public static final Block PURPLE_CANDLE_CAKE = register(new Block("purple_candle_cake", builder() + .booleanState(LIT))); + public static final Block BLUE_CANDLE_CAKE = register(new Block("blue_candle_cake", builder() + .booleanState(LIT))); + public static final Block BROWN_CANDLE_CAKE = register(new Block("brown_candle_cake", builder() + .booleanState(LIT))); + public static final Block GREEN_CANDLE_CAKE = register(new Block("green_candle_cake", builder() + .booleanState(LIT))); + public static final Block RED_CANDLE_CAKE = register(new Block("red_candle_cake", builder() + .booleanState(LIT))); + public static final Block BLACK_CANDLE_CAKE = register(new Block("black_candle_cake", builder() + .booleanState(LIT))); + public static final Block AMETHYST_BLOCK = register(new Block("amethyst_block", builder())); + public static final Block BUDDING_AMETHYST = register(new Block("budding_amethyst", builder())); + public static final Block AMETHYST_CLUSTER = register(new Block("amethyst_cluster", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(WATERLOGGED))); + public static final Block LARGE_AMETHYST_BUD = register(new Block("large_amethyst_bud", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(WATERLOGGED))); + public static final Block MEDIUM_AMETHYST_BUD = register(new Block("medium_amethyst_bud", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(WATERLOGGED))); + public static final Block SMALL_AMETHYST_BUD = register(new Block("small_amethyst_bud", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(WATERLOGGED))); + public static final Block TUFF = register(new Block("tuff", builder())); + public static final Block TUFF_SLAB = register(new Block("tuff_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block TUFF_STAIRS = register(new Block("tuff_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block TUFF_WALL = register(new Block("tuff_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block POLISHED_TUFF = register(new Block("polished_tuff", builder())); + public static final Block POLISHED_TUFF_SLAB = register(new Block("polished_tuff_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_TUFF_STAIRS = register(new Block("polished_tuff_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_TUFF_WALL = register(new Block("polished_tuff_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block CHISELED_TUFF = register(new Block("chiseled_tuff", builder())); + public static final Block TUFF_BRICKS = register(new Block("tuff_bricks", builder())); + public static final Block TUFF_BRICK_SLAB = register(new Block("tuff_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block TUFF_BRICK_STAIRS = register(new Block("tuff_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block TUFF_BRICK_WALL = register(new Block("tuff_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block CHISELED_TUFF_BRICKS = register(new Block("chiseled_tuff_bricks", builder())); + public static final Block CALCITE = register(new Block("calcite", builder())); + public static final Block TINTED_GLASS = register(new Block("tinted_glass", builder())); + public static final Block POWDER_SNOW = register(new Block("powder_snow", builder())); + public static final Block SCULK_SENSOR = register(new Block("sculk_sensor", builder() + .intState(POWER, 0, 15) + .enumState(SCULK_SENSOR_PHASE, "inactive", "active", "cooldown") + .booleanState(WATERLOGGED))); + public static final Block CALIBRATED_SCULK_SENSOR = register(new Block("calibrated_sculk_sensor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .intState(POWER, 0, 15) + .enumState(SCULK_SENSOR_PHASE, "inactive", "active", "cooldown") + .booleanState(WATERLOGGED))); + public static final Block SCULK = register(new Block("sculk", builder())); + public static final Block SCULK_VEIN = register(new Block("sculk_vein", builder() + .booleanState(DOWN) + .booleanState(EAST) + .booleanState(NORTH) + .booleanState(SOUTH) + .booleanState(UP) + .booleanState(WATERLOGGED) + .booleanState(WEST))); + public static final Block SCULK_CATALYST = register(new Block("sculk_catalyst", builder() + .booleanState(BLOOM))); + public static final Block SCULK_SHRIEKER = register(new Block("sculk_shrieker", builder() + .booleanState(CAN_SUMMON) + .booleanState(SHRIEKING) + .booleanState(WATERLOGGED))); + public static final Block COPPER_BLOCK = register(new Block("copper_block", builder())); + public static final Block EXPOSED_COPPER = register(new Block("exposed_copper", builder())); + public static final Block WEATHERED_COPPER = register(new Block("weathered_copper", builder())); + public static final Block OXIDIZED_COPPER = register(new Block("oxidized_copper", builder())); + public static final Block COPPER_ORE = register(new Block("copper_ore", builder())); + public static final Block DEEPSLATE_COPPER_ORE = register(new Block("deepslate_copper_ore", builder())); + public static final Block OXIDIZED_CUT_COPPER = register(new Block("oxidized_cut_copper", builder())); + public static final Block WEATHERED_CUT_COPPER = register(new Block("weathered_cut_copper", builder())); + public static final Block EXPOSED_CUT_COPPER = register(new Block("exposed_cut_copper", builder())); + public static final Block CUT_COPPER = register(new Block("cut_copper", builder())); + public static final Block OXIDIZED_CHISELED_COPPER = register(new Block("oxidized_chiseled_copper", builder())); + public static final Block WEATHERED_CHISELED_COPPER = register(new Block("weathered_chiseled_copper", builder())); + public static final Block EXPOSED_CHISELED_COPPER = register(new Block("exposed_chiseled_copper", builder())); + public static final Block CHISELED_COPPER = register(new Block("chiseled_copper", builder())); + public static final Block WAXED_OXIDIZED_CHISELED_COPPER = register(new Block("waxed_oxidized_chiseled_copper", builder())); + public static final Block WAXED_WEATHERED_CHISELED_COPPER = register(new Block("waxed_weathered_chiseled_copper", builder())); + public static final Block WAXED_EXPOSED_CHISELED_COPPER = register(new Block("waxed_exposed_chiseled_copper", builder())); + public static final Block WAXED_CHISELED_COPPER = register(new Block("waxed_chiseled_copper", builder())); + public static final Block OXIDIZED_CUT_COPPER_STAIRS = register(new Block("oxidized_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block WEATHERED_CUT_COPPER_STAIRS = register(new Block("weathered_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block EXPOSED_CUT_COPPER_STAIRS = register(new Block("exposed_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block CUT_COPPER_STAIRS = register(new Block("cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block OXIDIZED_CUT_COPPER_SLAB = register(new Block("oxidized_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block WEATHERED_CUT_COPPER_SLAB = register(new Block("weathered_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block EXPOSED_CUT_COPPER_SLAB = register(new Block("exposed_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block CUT_COPPER_SLAB = register(new Block("cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block WAXED_COPPER_BLOCK = register(new Block("waxed_copper_block", builder())); + public static final Block WAXED_WEATHERED_COPPER = register(new Block("waxed_weathered_copper", builder())); + public static final Block WAXED_EXPOSED_COPPER = register(new Block("waxed_exposed_copper", builder())); + public static final Block WAXED_OXIDIZED_COPPER = register(new Block("waxed_oxidized_copper", builder())); + public static final Block WAXED_OXIDIZED_CUT_COPPER = register(new Block("waxed_oxidized_cut_copper", builder())); + public static final Block WAXED_WEATHERED_CUT_COPPER = register(new Block("waxed_weathered_cut_copper", builder())); + public static final Block WAXED_EXPOSED_CUT_COPPER = register(new Block("waxed_exposed_cut_copper", builder())); + public static final Block WAXED_CUT_COPPER = register(new Block("waxed_cut_copper", builder())); + public static final Block WAXED_OXIDIZED_CUT_COPPER_STAIRS = register(new Block("waxed_oxidized_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block WAXED_WEATHERED_CUT_COPPER_STAIRS = register(new Block("waxed_weathered_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block WAXED_EXPOSED_CUT_COPPER_STAIRS = register(new Block("waxed_exposed_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block WAXED_CUT_COPPER_STAIRS = register(new Block("waxed_cut_copper_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block WAXED_OXIDIZED_CUT_COPPER_SLAB = register(new Block("waxed_oxidized_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block WAXED_WEATHERED_CUT_COPPER_SLAB = register(new Block("waxed_weathered_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block WAXED_EXPOSED_CUT_COPPER_SLAB = register(new Block("waxed_exposed_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block WAXED_CUT_COPPER_SLAB = register(new Block("waxed_cut_copper_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block COPPER_DOOR = register(new Block("copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block EXPOSED_COPPER_DOOR = register(new Block("exposed_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block OXIDIZED_COPPER_DOOR = register(new Block("oxidized_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WEATHERED_COPPER_DOOR = register(new Block("weathered_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WAXED_COPPER_DOOR = register(new Block("waxed_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WAXED_EXPOSED_COPPER_DOOR = register(new Block("waxed_exposed_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WAXED_OXIDIZED_COPPER_DOOR = register(new Block("waxed_oxidized_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block WAXED_WEATHERED_COPPER_DOOR = register(new Block("waxed_weathered_copper_door", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .enumState(DOOR_HINGE, "left", "right") + .booleanState(OPEN) + .booleanState(POWERED))); + public static final Block COPPER_TRAPDOOR = register(new Block("copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block EXPOSED_COPPER_TRAPDOOR = register(new Block("exposed_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block OXIDIZED_COPPER_TRAPDOOR = register(new Block("oxidized_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block WEATHERED_COPPER_TRAPDOOR = register(new Block("weathered_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block WAXED_COPPER_TRAPDOOR = register(new Block("waxed_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block WAXED_EXPOSED_COPPER_TRAPDOOR = register(new Block("waxed_exposed_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block WAXED_OXIDIZED_COPPER_TRAPDOOR = register(new Block("waxed_oxidized_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block WAXED_WEATHERED_COPPER_TRAPDOOR = register(new Block("waxed_weathered_copper_trapdoor", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .booleanState(OPEN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block COPPER_GRATE = register(new Block("copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block EXPOSED_COPPER_GRATE = register(new Block("exposed_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block WEATHERED_COPPER_GRATE = register(new Block("weathered_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block OXIDIZED_COPPER_GRATE = register(new Block("oxidized_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block WAXED_COPPER_GRATE = register(new Block("waxed_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block WAXED_EXPOSED_COPPER_GRATE = register(new Block("waxed_exposed_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block WAXED_WEATHERED_COPPER_GRATE = register(new Block("waxed_weathered_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block WAXED_OXIDIZED_COPPER_GRATE = register(new Block("waxed_oxidized_copper_grate", builder() + .booleanState(WATERLOGGED))); + public static final Block COPPER_BULB = register(new Block("copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block EXPOSED_COPPER_BULB = register(new Block("exposed_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block WEATHERED_COPPER_BULB = register(new Block("weathered_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block OXIDIZED_COPPER_BULB = register(new Block("oxidized_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block WAXED_COPPER_BULB = register(new Block("waxed_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block WAXED_EXPOSED_COPPER_BULB = register(new Block("waxed_exposed_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block WAXED_WEATHERED_COPPER_BULB = register(new Block("waxed_weathered_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block WAXED_OXIDIZED_COPPER_BULB = register(new Block("waxed_oxidized_copper_bulb", builder() + .booleanState(LIT) + .booleanState(POWERED))); + public static final Block LIGHTNING_ROD = register(new Block("lightning_rod", builder() + .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) + .booleanState(POWERED) + .booleanState(WATERLOGGED))); + public static final Block POINTED_DRIPSTONE = register(new Block("pointed_dripstone", builder() + .enumState(DRIPSTONE_THICKNESS, "tip_merge", "tip", "frustum", "middle", "base") + .enumState(VERTICAL_DIRECTION, Direction.UP, Direction.DOWN) + .booleanState(WATERLOGGED))); + public static final Block DRIPSTONE_BLOCK = register(new Block("dripstone_block", builder())); + public static final Block CAVE_VINES = register(new Block("cave_vines", builder() + .intState(AGE_25, 0, 25) + .booleanState(BERRIES))); + public static final Block CAVE_VINES_PLANT = register(new Block("cave_vines_plant", builder() + .booleanState(BERRIES))); + public static final Block SPORE_BLOSSOM = register(new Block("spore_blossom", builder())); + public static final Block AZALEA = register(new Block("azalea", builder())); + public static final Block FLOWERING_AZALEA = register(new Block("flowering_azalea", builder())); + public static final Block MOSS_CARPET = register(new Block("moss_carpet", builder())); + public static final Block PINK_PETALS = register(new Block("pink_petals", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .intState(FLOWER_AMOUNT, 1, 4))); + public static final Block MOSS_BLOCK = register(new Block("moss_block", builder())); + public static final Block BIG_DRIPLEAF = register(new Block("big_dripleaf", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(TILT, "none", "unstable", "partial", "full") + .booleanState(WATERLOGGED))); + public static final Block BIG_DRIPLEAF_STEM = register(new Block("big_dripleaf_stem", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block SMALL_DRIPLEAF = register(new Block("small_dripleaf", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") + .booleanState(WATERLOGGED))); + public static final Block HANGING_ROOTS = register(new Block("hanging_roots", builder() + .booleanState(WATERLOGGED))); + public static final Block ROOTED_DIRT = register(new Block("rooted_dirt", builder())); + public static final Block MUD = register(new Block("mud", builder())); + public static final Block DEEPSLATE = register(new Block("deepslate", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block COBBLED_DEEPSLATE = register(new Block("cobbled_deepslate", builder())); + public static final Block COBBLED_DEEPSLATE_STAIRS = register(new Block("cobbled_deepslate_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block COBBLED_DEEPSLATE_SLAB = register(new Block("cobbled_deepslate_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block COBBLED_DEEPSLATE_WALL = register(new Block("cobbled_deepslate_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block POLISHED_DEEPSLATE = register(new Block("polished_deepslate", builder())); + public static final Block POLISHED_DEEPSLATE_STAIRS = register(new Block("polished_deepslate_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_DEEPSLATE_SLAB = register(new Block("polished_deepslate_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block POLISHED_DEEPSLATE_WALL = register(new Block("polished_deepslate_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block DEEPSLATE_TILES = register(new Block("deepslate_tiles", builder())); + public static final Block DEEPSLATE_TILE_STAIRS = register(new Block("deepslate_tile_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block DEEPSLATE_TILE_SLAB = register(new Block("deepslate_tile_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block DEEPSLATE_TILE_WALL = register(new Block("deepslate_tile_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block DEEPSLATE_BRICKS = register(new Block("deepslate_bricks", builder())); + public static final Block DEEPSLATE_BRICK_STAIRS = register(new Block("deepslate_brick_stairs", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .enumState(HALF, "top", "bottom") + .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") + .booleanState(WATERLOGGED))); + public static final Block DEEPSLATE_BRICK_SLAB = register(new Block("deepslate_brick_slab", builder() + .enumState(SLAB_TYPE, "top", "bottom", "double") + .booleanState(WATERLOGGED))); + public static final Block DEEPSLATE_BRICK_WALL = register(new Block("deepslate_brick_wall", builder() + .enumState(EAST_WALL, "none", "low", "tall") + .enumState(NORTH_WALL, "none", "low", "tall") + .enumState(SOUTH_WALL, "none", "low", "tall") + .booleanState(UP) + .booleanState(WATERLOGGED) + .enumState(WEST_WALL, "none", "low", "tall"))); + public static final Block CHISELED_DEEPSLATE = register(new Block("chiseled_deepslate", builder())); + public static final Block CRACKED_DEEPSLATE_BRICKS = register(new Block("cracked_deepslate_bricks", builder())); + public static final Block CRACKED_DEEPSLATE_TILES = register(new Block("cracked_deepslate_tiles", builder())); + public static final Block INFESTED_DEEPSLATE = register(new Block("infested_deepslate", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block SMOOTH_BASALT = register(new Block("smooth_basalt", builder())); + public static final Block RAW_IRON_BLOCK = register(new Block("raw_iron_block", builder())); + public static final Block RAW_COPPER_BLOCK = register(new Block("raw_copper_block", builder())); + public static final Block RAW_GOLD_BLOCK = register(new Block("raw_gold_block", builder())); + public static final Block POTTED_AZALEA_BUSH = register(new Block("potted_azalea_bush", builder())); + public static final Block POTTED_FLOWERING_AZALEA_BUSH = register(new Block("potted_flowering_azalea_bush", builder())); + public static final Block OCHRE_FROGLIGHT = register(new Block("ochre_froglight", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block VERDANT_FROGLIGHT = register(new Block("verdant_froglight", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block PEARLESCENT_FROGLIGHT = register(new Block("pearlescent_froglight", builder() + .enumState(AXIS, Axis.VALUES))); + public static final Block FROGSPAWN = register(new Block("frogspawn", builder())); + public static final Block REINFORCED_DEEPSLATE = register(new Block("reinforced_deepslate", builder())); + public static final Block DECORATED_POT = register(new Block("decorated_pot", builder() + .booleanState(CRACKED) + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(WATERLOGGED))); + public static final Block CRAFTER = register(new Block("crafter", builder() + .booleanState(CRAFTING) + .enumState(ORIENTATION, "down_east", "down_north", "down_south", "down_west", "up_east", "up_north", "up_south", "up_west", "west_up", "east_up", "north_up", "south_up") + .booleanState(TRIGGERED))); + public static final Block TRIAL_SPAWNER = register(new Block("trial_spawner", builder() + .booleanState(OMINOUS) + .enumState(TRIAL_SPAWNER_STATE, "inactive", "waiting_for_players", "active", "waiting_for_reward_ejection", "ejecting_reward", "cooldown"))); + public static final Block VAULT = register(new Block("vault", builder() + .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) + .booleanState(OMINOUS) + .enumState(VAULT_STATE, "inactive", "active", "unlocking", "ejecting"))); + public static final Block HEAVY_CORE = register(new Block("heavy_core", builder() + .booleanState(WATERLOGGED))); + + private static T register(T block) { + BlockRegistries.JAVA_BLOCKS_TO_RENAME.get().add(block); + return block; + } + + private Blocks() { + } +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/property/ChestType.java b/core/src/main/java/org/geysermc/geyser/level/block/property/ChestType.java new file mode 100644 index 000000000..c206f127c --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/property/ChestType.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.property; + +public enum ChestType { + SINGLE, + LEFT, + RIGHT; + + public static final ChestType[] VALUES = values(); +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java b/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java new file mode 100644 index 000000000..bbb6f8fe3 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.property; + +import org.geysermc.geyser.level.physics.Axis; +import org.geysermc.geyser.level.physics.Direction; + +public final class Properties { + public static final Property ATTACHED = Property.create("attached"); + public static final Property BOTTOM = Property.create("bottom"); + public static final Property CONDITIONAL = Property.create("conditional"); + public static final Property DISARMED = Property.create("disarmed"); + public static final Property DRAG = Property.create("drag"); + public static final Property ENABLED = Property.create("enabled"); + public static final Property EXTENDED = Property.create("extended"); + public static final Property EYE = Property.create("eye"); + public static final Property FALLING = Property.create("falling"); + public static final Property HANGING = Property.create("hanging"); + public static final Property HAS_BOTTLE_0 = Property.create("has_bottle_0"); + public static final Property HAS_BOTTLE_1 = Property.create("has_bottle_1"); + public static final Property HAS_BOTTLE_2 = Property.create("has_bottle_2"); + public static final Property HAS_RECORD = Property.create("has_record"); + public static final Property HAS_BOOK = Property.create("has_book"); + public static final Property INVERTED = Property.create("inverted"); + public static final Property IN_WALL = Property.create("in_wall"); + public static final Property LIT = Property.create("lit"); + public static final Property LOCKED = Property.create("locked"); + public static final Property OCCUPIED = Property.create("occupied"); + public static final Property OPEN = Property.create("open"); + public static final Property PERSISTENT = Property.create("persistent"); + public static final Property POWERED = Property.create("powered"); + public static final Property SHORT = Property.create("short"); + public static final Property SIGNAL_FIRE = Property.create("signal_fire"); + public static final Property SNOWY = Property.create("snowy"); + public static final Property TRIGGERED = Property.create("triggered"); + public static final Property UNSTABLE = Property.create("unstable"); + public static final Property WATERLOGGED = Property.create("waterlogged"); + public static final Property BERRIES = Property.create("berries"); + public static final Property BLOOM = Property.create("bloom"); + public static final Property SHRIEKING = Property.create("shrieking"); + public static final Property CAN_SUMMON = Property.create("can_summon"); + public static final Property HORIZONTAL_AXIS = Property.create("axis"); + public static final Property AXIS = Property.create("axis"); + public static final Property UP = Property.create("up"); + public static final Property DOWN = Property.create("down"); + public static final Property NORTH = Property.create("north"); + public static final Property EAST = Property.create("east"); + public static final Property SOUTH = Property.create("south"); + public static final Property WEST = Property.create("west"); + public static final Property FACING = Property.create("facing"); + public static final Property FACING_HOPPER = Property.create("facing"); + public static final Property HORIZONTAL_FACING = Property.create("facing"); + public static final Property FLOWER_AMOUNT = Property.create("flower_amount"); + public static final Property ORIENTATION = Property.create("orientation"); + public static final Property ATTACH_FACE = Property.create("face"); + public static final Property BELL_ATTACHMENT = Property.create("attachment"); + public static final Property EAST_WALL = Property.create("east"); + public static final Property NORTH_WALL = Property.create("north"); + public static final Property SOUTH_WALL = Property.create("south"); + public static final Property WEST_WALL = Property.create("west"); + public static final Property EAST_REDSTONE = Property.create("east"); + public static final Property NORTH_REDSTONE = Property.create("north"); + public static final Property SOUTH_REDSTONE = Property.create("south"); + public static final Property WEST_REDSTONE = Property.create("west"); + public static final Property DOUBLE_BLOCK_HALF = Property.create("half"); + public static final Property HALF = Property.create("half"); + public static final Property RAIL_SHAPE = Property.create("shape"); + public static final Property RAIL_SHAPE_STRAIGHT = Property.create("shape"); + public static final Property AGE_1 = Property.create("age"); + public static final Property AGE_2 = Property.create("age"); + public static final Property AGE_3 = Property.create("age"); + public static final Property AGE_4 = Property.create("age"); + public static final Property AGE_5 = Property.create("age"); + public static final Property AGE_7 = Property.create("age"); + public static final Property AGE_15 = Property.create("age"); + public static final Property AGE_25 = Property.create("age"); + public static final Property BITES = Property.create("bites"); + public static final Property CANDLES = Property.create("candles"); + public static final Property DELAY = Property.create("delay"); + public static final Property DISTANCE = Property.create("distance"); + public static final Property EGGS = Property.create("eggs"); + public static final Property HATCH = Property.create("hatch"); + public static final Property LAYERS = Property.create("layers"); + public static final Property LEVEL_CAULDRON = Property.create("level"); + public static final Property LEVEL_COMPOSTER = Property.create("level"); + public static final Property LEVEL_FLOWING = Property.create("level"); + public static final Property LEVEL_HONEY = Property.create("honey_level"); + public static final Property LEVEL = Property.create("level"); + public static final Property MOISTURE = Property.create("moisture"); + public static final Property NOTE = Property.create("note"); + public static final Property PICKLES = Property.create("pickles"); + public static final Property POWER = Property.create("power"); + public static final Property STAGE = Property.create("stage"); + public static final Property STABILITY_DISTANCE = Property.create("distance"); + public static final Property RESPAWN_ANCHOR_CHARGES = Property.create("charges"); + public static final Property ROTATION_16 = Property.create("rotation"); + public static final Property BED_PART = Property.create("part"); + public static final Property CHEST_TYPE = Property.create("type"); + public static final Property MODE_COMPARATOR = Property.create("mode"); + public static final Property DOOR_HINGE = Property.create("hinge"); + public static final Property NOTEBLOCK_INSTRUMENT = Property.create("instrument"); + public static final Property PISTON_TYPE = Property.create("type"); + public static final Property SLAB_TYPE = Property.create("type"); + public static final Property STAIRS_SHAPE = Property.create("shape"); + public static final Property STRUCTUREBLOCK_MODE = Property.create("mode"); + public static final Property BAMBOO_LEAVES = Property.create("leaves"); + public static final Property TILT = Property.create("tilt"); + public static final Property VERTICAL_DIRECTION = Property.create("vertical_direction"); + public static final Property DRIPSTONE_THICKNESS = Property.create("thickness"); + public static final Property SCULK_SENSOR_PHASE = Property.create("sculk_sensor_phase"); + public static final Property CHISELED_BOOKSHELF_SLOT_0_OCCUPIED = Property.create("slot_0_occupied"); + public static final Property CHISELED_BOOKSHELF_SLOT_1_OCCUPIED = Property.create("slot_1_occupied"); + public static final Property CHISELED_BOOKSHELF_SLOT_2_OCCUPIED = Property.create("slot_2_occupied"); + public static final Property CHISELED_BOOKSHELF_SLOT_3_OCCUPIED = Property.create("slot_3_occupied"); + public static final Property CHISELED_BOOKSHELF_SLOT_4_OCCUPIED = Property.create("slot_4_occupied"); + public static final Property CHISELED_BOOKSHELF_SLOT_5_OCCUPIED = Property.create("slot_5_occupied"); + public static final Property DUSTED = Property.create("dusted"); + public static final Property CRACKED = Property.create("cracked"); + public static final Property CRAFTING = Property.create("crafting"); + public static final Property TRIAL_SPAWNER_STATE = Property.create("trial_spawner_state"); + public static final Property VAULT_STATE = Property.create("vault_state"); + public static final Property OMINOUS = Property.create("ominous"); +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/property/Property.java b/core/src/main/java/org/geysermc/geyser/level/block/property/Property.java new file mode 100644 index 000000000..da68c54e4 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/property/Property.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.property; + +public class Property> { + private final String name; + + public Property(String name) { + this.name = name; + } + + @Override + public String toString() { + return getClass().getSimpleName() + "[" + name + "]"; + } + + public static > Property create(String name) { + return new Property<>(name); + } +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/type/BannerBlock.java b/core/src/main/java/org/geysermc/geyser/level/block/type/BannerBlock.java new file mode 100644 index 000000000..481004baa --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/type/BannerBlock.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.type; + +public class BannerBlock extends Block { + private final int dyeColor; + + public BannerBlock(String javaIdentifier, int dyeColor, Builder builder) { + super(javaIdentifier, builder); + this.dyeColor = dyeColor; + } + + public int dyeColor() { + return dyeColor; + } +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/type/BedBlock.java b/core/src/main/java/org/geysermc/geyser/level/block/type/BedBlock.java new file mode 100644 index 000000000..e72dbdafa --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/type/BedBlock.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.type; + +public class BedBlock extends Block { + private final int dyeColor; + + public BedBlock(String javaIdentifier, int dyeColor, Builder builder) { + super(javaIdentifier, builder); + this.dyeColor = dyeColor; + } + + public int dyeColor() { + return dyeColor; + } +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java b/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java new file mode 100644 index 000000000..459f4a5af --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.type; + +import it.unimi.dsi.fastutil.Pair; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; +import it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap; +import it.unimi.dsi.fastutil.objects.Reference2ObjectMap; +import org.geysermc.geyser.level.block.property.Property; +import org.geysermc.geyser.registry.BlockRegistries; +import org.geysermc.mcprotocollib.protocol.data.game.Identifier; + +import java.util.*; +import java.util.stream.Stream; + +public class Block { + public static final int JAVA_AIR_ID = 0; + + private final String javaIdentifier; + private int javaId = -1; + + public Block(String javaIdentifier, Builder builder) { + this.javaIdentifier = Identifier.formalize(javaIdentifier).intern(); + builder.build(this); + } + + public String javaIdentifier() { + return javaIdentifier; + } + + public int javaId() { + return javaId; + } + + public void setJavaId(int javaId) { + if (this.javaId != -1) { + throw new RuntimeException("Block ID has already been set!"); + } + this.javaId = javaId; + } + + @Override + public String toString() { + return "Item{" + + "javaIdentifier='" + javaIdentifier + '\'' + + ", javaId=" + javaId + + '}'; + } + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private final Map, List>> states = new LinkedHashMap<>(); + + /** + * For states that we're just tracking for mirroring Java states. + */ + public Builder enumState(Property property, String... values) { + states.put(property, List.of(values)); + return this; + } + + @SafeVarargs + public final > Builder enumState(Property property, T... enums) { + states.put(property, List.of(enums)); + return this; + } + + public Builder booleanState(Property property) { + states.put(property, List.of(Boolean.TRUE, Boolean.FALSE)); // Make this list a static constant if it'll survive past initialization + return this; + } + + public Builder intState(Property property, int low, int high) { + IntList list = new IntArrayList(); + // There is a state for every number between the low and high. + for (int i = low; i <= high; i++) { + list.add(i); + } + states.put(property, List.copyOf(list)); // Boxing reasons for that copy I guess. + return this; + } + + private void build(Block block) { + if (states.isEmpty()) { + BlockRegistries.BLOCK_STATES.get().add(new BlockState(block, BlockRegistries.BLOCK_STATES.get().size())); + } else { + // Think of this stream as another list containing, at the start, one empty list. + // It's two collections. Not a stream from the empty list. + Stream, Comparable>>> stream = Stream.of(Collections.emptyList()); + for (var state : this.states.entrySet()) { + // OK, so here's how I understand this works. Because this was staring at vanilla Java code trying + // to figure out exactly how it works so we don't have any discrepencies. + // For each existing pair in the list, a new list is created, adding one of the new values. + // Property up [true/false] would exist as true and false + // Both entries will get duplicated, adding down, true and false. + stream = stream.flatMap(aPreviousPropertiesList -> + // So the above is a list. It may be empty if this is the first property, + // or it may be populated if this is not the first property. + // We're about to create a new stream, each with a new list, + // for every previous property + state.getValue().stream().map(value -> { + var newProperties = new ArrayList<>(aPreviousPropertiesList); + newProperties.add(Pair.of(state.getKey(), value)); + return newProperties; + })); + } + + // Now we have a list of Pairs. Each list is a block state! + // If we have two boolean properties: up [true/false] and down [true/false], + // We'll see [up=true,down=true], [up=false,down=true], [up=true,down=false], [up=false,down=false] + stream.forEach(properties -> { + Reference2ObjectMap, Comparable> propertyMap = new Reference2ObjectArrayMap<>(properties.size()); + for (int i = 0; i < properties.size(); i++) { + Pair, Comparable> property = properties.get(i); + propertyMap.put(property.key(), property.value()); + } + BlockRegistries.BLOCK_STATES.get().add(new BlockState(block, BlockRegistries.BLOCK_STATES.get().size(), propertyMap)); + }); + } + } + + private Builder() { + } + } +} diff --git a/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java b/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java new file mode 100644 index 000000000..936b711e4 --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.level.block.type; + +import it.unimi.dsi.fastutil.objects.Reference2ObjectMap; +import it.unimi.dsi.fastutil.objects.Reference2ObjectMaps; +import org.geysermc.geyser.level.block.property.Property; +import org.geysermc.geyser.registry.BlockRegistries; + +public final class BlockState { + private final Block block; + private final int javaId; + private final Reference2ObjectMap, Comparable> states; + + BlockState(Block block, int javaId) { + this(block, javaId, Reference2ObjectMaps.emptyMap()); + } + + BlockState(Block block, int javaId, Reference2ObjectMap, Comparable> states) { + this.block = block; + this.javaId = javaId; + this.states = states; + } + + public > T getValue(Property property) { + //noinspection unchecked + return (T) states.get(property); + } + + public Block block() { + return block; + } + + public int javaId() { + return javaId; + } + + public static BlockState of(int javaId) { + return BlockRegistries.BLOCK_STATES.get(javaId); + } +} diff --git a/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java b/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java index aa9d6fc36..54a36dc12 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java +++ b/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java @@ -34,6 +34,8 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import org.geysermc.geyser.api.block.custom.CustomBlockData; import org.geysermc.geyser.api.block.custom.CustomBlockState; import org.geysermc.geyser.api.block.custom.nonvanilla.JavaBlockState; +import org.geysermc.geyser.level.block.type.Block; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.loader.CollisionRegistryLoader; import org.geysermc.geyser.registry.loader.RegistryLoaders; import org.geysermc.geyser.registry.populator.BlockRegistryPopulator; @@ -44,8 +46,8 @@ import org.geysermc.geyser.registry.type.BlockMappings; import org.geysermc.geyser.registry.type.CustomSkull; import org.geysermc.geyser.translator.collision.BlockCollision; +import java.util.ArrayList; import java.util.BitSet; - import java.util.Set; /** @@ -58,6 +60,14 @@ public class BlockRegistries { */ public static final VersionedRegistry BLOCKS = VersionedRegistry.create(RegistryLoaders.empty(Int2ObjectOpenHashMap::new)); + /** + * A registry which stores Java IDs to Java {@link BlockState}s, each with their specific state differences and a link + * to the overarching block. + */ + public static final ListRegistry BLOCK_STATES = ListRegistry.create(RegistryLoaders.empty(ArrayList::new)); + + public static final ListRegistry JAVA_BLOCKS_TO_RENAME = ListRegistry.create(RegistryLoaders.empty(ArrayList::new)); + /** * A mapped registry which stores Java to Bedrock block identifiers. */ diff --git a/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java b/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java new file mode 100644 index 000000000..bb5d2538c --- /dev/null +++ b/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2024 GeyserMC. http://geysermc.org + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @author GeyserMC + * @link https://github.com/GeyserMC/Geyser + */ + +package org.geysermc.geyser.registry; + +import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.geyser.registry.loader.RegistryLoader; + +import java.util.List; + +public class ListRegistry extends Registry> { + /** + * Creates a new instance of this class with the given input and + * {@link RegistryLoader}. The input specified is what the registry + * loader needs to take in. + * + * @param input the input + * @param registryLoader the registry loader + */ + protected ListRegistry(I input, RegistryLoader> registryLoader) { + super(input, registryLoader); + } + + /** + * Returns the value registered by the given index. + * + * @param index the index + * @return the value registered by the given index. + */ + @Nullable + public M get(int index) { + if (index >= this.mappings.size()) { + return null; + } + + return this.mappings.get(index); + } + + /** + * Returns the value registered by the given index or the default value + * specified if null. + * + * @param index the index + * @param defaultValue the default value + * @return the value registered by the given key or the default value + * specified if null. + */ + public M getOrDefault(int index, M defaultValue) { + M value = this.get(index); + if (value == null) { + return defaultValue; + } + + return value; + } + + /** + * Registers a new value into this registry with the given index. + * + * @param index the index + * @param value the value + * @return a new value into this registry with the given index. + */ + public M register(int index, M value) { + return this.mappings.set(index, value); + } + + /** + * Creates a new array registry with the given {@link RegistryLoader}. The + * input type is not specified here, meaning the loader return type is either + * predefined, or the registry is populated at a later point. + * + * @param registryLoader the registry loader + * @param the input type + * @param the returned mappings type + * @return a new registry with the given RegistryLoader supplier + */ + public static ListRegistry create(RegistryLoader> registryLoader) { + return new ListRegistry(null, registryLoader); + } +} diff --git a/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java b/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java index e76edc059..ace110f78 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java +++ b/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java @@ -582,8 +582,6 @@ public final class BlockRegistryPopulator { } } - BlockRegistries.CLEAN_JAVA_IDENTIFIERS.set(cleanIdentifiers.toArray(new String[0])); - BLOCKS_JSON = blocksJson; JsonNode blockInteractionsJson; diff --git a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java index c0ff1fb71..144cd9f27 100644 --- a/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java +++ b/core/src/main/java/org/geysermc/geyser/session/GeyserSession.java @@ -1592,9 +1592,6 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource { startGamePacket.setRewindHistorySize(0); startGamePacket.setServerAuthoritativeBlockBreaking(false); - // Entity properties for older versions - startGamePacket.getExperiments().add(new ExperimentData("upcoming_creator_features", true)); - upstream.sendPacket(startGamePacket); } diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/ChunkCache.java b/core/src/main/java/org/geysermc/geyser/session/cache/ChunkCache.java index e3a9cba89..7b279857a 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/ChunkCache.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/ChunkCache.java @@ -25,6 +25,7 @@ package org.geysermc.geyser.session.cache; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.mcprotocollib.protocol.data.game.chunk.DataPalette; import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; @@ -92,11 +93,11 @@ public class ChunkCache { DataPalette palette = chunk.sections()[(y - minY) >> 4]; if (palette == null) { - if (block != BlockStateValues.JAVA_AIR_ID) { + if (block != Block.JAVA_AIR_ID) { // A previously empty chunk, which is no longer empty as a block has been added to it palette = DataPalette.createForChunk(); // Fixes the chunk assuming that all blocks is the `block` variable we are updating. /shrug - palette.getPalette().stateToId(BlockStateValues.JAVA_AIR_ID); + palette.getPalette().stateToId(Block.JAVA_AIR_ID); chunk.sections()[(y - minY) >> 4] = palette; } else { // Nothing to update @@ -109,17 +110,17 @@ public class ChunkCache { public int getBlockAt(int x, int y, int z) { if (!cache) { - return BlockStateValues.JAVA_AIR_ID; + return Block.JAVA_AIR_ID; } GeyserChunk column = this.getChunk(x >> 4, z >> 4); if (column == null) { - return BlockStateValues.JAVA_AIR_ID; + return Block.JAVA_AIR_ID; } if (y < minY || ((y - minY) >> 4) > column.sections().length - 1) { // Y likely goes above or below the height limit of this world - return BlockStateValues.JAVA_AIR_ID; + return Block.JAVA_AIR_ID; } DataPalette chunk = column.sections()[(y - minY) >> 4]; @@ -127,7 +128,7 @@ public class ChunkCache { return chunk.get(x & 0xF, y & 0xF, z & 0xF); } - return BlockStateValues.JAVA_AIR_ID; + return Block.JAVA_AIR_ID; } public void removeChunk(int chunkX, int chunkZ) { diff --git a/core/src/main/java/org/geysermc/geyser/translator/inventory/ShulkerInventoryTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/inventory/ShulkerInventoryTranslator.java index f9879499a..795eba101 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/inventory/ShulkerInventoryTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/inventory/ShulkerInventoryTranslator.java @@ -35,6 +35,7 @@ import org.geysermc.geyser.inventory.BedrockContainerSlot; import org.geysermc.geyser.inventory.Inventory; import org.geysermc.geyser.inventory.holder.BlockInventoryHolder; import org.geysermc.geyser.inventory.updater.ContainerInventoryUpdater; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.Registries; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.level.block.entity.BlockEntityTranslator; @@ -58,7 +59,7 @@ public class ShulkerInventoryTranslator extends AbstractBlockInventoryTranslator .putInt("z", position.getZ()) .putString("CustomName", inventory.getTitle()); // Don't reset facing property - shulkerBoxTranslator.translateTag(session, tag, null, javaBlockState); + shulkerBoxTranslator.translateTag(session, tag, null, BlockState.of(javaBlockState)); BlockEntityDataPacket dataPacket = new BlockEntityDataPacket(); dataPacket.setData(tag.build()); diff --git a/core/src/main/java/org/geysermc/geyser/translator/inventory/chest/DoubleChestInventoryTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/inventory/chest/DoubleChestInventoryTranslator.java index 498bd418b..cb973fa18 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/inventory/chest/DoubleChestInventoryTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/inventory/chest/DoubleChestInventoryTranslator.java @@ -36,8 +36,7 @@ import org.cloudburstmc.protocol.bedrock.packet.ContainerOpenPacket; import org.cloudburstmc.protocol.bedrock.packet.UpdateBlockPacket; import org.geysermc.geyser.inventory.Container; import org.geysermc.geyser.inventory.Inventory; -import org.geysermc.geyser.level.block.BlockStateValues; -import org.geysermc.geyser.level.block.DoubleChestValue; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.registry.type.BlockMapping; import org.geysermc.geyser.session.GeyserSession; @@ -72,8 +71,8 @@ public class DoubleChestInventoryTranslator extends ChestInventoryTranslator { .putString("CustomName", inventory.getTitle()) .putString("id", "Chest"); - DoubleChestValue chestValue = BlockStateValues.getDoubleChestValues().get(javaBlockId); - DoubleChestBlockEntityTranslator.translateChestValue(tag, chestValue, + BlockState blockState = BlockState.of(javaBlockId); + DoubleChestBlockEntityTranslator.translateChestValue(tag, blockState, session.getLastInteractionBlockPosition().getX(), session.getLastInteractionBlockPosition().getZ()); BlockEntityDataPacket dataPacket = new BlockEntityDataPacket(); diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BannerBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BannerBlockEntityTranslator.java index 81f58214c..8b6f627e1 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BannerBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BannerBlockEntityTranslator.java @@ -30,7 +30,8 @@ import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.nbt.NbtType; import org.geysermc.geyser.item.type.BannerItem; -import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.BannerBlock; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -39,10 +40,9 @@ import java.util.List; @BlockEntity(type = BlockEntityType.BANNER) public class BannerBlockEntityTranslator extends BlockEntityTranslator implements RequiresBlockState { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, int blockState) { - int bannerColor = BlockStateValues.getBannerColor(blockState); - if (bannerColor != -1) { - bedrockNbt.putInt("Base", 15 - bannerColor); + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, BlockState blockState) { + if (blockState.block() instanceof BannerBlock banner) { + bedrockNbt.putInt("Base", 15 - banner.dyeColor()); } if (javaNbt == null) { diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BeaconBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BeaconBlockEntityTranslator.java index f7dee2864..9b5248785 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BeaconBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BeaconBlockEntityTranslator.java @@ -27,13 +27,14 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @BlockEntity(type = BlockEntityType.BEACON) public class BeaconBlockEntityTranslator extends BlockEntityTranslator { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { int primary = javaNbt.getInt("primary"); // The effects here generally map one-to-one Java <-> Bedrock. Only the newer ones get more complicated bedrockNbt.putInt("primary", primary == -1 ? 0 : primary); diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedBlockEntityTranslator.java index 720ffea3c..7622e6d28 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedBlockEntityTranslator.java @@ -27,19 +27,15 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; -import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.BedBlock; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @BlockEntity(type = BlockEntityType.BED) public class BedBlockEntityTranslator extends BlockEntityTranslator implements RequiresBlockState { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { - byte bedcolor = BlockStateValues.getBedColor(blockState); - // Just in case... - if (bedcolor == -1) { - bedcolor = 0; - } - bedrockNbt.putByte("color", bedcolor); + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { + bedrockNbt.putByte("color", (byte) (blockState.block() instanceof BedBlock bed ? bed.dyeColor() : 0)); } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedrockOnlyBlockEntity.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedrockOnlyBlockEntity.java index 051986473..01e2d3e74 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedrockOnlyBlockEntity.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BedrockOnlyBlockEntity.java @@ -31,6 +31,7 @@ import org.cloudburstmc.nbt.NbtList; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtType; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; /** @@ -50,7 +51,7 @@ public interface BedrockOnlyBlockEntity extends RequiresBlockState { * @param blockState The Java block state. * @param position The Bedrock block position. */ - void updateBlock(GeyserSession session, int blockState, Vector3i position); + void updateBlock(GeyserSession session, BlockState blockState, Vector3i position); /** * Get the tag of the Bedrock-only block entity diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BlockEntityTranslator.java index 6df7781be..5def51e01 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BlockEntityTranslator.java @@ -28,6 +28,7 @@ package org.geysermc.geyser.translator.level.block.entity; import org.checkerframework.checker.nullness.qual.Nullable; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.util.BlockEntityUtils; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -39,9 +40,9 @@ public abstract class BlockEntityTranslator { protected BlockEntityTranslator() { } - public abstract void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState); + public abstract void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState); - public NbtMap getBlockEntityTag(GeyserSession session, BlockEntityType type, int x, int y, int z, @Nullable NbtMap javaNbt, int blockState) { + public NbtMap getBlockEntityTag(GeyserSession session, BlockEntityType type, int x, int y, int z, @Nullable NbtMap javaNbt, BlockState blockState) { NbtMapBuilder tagBuilder = getConstantBedrockTag(type, x, y, z); if (javaNbt != null || this instanceof RequiresBlockState) { // Always process tags if the block state is part of the tag. diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BrushableBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BrushableBlockEntityTranslator.java index b4012236b..f0d632041 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BrushableBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/BrushableBlockEntityTranslator.java @@ -29,7 +29,8 @@ import org.checkerframework.checker.nullness.qual.Nullable; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.geysermc.geyser.item.Items; -import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.type.ItemMapping; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -38,7 +39,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType public class BrushableBlockEntityTranslator extends BlockEntityTranslator implements RequiresBlockState { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, BlockState blockState) { if (javaNbt == null) { return; } @@ -70,6 +71,6 @@ public class BrushableBlockEntityTranslator extends BlockEntityTranslator implem // controls which side the item protrudes from bedrockNbt.putByte("brush_direction", hitDirection); // controls how much the item protrudes - bedrockNbt.putInt("brush_count", BlockStateValues.getBrushProgress(blockState)); + bedrockNbt.putInt("brush_count", blockState.getValue(Properties.DUSTED)); } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CampfireBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CampfireBlockEntityTranslator.java index 699319bb6..fb71a84cc 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CampfireBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CampfireBlockEntityTranslator.java @@ -28,6 +28,7 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.nbt.NbtType; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.type.ItemMapping; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.item.BedrockItemBuilder; @@ -38,7 +39,7 @@ import java.util.List; @BlockEntity(type = BlockEntityType.CAMPFIRE) public class CampfireBlockEntityTranslator extends BlockEntityTranslator { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { List items = javaNbt.getList("Items", NbtType.COMPOUND); if (items != null) { int i = 1; diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CommandBlockBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CommandBlockBlockEntityTranslator.java index 0e00a19a8..b363de530 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CommandBlockBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/CommandBlockBlockEntityTranslator.java @@ -27,7 +27,8 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; -import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.text.MessageTranslator; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -35,12 +36,12 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType @BlockEntity(type = BlockEntityType.COMMAND_BLOCK) public class CommandBlockBlockEntityTranslator extends BlockEntityTranslator implements RequiresBlockState { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { if (javaNbt == null || javaNbt.size() < 5) { return; // These values aren't here } // Java infers from the block state, but Bedrock needs it in the tag - bedrockNbt.putByte("conditionalMode", BlockStateValues.getCommandBlockValues().getOrDefault(blockState, (byte) 0)); + bedrockNbt.putBoolean("conditionalMode", blockState.getValue(Properties.CONDITIONAL)); // Java and Bedrock values bedrockNbt.putByte("conditionMet", javaNbt.getByte("conditionMet")); bedrockNbt.putByte("auto", javaNbt.getByte("auto")); diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DecoratedPotBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DecoratedPotBlockEntityTranslator.java index b24558b45..33c884c55 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DecoratedPotBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DecoratedPotBlockEntityTranslator.java @@ -28,6 +28,7 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.nbt.NbtType; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -35,7 +36,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType public class DecoratedPotBlockEntityTranslator extends BlockEntityTranslator { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { if (javaNbt == null) { return; } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DoubleChestBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DoubleChestBlockEntityTranslator.java index dcb39d22c..63c5f71f3 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DoubleChestBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/DoubleChestBlockEntityTranslator.java @@ -29,7 +29,9 @@ import org.cloudburstmc.math.vector.Vector3i; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.geysermc.geyser.level.block.BlockStateValues; -import org.geysermc.geyser.level.block.DoubleChestValue; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; +import org.geysermc.geyser.level.physics.Direction; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.util.BlockEntityUtils; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -45,52 +47,40 @@ public class DoubleChestBlockEntityTranslator extends BlockEntityTranslator impl } @Override - public void updateBlock(GeyserSession session, int blockState, Vector3i position) { + public void updateBlock(GeyserSession session, BlockState blockState, Vector3i position) { NbtMapBuilder tagBuilder = getConstantBedrockTag(BlockEntityUtils.getBedrockBlockEntityId(BlockEntityType.CHEST), position.getX(), position.getY(), position.getZ()); translateTag(session, tagBuilder, null, blockState); BlockEntityUtils.updateBlockEntity(session, tagBuilder.build(), position); } @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { - DoubleChestValue chestValues = BlockStateValues.getDoubleChestValues().get(blockState); - if (chestValues != null) { - int x = (int) bedrockNbt.get("x"); - int z = (int) bedrockNbt.get("z"); - translateChestValue(bedrockNbt, chestValues, x, z); - } + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { + int x = (int) bedrockNbt.get("x"); + int z = (int) bedrockNbt.get("z"); + translateChestValue(bedrockNbt, blockState, x, z); } /** * Add Bedrock block entity tags to a NbtMap based on Java properties * * @param builder the NbtMapBuilder to apply properties to - * @param chestValues the position properties of this double chest + * @param state the BlockState of this double chest * @param x the x position of this chest pair * @param z the z position of this chest pair */ - public static void translateChestValue(NbtMapBuilder builder, DoubleChestValue chestValues, int x, int z) { + public static void translateChestValue(NbtMapBuilder builder, BlockState state, int x, int z) { // Calculate the position of the other chest based on the Java block state - if (chestValues.isFacingEast()) { - if (chestValues.isDirectionPositive()) { - // East - z = z + (chestValues.isLeft() ? 1 : -1); - } else { - // West - z = z + (chestValues.isLeft() ? -1 : 1); - } - } else { - if (chestValues.isDirectionPositive()) { - // South - x = x + (chestValues.isLeft() ? -1 : 1); - } else { - // North - x = x + (chestValues.isLeft() ? 1 : -1); - } + Direction facing = state.getValue(Properties.HORIZONTAL_FACING); + boolean isLeft = state.getValue(Properties.CHEST_TYPE).equals("left"); //TODO enum + switch (facing) { + case EAST -> z = z + (isLeft ? 1 : -1); + case WEST -> z = z + (isLeft ? -1 : 1); + case SOUTH -> x = x + (isLeft ? -1 : 1); + case NORTH -> x = x + (isLeft ? 1 : -1); } builder.putInt("pairx", x); builder.putInt("pairz", z); - if (!chestValues.isLeft()) { + if (!isLeft) { builder.putInt("pairlead", (byte) 1); } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EmptyBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EmptyBlockEntityTranslator.java index 9ce0aff0a..88029dc2d 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EmptyBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EmptyBlockEntityTranslator.java @@ -27,10 +27,11 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; public class EmptyBlockEntityTranslator extends BlockEntityTranslator { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EndGatewayBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EndGatewayBlockEntityTranslator.java index 97428eec1..36731bdff 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EndGatewayBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/EndGatewayBlockEntityTranslator.java @@ -31,13 +31,14 @@ import org.cloudburstmc.nbt.NbtList; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.nbt.NbtType; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @BlockEntity(type = BlockEntityType.END_GATEWAY) public class EndGatewayBlockEntityTranslator extends BlockEntityTranslator { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { bedrockNbt.putInt("Age", (int) javaNbt.getLong("Age")); // Java sometimes does not provide this tag, but Bedrock crashes if it doesn't exist // Linked coordinates diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/FlowerPotBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/FlowerPotBlockEntityTranslator.java index 074fff6ef..0a60b0f32 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/FlowerPotBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/FlowerPotBlockEntityTranslator.java @@ -30,6 +30,7 @@ import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.protocol.bedrock.packet.UpdateBlockPacket; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.util.BlockEntityUtils; @@ -75,12 +76,12 @@ public class FlowerPotBlockEntityTranslator implements BedrockOnlyBlockEntity { } @Override - public void updateBlock(GeyserSession session, int blockState, Vector3i position) { - NbtMap tag = getTag(session, blockState, position); + public void updateBlock(GeyserSession session, BlockState blockState, Vector3i position) { + NbtMap tag = getTag(session, blockState.javaId(), position); BlockEntityUtils.updateBlockEntity(session, tag, position); UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); updateBlockPacket.setDataLayer(0); - updateBlockPacket.setDefinition(session.getBlockMappings().getBedrockBlock(blockState)); + updateBlockPacket.setDefinition(session.getBlockMappings().getBedrockBlock(blockState.javaId())); updateBlockPacket.setBlockPosition(position); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NEIGHBORS); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NETWORK); diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/JigsawBlockBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/JigsawBlockBlockEntityTranslator.java index 53f32682c..51f5565b7 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/JigsawBlockBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/JigsawBlockBlockEntityTranslator.java @@ -29,13 +29,14 @@ import org.checkerframework.checker.nullness.qual.Nullable; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @BlockEntity(type = BlockEntityType.JIGSAW) public class JigsawBlockBlockEntityTranslator extends BlockEntityTranslator implements RequiresBlockState { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, BlockState blockState) { if (javaNbt == null) { return; } @@ -46,7 +47,7 @@ public class JigsawBlockBlockEntityTranslator extends BlockEntityTranslator impl } else { // Tag is not present in at least 1.14.4 Paper // Minecraft 1.18.1 deliberately has a fallback here, but not for any other value - bedrockNbt.putString("joint", BlockStateValues.getHorizontalFacingJigsaws().contains(blockState) ? "aligned" : "rollable"); + bedrockNbt.putString("joint", BlockStateValues.getHorizontalFacingJigsaws().contains(blockState.javaId()) ? "aligned" : "rollable"); // TODO } bedrockNbt.putString("name", javaNbt.getString("name")); bedrockNbt.putString("target_pool", javaNbt.getString("target_pool")); diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/PistonBlockEntity.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/PistonBlockEntity.java index 78e71000a..e09f6ae42 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/PistonBlockEntity.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/PistonBlockEntity.java @@ -25,6 +25,7 @@ package org.geysermc.geyser.translator.level.block.entity; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.PistonValueType; import org.cloudburstmc.math.vector.Vector3d; import org.cloudburstmc.math.vector.Vector3f; @@ -222,10 +223,10 @@ public class PistonBlockEntity { Vector3i blockInFront = position.add(orientation.getUnitVector()); int blockId = session.getGeyser().getWorldManager().getBlockAt(session, blockInFront); if (BlockStateValues.isPistonHead(blockId)) { - ChunkUtils.updateBlock(session, BlockStateValues.JAVA_AIR_ID, blockInFront); - } else if ((session.getGeyser().getPlatformType() == PlatformType.SPIGOT || session.getErosionHandler().isActive()) && blockId == BlockStateValues.JAVA_AIR_ID) { + ChunkUtils.updateBlock(session, Block.JAVA_AIR_ID, blockInFront); + } else if ((session.getGeyser().getPlatformType() == PlatformType.SPIGOT || session.getErosionHandler().isActive()) && blockId == Block.JAVA_AIR_ID) { // Spigot removes the piston head from the cache, but we need to send the block update ourselves - ChunkUtils.updateBlock(session, BlockStateValues.JAVA_AIR_ID, blockInFront); + ChunkUtils.updateBlock(session, Block.JAVA_AIR_ID, blockInFront); } } @@ -255,7 +256,7 @@ public class PistonBlockEntity { continue; } int blockId = session.getGeyser().getWorldManager().getBlockAt(session, blockPos); - if (blockId == BlockStateValues.JAVA_AIR_ID) { + if (blockId == Block.JAVA_AIR_ID) { continue; } if (BlockStateValues.canPistonMoveBlock(blockId, action == PistonValueType.PUSHING)) { @@ -278,7 +279,7 @@ public class PistonBlockEntity { continue; } int adjacentBlockId = session.getGeyser().getWorldManager().getBlockAt(session, adjacentPos); - if (adjacentBlockId != BlockStateValues.JAVA_AIR_ID && BlockStateValues.isBlockAttached(blockId, adjacentBlockId) && BlockStateValues.canPistonMoveBlock(adjacentBlockId, false)) { + if (adjacentBlockId != Block.JAVA_AIR_ID && BlockStateValues.isBlockAttached(blockId, adjacentBlockId) && BlockStateValues.canPistonMoveBlock(adjacentBlockId, false)) { // If it is another slime/honey block we need to check its adjacent blocks if (BlockStateValues.isBlockSticky(adjacentBlockId)) { blocksToCheck.add(adjacentPos); @@ -322,7 +323,7 @@ public class PistonBlockEntity { */ private void removeBlocks() { for (Vector3i blockPos : attachedBlocks.keySet()) { - ChunkUtils.updateBlock(session, BlockStateValues.JAVA_AIR_ID, blockPos); + ChunkUtils.updateBlock(session, Block.JAVA_AIR_ID, blockPos); } if (action != PistonValueType.PUSHING) { removePistonHead(); @@ -560,7 +561,7 @@ public class PistonBlockEntity { if (blockPos.equals(getPistonHeadPos())) { return BlockStateValues.getPistonHead(orientation); } else { - return attachedBlocks.getOrDefault(blockPos, BlockStateValues.JAVA_AIR_ID); + return attachedBlocks.getOrDefault(blockPos, Block.JAVA_AIR_ID); } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/ShulkerBoxBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/ShulkerBoxBlockEntityTranslator.java index ba2ddd815..e6d19e492 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/ShulkerBoxBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/ShulkerBoxBlockEntityTranslator.java @@ -28,7 +28,8 @@ package org.geysermc.geyser.translator.level.block.entity; import org.checkerframework.checker.nullness.qual.Nullable; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; -import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.translator.inventory.ShulkerInventoryTranslator; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -40,12 +41,7 @@ public class ShulkerBoxBlockEntityTranslator extends BlockEntityTranslator imple * where {@code tag} is passed as null. */ @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, int blockState) { - byte direction = BlockStateValues.getShulkerBoxDirection(blockState); - // Just in case... - if (direction == -1) { - direction = 1; - } - bedrockNbt.putByte("facing", direction); + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, @Nullable NbtMap javaNbt, BlockState blockState) { + bedrockNbt.putByte("facing", (byte) blockState.getValue(Properties.FACING).ordinal()); } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SignBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SignBlockEntityTranslator.java index bbf0dbcb3..2a1ccb639 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SignBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SignBlockEntityTranslator.java @@ -28,6 +28,7 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.nbt.NbtType; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.text.ChatColor; import org.geysermc.geyser.translator.text.MessageTranslator; @@ -73,7 +74,7 @@ public class SignBlockEntityTranslator extends BlockEntityTranslator { } @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { bedrockNbt.putCompound("FrontText", translateSide(javaNbt.getCompound("front_text"))); bedrockNbt.putCompound("BackText", translateSide(javaNbt.getCompound("back_text"))); bedrockNbt.putBoolean("IsWaxed", javaNbt.getBoolean("is_waxed")); diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SkullBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SkullBlockEntityTranslator.java index b1ab017e8..c03ae8ef0 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SkullBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SkullBlockEntityTranslator.java @@ -34,6 +34,8 @@ import org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition; import org.cloudburstmc.protocol.bedrock.packet.UpdateBlockPacket; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.cache.SkullCache; import org.geysermc.geyser.skin.SkinProvider; @@ -50,16 +52,19 @@ import java.util.concurrent.ExecutionException; public class SkullBlockEntityTranslator extends BlockEntityTranslator implements RequiresBlockState { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { - byte skullVariant = BlockStateValues.getSkullVariant(blockState); - float rotation = BlockStateValues.getSkullRotation(blockState) * 22.5f; + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { + byte skullVariant = BlockStateValues.getSkullVariant(blockState.javaId()); // TODO // Just in case... if (skullVariant == -1) { skullVariant = 0; } - bedrockNbt.putFloat("Rotation", rotation); + Integer rotation = blockState.getValue(Properties.ROTATION_16); + if (rotation != null) { + // Could be a wall skull block + bedrockNbt.putFloat("Rotation", rotation * 22.5f); + } bedrockNbt.putByte("SkullType", skullVariant); - if (BlockStateValues.isSkullPowered(blockState)) { + if (blockState.getValue(Properties.POWERED)) { bedrockNbt.putBoolean("MouthMoving", true); } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SpawnerBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SpawnerBlockEntityTranslator.java index edf71d384..4b6a630ba 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SpawnerBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/SpawnerBlockEntityTranslator.java @@ -32,6 +32,7 @@ import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.protocol.bedrock.packet.UpdateBlockPacket; import org.geysermc.geyser.entity.EntityDefinition; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.Registries; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -40,7 +41,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType public class SpawnerBlockEntityTranslator extends BlockEntityTranslator { @Override - public NbtMap getBlockEntityTag(GeyserSession session, BlockEntityType type, int x, int y, int z, @Nullable NbtMap javaNbt, int blockState) { + public NbtMap getBlockEntityTag(GeyserSession session, BlockEntityType type, int x, int y, int z, @Nullable NbtMap javaNbt, BlockState blockState) { if (javaNbt == null) { return super.getBlockEntityTag(session, type, x, y, z, javaNbt, blockState); } @@ -70,7 +71,7 @@ public class SpawnerBlockEntityTranslator extends BlockEntityTranslator { } @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { Object current; // TODO use primitive get and put methods diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/StructureBlockBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/StructureBlockBlockEntityTranslator.java index 4bb9c5676..79fb3da6b 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/StructureBlockBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/StructureBlockBlockEntityTranslator.java @@ -32,6 +32,7 @@ import org.cloudburstmc.nbt.NbtMapBuilder; import org.cloudburstmc.protocol.bedrock.data.structure.StructureMirror; import org.cloudburstmc.protocol.bedrock.data.structure.StructureRotation; import org.cloudburstmc.protocol.bedrock.packet.UpdateBlockPacket; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.util.StructureBlockUtils; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -40,7 +41,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType public class StructureBlockBlockEntityTranslator extends BlockEntityTranslator { @Override - public NbtMap getBlockEntityTag(GeyserSession session, BlockEntityType type, int x, int y, int z, @Nullable NbtMap javaNbt, int blockState) { + public NbtMap getBlockEntityTag(GeyserSession session, BlockEntityType type, int x, int y, int z, @Nullable NbtMap javaNbt, BlockState blockState) { if (javaNbt == null) { return super.getBlockEntityTag(session, type, x, y, z, javaNbt, blockState); } @@ -73,7 +74,7 @@ public class StructureBlockBlockEntityTranslator extends BlockEntityTranslator { } @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { if (javaNbt.size() < 5) { return; // These values aren't here } diff --git a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/TrialSpawnerBlockEntityTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/TrialSpawnerBlockEntityTranslator.java index ff3f89f3f..a4c158a15 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/TrialSpawnerBlockEntityTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/level/block/entity/TrialSpawnerBlockEntityTranslator.java @@ -27,6 +27,7 @@ package org.geysermc.geyser.translator.level.block.entity; import org.cloudburstmc.nbt.NbtMap; import org.cloudburstmc.nbt.NbtMapBuilder; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -34,7 +35,7 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType public class TrialSpawnerBlockEntityTranslator extends BlockEntityTranslator { @Override - public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, int blockState) { + public void translateTag(GeyserSession session, NbtMapBuilder bedrockNbt, NbtMap javaNbt, BlockState blockState) { if (javaNbt == null) { return; } diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockBlockPickRequestTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockBlockPickRequestTranslator.java index 35c46ffd2..9cb3fb455 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockBlockPickRequestTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockBlockPickRequestTranslator.java @@ -25,6 +25,7 @@ package org.geysermc.geyser.translator.protocol.bedrock; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import org.cloudburstmc.math.vector.Vector3i; import org.cloudburstmc.protocol.bedrock.packet.BlockPickRequestPacket; @@ -48,7 +49,7 @@ public class BedrockBlockPickRequestTranslator extends PacketTranslator> 4) - yOffset]; - int blockState = section.get(x, y & 0xF, z); + BlockState blockState = BlockRegistries.BLOCK_STATES.get(section.get(x, y & 0xF, z)); - if (type == BlockEntityType.LECTERN && BlockStateValues.getLecternBookStates().get(blockState)) { + if (type == BlockEntityType.LECTERN && blockState.getValue(Properties.HAS_BOOK)) { // If getLecternBookStates is false, let's just treat it like a normal block entity // Fill in tag with a default value NbtMapBuilder lecternTag = LecternUtils.getBaseLecternTag(x + chunkBlockX, y, z + chunkBlockZ, 1); @@ -419,7 +422,7 @@ public class JavaLevelChunkWithLightTranslator extends PacketTranslator> 4) - (bedrockDimension.minY() >> 4); int subChunkIndex = (y >> 4) + (bedrockDimension.minY() >> 4); diff --git a/core/src/main/java/org/geysermc/geyser/util/ChunkUtils.java b/core/src/main/java/org/geysermc/geyser/util/ChunkUtils.java index 379162540..a1e956ace 100644 --- a/core/src/main/java/org/geysermc/geyser/util/ChunkUtils.java +++ b/core/src/main/java/org/geysermc/geyser/util/ChunkUtils.java @@ -41,6 +41,8 @@ import org.geysermc.geyser.entity.type.ItemFrameEntity; import org.geysermc.geyser.level.BedrockDimension; import org.geysermc.geyser.level.JavaDimension; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.chunk.BlockStorage; import org.geysermc.geyser.level.chunk.GeyserChunkSection; import org.geysermc.geyser.level.chunk.bitarray.SingletonBitArray; @@ -50,8 +52,6 @@ import org.geysermc.geyser.session.cache.SkullCache; import org.geysermc.geyser.text.GeyserLocale; import org.geysermc.geyser.translator.level.block.entity.BedrockOnlyBlockEntity; -import static org.geysermc.geyser.level.block.BlockStateValues.JAVA_AIR_ID; - @UtilityClass public class ChunkUtils { @@ -130,7 +130,7 @@ public class ChunkUtils { // Checks for item frames so they aren't tripped up and removed ItemFrameEntity itemFrameEntity = ItemFrameEntity.getItemFrameEntity(session, position); if (itemFrameEntity != null) { - if (blockState == JAVA_AIR_ID) { // Item frame is still present and no block overrides that; refresh it + if (blockState == Block.JAVA_AIR_ID) { // Item frame is still present and no block overrides that; refresh it itemFrameEntity.updateBlock(true); // Still update the chunk cache with the new block if updateBlock is called return; @@ -180,21 +180,21 @@ public class ChunkUtils { BlockDefinition aboveBedrockExtendedCollisionDefinition = session.getBlockMappings().getExtendedCollisionBoxes().get(blockState); int belowBlock = session.getGeyser().getWorldManager().getBlockAt(session, position.getX(), position.getY() - 1, position.getZ()); BlockDefinition belowBedrockExtendedCollisionDefinition = session.getBlockMappings().getExtendedCollisionBoxes().get(belowBlock); - if (belowBedrockExtendedCollisionDefinition != null && blockState == BlockStateValues.JAVA_AIR_ID) { + if (belowBedrockExtendedCollisionDefinition != null && blockState == Block.JAVA_AIR_ID) { UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); updateBlockPacket.setDataLayer(0); updateBlockPacket.setBlockPosition(position); updateBlockPacket.setDefinition(belowBedrockExtendedCollisionDefinition); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NETWORK); session.sendUpstreamPacket(updateBlockPacket); - } else if (aboveBedrockExtendedCollisionDefinition != null && aboveBlock == BlockStateValues.JAVA_AIR_ID) { + } else if (aboveBedrockExtendedCollisionDefinition != null && aboveBlock == Block.JAVA_AIR_ID) { UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); updateBlockPacket.setDataLayer(0); updateBlockPacket.setBlockPosition(position.add(0, 1, 0)); updateBlockPacket.setDefinition(aboveBedrockExtendedCollisionDefinition); updateBlockPacket.getFlags().add(UpdateBlockPacket.Flag.NETWORK); session.sendUpstreamPacket(updateBlockPacket); - } else if (aboveBlock == BlockStateValues.JAVA_AIR_ID) { + } else if (aboveBlock == Block.JAVA_AIR_ID) { UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); updateBlockPacket.setDataLayer(0); updateBlockPacket.setBlockPosition(position.add(0, 1, 0)); @@ -211,7 +211,7 @@ public class ChunkUtils { for (BedrockOnlyBlockEntity bedrockOnlyBlockEntity : BlockEntityUtils.BEDROCK_ONLY_BLOCK_ENTITIES) { if (bedrockOnlyBlockEntity.isBlock(blockState)) { // Flower pots are block entities only in Bedrock and are not updated anywhere else like note blocks - bedrockOnlyBlockEntity.updateBlock(session, blockState, position); + bedrockOnlyBlockEntity.updateBlock(session, BlockState.of(blockState), position); //TODO blockState break; //No block will be a part of two classes } } diff --git a/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java b/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java index 85f8fc704..7559347e9 100644 --- a/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java +++ b/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java @@ -34,6 +34,7 @@ import org.cloudburstmc.protocol.bedrock.packet.LevelSoundEventPacket; import org.cloudburstmc.protocol.bedrock.packet.PlaySoundPacket; import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.registry.Registries; import org.geysermc.geyser.registry.type.SoundMapping; @@ -147,7 +148,7 @@ public final class SoundUtils { soundPacket.setExtraData(soundMapping.getExtraData() + (int)(Math.round((Math.log10(pitch) / Math.log10(2)) * 12)) + 12); } else if (sound == SoundEvent.PLACE && soundMapping.getExtraData() == -1) { if (!soundMapping.getIdentifier().equals(":")) { - int javaId = BlockRegistries.JAVA_IDENTIFIER_TO_ID.get().getOrDefault(soundMapping.getIdentifier(), BlockStateValues.JAVA_AIR_ID); + int javaId = BlockRegistries.JAVA_IDENTIFIER_TO_ID.get().getOrDefault(soundMapping.getIdentifier(), Block.JAVA_AIR_ID); soundPacket.setExtraData(session.getBlockMappings().getBedrockBlockId(javaId)); } else { session.getGeyser().getLogger().debug("PLACE sound mapping identifier was invalid! Please report: " + soundMapping); diff --git a/core/src/main/java/org/geysermc/geyser/util/StatisticsUtils.java b/core/src/main/java/org/geysermc/geyser/util/StatisticsUtils.java index 96328bcdd..8f9be0b98 100644 --- a/core/src/main/java/org/geysermc/geyser/util/StatisticsUtils.java +++ b/core/src/main/java/org/geysermc/geyser/util/StatisticsUtils.java @@ -29,6 +29,7 @@ import it.unimi.dsi.fastutil.objects.Object2IntMap; import org.geysermc.cumulus.form.SimpleForm; import org.geysermc.cumulus.util.FormImage; import org.geysermc.geyser.item.type.Item; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.registry.Registries; import org.geysermc.geyser.session.GeyserSession; @@ -93,10 +94,10 @@ public class StatisticsUtils { for (Object2IntMap.Entry entry : session.getStatistics().object2IntEntrySet()) { if (entry.getKey() instanceof BreakBlockStatistic statistic) { - String identifier = BlockRegistries.CLEAN_JAVA_IDENTIFIERS.get(statistic.getId()); - if (identifier != null) { - String block = identifier.replace("minecraft:", "block.minecraft."); - content.add(block + ": " + entry.getIntValue()); + Block block = BlockRegistries.JAVA_BLOCKS_TO_RENAME.get(statistic.getId()); + if (block != null) { + String identifier = block.javaIdentifier().replace("minecraft:", "block.minecraft."); + content.add(identifier + ": " + entry.getIntValue()); } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0500a31be..0f0845137 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -65,6 +65,7 @@ fastutil-int-byte-maps = { group = "com.nukkitx.fastutil", name = "fastutil-int- fastutil-int-boolean-maps = { group = "com.nukkitx.fastutil", name = "fastutil-int-boolean-maps", version.ref = "fastutil" } fastutil-object-int-maps = { group = "com.nukkitx.fastutil", name = "fastutil-object-int-maps", version.ref = "fastutil" } fastutil-object-object-maps = { group = "com.nukkitx.fastutil", name = "fastutil-object-object-maps", version.ref = "fastutil" } +fastutil-reference-object-maps = { group = "com.nukkitx.fastutil", name = "fastutil-reference-object-maps", version.ref = "fastutil" } adventure-text-serializer-gson = { group = "net.kyori", name = "adventure-text-serializer-gson", version.ref = "adventure" } # Remove when we remove our Adventure bump adventure-text-serializer-legacy = { group = "net.kyori", name = "adventure-text-serializer-legacy", version.ref = "adventure" } @@ -142,7 +143,7 @@ blossom = { id = "net.kyori.blossom", version.ref = "blossom" } [bundles] jackson = [ "jackson-annotations", "jackson-core", "jackson-dataformat-yaml" ] -fastutil = [ "fastutil-int-int-maps", "fastutil-int-long-maps", "fastutil-int-byte-maps", "fastutil-int-boolean-maps", "fastutil-object-int-maps", "fastutil-object-object-maps" ] +fastutil = [ "fastutil-int-int-maps", "fastutil-int-long-maps", "fastutil-int-byte-maps", "fastutil-int-boolean-maps", "fastutil-object-int-maps", "fastutil-object-object-maps", "fastutil-reference-object-maps" ] adventure = [ "adventure-text-serializer-gson", "adventure-text-serializer-legacy", "adventure-text-serializer-plain" ] log4j = [ "log4j-api", "log4j-core", "log4j-slf4j2-impl" ] jline = [ "jline-terminal", "jline-terminal-jna", "jline-reader" ] From a46332ace19aadf2d09f258f7c9ef456cf0af965 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Fri, 17 May 2024 14:50:21 -0400 Subject: [PATCH 5/7] Move block breaking to new system --- .../geysermc/geyser/level/block/Blocks.java | 1834 ++++++++--------- .../geyser/level/block/type/Block.java | 36 + .../populator/BlockRegistryPopulator.java | 10 + .../geyser/session/cache/TagCache.java | 14 +- .../player/BedrockActionTranslator.java | 5 +- .../level/JavaBlockDestructionTranslator.java | 7 +- .../org/geysermc/geyser/util/BlockUtils.java | 44 +- 7 files changed, 1005 insertions(+), 945 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java b/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java index 426895269..1f9c9c162 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/Blocks.java @@ -38,30 +38,30 @@ import static org.geysermc.geyser.level.block.type.Block.builder; @SuppressWarnings("unused") public final class Blocks { public static final Block AIR = register(new Block("air", builder())); - public static final Block STONE = register(new Block("stone", builder())); - public static final Block GRANITE = register(new Block("granite", builder())); - public static final Block POLISHED_GRANITE = register(new Block("polished_granite", builder())); - public static final Block DIORITE = register(new Block("diorite", builder())); - public static final Block POLISHED_DIORITE = register(new Block("polished_diorite", builder())); - public static final Block ANDESITE = register(new Block("andesite", builder())); - public static final Block POLISHED_ANDESITE = register(new Block("polished_andesite", builder())); - public static final Block GRASS_BLOCK = register(new Block("grass_block", builder() + public static final Block STONE = register(new Block("stone", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block GRANITE = register(new Block("granite", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block POLISHED_GRANITE = register(new Block("polished_granite", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DIORITE = register(new Block("diorite", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block POLISHED_DIORITE = register(new Block("polished_diorite", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block ANDESITE = register(new Block("andesite", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block POLISHED_ANDESITE = register(new Block("polished_andesite", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block GRASS_BLOCK = register(new Block("grass_block", builder().destroyTime(0.6f) .booleanState(SNOWY))); - public static final Block DIRT = register(new Block("dirt", builder())); - public static final Block COARSE_DIRT = register(new Block("coarse_dirt", builder())); - public static final Block PODZOL = register(new Block("podzol", builder() + public static final Block DIRT = register(new Block("dirt", builder().destroyTime(0.5f))); + public static final Block COARSE_DIRT = register(new Block("coarse_dirt", builder().destroyTime(0.5f))); + public static final Block PODZOL = register(new Block("podzol", builder().destroyTime(0.5f) .booleanState(SNOWY))); - public static final Block COBBLESTONE = register(new Block("cobblestone", builder())); - public static final Block OAK_PLANKS = register(new Block("oak_planks", builder())); - public static final Block SPRUCE_PLANKS = register(new Block("spruce_planks", builder())); - public static final Block BIRCH_PLANKS = register(new Block("birch_planks", builder())); - public static final Block JUNGLE_PLANKS = register(new Block("jungle_planks", builder())); - public static final Block ACACIA_PLANKS = register(new Block("acacia_planks", builder())); - public static final Block CHERRY_PLANKS = register(new Block("cherry_planks", builder())); - public static final Block DARK_OAK_PLANKS = register(new Block("dark_oak_planks", builder())); - public static final Block MANGROVE_PLANKS = register(new Block("mangrove_planks", builder())); - public static final Block BAMBOO_PLANKS = register(new Block("bamboo_planks", builder())); - public static final Block BAMBOO_MOSAIC = register(new Block("bamboo_mosaic", builder())); + public static final Block COBBLESTONE = register(new Block("cobblestone", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block OAK_PLANKS = register(new Block("oak_planks", builder().destroyTime(2.0f))); + public static final Block SPRUCE_PLANKS = register(new Block("spruce_planks", builder().destroyTime(2.0f))); + public static final Block BIRCH_PLANKS = register(new Block("birch_planks", builder().destroyTime(2.0f))); + public static final Block JUNGLE_PLANKS = register(new Block("jungle_planks", builder().destroyTime(2.0f))); + public static final Block ACACIA_PLANKS = register(new Block("acacia_planks", builder().destroyTime(2.0f))); + public static final Block CHERRY_PLANKS = register(new Block("cherry_planks", builder().destroyTime(2.0f))); + public static final Block DARK_OAK_PLANKS = register(new Block("dark_oak_planks", builder().destroyTime(2.0f))); + public static final Block MANGROVE_PLANKS = register(new Block("mangrove_planks", builder().destroyTime(2.0f))); + public static final Block BAMBOO_PLANKS = register(new Block("bamboo_planks", builder().destroyTime(2.0f))); + public static final Block BAMBOO_MOSAIC = register(new Block("bamboo_mosaic", builder().destroyTime(2.0f))); public static final Block OAK_SAPLING = register(new Block("oak_sapling", builder() .intState(STAGE, 0, 1))); public static final Block SPRUCE_SAPLING = register(new Block("spruce_sapling", builder() @@ -81,259 +81,259 @@ public final class Blocks { .booleanState(HANGING) .intState(STAGE, 0, 1) .booleanState(WATERLOGGED))); - public static final Block BEDROCK = register(new Block("bedrock", builder())); - public static final Block WATER = register(new Block("water", builder() + public static final Block BEDROCK = register(new Block("bedrock", builder().destroyTime(-1.0f))); + public static final Block WATER = register(new Block("water", builder().destroyTime(100.0f) .intState(LEVEL, 0, 15))); - public static final Block LAVA = register(new Block("lava", builder() + public static final Block LAVA = register(new Block("lava", builder().destroyTime(100.0f) .intState(LEVEL, 0, 15))); - public static final Block SAND = register(new Block("sand", builder())); - public static final Block SUSPICIOUS_SAND = register(new Block("suspicious_sand", builder() + public static final Block SAND = register(new Block("sand", builder().destroyTime(0.5f))); + public static final Block SUSPICIOUS_SAND = register(new Block("suspicious_sand", builder().setBlockEntity().destroyTime(0.25f) .intState(DUSTED, 0, 3))); - public static final Block RED_SAND = register(new Block("red_sand", builder())); - public static final Block GRAVEL = register(new Block("gravel", builder())); - public static final Block SUSPICIOUS_GRAVEL = register(new Block("suspicious_gravel", builder() + public static final Block RED_SAND = register(new Block("red_sand", builder().destroyTime(0.5f))); + public static final Block GRAVEL = register(new Block("gravel", builder().destroyTime(0.6f))); + public static final Block SUSPICIOUS_GRAVEL = register(new Block("suspicious_gravel", builder().setBlockEntity().destroyTime(0.25f) .intState(DUSTED, 0, 3))); - public static final Block GOLD_ORE = register(new Block("gold_ore", builder())); - public static final Block DEEPSLATE_GOLD_ORE = register(new Block("deepslate_gold_ore", builder())); - public static final Block IRON_ORE = register(new Block("iron_ore", builder())); - public static final Block DEEPSLATE_IRON_ORE = register(new Block("deepslate_iron_ore", builder())); - public static final Block COAL_ORE = register(new Block("coal_ore", builder())); - public static final Block DEEPSLATE_COAL_ORE = register(new Block("deepslate_coal_ore", builder())); - public static final Block NETHER_GOLD_ORE = register(new Block("nether_gold_ore", builder())); - public static final Block OAK_LOG = register(new Block("oak_log", builder() + public static final Block GOLD_ORE = register(new Block("gold_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_GOLD_ORE = register(new Block("deepslate_gold_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block IRON_ORE = register(new Block("iron_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_IRON_ORE = register(new Block("deepslate_iron_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block COAL_ORE = register(new Block("coal_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_COAL_ORE = register(new Block("deepslate_coal_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block NETHER_GOLD_ORE = register(new Block("nether_gold_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block OAK_LOG = register(new Block("oak_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block SPRUCE_LOG = register(new Block("spruce_log", builder() + public static final Block SPRUCE_LOG = register(new Block("spruce_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block BIRCH_LOG = register(new Block("birch_log", builder() + public static final Block BIRCH_LOG = register(new Block("birch_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block JUNGLE_LOG = register(new Block("jungle_log", builder() + public static final Block JUNGLE_LOG = register(new Block("jungle_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block ACACIA_LOG = register(new Block("acacia_log", builder() + public static final Block ACACIA_LOG = register(new Block("acacia_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block CHERRY_LOG = register(new Block("cherry_log", builder() + public static final Block CHERRY_LOG = register(new Block("cherry_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block DARK_OAK_LOG = register(new Block("dark_oak_log", builder() + public static final Block DARK_OAK_LOG = register(new Block("dark_oak_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block MANGROVE_LOG = register(new Block("mangrove_log", builder() + public static final Block MANGROVE_LOG = register(new Block("mangrove_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block MANGROVE_ROOTS = register(new Block("mangrove_roots", builder() + public static final Block MANGROVE_ROOTS = register(new Block("mangrove_roots", builder().destroyTime(0.7f) .booleanState(WATERLOGGED))); - public static final Block MUDDY_MANGROVE_ROOTS = register(new Block("muddy_mangrove_roots", builder() + public static final Block MUDDY_MANGROVE_ROOTS = register(new Block("muddy_mangrove_roots", builder().destroyTime(0.7f) .enumState(AXIS, Axis.VALUES))); - public static final Block BAMBOO_BLOCK = register(new Block("bamboo_block", builder() + public static final Block BAMBOO_BLOCK = register(new Block("bamboo_block", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_SPRUCE_LOG = register(new Block("stripped_spruce_log", builder() + public static final Block STRIPPED_SPRUCE_LOG = register(new Block("stripped_spruce_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_BIRCH_LOG = register(new Block("stripped_birch_log", builder() + public static final Block STRIPPED_BIRCH_LOG = register(new Block("stripped_birch_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_JUNGLE_LOG = register(new Block("stripped_jungle_log", builder() + public static final Block STRIPPED_JUNGLE_LOG = register(new Block("stripped_jungle_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_ACACIA_LOG = register(new Block("stripped_acacia_log", builder() + public static final Block STRIPPED_ACACIA_LOG = register(new Block("stripped_acacia_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_CHERRY_LOG = register(new Block("stripped_cherry_log", builder() + public static final Block STRIPPED_CHERRY_LOG = register(new Block("stripped_cherry_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_DARK_OAK_LOG = register(new Block("stripped_dark_oak_log", builder() + public static final Block STRIPPED_DARK_OAK_LOG = register(new Block("stripped_dark_oak_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_OAK_LOG = register(new Block("stripped_oak_log", builder() + public static final Block STRIPPED_OAK_LOG = register(new Block("stripped_oak_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_MANGROVE_LOG = register(new Block("stripped_mangrove_log", builder() + public static final Block STRIPPED_MANGROVE_LOG = register(new Block("stripped_mangrove_log", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_BAMBOO_BLOCK = register(new Block("stripped_bamboo_block", builder() + public static final Block STRIPPED_BAMBOO_BLOCK = register(new Block("stripped_bamboo_block", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block OAK_WOOD = register(new Block("oak_wood", builder() + public static final Block OAK_WOOD = register(new Block("oak_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block SPRUCE_WOOD = register(new Block("spruce_wood", builder() + public static final Block SPRUCE_WOOD = register(new Block("spruce_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block BIRCH_WOOD = register(new Block("birch_wood", builder() + public static final Block BIRCH_WOOD = register(new Block("birch_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block JUNGLE_WOOD = register(new Block("jungle_wood", builder() + public static final Block JUNGLE_WOOD = register(new Block("jungle_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block ACACIA_WOOD = register(new Block("acacia_wood", builder() + public static final Block ACACIA_WOOD = register(new Block("acacia_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block CHERRY_WOOD = register(new Block("cherry_wood", builder() + public static final Block CHERRY_WOOD = register(new Block("cherry_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block DARK_OAK_WOOD = register(new Block("dark_oak_wood", builder() + public static final Block DARK_OAK_WOOD = register(new Block("dark_oak_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block MANGROVE_WOOD = register(new Block("mangrove_wood", builder() + public static final Block MANGROVE_WOOD = register(new Block("mangrove_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_OAK_WOOD = register(new Block("stripped_oak_wood", builder() + public static final Block STRIPPED_OAK_WOOD = register(new Block("stripped_oak_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_SPRUCE_WOOD = register(new Block("stripped_spruce_wood", builder() + public static final Block STRIPPED_SPRUCE_WOOD = register(new Block("stripped_spruce_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_BIRCH_WOOD = register(new Block("stripped_birch_wood", builder() + public static final Block STRIPPED_BIRCH_WOOD = register(new Block("stripped_birch_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_JUNGLE_WOOD = register(new Block("stripped_jungle_wood", builder() + public static final Block STRIPPED_JUNGLE_WOOD = register(new Block("stripped_jungle_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_ACACIA_WOOD = register(new Block("stripped_acacia_wood", builder() + public static final Block STRIPPED_ACACIA_WOOD = register(new Block("stripped_acacia_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_CHERRY_WOOD = register(new Block("stripped_cherry_wood", builder() + public static final Block STRIPPED_CHERRY_WOOD = register(new Block("stripped_cherry_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_DARK_OAK_WOOD = register(new Block("stripped_dark_oak_wood", builder() + public static final Block STRIPPED_DARK_OAK_WOOD = register(new Block("stripped_dark_oak_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_MANGROVE_WOOD = register(new Block("stripped_mangrove_wood", builder() + public static final Block STRIPPED_MANGROVE_WOOD = register(new Block("stripped_mangrove_wood", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block OAK_LEAVES = register(new Block("oak_leaves", builder() + public static final Block OAK_LEAVES = register(new Block("oak_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block SPRUCE_LEAVES = register(new Block("spruce_leaves", builder() + public static final Block SPRUCE_LEAVES = register(new Block("spruce_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block BIRCH_LEAVES = register(new Block("birch_leaves", builder() + public static final Block BIRCH_LEAVES = register(new Block("birch_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block JUNGLE_LEAVES = register(new Block("jungle_leaves", builder() + public static final Block JUNGLE_LEAVES = register(new Block("jungle_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block ACACIA_LEAVES = register(new Block("acacia_leaves", builder() + public static final Block ACACIA_LEAVES = register(new Block("acacia_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block CHERRY_LEAVES = register(new Block("cherry_leaves", builder() + public static final Block CHERRY_LEAVES = register(new Block("cherry_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_LEAVES = register(new Block("dark_oak_leaves", builder() + public static final Block DARK_OAK_LEAVES = register(new Block("dark_oak_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block MANGROVE_LEAVES = register(new Block("mangrove_leaves", builder() + public static final Block MANGROVE_LEAVES = register(new Block("mangrove_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block AZALEA_LEAVES = register(new Block("azalea_leaves", builder() + public static final Block AZALEA_LEAVES = register(new Block("azalea_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block FLOWERING_AZALEA_LEAVES = register(new Block("flowering_azalea_leaves", builder() + public static final Block FLOWERING_AZALEA_LEAVES = register(new Block("flowering_azalea_leaves", builder().destroyTime(0.2f) .intState(DISTANCE, 1, 7) .booleanState(PERSISTENT) .booleanState(WATERLOGGED))); - public static final Block SPONGE = register(new Block("sponge", builder())); - public static final Block WET_SPONGE = register(new Block("wet_sponge", builder())); - public static final Block GLASS = register(new Block("glass", builder())); - public static final Block LAPIS_ORE = register(new Block("lapis_ore", builder())); - public static final Block DEEPSLATE_LAPIS_ORE = register(new Block("deepslate_lapis_ore", builder())); - public static final Block LAPIS_BLOCK = register(new Block("lapis_block", builder())); - public static final Block DISPENSER = register(new Block("dispenser", builder() + public static final Block SPONGE = register(new Block("sponge", builder().destroyTime(0.6f))); + public static final Block WET_SPONGE = register(new Block("wet_sponge", builder().destroyTime(0.6f))); + public static final Block GLASS = register(new Block("glass", builder().destroyTime(0.3f))); + public static final Block LAPIS_ORE = register(new Block("lapis_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_LAPIS_ORE = register(new Block("deepslate_lapis_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block LAPIS_BLOCK = register(new Block("lapis_block", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DISPENSER = register(new Block("dispenser", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(TRIGGERED))); - public static final Block SANDSTONE = register(new Block("sandstone", builder())); - public static final Block CHISELED_SANDSTONE = register(new Block("chiseled_sandstone", builder())); - public static final Block CUT_SANDSTONE = register(new Block("cut_sandstone", builder())); - public static final Block NOTE_BLOCK = register(new Block("note_block", builder() + public static final Block SANDSTONE = register(new Block("sandstone", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block CHISELED_SANDSTONE = register(new Block("chiseled_sandstone", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block CUT_SANDSTONE = register(new Block("cut_sandstone", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block NOTE_BLOCK = register(new Block("note_block", builder().destroyTime(0.8f) .enumState(NOTEBLOCK_INSTRUMENT, "harp", "basedrum", "snare", "hat", "bass", "flute", "bell", "guitar", "chime", "xylophone", "iron_xylophone", "cow_bell", "didgeridoo", "bit", "banjo", "pling", "zombie", "skeleton", "creeper", "dragon", "wither_skeleton", "piglin", "custom_head") .intState(NOTE, 0, 24) .booleanState(POWERED))); - public static final Block WHITE_BED = register(new BedBlock("white_bed", 0, builder() + public static final Block WHITE_BED = register(new BedBlock("white_bed", 0, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block ORANGE_BED = register(new BedBlock("orange_bed", 1, builder() + public static final Block ORANGE_BED = register(new BedBlock("orange_bed", 1, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block MAGENTA_BED = register(new BedBlock("magenta_bed", 2, builder() + public static final Block MAGENTA_BED = register(new BedBlock("magenta_bed", 2, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block LIGHT_BLUE_BED = register(new BedBlock("light_blue_bed", 3, builder() + public static final Block LIGHT_BLUE_BED = register(new BedBlock("light_blue_bed", 3, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block YELLOW_BED = register(new BedBlock("yellow_bed", 4, builder() + public static final Block YELLOW_BED = register(new BedBlock("yellow_bed", 4, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block LIME_BED = register(new BedBlock("lime_bed", 5, builder() + public static final Block LIME_BED = register(new BedBlock("lime_bed", 5, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block PINK_BED = register(new BedBlock("pink_bed", 6, builder() + public static final Block PINK_BED = register(new BedBlock("pink_bed", 6, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block GRAY_BED = register(new BedBlock("gray_bed", 7, builder() + public static final Block GRAY_BED = register(new BedBlock("gray_bed", 7, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block LIGHT_GRAY_BED = register(new BedBlock("light_gray_bed", 8, builder() + public static final Block LIGHT_GRAY_BED = register(new BedBlock("light_gray_bed", 8, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block CYAN_BED = register(new BedBlock("cyan_bed", 9, builder() + public static final Block CYAN_BED = register(new BedBlock("cyan_bed", 9, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block PURPLE_BED = register(new BedBlock("purple_bed", 10, builder() + public static final Block PURPLE_BED = register(new BedBlock("purple_bed", 10, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block BLUE_BED = register(new BedBlock("blue_bed", 11, builder() + public static final Block BLUE_BED = register(new BedBlock("blue_bed", 11, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block BROWN_BED = register(new BedBlock("brown_bed", 12, builder() + public static final Block BROWN_BED = register(new BedBlock("brown_bed", 12, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block GREEN_BED = register(new BedBlock("green_bed", 13, builder() + public static final Block GREEN_BED = register(new BedBlock("green_bed", 13, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block RED_BED = register(new BedBlock("red_bed", 14, builder() + public static final Block RED_BED = register(new BedBlock("red_bed", 14, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block BLACK_BED = register(new BedBlock("black_bed", 15, builder() + public static final Block BLACK_BED = register(new BedBlock("black_bed", 15, builder().setBlockEntity().destroyTime(0.2f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OCCUPIED) .enumState(BED_PART, "head", "foot"))); - public static final Block POWERED_RAIL = register(new Block("powered_rail", builder() + public static final Block POWERED_RAIL = register(new Block("powered_rail", builder().destroyTime(0.7f) .booleanState(POWERED) .enumState(RAIL_SHAPE_STRAIGHT, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south") .booleanState(WATERLOGGED))); - public static final Block DETECTOR_RAIL = register(new Block("detector_rail", builder() + public static final Block DETECTOR_RAIL = register(new Block("detector_rail", builder().destroyTime(0.7f) .booleanState(POWERED) .enumState(RAIL_SHAPE_STRAIGHT, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south") .booleanState(WATERLOGGED))); - public static final Block STICKY_PISTON = register(new Block("sticky_piston", builder() + public static final Block STICKY_PISTON = register(new Block("sticky_piston", builder().destroyTime(1.5f) .booleanState(EXTENDED) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block COBWEB = register(new Block("cobweb", builder())); + public static final Block COBWEB = register(new Block("cobweb", builder().requiresCorrectToolForDrops().destroyTime(4.0f))); public static final Block SHORT_GRASS = register(new Block("short_grass", builder())); public static final Block FERN = register(new Block("fern", builder())); public static final Block DEAD_BUSH = register(new Block("dead_bush", builder())); public static final Block SEAGRASS = register(new Block("seagrass", builder())); public static final Block TALL_SEAGRASS = register(new Block("tall_seagrass", builder() .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); - public static final Block PISTON = register(new Block("piston", builder() + public static final Block PISTON = register(new Block("piston", builder().destroyTime(1.5f) .booleanState(EXTENDED) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block PISTON_HEAD = register(new Block("piston_head", builder() + public static final Block PISTON_HEAD = register(new Block("piston_head", builder().destroyTime(1.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(SHORT) .enumState(PISTON_TYPE, "normal", "sticky"))); - public static final Block WHITE_WOOL = register(new Block("white_wool", builder())); - public static final Block ORANGE_WOOL = register(new Block("orange_wool", builder())); - public static final Block MAGENTA_WOOL = register(new Block("magenta_wool", builder())); - public static final Block LIGHT_BLUE_WOOL = register(new Block("light_blue_wool", builder())); - public static final Block YELLOW_WOOL = register(new Block("yellow_wool", builder())); - public static final Block LIME_WOOL = register(new Block("lime_wool", builder())); - public static final Block PINK_WOOL = register(new Block("pink_wool", builder())); - public static final Block GRAY_WOOL = register(new Block("gray_wool", builder())); - public static final Block LIGHT_GRAY_WOOL = register(new Block("light_gray_wool", builder())); - public static final Block CYAN_WOOL = register(new Block("cyan_wool", builder())); - public static final Block PURPLE_WOOL = register(new Block("purple_wool", builder())); - public static final Block BLUE_WOOL = register(new Block("blue_wool", builder())); - public static final Block BROWN_WOOL = register(new Block("brown_wool", builder())); - public static final Block GREEN_WOOL = register(new Block("green_wool", builder())); - public static final Block RED_WOOL = register(new Block("red_wool", builder())); - public static final Block BLACK_WOOL = register(new Block("black_wool", builder())); - public static final Block MOVING_PISTON = register(new Block("moving_piston", builder() + public static final Block WHITE_WOOL = register(new Block("white_wool", builder().destroyTime(0.8f))); + public static final Block ORANGE_WOOL = register(new Block("orange_wool", builder().destroyTime(0.8f))); + public static final Block MAGENTA_WOOL = register(new Block("magenta_wool", builder().destroyTime(0.8f))); + public static final Block LIGHT_BLUE_WOOL = register(new Block("light_blue_wool", builder().destroyTime(0.8f))); + public static final Block YELLOW_WOOL = register(new Block("yellow_wool", builder().destroyTime(0.8f))); + public static final Block LIME_WOOL = register(new Block("lime_wool", builder().destroyTime(0.8f))); + public static final Block PINK_WOOL = register(new Block("pink_wool", builder().destroyTime(0.8f))); + public static final Block GRAY_WOOL = register(new Block("gray_wool", builder().destroyTime(0.8f))); + public static final Block LIGHT_GRAY_WOOL = register(new Block("light_gray_wool", builder().destroyTime(0.8f))); + public static final Block CYAN_WOOL = register(new Block("cyan_wool", builder().destroyTime(0.8f))); + public static final Block PURPLE_WOOL = register(new Block("purple_wool", builder().destroyTime(0.8f))); + public static final Block BLUE_WOOL = register(new Block("blue_wool", builder().destroyTime(0.8f))); + public static final Block BROWN_WOOL = register(new Block("brown_wool", builder().destroyTime(0.8f))); + public static final Block GREEN_WOOL = register(new Block("green_wool", builder().destroyTime(0.8f))); + public static final Block RED_WOOL = register(new Block("red_wool", builder().destroyTime(0.8f))); + public static final Block BLACK_WOOL = register(new Block("black_wool", builder().destroyTime(0.8f))); + public static final Block MOVING_PISTON = register(new Block("moving_piston", builder().setBlockEntity().destroyTime(-1.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .enumState(PISTON_TYPE, "normal", "sticky"))); public static final Block DANDELION = register(new Block("dandelion", builder())); @@ -352,13 +352,13 @@ public final class Blocks { public static final Block LILY_OF_THE_VALLEY = register(new Block("lily_of_the_valley", builder())); public static final Block BROWN_MUSHROOM = register(new Block("brown_mushroom", builder())); public static final Block RED_MUSHROOM = register(new Block("red_mushroom", builder())); - public static final Block GOLD_BLOCK = register(new Block("gold_block", builder())); - public static final Block IRON_BLOCK = register(new Block("iron_block", builder())); - public static final Block BRICKS = register(new Block("bricks", builder())); + public static final Block GOLD_BLOCK = register(new Block("gold_block", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block IRON_BLOCK = register(new Block("iron_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block BRICKS = register(new Block("bricks", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); public static final Block TNT = register(new Block("tnt", builder() .booleanState(UNSTABLE))); - public static final Block BOOKSHELF = register(new Block("bookshelf", builder())); - public static final Block CHISELED_BOOKSHELF = register(new Block("chiseled_bookshelf", builder() + public static final Block BOOKSHELF = register(new Block("bookshelf", builder().destroyTime(1.5f))); + public static final Block CHISELED_BOOKSHELF = register(new Block("chiseled_bookshelf", builder().setBlockEntity().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(CHISELED_BOOKSHELF_SLOT_0_OCCUPIED) .booleanState(CHISELED_BOOKSHELF_SLOT_1_OCCUPIED) @@ -366,8 +366,8 @@ public final class Blocks { .booleanState(CHISELED_BOOKSHELF_SLOT_3_OCCUPIED) .booleanState(CHISELED_BOOKSHELF_SLOT_4_OCCUPIED) .booleanState(CHISELED_BOOKSHELF_SLOT_5_OCCUPIED))); - public static final Block MOSSY_COBBLESTONE = register(new Block("mossy_cobblestone", builder())); - public static final Block OBSIDIAN = register(new Block("obsidian", builder())); + public static final Block MOSSY_COBBLESTONE = register(new Block("mossy_cobblestone", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block OBSIDIAN = register(new Block("obsidian", builder().requiresCorrectToolForDrops().destroyTime(50.0f))); public static final Block TORCH = register(new Block("torch", builder())); public static final Block WALL_TORCH = register(new Block("wall_torch", builder() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); @@ -379,13 +379,13 @@ public final class Blocks { .booleanState(UP) .booleanState(WEST))); public static final Block SOUL_FIRE = register(new Block("soul_fire", builder())); - public static final Block SPAWNER = register(new Block("spawner", builder())); - public static final Block OAK_STAIRS = register(new Block("oak_stairs", builder() + public static final Block SPAWNER = register(new Block("spawner", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block OAK_STAIRS = register(new Block("oak_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block CHEST = register(new Block("chest", builder() + public static final Block CHEST = register(new Block("chest", builder().setBlockEntity().destroyTime(2.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(CHEST_TYPE, "single", "left", "right") .booleanState(WATERLOGGED))); @@ -395,369 +395,369 @@ public final class Blocks { .intState(POWER, 0, 15) .enumState(SOUTH_REDSTONE, "up", "side", "none") .enumState(WEST_REDSTONE, "up", "side", "none"))); - public static final Block DIAMOND_ORE = register(new Block("diamond_ore", builder())); - public static final Block DEEPSLATE_DIAMOND_ORE = register(new Block("deepslate_diamond_ore", builder())); - public static final Block DIAMOND_BLOCK = register(new Block("diamond_block", builder())); - public static final Block CRAFTING_TABLE = register(new Block("crafting_table", builder())); + public static final Block DIAMOND_ORE = register(new Block("diamond_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_DIAMOND_ORE = register(new Block("deepslate_diamond_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block DIAMOND_BLOCK = register(new Block("diamond_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block CRAFTING_TABLE = register(new Block("crafting_table", builder().destroyTime(2.5f))); public static final Block WHEAT = register(new Block("wheat", builder() .intState(AGE_7, 0, 7))); - public static final Block FARMLAND = register(new Block("farmland", builder() + public static final Block FARMLAND = register(new Block("farmland", builder().destroyTime(0.6f) .intState(MOISTURE, 0, 7))); - public static final Block FURNACE = register(new Block("furnace", builder() + public static final Block FURNACE = register(new Block("furnace", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LIT))); - public static final Block OAK_SIGN = register(new Block("oak_sign", builder() + public static final Block OAK_SIGN = register(new Block("oak_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block SPRUCE_SIGN = register(new Block("spruce_sign", builder() + public static final Block SPRUCE_SIGN = register(new Block("spruce_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block BIRCH_SIGN = register(new Block("birch_sign", builder() + public static final Block BIRCH_SIGN = register(new Block("birch_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block ACACIA_SIGN = register(new Block("acacia_sign", builder() + public static final Block ACACIA_SIGN = register(new Block("acacia_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block CHERRY_SIGN = register(new Block("cherry_sign", builder() + public static final Block CHERRY_SIGN = register(new Block("cherry_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block JUNGLE_SIGN = register(new Block("jungle_sign", builder() + public static final Block JUNGLE_SIGN = register(new Block("jungle_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_SIGN = register(new Block("dark_oak_sign", builder() + public static final Block DARK_OAK_SIGN = register(new Block("dark_oak_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block MANGROVE_SIGN = register(new Block("mangrove_sign", builder() + public static final Block MANGROVE_SIGN = register(new Block("mangrove_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block BAMBOO_SIGN = register(new Block("bamboo_sign", builder() + public static final Block BAMBOO_SIGN = register(new Block("bamboo_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block OAK_DOOR = register(new Block("oak_door", builder() + public static final Block OAK_DOOR = register(new Block("oak_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block LADDER = register(new Block("ladder", builder() + public static final Block LADDER = register(new Block("ladder", builder().destroyTime(0.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block RAIL = register(new Block("rail", builder() + public static final Block RAIL = register(new Block("rail", builder().destroyTime(0.7f) .enumState(RAIL_SHAPE, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south", "south_east", "south_west", "north_west", "north_east") .booleanState(WATERLOGGED))); - public static final Block COBBLESTONE_STAIRS = register(new Block("cobblestone_stairs", builder() + public static final Block COBBLESTONE_STAIRS = register(new Block("cobblestone_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block OAK_WALL_SIGN = register(new Block("oak_wall_sign", builder() + public static final Block OAK_WALL_SIGN = register(new Block("oak_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block SPRUCE_WALL_SIGN = register(new Block("spruce_wall_sign", builder() + public static final Block SPRUCE_WALL_SIGN = register(new Block("spruce_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block BIRCH_WALL_SIGN = register(new Block("birch_wall_sign", builder() + public static final Block BIRCH_WALL_SIGN = register(new Block("birch_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block ACACIA_WALL_SIGN = register(new Block("acacia_wall_sign", builder() + public static final Block ACACIA_WALL_SIGN = register(new Block("acacia_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block CHERRY_WALL_SIGN = register(new Block("cherry_wall_sign", builder() + public static final Block CHERRY_WALL_SIGN = register(new Block("cherry_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block JUNGLE_WALL_SIGN = register(new Block("jungle_wall_sign", builder() + public static final Block JUNGLE_WALL_SIGN = register(new Block("jungle_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_WALL_SIGN = register(new Block("dark_oak_wall_sign", builder() + public static final Block DARK_OAK_WALL_SIGN = register(new Block("dark_oak_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block MANGROVE_WALL_SIGN = register(new Block("mangrove_wall_sign", builder() + public static final Block MANGROVE_WALL_SIGN = register(new Block("mangrove_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block BAMBOO_WALL_SIGN = register(new Block("bamboo_wall_sign", builder() + public static final Block BAMBOO_WALL_SIGN = register(new Block("bamboo_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block OAK_HANGING_SIGN = register(new Block("oak_hanging_sign", builder() + public static final Block OAK_HANGING_SIGN = register(new Block("oak_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block SPRUCE_HANGING_SIGN = register(new Block("spruce_hanging_sign", builder() + public static final Block SPRUCE_HANGING_SIGN = register(new Block("spruce_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block BIRCH_HANGING_SIGN = register(new Block("birch_hanging_sign", builder() + public static final Block BIRCH_HANGING_SIGN = register(new Block("birch_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block ACACIA_HANGING_SIGN = register(new Block("acacia_hanging_sign", builder() + public static final Block ACACIA_HANGING_SIGN = register(new Block("acacia_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block CHERRY_HANGING_SIGN = register(new Block("cherry_hanging_sign", builder() + public static final Block CHERRY_HANGING_SIGN = register(new Block("cherry_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block JUNGLE_HANGING_SIGN = register(new Block("jungle_hanging_sign", builder() + public static final Block JUNGLE_HANGING_SIGN = register(new Block("jungle_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_HANGING_SIGN = register(new Block("dark_oak_hanging_sign", builder() + public static final Block DARK_OAK_HANGING_SIGN = register(new Block("dark_oak_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block CRIMSON_HANGING_SIGN = register(new Block("crimson_hanging_sign", builder() + public static final Block CRIMSON_HANGING_SIGN = register(new Block("crimson_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block WARPED_HANGING_SIGN = register(new Block("warped_hanging_sign", builder() + public static final Block WARPED_HANGING_SIGN = register(new Block("warped_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block MANGROVE_HANGING_SIGN = register(new Block("mangrove_hanging_sign", builder() + public static final Block MANGROVE_HANGING_SIGN = register(new Block("mangrove_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block BAMBOO_HANGING_SIGN = register(new Block("bamboo_hanging_sign", builder() + public static final Block BAMBOO_HANGING_SIGN = register(new Block("bamboo_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .booleanState(ATTACHED) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block OAK_WALL_HANGING_SIGN = register(new Block("oak_wall_hanging_sign", builder() + public static final Block OAK_WALL_HANGING_SIGN = register(new Block("oak_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block SPRUCE_WALL_HANGING_SIGN = register(new Block("spruce_wall_hanging_sign", builder() + public static final Block SPRUCE_WALL_HANGING_SIGN = register(new Block("spruce_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block BIRCH_WALL_HANGING_SIGN = register(new Block("birch_wall_hanging_sign", builder() + public static final Block BIRCH_WALL_HANGING_SIGN = register(new Block("birch_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block ACACIA_WALL_HANGING_SIGN = register(new Block("acacia_wall_hanging_sign", builder() + public static final Block ACACIA_WALL_HANGING_SIGN = register(new Block("acacia_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block CHERRY_WALL_HANGING_SIGN = register(new Block("cherry_wall_hanging_sign", builder() + public static final Block CHERRY_WALL_HANGING_SIGN = register(new Block("cherry_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block JUNGLE_WALL_HANGING_SIGN = register(new Block("jungle_wall_hanging_sign", builder() + public static final Block JUNGLE_WALL_HANGING_SIGN = register(new Block("jungle_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_WALL_HANGING_SIGN = register(new Block("dark_oak_wall_hanging_sign", builder() + public static final Block DARK_OAK_WALL_HANGING_SIGN = register(new Block("dark_oak_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block MANGROVE_WALL_HANGING_SIGN = register(new Block("mangrove_wall_hanging_sign", builder() + public static final Block MANGROVE_WALL_HANGING_SIGN = register(new Block("mangrove_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block CRIMSON_WALL_HANGING_SIGN = register(new Block("crimson_wall_hanging_sign", builder() + public static final Block CRIMSON_WALL_HANGING_SIGN = register(new Block("crimson_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block WARPED_WALL_HANGING_SIGN = register(new Block("warped_wall_hanging_sign", builder() + public static final Block WARPED_WALL_HANGING_SIGN = register(new Block("warped_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block BAMBOO_WALL_HANGING_SIGN = register(new Block("bamboo_wall_hanging_sign", builder() + public static final Block BAMBOO_WALL_HANGING_SIGN = register(new Block("bamboo_wall_hanging_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block LEVER = register(new Block("lever", builder() + public static final Block LEVER = register(new Block("lever", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block STONE_PRESSURE_PLATE = register(new Block("stone_pressure_plate", builder() + public static final Block STONE_PRESSURE_PLATE = register(new Block("stone_pressure_plate", builder().requiresCorrectToolForDrops().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block IRON_DOOR = register(new Block("iron_door", builder() + public static final Block IRON_DOOR = register(new Block("iron_door", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block OAK_PRESSURE_PLATE = register(new Block("oak_pressure_plate", builder() + public static final Block OAK_PRESSURE_PLATE = register(new Block("oak_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block SPRUCE_PRESSURE_PLATE = register(new Block("spruce_pressure_plate", builder() + public static final Block SPRUCE_PRESSURE_PLATE = register(new Block("spruce_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block BIRCH_PRESSURE_PLATE = register(new Block("birch_pressure_plate", builder() + public static final Block BIRCH_PRESSURE_PLATE = register(new Block("birch_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block JUNGLE_PRESSURE_PLATE = register(new Block("jungle_pressure_plate", builder() + public static final Block JUNGLE_PRESSURE_PLATE = register(new Block("jungle_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block ACACIA_PRESSURE_PLATE = register(new Block("acacia_pressure_plate", builder() + public static final Block ACACIA_PRESSURE_PLATE = register(new Block("acacia_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block CHERRY_PRESSURE_PLATE = register(new Block("cherry_pressure_plate", builder() + public static final Block CHERRY_PRESSURE_PLATE = register(new Block("cherry_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block DARK_OAK_PRESSURE_PLATE = register(new Block("dark_oak_pressure_plate", builder() + public static final Block DARK_OAK_PRESSURE_PLATE = register(new Block("dark_oak_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block MANGROVE_PRESSURE_PLATE = register(new Block("mangrove_pressure_plate", builder() + public static final Block MANGROVE_PRESSURE_PLATE = register(new Block("mangrove_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block BAMBOO_PRESSURE_PLATE = register(new Block("bamboo_pressure_plate", builder() + public static final Block BAMBOO_PRESSURE_PLATE = register(new Block("bamboo_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block REDSTONE_ORE = register(new Block("redstone_ore", builder() + public static final Block REDSTONE_ORE = register(new Block("redstone_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT))); - public static final Block DEEPSLATE_REDSTONE_ORE = register(new Block("deepslate_redstone_ore", builder() + public static final Block DEEPSLATE_REDSTONE_ORE = register(new Block("deepslate_redstone_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f) .booleanState(LIT))); public static final Block REDSTONE_TORCH = register(new Block("redstone_torch", builder() .booleanState(LIT))); public static final Block REDSTONE_WALL_TORCH = register(new Block("redstone_wall_torch", builder() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LIT))); - public static final Block STONE_BUTTON = register(new Block("stone_button", builder() + public static final Block STONE_BUTTON = register(new Block("stone_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block SNOW = register(new Block("snow", builder() + public static final Block SNOW = register(new Block("snow", builder().requiresCorrectToolForDrops().destroyTime(0.1f) .intState(LAYERS, 1, 8))); - public static final Block ICE = register(new Block("ice", builder())); - public static final Block SNOW_BLOCK = register(new Block("snow_block", builder())); - public static final Block CACTUS = register(new Block("cactus", builder() + public static final Block ICE = register(new Block("ice", builder().destroyTime(0.5f))); + public static final Block SNOW_BLOCK = register(new Block("snow_block", builder().requiresCorrectToolForDrops().destroyTime(0.2f))); + public static final Block CACTUS = register(new Block("cactus", builder().destroyTime(0.4f) .intState(AGE_15, 0, 15))); - public static final Block CLAY = register(new Block("clay", builder())); + public static final Block CLAY = register(new Block("clay", builder().destroyTime(0.6f))); public static final Block SUGAR_CANE = register(new Block("sugar_cane", builder() .intState(AGE_15, 0, 15))); - public static final Block JUKEBOX = register(new Block("jukebox", builder() + public static final Block JUKEBOX = register(new Block("jukebox", builder().setBlockEntity().destroyTime(2.0f) .booleanState(HAS_RECORD))); - public static final Block OAK_FENCE = register(new Block("oak_fence", builder() + public static final Block OAK_FENCE = register(new Block("oak_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block NETHERRACK = register(new Block("netherrack", builder())); - public static final Block SOUL_SAND = register(new Block("soul_sand", builder())); - public static final Block SOUL_SOIL = register(new Block("soul_soil", builder())); - public static final Block BASALT = register(new Block("basalt", builder() + public static final Block NETHERRACK = register(new Block("netherrack", builder().requiresCorrectToolForDrops().destroyTime(0.4f))); + public static final Block SOUL_SAND = register(new Block("soul_sand", builder().destroyTime(0.5f))); + public static final Block SOUL_SOIL = register(new Block("soul_soil", builder().destroyTime(0.5f))); + public static final Block BASALT = register(new Block("basalt", builder().requiresCorrectToolForDrops().destroyTime(1.25f) .enumState(AXIS, Axis.VALUES))); - public static final Block POLISHED_BASALT = register(new Block("polished_basalt", builder() + public static final Block POLISHED_BASALT = register(new Block("polished_basalt", builder().requiresCorrectToolForDrops().destroyTime(1.25f) .enumState(AXIS, Axis.VALUES))); public static final Block SOUL_TORCH = register(new Block("soul_torch", builder())); public static final Block SOUL_WALL_TORCH = register(new Block("soul_wall_torch", builder() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block GLOWSTONE = register(new Block("glowstone", builder())); - public static final Block NETHER_PORTAL = register(new Block("nether_portal", builder() + public static final Block GLOWSTONE = register(new Block("glowstone", builder().destroyTime(0.3f))); + public static final Block NETHER_PORTAL = register(new Block("nether_portal", builder().destroyTime(-1.0f) .enumState(HORIZONTAL_AXIS, Axis.X, Axis.Z))); - public static final Block CARVED_PUMPKIN = register(new Block("carved_pumpkin", builder() + public static final Block CARVED_PUMPKIN = register(new Block("carved_pumpkin", builder().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block JACK_O_LANTERN = register(new Block("jack_o_lantern", builder() + public static final Block JACK_O_LANTERN = register(new Block("jack_o_lantern", builder().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block CAKE = register(new Block("cake", builder() + public static final Block CAKE = register(new Block("cake", builder().destroyTime(0.5f) .intState(BITES, 0, 6))); public static final Block REPEATER = register(new Block("repeater", builder() .intState(DELAY, 1, 4) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LOCKED) .booleanState(POWERED))); - public static final Block WHITE_STAINED_GLASS = register(new Block("white_stained_glass", builder())); - public static final Block ORANGE_STAINED_GLASS = register(new Block("orange_stained_glass", builder())); - public static final Block MAGENTA_STAINED_GLASS = register(new Block("magenta_stained_glass", builder())); - public static final Block LIGHT_BLUE_STAINED_GLASS = register(new Block("light_blue_stained_glass", builder())); - public static final Block YELLOW_STAINED_GLASS = register(new Block("yellow_stained_glass", builder())); - public static final Block LIME_STAINED_GLASS = register(new Block("lime_stained_glass", builder())); - public static final Block PINK_STAINED_GLASS = register(new Block("pink_stained_glass", builder())); - public static final Block GRAY_STAINED_GLASS = register(new Block("gray_stained_glass", builder())); - public static final Block LIGHT_GRAY_STAINED_GLASS = register(new Block("light_gray_stained_glass", builder())); - public static final Block CYAN_STAINED_GLASS = register(new Block("cyan_stained_glass", builder())); - public static final Block PURPLE_STAINED_GLASS = register(new Block("purple_stained_glass", builder())); - public static final Block BLUE_STAINED_GLASS = register(new Block("blue_stained_glass", builder())); - public static final Block BROWN_STAINED_GLASS = register(new Block("brown_stained_glass", builder())); - public static final Block GREEN_STAINED_GLASS = register(new Block("green_stained_glass", builder())); - public static final Block RED_STAINED_GLASS = register(new Block("red_stained_glass", builder())); - public static final Block BLACK_STAINED_GLASS = register(new Block("black_stained_glass", builder())); - public static final Block OAK_TRAPDOOR = register(new Block("oak_trapdoor", builder() + public static final Block WHITE_STAINED_GLASS = register(new Block("white_stained_glass", builder().destroyTime(0.3f))); + public static final Block ORANGE_STAINED_GLASS = register(new Block("orange_stained_glass", builder().destroyTime(0.3f))); + public static final Block MAGENTA_STAINED_GLASS = register(new Block("magenta_stained_glass", builder().destroyTime(0.3f))); + public static final Block LIGHT_BLUE_STAINED_GLASS = register(new Block("light_blue_stained_glass", builder().destroyTime(0.3f))); + public static final Block YELLOW_STAINED_GLASS = register(new Block("yellow_stained_glass", builder().destroyTime(0.3f))); + public static final Block LIME_STAINED_GLASS = register(new Block("lime_stained_glass", builder().destroyTime(0.3f))); + public static final Block PINK_STAINED_GLASS = register(new Block("pink_stained_glass", builder().destroyTime(0.3f))); + public static final Block GRAY_STAINED_GLASS = register(new Block("gray_stained_glass", builder().destroyTime(0.3f))); + public static final Block LIGHT_GRAY_STAINED_GLASS = register(new Block("light_gray_stained_glass", builder().destroyTime(0.3f))); + public static final Block CYAN_STAINED_GLASS = register(new Block("cyan_stained_glass", builder().destroyTime(0.3f))); + public static final Block PURPLE_STAINED_GLASS = register(new Block("purple_stained_glass", builder().destroyTime(0.3f))); + public static final Block BLUE_STAINED_GLASS = register(new Block("blue_stained_glass", builder().destroyTime(0.3f))); + public static final Block BROWN_STAINED_GLASS = register(new Block("brown_stained_glass", builder().destroyTime(0.3f))); + public static final Block GREEN_STAINED_GLASS = register(new Block("green_stained_glass", builder().destroyTime(0.3f))); + public static final Block RED_STAINED_GLASS = register(new Block("red_stained_glass", builder().destroyTime(0.3f))); + public static final Block BLACK_STAINED_GLASS = register(new Block("black_stained_glass", builder().destroyTime(0.3f))); + public static final Block OAK_TRAPDOOR = register(new Block("oak_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block SPRUCE_TRAPDOOR = register(new Block("spruce_trapdoor", builder() + public static final Block SPRUCE_TRAPDOOR = register(new Block("spruce_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block BIRCH_TRAPDOOR = register(new Block("birch_trapdoor", builder() + public static final Block BIRCH_TRAPDOOR = register(new Block("birch_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block JUNGLE_TRAPDOOR = register(new Block("jungle_trapdoor", builder() + public static final Block JUNGLE_TRAPDOOR = register(new Block("jungle_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block ACACIA_TRAPDOOR = register(new Block("acacia_trapdoor", builder() + public static final Block ACACIA_TRAPDOOR = register(new Block("acacia_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block CHERRY_TRAPDOOR = register(new Block("cherry_trapdoor", builder() + public static final Block CHERRY_TRAPDOOR = register(new Block("cherry_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_TRAPDOOR = register(new Block("dark_oak_trapdoor", builder() + public static final Block DARK_OAK_TRAPDOOR = register(new Block("dark_oak_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block MANGROVE_TRAPDOOR = register(new Block("mangrove_trapdoor", builder() + public static final Block MANGROVE_TRAPDOOR = register(new Block("mangrove_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block BAMBOO_TRAPDOOR = register(new Block("bamboo_trapdoor", builder() + public static final Block BAMBOO_TRAPDOOR = register(new Block("bamboo_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block STONE_BRICKS = register(new Block("stone_bricks", builder())); - public static final Block MOSSY_STONE_BRICKS = register(new Block("mossy_stone_bricks", builder())); - public static final Block CRACKED_STONE_BRICKS = register(new Block("cracked_stone_bricks", builder())); - public static final Block CHISELED_STONE_BRICKS = register(new Block("chiseled_stone_bricks", builder())); - public static final Block PACKED_MUD = register(new Block("packed_mud", builder())); - public static final Block MUD_BRICKS = register(new Block("mud_bricks", builder())); - public static final Block INFESTED_STONE = register(new Block("infested_stone", builder())); - public static final Block INFESTED_COBBLESTONE = register(new Block("infested_cobblestone", builder())); - public static final Block INFESTED_STONE_BRICKS = register(new Block("infested_stone_bricks", builder())); - public static final Block INFESTED_MOSSY_STONE_BRICKS = register(new Block("infested_mossy_stone_bricks", builder())); - public static final Block INFESTED_CRACKED_STONE_BRICKS = register(new Block("infested_cracked_stone_bricks", builder())); - public static final Block INFESTED_CHISELED_STONE_BRICKS = register(new Block("infested_chiseled_stone_bricks", builder())); - public static final Block BROWN_MUSHROOM_BLOCK = register(new Block("brown_mushroom_block", builder() + public static final Block STONE_BRICKS = register(new Block("stone_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block MOSSY_STONE_BRICKS = register(new Block("mossy_stone_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block CRACKED_STONE_BRICKS = register(new Block("cracked_stone_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block CHISELED_STONE_BRICKS = register(new Block("chiseled_stone_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block PACKED_MUD = register(new Block("packed_mud", builder().destroyTime(1.0f))); + public static final Block MUD_BRICKS = register(new Block("mud_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block INFESTED_STONE = register(new Block("infested_stone", builder().destroyTime(0.75f))); + public static final Block INFESTED_COBBLESTONE = register(new Block("infested_cobblestone", builder().destroyTime(1.0f))); + public static final Block INFESTED_STONE_BRICKS = register(new Block("infested_stone_bricks", builder().destroyTime(0.75f))); + public static final Block INFESTED_MOSSY_STONE_BRICKS = register(new Block("infested_mossy_stone_bricks", builder().destroyTime(0.75f))); + public static final Block INFESTED_CRACKED_STONE_BRICKS = register(new Block("infested_cracked_stone_bricks", builder().destroyTime(0.75f))); + public static final Block INFESTED_CHISELED_STONE_BRICKS = register(new Block("infested_chiseled_stone_bricks", builder().destroyTime(0.75f))); + public static final Block BROWN_MUSHROOM_BLOCK = register(new Block("brown_mushroom_block", builder().destroyTime(0.2f) .booleanState(DOWN) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(UP) .booleanState(WEST))); - public static final Block RED_MUSHROOM_BLOCK = register(new Block("red_mushroom_block", builder() + public static final Block RED_MUSHROOM_BLOCK = register(new Block("red_mushroom_block", builder().destroyTime(0.2f) .booleanState(DOWN) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(UP) .booleanState(WEST))); - public static final Block MUSHROOM_STEM = register(new Block("mushroom_stem", builder() + public static final Block MUSHROOM_STEM = register(new Block("mushroom_stem", builder().destroyTime(0.2f) .booleanState(DOWN) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(UP) .booleanState(WEST))); - public static final Block IRON_BARS = register(new Block("iron_bars", builder() + public static final Block IRON_BARS = register(new Block("iron_bars", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block CHAIN = register(new Block("chain", builder() + public static final Block CHAIN = register(new Block("chain", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(AXIS, Axis.VALUES) .booleanState(WATERLOGGED))); - public static final Block GLASS_PANE = register(new Block("glass_pane", builder() + public static final Block GLASS_PANE = register(new Block("glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block PUMPKIN = register(new Block("pumpkin", builder())); - public static final Block MELON = register(new Block("melon", builder())); + public static final Block PUMPKIN = register(new Block("pumpkin", builder().destroyTime(1.0f))); + public static final Block MELON = register(new Block("melon", builder().destroyTime(1.0f))); public static final Block ATTACHED_PUMPKIN_STEM = register(new Block("attached_pumpkin_stem", builder() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); public static final Block ATTACHED_MELON_STEM = register(new Block("attached_melon_stem", builder() @@ -766,13 +766,13 @@ public final class Blocks { .intState(AGE_7, 0, 7))); public static final Block MELON_STEM = register(new Block("melon_stem", builder() .intState(AGE_7, 0, 7))); - public static final Block VINE = register(new Block("vine", builder() + public static final Block VINE = register(new Block("vine", builder().destroyTime(0.2f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(UP) .booleanState(WEST))); - public static final Block GLOW_LICHEN = register(new Block("glow_lichen", builder() + public static final Block GLOW_LICHEN = register(new Block("glow_lichen", builder().destroyTime(0.2f) .booleanState(DOWN) .booleanState(EAST) .booleanState(NORTH) @@ -780,73 +780,73 @@ public final class Blocks { .booleanState(UP) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block OAK_FENCE_GATE = register(new Block("oak_fence_gate", builder() + public static final Block OAK_FENCE_GATE = register(new Block("oak_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block BRICK_STAIRS = register(new Block("brick_stairs", builder() + public static final Block BRICK_STAIRS = register(new Block("brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block STONE_BRICK_STAIRS = register(new Block("stone_brick_stairs", builder() + public static final Block STONE_BRICK_STAIRS = register(new Block("stone_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block MUD_BRICK_STAIRS = register(new Block("mud_brick_stairs", builder() + public static final Block MUD_BRICK_STAIRS = register(new Block("mud_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block MYCELIUM = register(new Block("mycelium", builder() + public static final Block MYCELIUM = register(new Block("mycelium", builder().destroyTime(0.6f) .booleanState(SNOWY))); public static final Block LILY_PAD = register(new Block("lily_pad", builder())); - public static final Block NETHER_BRICKS = register(new Block("nether_bricks", builder())); - public static final Block NETHER_BRICK_FENCE = register(new Block("nether_brick_fence", builder() + public static final Block NETHER_BRICKS = register(new Block("nether_bricks", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block NETHER_BRICK_FENCE = register(new Block("nether_brick_fence", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block NETHER_BRICK_STAIRS = register(new Block("nether_brick_stairs", builder() + public static final Block NETHER_BRICK_STAIRS = register(new Block("nether_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); public static final Block NETHER_WART = register(new Block("nether_wart", builder() .intState(AGE_3, 0, 3))); - public static final Block ENCHANTING_TABLE = register(new Block("enchanting_table", builder())); - public static final Block BREWING_STAND = register(new Block("brewing_stand", builder() + public static final Block ENCHANTING_TABLE = register(new Block("enchanting_table", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block BREWING_STAND = register(new Block("brewing_stand", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(0.5f) .booleanState(HAS_BOTTLE_0) .booleanState(HAS_BOTTLE_1) .booleanState(HAS_BOTTLE_2))); - public static final Block CAULDRON = register(new Block("cauldron", builder())); - public static final Block WATER_CAULDRON = register(new Block("water_cauldron", builder() + public static final Block CAULDRON = register(new Block("cauldron", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block WATER_CAULDRON = register(new Block("water_cauldron", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .intState(LEVEL_CAULDRON, 1, 3))); - public static final Block LAVA_CAULDRON = register(new Block("lava_cauldron", builder())); - public static final Block POWDER_SNOW_CAULDRON = register(new Block("powder_snow_cauldron", builder() + public static final Block LAVA_CAULDRON = register(new Block("lava_cauldron", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block POWDER_SNOW_CAULDRON = register(new Block("powder_snow_cauldron", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .intState(LEVEL_CAULDRON, 1, 3))); - public static final Block END_PORTAL = register(new Block("end_portal", builder())); - public static final Block END_PORTAL_FRAME = register(new Block("end_portal_frame", builder() + public static final Block END_PORTAL = register(new Block("end_portal", builder().setBlockEntity().destroyTime(-1.0f))); + public static final Block END_PORTAL_FRAME = register(new Block("end_portal_frame", builder().destroyTime(-1.0f) .booleanState(EYE) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block END_STONE = register(new Block("end_stone", builder())); - public static final Block DRAGON_EGG = register(new Block("dragon_egg", builder())); - public static final Block REDSTONE_LAMP = register(new Block("redstone_lamp", builder() + public static final Block END_STONE = register(new Block("end_stone", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DRAGON_EGG = register(new Block("dragon_egg", builder().destroyTime(3.0f))); + public static final Block REDSTONE_LAMP = register(new Block("redstone_lamp", builder().destroyTime(0.3f) .booleanState(LIT))); - public static final Block COCOA = register(new Block("cocoa", builder() + public static final Block COCOA = register(new Block("cocoa", builder().destroyTime(0.2f) .intState(AGE_2, 0, 2) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block SANDSTONE_STAIRS = register(new Block("sandstone_stairs", builder() + public static final Block SANDSTONE_STAIRS = register(new Block("sandstone_stairs", builder().requiresCorrectToolForDrops().destroyTime(0.8f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block EMERALD_ORE = register(new Block("emerald_ore", builder())); - public static final Block DEEPSLATE_EMERALD_ORE = register(new Block("deepslate_emerald_ore", builder())); - public static final Block ENDER_CHEST = register(new Block("ender_chest", builder() + public static final Block EMERALD_ORE = register(new Block("emerald_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_EMERALD_ORE = register(new Block("deepslate_emerald_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block ENDER_CHEST = register(new Block("ender_chest", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(22.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); public static final Block TRIPWIRE_HOOK = register(new Block("tripwire_hook", builder() @@ -861,34 +861,34 @@ public final class Blocks { .booleanState(POWERED) .booleanState(SOUTH) .booleanState(WEST))); - public static final Block EMERALD_BLOCK = register(new Block("emerald_block", builder())); - public static final Block SPRUCE_STAIRS = register(new Block("spruce_stairs", builder() + public static final Block EMERALD_BLOCK = register(new Block("emerald_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block SPRUCE_STAIRS = register(new Block("spruce_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block BIRCH_STAIRS = register(new Block("birch_stairs", builder() + public static final Block BIRCH_STAIRS = register(new Block("birch_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block JUNGLE_STAIRS = register(new Block("jungle_stairs", builder() + public static final Block JUNGLE_STAIRS = register(new Block("jungle_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block COMMAND_BLOCK = register(new Block("command_block", builder() + public static final Block COMMAND_BLOCK = register(new Block("command_block", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(-1.0f) .booleanState(CONDITIONAL) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block BEACON = register(new Block("beacon", builder())); - public static final Block COBBLESTONE_WALL = register(new Block("cobblestone_wall", builder() + public static final Block BEACON = register(new Block("beacon", builder().setBlockEntity().destroyTime(3.0f))); + public static final Block COBBLESTONE_WALL = register(new Block("cobblestone_wall", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block MOSSY_COBBLESTONE_WALL = register(new Block("mossy_cobblestone_wall", builder() + public static final Block MOSSY_COBBLESTONE_WALL = register(new Block("mossy_cobblestone_wall", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") @@ -927,329 +927,329 @@ public final class Blocks { .intState(AGE_7, 0, 7))); public static final Block POTATOES = register(new Block("potatoes", builder() .intState(AGE_7, 0, 7))); - public static final Block OAK_BUTTON = register(new Block("oak_button", builder() + public static final Block OAK_BUTTON = register(new Block("oak_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block SPRUCE_BUTTON = register(new Block("spruce_button", builder() + public static final Block SPRUCE_BUTTON = register(new Block("spruce_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block BIRCH_BUTTON = register(new Block("birch_button", builder() + public static final Block BIRCH_BUTTON = register(new Block("birch_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block JUNGLE_BUTTON = register(new Block("jungle_button", builder() + public static final Block JUNGLE_BUTTON = register(new Block("jungle_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block ACACIA_BUTTON = register(new Block("acacia_button", builder() + public static final Block ACACIA_BUTTON = register(new Block("acacia_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block CHERRY_BUTTON = register(new Block("cherry_button", builder() + public static final Block CHERRY_BUTTON = register(new Block("cherry_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block DARK_OAK_BUTTON = register(new Block("dark_oak_button", builder() + public static final Block DARK_OAK_BUTTON = register(new Block("dark_oak_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block MANGROVE_BUTTON = register(new Block("mangrove_button", builder() + public static final Block MANGROVE_BUTTON = register(new Block("mangrove_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block BAMBOO_BUTTON = register(new Block("bamboo_button", builder() + public static final Block BAMBOO_BUTTON = register(new Block("bamboo_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block SKELETON_SKULL = register(new Block("skeleton_skull", builder() + public static final Block SKELETON_SKULL = register(new Block("skeleton_skull", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block SKELETON_WALL_SKULL = register(new Block("skeleton_wall_skull", builder() + public static final Block SKELETON_WALL_SKULL = register(new Block("skeleton_wall_skull", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block WITHER_SKELETON_SKULL = register(new Block("wither_skeleton_skull", builder() + public static final Block WITHER_SKELETON_SKULL = register(new Block("wither_skeleton_skull", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block WITHER_SKELETON_WALL_SKULL = register(new Block("wither_skeleton_wall_skull", builder() + public static final Block WITHER_SKELETON_WALL_SKULL = register(new Block("wither_skeleton_wall_skull", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block ZOMBIE_HEAD = register(new Block("zombie_head", builder() + public static final Block ZOMBIE_HEAD = register(new Block("zombie_head", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block ZOMBIE_WALL_HEAD = register(new Block("zombie_wall_head", builder() + public static final Block ZOMBIE_WALL_HEAD = register(new Block("zombie_wall_head", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block PLAYER_HEAD = register(new Block("player_head", builder() + public static final Block PLAYER_HEAD = register(new Block("player_head", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block PLAYER_WALL_HEAD = register(new Block("player_wall_head", builder() + public static final Block PLAYER_WALL_HEAD = register(new Block("player_wall_head", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block CREEPER_HEAD = register(new Block("creeper_head", builder() + public static final Block CREEPER_HEAD = register(new Block("creeper_head", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block CREEPER_WALL_HEAD = register(new Block("creeper_wall_head", builder() + public static final Block CREEPER_WALL_HEAD = register(new Block("creeper_wall_head", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block DRAGON_HEAD = register(new Block("dragon_head", builder() + public static final Block DRAGON_HEAD = register(new Block("dragon_head", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block DRAGON_WALL_HEAD = register(new Block("dragon_wall_head", builder() + public static final Block DRAGON_WALL_HEAD = register(new Block("dragon_wall_head", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block PIGLIN_HEAD = register(new Block("piglin_head", builder() + public static final Block PIGLIN_HEAD = register(new Block("piglin_head", builder().setBlockEntity().destroyTime(1.0f) .booleanState(POWERED) .intState(ROTATION_16, 0, 15))); - public static final Block PIGLIN_WALL_HEAD = register(new Block("piglin_wall_head", builder() + public static final Block PIGLIN_WALL_HEAD = register(new Block("piglin_wall_head", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block ANVIL = register(new Block("anvil", builder() + public static final Block ANVIL = register(new Block("anvil", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block CHIPPED_ANVIL = register(new Block("chipped_anvil", builder() + public static final Block CHIPPED_ANVIL = register(new Block("chipped_anvil", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block DAMAGED_ANVIL = register(new Block("damaged_anvil", builder() + public static final Block DAMAGED_ANVIL = register(new Block("damaged_anvil", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block TRAPPED_CHEST = register(new Block("trapped_chest", builder() + public static final Block TRAPPED_CHEST = register(new Block("trapped_chest", builder().setBlockEntity().destroyTime(2.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(CHEST_TYPE, "single", "left", "right") .booleanState(WATERLOGGED))); - public static final Block LIGHT_WEIGHTED_PRESSURE_PLATE = register(new Block("light_weighted_pressure_plate", builder() + public static final Block LIGHT_WEIGHTED_PRESSURE_PLATE = register(new Block("light_weighted_pressure_plate", builder().requiresCorrectToolForDrops().destroyTime(0.5f) .intState(POWER, 0, 15))); - public static final Block HEAVY_WEIGHTED_PRESSURE_PLATE = register(new Block("heavy_weighted_pressure_plate", builder() + public static final Block HEAVY_WEIGHTED_PRESSURE_PLATE = register(new Block("heavy_weighted_pressure_plate", builder().requiresCorrectToolForDrops().destroyTime(0.5f) .intState(POWER, 0, 15))); - public static final Block COMPARATOR = register(new Block("comparator", builder() + public static final Block COMPARATOR = register(new Block("comparator", builder().setBlockEntity() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(MODE_COMPARATOR, "compare", "subtract") .booleanState(POWERED))); - public static final Block DAYLIGHT_DETECTOR = register(new Block("daylight_detector", builder() + public static final Block DAYLIGHT_DETECTOR = register(new Block("daylight_detector", builder().setBlockEntity().destroyTime(0.2f) .booleanState(INVERTED) .intState(POWER, 0, 15))); - public static final Block REDSTONE_BLOCK = register(new Block("redstone_block", builder())); - public static final Block NETHER_QUARTZ_ORE = register(new Block("nether_quartz_ore", builder())); - public static final Block HOPPER = register(new Block("hopper", builder() + public static final Block REDSTONE_BLOCK = register(new Block("redstone_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block NETHER_QUARTZ_ORE = register(new Block("nether_quartz_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block HOPPER = register(new Block("hopper", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(ENABLED) .enumState(FACING_HOPPER, Direction.DOWN, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block QUARTZ_BLOCK = register(new Block("quartz_block", builder())); - public static final Block CHISELED_QUARTZ_BLOCK = register(new Block("chiseled_quartz_block", builder())); - public static final Block QUARTZ_PILLAR = register(new Block("quartz_pillar", builder() + public static final Block QUARTZ_BLOCK = register(new Block("quartz_block", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block CHISELED_QUARTZ_BLOCK = register(new Block("chiseled_quartz_block", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block QUARTZ_PILLAR = register(new Block("quartz_pillar", builder().requiresCorrectToolForDrops().destroyTime(0.8f) .enumState(AXIS, Axis.VALUES))); - public static final Block QUARTZ_STAIRS = register(new Block("quartz_stairs", builder() + public static final Block QUARTZ_STAIRS = register(new Block("quartz_stairs", builder().requiresCorrectToolForDrops().destroyTime(0.8f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block ACTIVATOR_RAIL = register(new Block("activator_rail", builder() + public static final Block ACTIVATOR_RAIL = register(new Block("activator_rail", builder().destroyTime(0.7f) .booleanState(POWERED) .enumState(RAIL_SHAPE_STRAIGHT, "north_south", "east_west", "ascending_east", "ascending_west", "ascending_north", "ascending_south") .booleanState(WATERLOGGED))); - public static final Block DROPPER = register(new Block("dropper", builder() + public static final Block DROPPER = register(new Block("dropper", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(TRIGGERED))); - public static final Block WHITE_TERRACOTTA = register(new Block("white_terracotta", builder())); - public static final Block ORANGE_TERRACOTTA = register(new Block("orange_terracotta", builder())); - public static final Block MAGENTA_TERRACOTTA = register(new Block("magenta_terracotta", builder())); - public static final Block LIGHT_BLUE_TERRACOTTA = register(new Block("light_blue_terracotta", builder())); - public static final Block YELLOW_TERRACOTTA = register(new Block("yellow_terracotta", builder())); - public static final Block LIME_TERRACOTTA = register(new Block("lime_terracotta", builder())); - public static final Block PINK_TERRACOTTA = register(new Block("pink_terracotta", builder())); - public static final Block GRAY_TERRACOTTA = register(new Block("gray_terracotta", builder())); - public static final Block LIGHT_GRAY_TERRACOTTA = register(new Block("light_gray_terracotta", builder())); - public static final Block CYAN_TERRACOTTA = register(new Block("cyan_terracotta", builder())); - public static final Block PURPLE_TERRACOTTA = register(new Block("purple_terracotta", builder())); - public static final Block BLUE_TERRACOTTA = register(new Block("blue_terracotta", builder())); - public static final Block BROWN_TERRACOTTA = register(new Block("brown_terracotta", builder())); - public static final Block GREEN_TERRACOTTA = register(new Block("green_terracotta", builder())); - public static final Block RED_TERRACOTTA = register(new Block("red_terracotta", builder())); - public static final Block BLACK_TERRACOTTA = register(new Block("black_terracotta", builder())); - public static final Block WHITE_STAINED_GLASS_PANE = register(new Block("white_stained_glass_pane", builder() + public static final Block WHITE_TERRACOTTA = register(new Block("white_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block ORANGE_TERRACOTTA = register(new Block("orange_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block MAGENTA_TERRACOTTA = register(new Block("magenta_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block LIGHT_BLUE_TERRACOTTA = register(new Block("light_blue_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block YELLOW_TERRACOTTA = register(new Block("yellow_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block LIME_TERRACOTTA = register(new Block("lime_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block PINK_TERRACOTTA = register(new Block("pink_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block GRAY_TERRACOTTA = register(new Block("gray_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block LIGHT_GRAY_TERRACOTTA = register(new Block("light_gray_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block CYAN_TERRACOTTA = register(new Block("cyan_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block PURPLE_TERRACOTTA = register(new Block("purple_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block BLUE_TERRACOTTA = register(new Block("blue_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block BROWN_TERRACOTTA = register(new Block("brown_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block GREEN_TERRACOTTA = register(new Block("green_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block RED_TERRACOTTA = register(new Block("red_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block BLACK_TERRACOTTA = register(new Block("black_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block WHITE_STAINED_GLASS_PANE = register(new Block("white_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block ORANGE_STAINED_GLASS_PANE = register(new Block("orange_stained_glass_pane", builder() + public static final Block ORANGE_STAINED_GLASS_PANE = register(new Block("orange_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block MAGENTA_STAINED_GLASS_PANE = register(new Block("magenta_stained_glass_pane", builder() + public static final Block MAGENTA_STAINED_GLASS_PANE = register(new Block("magenta_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block LIGHT_BLUE_STAINED_GLASS_PANE = register(new Block("light_blue_stained_glass_pane", builder() + public static final Block LIGHT_BLUE_STAINED_GLASS_PANE = register(new Block("light_blue_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block YELLOW_STAINED_GLASS_PANE = register(new Block("yellow_stained_glass_pane", builder() + public static final Block YELLOW_STAINED_GLASS_PANE = register(new Block("yellow_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block LIME_STAINED_GLASS_PANE = register(new Block("lime_stained_glass_pane", builder() + public static final Block LIME_STAINED_GLASS_PANE = register(new Block("lime_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block PINK_STAINED_GLASS_PANE = register(new Block("pink_stained_glass_pane", builder() + public static final Block PINK_STAINED_GLASS_PANE = register(new Block("pink_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block GRAY_STAINED_GLASS_PANE = register(new Block("gray_stained_glass_pane", builder() + public static final Block GRAY_STAINED_GLASS_PANE = register(new Block("gray_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block LIGHT_GRAY_STAINED_GLASS_PANE = register(new Block("light_gray_stained_glass_pane", builder() + public static final Block LIGHT_GRAY_STAINED_GLASS_PANE = register(new Block("light_gray_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block CYAN_STAINED_GLASS_PANE = register(new Block("cyan_stained_glass_pane", builder() + public static final Block CYAN_STAINED_GLASS_PANE = register(new Block("cyan_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block PURPLE_STAINED_GLASS_PANE = register(new Block("purple_stained_glass_pane", builder() + public static final Block PURPLE_STAINED_GLASS_PANE = register(new Block("purple_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block BLUE_STAINED_GLASS_PANE = register(new Block("blue_stained_glass_pane", builder() + public static final Block BLUE_STAINED_GLASS_PANE = register(new Block("blue_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block BROWN_STAINED_GLASS_PANE = register(new Block("brown_stained_glass_pane", builder() + public static final Block BROWN_STAINED_GLASS_PANE = register(new Block("brown_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block GREEN_STAINED_GLASS_PANE = register(new Block("green_stained_glass_pane", builder() + public static final Block GREEN_STAINED_GLASS_PANE = register(new Block("green_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block RED_STAINED_GLASS_PANE = register(new Block("red_stained_glass_pane", builder() + public static final Block RED_STAINED_GLASS_PANE = register(new Block("red_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block BLACK_STAINED_GLASS_PANE = register(new Block("black_stained_glass_pane", builder() + public static final Block BLACK_STAINED_GLASS_PANE = register(new Block("black_stained_glass_pane", builder().destroyTime(0.3f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block ACACIA_STAIRS = register(new Block("acacia_stairs", builder() + public static final Block ACACIA_STAIRS = register(new Block("acacia_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block CHERRY_STAIRS = register(new Block("cherry_stairs", builder() + public static final Block CHERRY_STAIRS = register(new Block("cherry_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_STAIRS = register(new Block("dark_oak_stairs", builder() + public static final Block DARK_OAK_STAIRS = register(new Block("dark_oak_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block MANGROVE_STAIRS = register(new Block("mangrove_stairs", builder() + public static final Block MANGROVE_STAIRS = register(new Block("mangrove_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block BAMBOO_STAIRS = register(new Block("bamboo_stairs", builder() + public static final Block BAMBOO_STAIRS = register(new Block("bamboo_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block BAMBOO_MOSAIC_STAIRS = register(new Block("bamboo_mosaic_stairs", builder() + public static final Block BAMBOO_MOSAIC_STAIRS = register(new Block("bamboo_mosaic_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); public static final Block SLIME_BLOCK = register(new Block("slime_block", builder())); - public static final Block BARRIER = register(new Block("barrier", builder() + public static final Block BARRIER = register(new Block("barrier", builder().destroyTime(-1.0f) .booleanState(WATERLOGGED))); - public static final Block LIGHT = register(new Block("light", builder() + public static final Block LIGHT = register(new Block("light", builder().destroyTime(-1.0f) .intState(LEVEL, 0, 15) .booleanState(WATERLOGGED))); - public static final Block IRON_TRAPDOOR = register(new Block("iron_trapdoor", builder() + public static final Block IRON_TRAPDOOR = register(new Block("iron_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block PRISMARINE = register(new Block("prismarine", builder())); - public static final Block PRISMARINE_BRICKS = register(new Block("prismarine_bricks", builder())); - public static final Block DARK_PRISMARINE = register(new Block("dark_prismarine", builder())); - public static final Block PRISMARINE_STAIRS = register(new Block("prismarine_stairs", builder() + public static final Block PRISMARINE = register(new Block("prismarine", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block PRISMARINE_BRICKS = register(new Block("prismarine_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DARK_PRISMARINE = register(new Block("dark_prismarine", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block PRISMARINE_STAIRS = register(new Block("prismarine_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block PRISMARINE_BRICK_STAIRS = register(new Block("prismarine_brick_stairs", builder() + public static final Block PRISMARINE_BRICK_STAIRS = register(new Block("prismarine_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block DARK_PRISMARINE_STAIRS = register(new Block("dark_prismarine_stairs", builder() + public static final Block DARK_PRISMARINE_STAIRS = register(new Block("dark_prismarine_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block PRISMARINE_SLAB = register(new Block("prismarine_slab", builder() + public static final Block PRISMARINE_SLAB = register(new Block("prismarine_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block PRISMARINE_BRICK_SLAB = register(new Block("prismarine_brick_slab", builder() + public static final Block PRISMARINE_BRICK_SLAB = register(new Block("prismarine_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block DARK_PRISMARINE_SLAB = register(new Block("dark_prismarine_slab", builder() + public static final Block DARK_PRISMARINE_SLAB = register(new Block("dark_prismarine_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SEA_LANTERN = register(new Block("sea_lantern", builder())); - public static final Block HAY_BLOCK = register(new Block("hay_block", builder() + public static final Block SEA_LANTERN = register(new Block("sea_lantern", builder().destroyTime(0.3f))); + public static final Block HAY_BLOCK = register(new Block("hay_block", builder().destroyTime(0.5f) .enumState(AXIS, Axis.VALUES))); - public static final Block WHITE_CARPET = register(new Block("white_carpet", builder())); - public static final Block ORANGE_CARPET = register(new Block("orange_carpet", builder())); - public static final Block MAGENTA_CARPET = register(new Block("magenta_carpet", builder())); - public static final Block LIGHT_BLUE_CARPET = register(new Block("light_blue_carpet", builder())); - public static final Block YELLOW_CARPET = register(new Block("yellow_carpet", builder())); - public static final Block LIME_CARPET = register(new Block("lime_carpet", builder())); - public static final Block PINK_CARPET = register(new Block("pink_carpet", builder())); - public static final Block GRAY_CARPET = register(new Block("gray_carpet", builder())); - public static final Block LIGHT_GRAY_CARPET = register(new Block("light_gray_carpet", builder())); - public static final Block CYAN_CARPET = register(new Block("cyan_carpet", builder())); - public static final Block PURPLE_CARPET = register(new Block("purple_carpet", builder())); - public static final Block BLUE_CARPET = register(new Block("blue_carpet", builder())); - public static final Block BROWN_CARPET = register(new Block("brown_carpet", builder())); - public static final Block GREEN_CARPET = register(new Block("green_carpet", builder())); - public static final Block RED_CARPET = register(new Block("red_carpet", builder())); - public static final Block BLACK_CARPET = register(new Block("black_carpet", builder())); - public static final Block TERRACOTTA = register(new Block("terracotta", builder())); - public static final Block COAL_BLOCK = register(new Block("coal_block", builder())); - public static final Block PACKED_ICE = register(new Block("packed_ice", builder())); + public static final Block WHITE_CARPET = register(new Block("white_carpet", builder().destroyTime(0.1f))); + public static final Block ORANGE_CARPET = register(new Block("orange_carpet", builder().destroyTime(0.1f))); + public static final Block MAGENTA_CARPET = register(new Block("magenta_carpet", builder().destroyTime(0.1f))); + public static final Block LIGHT_BLUE_CARPET = register(new Block("light_blue_carpet", builder().destroyTime(0.1f))); + public static final Block YELLOW_CARPET = register(new Block("yellow_carpet", builder().destroyTime(0.1f))); + public static final Block LIME_CARPET = register(new Block("lime_carpet", builder().destroyTime(0.1f))); + public static final Block PINK_CARPET = register(new Block("pink_carpet", builder().destroyTime(0.1f))); + public static final Block GRAY_CARPET = register(new Block("gray_carpet", builder().destroyTime(0.1f))); + public static final Block LIGHT_GRAY_CARPET = register(new Block("light_gray_carpet", builder().destroyTime(0.1f))); + public static final Block CYAN_CARPET = register(new Block("cyan_carpet", builder().destroyTime(0.1f))); + public static final Block PURPLE_CARPET = register(new Block("purple_carpet", builder().destroyTime(0.1f))); + public static final Block BLUE_CARPET = register(new Block("blue_carpet", builder().destroyTime(0.1f))); + public static final Block BROWN_CARPET = register(new Block("brown_carpet", builder().destroyTime(0.1f))); + public static final Block GREEN_CARPET = register(new Block("green_carpet", builder().destroyTime(0.1f))); + public static final Block RED_CARPET = register(new Block("red_carpet", builder().destroyTime(0.1f))); + public static final Block BLACK_CARPET = register(new Block("black_carpet", builder().destroyTime(0.1f))); + public static final Block TERRACOTTA = register(new Block("terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block COAL_BLOCK = register(new Block("coal_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block PACKED_ICE = register(new Block("packed_ice", builder().destroyTime(0.5f))); public static final Block SUNFLOWER = register(new Block("sunflower", builder() .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); public static final Block LILAC = register(new Block("lilac", builder() @@ -1262,285 +1262,285 @@ public final class Blocks { .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); public static final Block LARGE_FERN = register(new Block("large_fern", builder() .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); - public static final Block WHITE_BANNER = register(new BannerBlock("white_banner", 0, builder() + public static final Block WHITE_BANNER = register(new BannerBlock("white_banner", 0, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block ORANGE_BANNER = register(new BannerBlock("orange_banner", 1, builder() + public static final Block ORANGE_BANNER = register(new BannerBlock("orange_banner", 1, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block MAGENTA_BANNER = register(new BannerBlock("magenta_banner", 2, builder() + public static final Block MAGENTA_BANNER = register(new BannerBlock("magenta_banner", 2, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block LIGHT_BLUE_BANNER = register(new BannerBlock("light_blue_banner", 3, builder() + public static final Block LIGHT_BLUE_BANNER = register(new BannerBlock("light_blue_banner", 3, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block YELLOW_BANNER = register(new BannerBlock("yellow_banner", 4, builder() + public static final Block YELLOW_BANNER = register(new BannerBlock("yellow_banner", 4, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block LIME_BANNER = register(new BannerBlock("lime_banner", 5, builder() + public static final Block LIME_BANNER = register(new BannerBlock("lime_banner", 5, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block PINK_BANNER = register(new BannerBlock("pink_banner", 6, builder() + public static final Block PINK_BANNER = register(new BannerBlock("pink_banner", 6, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block GRAY_BANNER = register(new BannerBlock("gray_banner", 7, builder() + public static final Block GRAY_BANNER = register(new BannerBlock("gray_banner", 7, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block LIGHT_GRAY_BANNER = register(new BannerBlock("light_gray_banner", 8, builder() + public static final Block LIGHT_GRAY_BANNER = register(new BannerBlock("light_gray_banner", 8, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block CYAN_BANNER = register(new BannerBlock("cyan_banner", 9, builder() + public static final Block CYAN_BANNER = register(new BannerBlock("cyan_banner", 9, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block PURPLE_BANNER = register(new BannerBlock("purple_banner", 10, builder() + public static final Block PURPLE_BANNER = register(new BannerBlock("purple_banner", 10, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block BLUE_BANNER = register(new BannerBlock("blue_banner", 11, builder() + public static final Block BLUE_BANNER = register(new BannerBlock("blue_banner", 11, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block BROWN_BANNER = register(new BannerBlock("brown_banner", 12, builder() + public static final Block BROWN_BANNER = register(new BannerBlock("brown_banner", 12, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block GREEN_BANNER = register(new BannerBlock("green_banner", 13, builder() + public static final Block GREEN_BANNER = register(new BannerBlock("green_banner", 13, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block RED_BANNER = register(new BannerBlock("red_banner", 14, builder() + public static final Block RED_BANNER = register(new BannerBlock("red_banner", 14, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block BLACK_BANNER = register(new BannerBlock("black_banner", 15, builder() + public static final Block BLACK_BANNER = register(new BannerBlock("black_banner", 15, builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15))); - public static final Block WHITE_WALL_BANNER = register(new BannerBlock("white_wall_banner", 0, builder() + public static final Block WHITE_WALL_BANNER = register(new BannerBlock("white_wall_banner", 0, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block ORANGE_WALL_BANNER = register(new BannerBlock("orange_wall_banner", 1, builder() + public static final Block ORANGE_WALL_BANNER = register(new BannerBlock("orange_wall_banner", 1, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block MAGENTA_WALL_BANNER = register(new BannerBlock("magenta_wall_banner", 2, builder() + public static final Block MAGENTA_WALL_BANNER = register(new BannerBlock("magenta_wall_banner", 2, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LIGHT_BLUE_WALL_BANNER = register(new BannerBlock("light_blue_wall_banner", 3, builder() + public static final Block LIGHT_BLUE_WALL_BANNER = register(new BannerBlock("light_blue_wall_banner", 3, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block YELLOW_WALL_BANNER = register(new BannerBlock("yellow_wall_banner", 4, builder() + public static final Block YELLOW_WALL_BANNER = register(new BannerBlock("yellow_wall_banner", 4, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LIME_WALL_BANNER = register(new BannerBlock("lime_wall_banner", 5, builder() + public static final Block LIME_WALL_BANNER = register(new BannerBlock("lime_wall_banner", 5, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block PINK_WALL_BANNER = register(new BannerBlock("pink_wall_banner", 6, builder() + public static final Block PINK_WALL_BANNER = register(new BannerBlock("pink_wall_banner", 6, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block GRAY_WALL_BANNER = register(new BannerBlock("gray_wall_banner", 7, builder() + public static final Block GRAY_WALL_BANNER = register(new BannerBlock("gray_wall_banner", 7, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LIGHT_GRAY_WALL_BANNER = register(new BannerBlock("light_gray_wall_banner", 8, builder() + public static final Block LIGHT_GRAY_WALL_BANNER = register(new BannerBlock("light_gray_wall_banner", 8, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block CYAN_WALL_BANNER = register(new BannerBlock("cyan_wall_banner", 9, builder() + public static final Block CYAN_WALL_BANNER = register(new BannerBlock("cyan_wall_banner", 9, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block PURPLE_WALL_BANNER = register(new BannerBlock("purple_wall_banner", 10, builder() + public static final Block PURPLE_WALL_BANNER = register(new BannerBlock("purple_wall_banner", 10, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BLUE_WALL_BANNER = register(new BannerBlock("blue_wall_banner", 11, builder() + public static final Block BLUE_WALL_BANNER = register(new BannerBlock("blue_wall_banner", 11, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BROWN_WALL_BANNER = register(new BannerBlock("brown_wall_banner", 12, builder() + public static final Block BROWN_WALL_BANNER = register(new BannerBlock("brown_wall_banner", 12, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block GREEN_WALL_BANNER = register(new BannerBlock("green_wall_banner", 13, builder() + public static final Block GREEN_WALL_BANNER = register(new BannerBlock("green_wall_banner", 13, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block RED_WALL_BANNER = register(new BannerBlock("red_wall_banner", 14, builder() + public static final Block RED_WALL_BANNER = register(new BannerBlock("red_wall_banner", 14, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BLACK_WALL_BANNER = register(new BannerBlock("black_wall_banner", 15, builder() + public static final Block BLACK_WALL_BANNER = register(new BannerBlock("black_wall_banner", 15, builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block RED_SANDSTONE = register(new Block("red_sandstone", builder())); - public static final Block CHISELED_RED_SANDSTONE = register(new Block("chiseled_red_sandstone", builder())); - public static final Block CUT_RED_SANDSTONE = register(new Block("cut_red_sandstone", builder())); - public static final Block RED_SANDSTONE_STAIRS = register(new Block("red_sandstone_stairs", builder() + public static final Block RED_SANDSTONE = register(new Block("red_sandstone", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block CHISELED_RED_SANDSTONE = register(new Block("chiseled_red_sandstone", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block CUT_RED_SANDSTONE = register(new Block("cut_red_sandstone", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block RED_SANDSTONE_STAIRS = register(new Block("red_sandstone_stairs", builder().requiresCorrectToolForDrops().destroyTime(0.8f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block OAK_SLAB = register(new Block("oak_slab", builder() + public static final Block OAK_SLAB = register(new Block("oak_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SPRUCE_SLAB = register(new Block("spruce_slab", builder() + public static final Block SPRUCE_SLAB = register(new Block("spruce_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block BIRCH_SLAB = register(new Block("birch_slab", builder() + public static final Block BIRCH_SLAB = register(new Block("birch_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block JUNGLE_SLAB = register(new Block("jungle_slab", builder() + public static final Block JUNGLE_SLAB = register(new Block("jungle_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block ACACIA_SLAB = register(new Block("acacia_slab", builder() + public static final Block ACACIA_SLAB = register(new Block("acacia_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block CHERRY_SLAB = register(new Block("cherry_slab", builder() + public static final Block CHERRY_SLAB = register(new Block("cherry_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block DARK_OAK_SLAB = register(new Block("dark_oak_slab", builder() + public static final Block DARK_OAK_SLAB = register(new Block("dark_oak_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block MANGROVE_SLAB = register(new Block("mangrove_slab", builder() + public static final Block MANGROVE_SLAB = register(new Block("mangrove_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block BAMBOO_SLAB = register(new Block("bamboo_slab", builder() + public static final Block BAMBOO_SLAB = register(new Block("bamboo_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block BAMBOO_MOSAIC_SLAB = register(new Block("bamboo_mosaic_slab", builder() + public static final Block BAMBOO_MOSAIC_SLAB = register(new Block("bamboo_mosaic_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block STONE_SLAB = register(new Block("stone_slab", builder() + public static final Block STONE_SLAB = register(new Block("stone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_STONE_SLAB = register(new Block("smooth_stone_slab", builder() + public static final Block SMOOTH_STONE_SLAB = register(new Block("smooth_stone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SANDSTONE_SLAB = register(new Block("sandstone_slab", builder() + public static final Block SANDSTONE_SLAB = register(new Block("sandstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block CUT_SANDSTONE_SLAB = register(new Block("cut_sandstone_slab", builder() + public static final Block CUT_SANDSTONE_SLAB = register(new Block("cut_sandstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block PETRIFIED_OAK_SLAB = register(new Block("petrified_oak_slab", builder() + public static final Block PETRIFIED_OAK_SLAB = register(new Block("petrified_oak_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block COBBLESTONE_SLAB = register(new Block("cobblestone_slab", builder() + public static final Block COBBLESTONE_SLAB = register(new Block("cobblestone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block BRICK_SLAB = register(new Block("brick_slab", builder() + public static final Block BRICK_SLAB = register(new Block("brick_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block STONE_BRICK_SLAB = register(new Block("stone_brick_slab", builder() + public static final Block STONE_BRICK_SLAB = register(new Block("stone_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block MUD_BRICK_SLAB = register(new Block("mud_brick_slab", builder() + public static final Block MUD_BRICK_SLAB = register(new Block("mud_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block NETHER_BRICK_SLAB = register(new Block("nether_brick_slab", builder() + public static final Block NETHER_BRICK_SLAB = register(new Block("nether_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block QUARTZ_SLAB = register(new Block("quartz_slab", builder() + public static final Block QUARTZ_SLAB = register(new Block("quartz_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block RED_SANDSTONE_SLAB = register(new Block("red_sandstone_slab", builder() + public static final Block RED_SANDSTONE_SLAB = register(new Block("red_sandstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block CUT_RED_SANDSTONE_SLAB = register(new Block("cut_red_sandstone_slab", builder() + public static final Block CUT_RED_SANDSTONE_SLAB = register(new Block("cut_red_sandstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block PURPUR_SLAB = register(new Block("purpur_slab", builder() + public static final Block PURPUR_SLAB = register(new Block("purpur_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_STONE = register(new Block("smooth_stone", builder())); - public static final Block SMOOTH_SANDSTONE = register(new Block("smooth_sandstone", builder())); - public static final Block SMOOTH_QUARTZ = register(new Block("smooth_quartz", builder())); - public static final Block SMOOTH_RED_SANDSTONE = register(new Block("smooth_red_sandstone", builder())); - public static final Block SPRUCE_FENCE_GATE = register(new Block("spruce_fence_gate", builder() + public static final Block SMOOTH_STONE = register(new Block("smooth_stone", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block SMOOTH_SANDSTONE = register(new Block("smooth_sandstone", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block SMOOTH_QUARTZ = register(new Block("smooth_quartz", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block SMOOTH_RED_SANDSTONE = register(new Block("smooth_red_sandstone", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block SPRUCE_FENCE_GATE = register(new Block("spruce_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block BIRCH_FENCE_GATE = register(new Block("birch_fence_gate", builder() + public static final Block BIRCH_FENCE_GATE = register(new Block("birch_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block JUNGLE_FENCE_GATE = register(new Block("jungle_fence_gate", builder() + public static final Block JUNGLE_FENCE_GATE = register(new Block("jungle_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block ACACIA_FENCE_GATE = register(new Block("acacia_fence_gate", builder() + public static final Block ACACIA_FENCE_GATE = register(new Block("acacia_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block CHERRY_FENCE_GATE = register(new Block("cherry_fence_gate", builder() + public static final Block CHERRY_FENCE_GATE = register(new Block("cherry_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block DARK_OAK_FENCE_GATE = register(new Block("dark_oak_fence_gate", builder() + public static final Block DARK_OAK_FENCE_GATE = register(new Block("dark_oak_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block MANGROVE_FENCE_GATE = register(new Block("mangrove_fence_gate", builder() + public static final Block MANGROVE_FENCE_GATE = register(new Block("mangrove_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block BAMBOO_FENCE_GATE = register(new Block("bamboo_fence_gate", builder() + public static final Block BAMBOO_FENCE_GATE = register(new Block("bamboo_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block SPRUCE_FENCE = register(new Block("spruce_fence", builder() + public static final Block SPRUCE_FENCE = register(new Block("spruce_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block BIRCH_FENCE = register(new Block("birch_fence", builder() + public static final Block BIRCH_FENCE = register(new Block("birch_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block JUNGLE_FENCE = register(new Block("jungle_fence", builder() + public static final Block JUNGLE_FENCE = register(new Block("jungle_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block ACACIA_FENCE = register(new Block("acacia_fence", builder() + public static final Block ACACIA_FENCE = register(new Block("acacia_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block CHERRY_FENCE = register(new Block("cherry_fence", builder() + public static final Block CHERRY_FENCE = register(new Block("cherry_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block DARK_OAK_FENCE = register(new Block("dark_oak_fence", builder() + public static final Block DARK_OAK_FENCE = register(new Block("dark_oak_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block MANGROVE_FENCE = register(new Block("mangrove_fence", builder() + public static final Block MANGROVE_FENCE = register(new Block("mangrove_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block BAMBOO_FENCE = register(new Block("bamboo_fence", builder() + public static final Block BAMBOO_FENCE = register(new Block("bamboo_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block SPRUCE_DOOR = register(new Block("spruce_door", builder() + public static final Block SPRUCE_DOOR = register(new Block("spruce_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block BIRCH_DOOR = register(new Block("birch_door", builder() + public static final Block BIRCH_DOOR = register(new Block("birch_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block JUNGLE_DOOR = register(new Block("jungle_door", builder() + public static final Block JUNGLE_DOOR = register(new Block("jungle_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block ACACIA_DOOR = register(new Block("acacia_door", builder() + public static final Block ACACIA_DOOR = register(new Block("acacia_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block CHERRY_DOOR = register(new Block("cherry_door", builder() + public static final Block CHERRY_DOOR = register(new Block("cherry_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block DARK_OAK_DOOR = register(new Block("dark_oak_door", builder() + public static final Block DARK_OAK_DOOR = register(new Block("dark_oak_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block MANGROVE_DOOR = register(new Block("mangrove_door", builder() + public static final Block MANGROVE_DOOR = register(new Block("mangrove_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block BAMBOO_DOOR = register(new Block("bamboo_door", builder() + public static final Block BAMBOO_DOOR = register(new Block("bamboo_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") @@ -1548,24 +1548,24 @@ public final class Blocks { .booleanState(POWERED))); public static final Block END_ROD = register(new Block("end_rod", builder() .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block CHORUS_PLANT = register(new Block("chorus_plant", builder() + public static final Block CHORUS_PLANT = register(new Block("chorus_plant", builder().destroyTime(0.4f) .booleanState(DOWN) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(UP) .booleanState(WEST))); - public static final Block CHORUS_FLOWER = register(new Block("chorus_flower", builder() + public static final Block CHORUS_FLOWER = register(new Block("chorus_flower", builder().destroyTime(0.4f) .intState(AGE_5, 0, 5))); - public static final Block PURPUR_BLOCK = register(new Block("purpur_block", builder())); - public static final Block PURPUR_PILLAR = register(new Block("purpur_pillar", builder() + public static final Block PURPUR_BLOCK = register(new Block("purpur_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block PURPUR_PILLAR = register(new Block("purpur_pillar", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(AXIS, Axis.VALUES))); - public static final Block PURPUR_STAIRS = register(new Block("purpur_stairs", builder() + public static final Block PURPUR_STAIRS = register(new Block("purpur_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block END_STONE_BRICKS = register(new Block("end_stone_bricks", builder())); + public static final Block END_STONE_BRICKS = register(new Block("end_stone_bricks", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); public static final Block TORCHFLOWER_CROP = register(new Block("torchflower_crop", builder() .intState(AGE_1, 0, 1))); public static final Block PITCHER_CROP = register(new Block("pitcher_crop", builder() @@ -1575,151 +1575,151 @@ public final class Blocks { .enumState(DOUBLE_BLOCK_HALF, "upper", "lower"))); public static final Block BEETROOTS = register(new Block("beetroots", builder() .intState(AGE_3, 0, 3))); - public static final Block DIRT_PATH = register(new Block("dirt_path", builder())); - public static final Block END_GATEWAY = register(new Block("end_gateway", builder())); - public static final Block REPEATING_COMMAND_BLOCK = register(new Block("repeating_command_block", builder() + public static final Block DIRT_PATH = register(new Block("dirt_path", builder().destroyTime(0.65f))); + public static final Block END_GATEWAY = register(new Block("end_gateway", builder().setBlockEntity().destroyTime(-1.0f))); + public static final Block REPEATING_COMMAND_BLOCK = register(new Block("repeating_command_block", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(-1.0f) .booleanState(CONDITIONAL) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block CHAIN_COMMAND_BLOCK = register(new Block("chain_command_block", builder() + public static final Block CHAIN_COMMAND_BLOCK = register(new Block("chain_command_block", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(-1.0f) .booleanState(CONDITIONAL) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block FROSTED_ICE = register(new Block("frosted_ice", builder() + public static final Block FROSTED_ICE = register(new Block("frosted_ice", builder().destroyTime(0.5f) .intState(AGE_3, 0, 3))); - public static final Block MAGMA_BLOCK = register(new Block("magma_block", builder())); - public static final Block NETHER_WART_BLOCK = register(new Block("nether_wart_block", builder())); - public static final Block RED_NETHER_BRICKS = register(new Block("red_nether_bricks", builder())); - public static final Block BONE_BLOCK = register(new Block("bone_block", builder() + public static final Block MAGMA_BLOCK = register(new Block("magma_block", builder().requiresCorrectToolForDrops().destroyTime(0.5f))); + public static final Block NETHER_WART_BLOCK = register(new Block("nether_wart_block", builder().destroyTime(1.0f))); + public static final Block RED_NETHER_BRICKS = register(new Block("red_nether_bricks", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block BONE_BLOCK = register(new Block("bone_block", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); public static final Block STRUCTURE_VOID = register(new Block("structure_void", builder())); - public static final Block OBSERVER = register(new Block("observer", builder() + public static final Block OBSERVER = register(new Block("observer", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(POWERED))); - public static final Block SHULKER_BOX = register(new Block("shulker_box", builder() + public static final Block SHULKER_BOX = register(new Block("shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block WHITE_SHULKER_BOX = register(new Block("white_shulker_box", builder() + public static final Block WHITE_SHULKER_BOX = register(new Block("white_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block ORANGE_SHULKER_BOX = register(new Block("orange_shulker_box", builder() + public static final Block ORANGE_SHULKER_BOX = register(new Block("orange_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block MAGENTA_SHULKER_BOX = register(new Block("magenta_shulker_box", builder() + public static final Block MAGENTA_SHULKER_BOX = register(new Block("magenta_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block LIGHT_BLUE_SHULKER_BOX = register(new Block("light_blue_shulker_box", builder() + public static final Block LIGHT_BLUE_SHULKER_BOX = register(new Block("light_blue_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block YELLOW_SHULKER_BOX = register(new Block("yellow_shulker_box", builder() + public static final Block YELLOW_SHULKER_BOX = register(new Block("yellow_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block LIME_SHULKER_BOX = register(new Block("lime_shulker_box", builder() + public static final Block LIME_SHULKER_BOX = register(new Block("lime_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block PINK_SHULKER_BOX = register(new Block("pink_shulker_box", builder() + public static final Block PINK_SHULKER_BOX = register(new Block("pink_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block GRAY_SHULKER_BOX = register(new Block("gray_shulker_box", builder() + public static final Block GRAY_SHULKER_BOX = register(new Block("gray_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block LIGHT_GRAY_SHULKER_BOX = register(new Block("light_gray_shulker_box", builder() + public static final Block LIGHT_GRAY_SHULKER_BOX = register(new Block("light_gray_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block CYAN_SHULKER_BOX = register(new Block("cyan_shulker_box", builder() + public static final Block CYAN_SHULKER_BOX = register(new Block("cyan_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block PURPLE_SHULKER_BOX = register(new Block("purple_shulker_box", builder() + public static final Block PURPLE_SHULKER_BOX = register(new Block("purple_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block BLUE_SHULKER_BOX = register(new Block("blue_shulker_box", builder() + public static final Block BLUE_SHULKER_BOX = register(new Block("blue_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block BROWN_SHULKER_BOX = register(new Block("brown_shulker_box", builder() + public static final Block BROWN_SHULKER_BOX = register(new Block("brown_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block GREEN_SHULKER_BOX = register(new Block("green_shulker_box", builder() + public static final Block GREEN_SHULKER_BOX = register(new Block("green_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block RED_SHULKER_BOX = register(new Block("red_shulker_box", builder() + public static final Block RED_SHULKER_BOX = register(new Block("red_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block BLACK_SHULKER_BOX = register(new Block("black_shulker_box", builder() + public static final Block BLACK_SHULKER_BOX = register(new Block("black_shulker_box", builder().setBlockEntity().destroyTime(2.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN))); - public static final Block WHITE_GLAZED_TERRACOTTA = register(new Block("white_glazed_terracotta", builder() + public static final Block WHITE_GLAZED_TERRACOTTA = register(new Block("white_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block ORANGE_GLAZED_TERRACOTTA = register(new Block("orange_glazed_terracotta", builder() + public static final Block ORANGE_GLAZED_TERRACOTTA = register(new Block("orange_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block MAGENTA_GLAZED_TERRACOTTA = register(new Block("magenta_glazed_terracotta", builder() + public static final Block MAGENTA_GLAZED_TERRACOTTA = register(new Block("magenta_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LIGHT_BLUE_GLAZED_TERRACOTTA = register(new Block("light_blue_glazed_terracotta", builder() + public static final Block LIGHT_BLUE_GLAZED_TERRACOTTA = register(new Block("light_blue_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block YELLOW_GLAZED_TERRACOTTA = register(new Block("yellow_glazed_terracotta", builder() + public static final Block YELLOW_GLAZED_TERRACOTTA = register(new Block("yellow_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LIME_GLAZED_TERRACOTTA = register(new Block("lime_glazed_terracotta", builder() + public static final Block LIME_GLAZED_TERRACOTTA = register(new Block("lime_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block PINK_GLAZED_TERRACOTTA = register(new Block("pink_glazed_terracotta", builder() + public static final Block PINK_GLAZED_TERRACOTTA = register(new Block("pink_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block GRAY_GLAZED_TERRACOTTA = register(new Block("gray_glazed_terracotta", builder() + public static final Block GRAY_GLAZED_TERRACOTTA = register(new Block("gray_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LIGHT_GRAY_GLAZED_TERRACOTTA = register(new Block("light_gray_glazed_terracotta", builder() + public static final Block LIGHT_GRAY_GLAZED_TERRACOTTA = register(new Block("light_gray_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block CYAN_GLAZED_TERRACOTTA = register(new Block("cyan_glazed_terracotta", builder() + public static final Block CYAN_GLAZED_TERRACOTTA = register(new Block("cyan_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block PURPLE_GLAZED_TERRACOTTA = register(new Block("purple_glazed_terracotta", builder() + public static final Block PURPLE_GLAZED_TERRACOTTA = register(new Block("purple_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BLUE_GLAZED_TERRACOTTA = register(new Block("blue_glazed_terracotta", builder() + public static final Block BLUE_GLAZED_TERRACOTTA = register(new Block("blue_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BROWN_GLAZED_TERRACOTTA = register(new Block("brown_glazed_terracotta", builder() + public static final Block BROWN_GLAZED_TERRACOTTA = register(new Block("brown_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block GREEN_GLAZED_TERRACOTTA = register(new Block("green_glazed_terracotta", builder() + public static final Block GREEN_GLAZED_TERRACOTTA = register(new Block("green_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block RED_GLAZED_TERRACOTTA = register(new Block("red_glazed_terracotta", builder() + public static final Block RED_GLAZED_TERRACOTTA = register(new Block("red_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BLACK_GLAZED_TERRACOTTA = register(new Block("black_glazed_terracotta", builder() + public static final Block BLACK_GLAZED_TERRACOTTA = register(new Block("black_glazed_terracotta", builder().requiresCorrectToolForDrops().destroyTime(1.4f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block WHITE_CONCRETE = register(new Block("white_concrete", builder())); - public static final Block ORANGE_CONCRETE = register(new Block("orange_concrete", builder())); - public static final Block MAGENTA_CONCRETE = register(new Block("magenta_concrete", builder())); - public static final Block LIGHT_BLUE_CONCRETE = register(new Block("light_blue_concrete", builder())); - public static final Block YELLOW_CONCRETE = register(new Block("yellow_concrete", builder())); - public static final Block LIME_CONCRETE = register(new Block("lime_concrete", builder())); - public static final Block PINK_CONCRETE = register(new Block("pink_concrete", builder())); - public static final Block GRAY_CONCRETE = register(new Block("gray_concrete", builder())); - public static final Block LIGHT_GRAY_CONCRETE = register(new Block("light_gray_concrete", builder())); - public static final Block CYAN_CONCRETE = register(new Block("cyan_concrete", builder())); - public static final Block PURPLE_CONCRETE = register(new Block("purple_concrete", builder())); - public static final Block BLUE_CONCRETE = register(new Block("blue_concrete", builder())); - public static final Block BROWN_CONCRETE = register(new Block("brown_concrete", builder())); - public static final Block GREEN_CONCRETE = register(new Block("green_concrete", builder())); - public static final Block RED_CONCRETE = register(new Block("red_concrete", builder())); - public static final Block BLACK_CONCRETE = register(new Block("black_concrete", builder())); - public static final Block WHITE_CONCRETE_POWDER = register(new Block("white_concrete_powder", builder())); - public static final Block ORANGE_CONCRETE_POWDER = register(new Block("orange_concrete_powder", builder())); - public static final Block MAGENTA_CONCRETE_POWDER = register(new Block("magenta_concrete_powder", builder())); - public static final Block LIGHT_BLUE_CONCRETE_POWDER = register(new Block("light_blue_concrete_powder", builder())); - public static final Block YELLOW_CONCRETE_POWDER = register(new Block("yellow_concrete_powder", builder())); - public static final Block LIME_CONCRETE_POWDER = register(new Block("lime_concrete_powder", builder())); - public static final Block PINK_CONCRETE_POWDER = register(new Block("pink_concrete_powder", builder())); - public static final Block GRAY_CONCRETE_POWDER = register(new Block("gray_concrete_powder", builder())); - public static final Block LIGHT_GRAY_CONCRETE_POWDER = register(new Block("light_gray_concrete_powder", builder())); - public static final Block CYAN_CONCRETE_POWDER = register(new Block("cyan_concrete_powder", builder())); - public static final Block PURPLE_CONCRETE_POWDER = register(new Block("purple_concrete_powder", builder())); - public static final Block BLUE_CONCRETE_POWDER = register(new Block("blue_concrete_powder", builder())); - public static final Block BROWN_CONCRETE_POWDER = register(new Block("brown_concrete_powder", builder())); - public static final Block GREEN_CONCRETE_POWDER = register(new Block("green_concrete_powder", builder())); - public static final Block RED_CONCRETE_POWDER = register(new Block("red_concrete_powder", builder())); - public static final Block BLACK_CONCRETE_POWDER = register(new Block("black_concrete_powder", builder())); + public static final Block WHITE_CONCRETE = register(new Block("white_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block ORANGE_CONCRETE = register(new Block("orange_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block MAGENTA_CONCRETE = register(new Block("magenta_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block LIGHT_BLUE_CONCRETE = register(new Block("light_blue_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block YELLOW_CONCRETE = register(new Block("yellow_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block LIME_CONCRETE = register(new Block("lime_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block PINK_CONCRETE = register(new Block("pink_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block GRAY_CONCRETE = register(new Block("gray_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block LIGHT_GRAY_CONCRETE = register(new Block("light_gray_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block CYAN_CONCRETE = register(new Block("cyan_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block PURPLE_CONCRETE = register(new Block("purple_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block BLUE_CONCRETE = register(new Block("blue_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block BROWN_CONCRETE = register(new Block("brown_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block GREEN_CONCRETE = register(new Block("green_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block RED_CONCRETE = register(new Block("red_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block BLACK_CONCRETE = register(new Block("black_concrete", builder().requiresCorrectToolForDrops().destroyTime(1.8f))); + public static final Block WHITE_CONCRETE_POWDER = register(new Block("white_concrete_powder", builder().destroyTime(0.5f))); + public static final Block ORANGE_CONCRETE_POWDER = register(new Block("orange_concrete_powder", builder().destroyTime(0.5f))); + public static final Block MAGENTA_CONCRETE_POWDER = register(new Block("magenta_concrete_powder", builder().destroyTime(0.5f))); + public static final Block LIGHT_BLUE_CONCRETE_POWDER = register(new Block("light_blue_concrete_powder", builder().destroyTime(0.5f))); + public static final Block YELLOW_CONCRETE_POWDER = register(new Block("yellow_concrete_powder", builder().destroyTime(0.5f))); + public static final Block LIME_CONCRETE_POWDER = register(new Block("lime_concrete_powder", builder().destroyTime(0.5f))); + public static final Block PINK_CONCRETE_POWDER = register(new Block("pink_concrete_powder", builder().destroyTime(0.5f))); + public static final Block GRAY_CONCRETE_POWDER = register(new Block("gray_concrete_powder", builder().destroyTime(0.5f))); + public static final Block LIGHT_GRAY_CONCRETE_POWDER = register(new Block("light_gray_concrete_powder", builder().destroyTime(0.5f))); + public static final Block CYAN_CONCRETE_POWDER = register(new Block("cyan_concrete_powder", builder().destroyTime(0.5f))); + public static final Block PURPLE_CONCRETE_POWDER = register(new Block("purple_concrete_powder", builder().destroyTime(0.5f))); + public static final Block BLUE_CONCRETE_POWDER = register(new Block("blue_concrete_powder", builder().destroyTime(0.5f))); + public static final Block BROWN_CONCRETE_POWDER = register(new Block("brown_concrete_powder", builder().destroyTime(0.5f))); + public static final Block GREEN_CONCRETE_POWDER = register(new Block("green_concrete_powder", builder().destroyTime(0.5f))); + public static final Block RED_CONCRETE_POWDER = register(new Block("red_concrete_powder", builder().destroyTime(0.5f))); + public static final Block BLACK_CONCRETE_POWDER = register(new Block("black_concrete_powder", builder().destroyTime(0.5f))); public static final Block KELP = register(new Block("kelp", builder() .intState(AGE_25, 0, 25))); public static final Block KELP_PLANT = register(new Block("kelp_plant", builder())); - public static final Block DRIED_KELP_BLOCK = register(new Block("dried_kelp_block", builder())); - public static final Block TURTLE_EGG = register(new Block("turtle_egg", builder() + public static final Block DRIED_KELP_BLOCK = register(new Block("dried_kelp_block", builder().destroyTime(0.5f))); + public static final Block TURTLE_EGG = register(new Block("turtle_egg", builder().destroyTime(0.5f) .intState(EGGS, 1, 4) .intState(HATCH, 0, 2))); - public static final Block SNIFFER_EGG = register(new Block("sniffer_egg", builder() + public static final Block SNIFFER_EGG = register(new Block("sniffer_egg", builder().destroyTime(0.5f) .intState(HATCH, 0, 2))); - public static final Block DEAD_TUBE_CORAL_BLOCK = register(new Block("dead_tube_coral_block", builder())); - public static final Block DEAD_BRAIN_CORAL_BLOCK = register(new Block("dead_brain_coral_block", builder())); - public static final Block DEAD_BUBBLE_CORAL_BLOCK = register(new Block("dead_bubble_coral_block", builder())); - public static final Block DEAD_FIRE_CORAL_BLOCK = register(new Block("dead_fire_coral_block", builder())); - public static final Block DEAD_HORN_CORAL_BLOCK = register(new Block("dead_horn_coral_block", builder())); - public static final Block TUBE_CORAL_BLOCK = register(new Block("tube_coral_block", builder())); - public static final Block BRAIN_CORAL_BLOCK = register(new Block("brain_coral_block", builder())); - public static final Block BUBBLE_CORAL_BLOCK = register(new Block("bubble_coral_block", builder())); - public static final Block FIRE_CORAL_BLOCK = register(new Block("fire_coral_block", builder())); - public static final Block HORN_CORAL_BLOCK = register(new Block("horn_coral_block", builder())); - public static final Block DEAD_TUBE_CORAL = register(new Block("dead_tube_coral", builder() + public static final Block DEAD_TUBE_CORAL_BLOCK = register(new Block("dead_tube_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DEAD_BRAIN_CORAL_BLOCK = register(new Block("dead_brain_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DEAD_BUBBLE_CORAL_BLOCK = register(new Block("dead_bubble_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DEAD_FIRE_CORAL_BLOCK = register(new Block("dead_fire_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DEAD_HORN_CORAL_BLOCK = register(new Block("dead_horn_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block TUBE_CORAL_BLOCK = register(new Block("tube_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block BRAIN_CORAL_BLOCK = register(new Block("brain_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block BUBBLE_CORAL_BLOCK = register(new Block("bubble_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block FIRE_CORAL_BLOCK = register(new Block("fire_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block HORN_CORAL_BLOCK = register(new Block("horn_coral_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block DEAD_TUBE_CORAL = register(new Block("dead_tube_coral", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_BRAIN_CORAL = register(new Block("dead_brain_coral", builder() + public static final Block DEAD_BRAIN_CORAL = register(new Block("dead_brain_coral", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_BUBBLE_CORAL = register(new Block("dead_bubble_coral", builder() + public static final Block DEAD_BUBBLE_CORAL = register(new Block("dead_bubble_coral", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_FIRE_CORAL = register(new Block("dead_fire_coral", builder() + public static final Block DEAD_FIRE_CORAL = register(new Block("dead_fire_coral", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_HORN_CORAL = register(new Block("dead_horn_coral", builder() + public static final Block DEAD_HORN_CORAL = register(new Block("dead_horn_coral", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); public static final Block TUBE_CORAL = register(new Block("tube_coral", builder() .booleanState(WATERLOGGED))); @@ -1731,15 +1731,15 @@ public final class Blocks { .booleanState(WATERLOGGED))); public static final Block HORN_CORAL = register(new Block("horn_coral", builder() .booleanState(WATERLOGGED))); - public static final Block DEAD_TUBE_CORAL_FAN = register(new Block("dead_tube_coral_fan", builder() + public static final Block DEAD_TUBE_CORAL_FAN = register(new Block("dead_tube_coral_fan", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_BRAIN_CORAL_FAN = register(new Block("dead_brain_coral_fan", builder() + public static final Block DEAD_BRAIN_CORAL_FAN = register(new Block("dead_brain_coral_fan", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_BUBBLE_CORAL_FAN = register(new Block("dead_bubble_coral_fan", builder() + public static final Block DEAD_BUBBLE_CORAL_FAN = register(new Block("dead_bubble_coral_fan", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_FIRE_CORAL_FAN = register(new Block("dead_fire_coral_fan", builder() + public static final Block DEAD_FIRE_CORAL_FAN = register(new Block("dead_fire_coral_fan", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); - public static final Block DEAD_HORN_CORAL_FAN = register(new Block("dead_horn_coral_fan", builder() + public static final Block DEAD_HORN_CORAL_FAN = register(new Block("dead_horn_coral_fan", builder().requiresCorrectToolForDrops() .booleanState(WATERLOGGED))); public static final Block TUBE_CORAL_FAN = register(new Block("tube_coral_fan", builder() .booleanState(WATERLOGGED))); @@ -1751,19 +1751,19 @@ public final class Blocks { .booleanState(WATERLOGGED))); public static final Block HORN_CORAL_FAN = register(new Block("horn_coral_fan", builder() .booleanState(WATERLOGGED))); - public static final Block DEAD_TUBE_CORAL_WALL_FAN = register(new Block("dead_tube_coral_wall_fan", builder() + public static final Block DEAD_TUBE_CORAL_WALL_FAN = register(new Block("dead_tube_coral_wall_fan", builder().requiresCorrectToolForDrops() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block DEAD_BRAIN_CORAL_WALL_FAN = register(new Block("dead_brain_coral_wall_fan", builder() + public static final Block DEAD_BRAIN_CORAL_WALL_FAN = register(new Block("dead_brain_coral_wall_fan", builder().requiresCorrectToolForDrops() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block DEAD_BUBBLE_CORAL_WALL_FAN = register(new Block("dead_bubble_coral_wall_fan", builder() + public static final Block DEAD_BUBBLE_CORAL_WALL_FAN = register(new Block("dead_bubble_coral_wall_fan", builder().requiresCorrectToolForDrops() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block DEAD_FIRE_CORAL_WALL_FAN = register(new Block("dead_fire_coral_wall_fan", builder() + public static final Block DEAD_FIRE_CORAL_WALL_FAN = register(new Block("dead_fire_coral_wall_fan", builder().requiresCorrectToolForDrops() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block DEAD_HORN_CORAL_WALL_FAN = register(new Block("dead_horn_coral_wall_fan", builder() + public static final Block DEAD_HORN_CORAL_WALL_FAN = register(new Block("dead_horn_coral_wall_fan", builder().requiresCorrectToolForDrops() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); public static final Block TUBE_CORAL_WALL_FAN = register(new Block("tube_coral_wall_fan", builder() @@ -1784,11 +1784,11 @@ public final class Blocks { public static final Block SEA_PICKLE = register(new Block("sea_pickle", builder() .intState(PICKLES, 1, 4) .booleanState(WATERLOGGED))); - public static final Block BLUE_ICE = register(new Block("blue_ice", builder())); - public static final Block CONDUIT = register(new Block("conduit", builder() + public static final Block BLUE_ICE = register(new Block("blue_ice", builder().destroyTime(2.8f))); + public static final Block CONDUIT = register(new Block("conduit", builder().setBlockEntity().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block BAMBOO_SAPLING = register(new Block("bamboo_sapling", builder())); - public static final Block BAMBOO = register(new Block("bamboo", builder() + public static final Block BAMBOO_SAPLING = register(new Block("bamboo_sapling", builder().destroyTime(1.0f))); + public static final Block BAMBOO = register(new Block("bamboo", builder().destroyTime(1.0f) .intState(AGE_1, 0, 1) .enumState(BAMBOO_LEAVES, "none", "small", "large") .intState(STAGE, 0, 1))); @@ -1797,200 +1797,200 @@ public final class Blocks { public static final Block CAVE_AIR = register(new Block("cave_air", builder())); public static final Block BUBBLE_COLUMN = register(new Block("bubble_column", builder() .booleanState(DRAG))); - public static final Block POLISHED_GRANITE_STAIRS = register(new Block("polished_granite_stairs", builder() + public static final Block POLISHED_GRANITE_STAIRS = register(new Block("polished_granite_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_RED_SANDSTONE_STAIRS = register(new Block("smooth_red_sandstone_stairs", builder() + public static final Block SMOOTH_RED_SANDSTONE_STAIRS = register(new Block("smooth_red_sandstone_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block MOSSY_STONE_BRICK_STAIRS = register(new Block("mossy_stone_brick_stairs", builder() + public static final Block MOSSY_STONE_BRICK_STAIRS = register(new Block("mossy_stone_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_DIORITE_STAIRS = register(new Block("polished_diorite_stairs", builder() + public static final Block POLISHED_DIORITE_STAIRS = register(new Block("polished_diorite_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block MOSSY_COBBLESTONE_STAIRS = register(new Block("mossy_cobblestone_stairs", builder() + public static final Block MOSSY_COBBLESTONE_STAIRS = register(new Block("mossy_cobblestone_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block END_STONE_BRICK_STAIRS = register(new Block("end_stone_brick_stairs", builder() + public static final Block END_STONE_BRICK_STAIRS = register(new Block("end_stone_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block STONE_STAIRS = register(new Block("stone_stairs", builder() + public static final Block STONE_STAIRS = register(new Block("stone_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_SANDSTONE_STAIRS = register(new Block("smooth_sandstone_stairs", builder() + public static final Block SMOOTH_SANDSTONE_STAIRS = register(new Block("smooth_sandstone_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_QUARTZ_STAIRS = register(new Block("smooth_quartz_stairs", builder() + public static final Block SMOOTH_QUARTZ_STAIRS = register(new Block("smooth_quartz_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block GRANITE_STAIRS = register(new Block("granite_stairs", builder() + public static final Block GRANITE_STAIRS = register(new Block("granite_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block ANDESITE_STAIRS = register(new Block("andesite_stairs", builder() + public static final Block ANDESITE_STAIRS = register(new Block("andesite_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block RED_NETHER_BRICK_STAIRS = register(new Block("red_nether_brick_stairs", builder() + public static final Block RED_NETHER_BRICK_STAIRS = register(new Block("red_nether_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_ANDESITE_STAIRS = register(new Block("polished_andesite_stairs", builder() + public static final Block POLISHED_ANDESITE_STAIRS = register(new Block("polished_andesite_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block DIORITE_STAIRS = register(new Block("diorite_stairs", builder() + public static final Block DIORITE_STAIRS = register(new Block("diorite_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_GRANITE_SLAB = register(new Block("polished_granite_slab", builder() + public static final Block POLISHED_GRANITE_SLAB = register(new Block("polished_granite_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_RED_SANDSTONE_SLAB = register(new Block("smooth_red_sandstone_slab", builder() + public static final Block SMOOTH_RED_SANDSTONE_SLAB = register(new Block("smooth_red_sandstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block MOSSY_STONE_BRICK_SLAB = register(new Block("mossy_stone_brick_slab", builder() + public static final Block MOSSY_STONE_BRICK_SLAB = register(new Block("mossy_stone_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_DIORITE_SLAB = register(new Block("polished_diorite_slab", builder() + public static final Block POLISHED_DIORITE_SLAB = register(new Block("polished_diorite_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block MOSSY_COBBLESTONE_SLAB = register(new Block("mossy_cobblestone_slab", builder() + public static final Block MOSSY_COBBLESTONE_SLAB = register(new Block("mossy_cobblestone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block END_STONE_BRICK_SLAB = register(new Block("end_stone_brick_slab", builder() + public static final Block END_STONE_BRICK_SLAB = register(new Block("end_stone_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_SANDSTONE_SLAB = register(new Block("smooth_sandstone_slab", builder() + public static final Block SMOOTH_SANDSTONE_SLAB = register(new Block("smooth_sandstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block SMOOTH_QUARTZ_SLAB = register(new Block("smooth_quartz_slab", builder() + public static final Block SMOOTH_QUARTZ_SLAB = register(new Block("smooth_quartz_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block GRANITE_SLAB = register(new Block("granite_slab", builder() + public static final Block GRANITE_SLAB = register(new Block("granite_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block ANDESITE_SLAB = register(new Block("andesite_slab", builder() + public static final Block ANDESITE_SLAB = register(new Block("andesite_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block RED_NETHER_BRICK_SLAB = register(new Block("red_nether_brick_slab", builder() + public static final Block RED_NETHER_BRICK_SLAB = register(new Block("red_nether_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_ANDESITE_SLAB = register(new Block("polished_andesite_slab", builder() + public static final Block POLISHED_ANDESITE_SLAB = register(new Block("polished_andesite_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block DIORITE_SLAB = register(new Block("diorite_slab", builder() + public static final Block DIORITE_SLAB = register(new Block("diorite_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block BRICK_WALL = register(new Block("brick_wall", builder() + public static final Block BRICK_WALL = register(new Block("brick_wall", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block PRISMARINE_WALL = register(new Block("prismarine_wall", builder() + public static final Block PRISMARINE_WALL = register(new Block("prismarine_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block RED_SANDSTONE_WALL = register(new Block("red_sandstone_wall", builder() + public static final Block RED_SANDSTONE_WALL = register(new Block("red_sandstone_wall", builder().requiresCorrectToolForDrops().destroyTime(0.8f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block MOSSY_STONE_BRICK_WALL = register(new Block("mossy_stone_brick_wall", builder() + public static final Block MOSSY_STONE_BRICK_WALL = register(new Block("mossy_stone_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block GRANITE_WALL = register(new Block("granite_wall", builder() + public static final Block GRANITE_WALL = register(new Block("granite_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block STONE_BRICK_WALL = register(new Block("stone_brick_wall", builder() + public static final Block STONE_BRICK_WALL = register(new Block("stone_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block MUD_BRICK_WALL = register(new Block("mud_brick_wall", builder() + public static final Block MUD_BRICK_WALL = register(new Block("mud_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block NETHER_BRICK_WALL = register(new Block("nether_brick_wall", builder() + public static final Block NETHER_BRICK_WALL = register(new Block("nether_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block ANDESITE_WALL = register(new Block("andesite_wall", builder() + public static final Block ANDESITE_WALL = register(new Block("andesite_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block RED_NETHER_BRICK_WALL = register(new Block("red_nether_brick_wall", builder() + public static final Block RED_NETHER_BRICK_WALL = register(new Block("red_nether_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block SANDSTONE_WALL = register(new Block("sandstone_wall", builder() + public static final Block SANDSTONE_WALL = register(new Block("sandstone_wall", builder().requiresCorrectToolForDrops().destroyTime(0.8f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block END_STONE_BRICK_WALL = register(new Block("end_stone_brick_wall", builder() + public static final Block END_STONE_BRICK_WALL = register(new Block("end_stone_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block DIORITE_WALL = register(new Block("diorite_wall", builder() + public static final Block DIORITE_WALL = register(new Block("diorite_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") @@ -2001,75 +2001,75 @@ public final class Blocks { .booleanState(BOTTOM) .intState(STABILITY_DISTANCE, 0, 7) .booleanState(WATERLOGGED))); - public static final Block LOOM = register(new Block("loom", builder() + public static final Block LOOM = register(new Block("loom", builder().destroyTime(2.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BARREL = register(new Block("barrel", builder() + public static final Block BARREL = register(new Block("barrel", builder().setBlockEntity().destroyTime(2.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(OPEN))); - public static final Block SMOKER = register(new Block("smoker", builder() + public static final Block SMOKER = register(new Block("smoker", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LIT))); - public static final Block BLAST_FURNACE = register(new Block("blast_furnace", builder() + public static final Block BLAST_FURNACE = register(new Block("blast_furnace", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LIT))); - public static final Block CARTOGRAPHY_TABLE = register(new Block("cartography_table", builder())); - public static final Block FLETCHING_TABLE = register(new Block("fletching_table", builder())); - public static final Block GRINDSTONE = register(new Block("grindstone", builder() + public static final Block CARTOGRAPHY_TABLE = register(new Block("cartography_table", builder().destroyTime(2.5f))); + public static final Block FLETCHING_TABLE = register(new Block("fletching_table", builder().destroyTime(2.5f))); + public static final Block GRINDSTONE = register(new Block("grindstone", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block LECTERN = register(new Block("lectern", builder() + public static final Block LECTERN = register(new Block("lectern", builder().setBlockEntity().destroyTime(2.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(HAS_BOOK) .booleanState(POWERED))); - public static final Block SMITHING_TABLE = register(new Block("smithing_table", builder())); - public static final Block STONECUTTER = register(new Block("stonecutter", builder() + public static final Block SMITHING_TABLE = register(new Block("smithing_table", builder().destroyTime(2.5f))); + public static final Block STONECUTTER = register(new Block("stonecutter", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST))); - public static final Block BELL = register(new Block("bell", builder() + public static final Block BELL = register(new Block("bell", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(5.0f) .enumState(BELL_ATTACHMENT, "floor", "ceiling", "single_wall", "double_wall") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block LANTERN = register(new Block("lantern", builder() + public static final Block LANTERN = register(new Block("lantern", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .booleanState(HANGING) .booleanState(WATERLOGGED))); - public static final Block SOUL_LANTERN = register(new Block("soul_lantern", builder() + public static final Block SOUL_LANTERN = register(new Block("soul_lantern", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .booleanState(HANGING) .booleanState(WATERLOGGED))); - public static final Block CAMPFIRE = register(new Block("campfire", builder() + public static final Block CAMPFIRE = register(new Block("campfire", builder().setBlockEntity().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LIT) .booleanState(SIGNAL_FIRE) .booleanState(WATERLOGGED))); - public static final Block SOUL_CAMPFIRE = register(new Block("soul_campfire", builder() + public static final Block SOUL_CAMPFIRE = register(new Block("soul_campfire", builder().setBlockEntity().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(LIT) .booleanState(SIGNAL_FIRE) .booleanState(WATERLOGGED))); public static final Block SWEET_BERRY_BUSH = register(new Block("sweet_berry_bush", builder() .intState(AGE_3, 0, 3))); - public static final Block WARPED_STEM = register(new Block("warped_stem", builder() + public static final Block WARPED_STEM = register(new Block("warped_stem", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_WARPED_STEM = register(new Block("stripped_warped_stem", builder() + public static final Block STRIPPED_WARPED_STEM = register(new Block("stripped_warped_stem", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block WARPED_HYPHAE = register(new Block("warped_hyphae", builder() + public static final Block WARPED_HYPHAE = register(new Block("warped_hyphae", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_WARPED_HYPHAE = register(new Block("stripped_warped_hyphae", builder() + public static final Block STRIPPED_WARPED_HYPHAE = register(new Block("stripped_warped_hyphae", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block WARPED_NYLIUM = register(new Block("warped_nylium", builder())); + public static final Block WARPED_NYLIUM = register(new Block("warped_nylium", builder().requiresCorrectToolForDrops().destroyTime(0.4f))); public static final Block WARPED_FUNGUS = register(new Block("warped_fungus", builder())); - public static final Block WARPED_WART_BLOCK = register(new Block("warped_wart_block", builder())); + public static final Block WARPED_WART_BLOCK = register(new Block("warped_wart_block", builder().destroyTime(1.0f))); public static final Block WARPED_ROOTS = register(new Block("warped_roots", builder())); public static final Block NETHER_SPROUTS = register(new Block("nether_sprouts", builder())); - public static final Block CRIMSON_STEM = register(new Block("crimson_stem", builder() + public static final Block CRIMSON_STEM = register(new Block("crimson_stem", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_CRIMSON_STEM = register(new Block("stripped_crimson_stem", builder() + public static final Block STRIPPED_CRIMSON_STEM = register(new Block("stripped_crimson_stem", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block CRIMSON_HYPHAE = register(new Block("crimson_hyphae", builder() + public static final Block CRIMSON_HYPHAE = register(new Block("crimson_hyphae", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block STRIPPED_CRIMSON_HYPHAE = register(new Block("stripped_crimson_hyphae", builder() + public static final Block STRIPPED_CRIMSON_HYPHAE = register(new Block("stripped_crimson_hyphae", builder().destroyTime(2.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block CRIMSON_NYLIUM = register(new Block("crimson_nylium", builder())); + public static final Block CRIMSON_NYLIUM = register(new Block("crimson_nylium", builder().requiresCorrectToolForDrops().destroyTime(0.4f))); public static final Block CRIMSON_FUNGUS = register(new Block("crimson_fungus", builder())); - public static final Block SHROOMLIGHT = register(new Block("shroomlight", builder())); + public static final Block SHROOMLIGHT = register(new Block("shroomlight", builder().destroyTime(1.0f))); public static final Block WEEPING_VINES = register(new Block("weeping_vines", builder() .intState(AGE_25, 0, 25))); public static final Block WEEPING_VINES_PLANT = register(new Block("weeping_vines_plant", builder())); @@ -2077,360 +2077,360 @@ public final class Blocks { .intState(AGE_25, 0, 25))); public static final Block TWISTING_VINES_PLANT = register(new Block("twisting_vines_plant", builder())); public static final Block CRIMSON_ROOTS = register(new Block("crimson_roots", builder())); - public static final Block CRIMSON_PLANKS = register(new Block("crimson_planks", builder())); - public static final Block WARPED_PLANKS = register(new Block("warped_planks", builder())); - public static final Block CRIMSON_SLAB = register(new Block("crimson_slab", builder() + public static final Block CRIMSON_PLANKS = register(new Block("crimson_planks", builder().destroyTime(2.0f))); + public static final Block WARPED_PLANKS = register(new Block("warped_planks", builder().destroyTime(2.0f))); + public static final Block CRIMSON_SLAB = register(new Block("crimson_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block WARPED_SLAB = register(new Block("warped_slab", builder() + public static final Block WARPED_SLAB = register(new Block("warped_slab", builder().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block CRIMSON_PRESSURE_PLATE = register(new Block("crimson_pressure_plate", builder() + public static final Block CRIMSON_PRESSURE_PLATE = register(new Block("crimson_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block WARPED_PRESSURE_PLATE = register(new Block("warped_pressure_plate", builder() + public static final Block WARPED_PRESSURE_PLATE = register(new Block("warped_pressure_plate", builder().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block CRIMSON_FENCE = register(new Block("crimson_fence", builder() + public static final Block CRIMSON_FENCE = register(new Block("crimson_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block WARPED_FENCE = register(new Block("warped_fence", builder() + public static final Block WARPED_FENCE = register(new Block("warped_fence", builder().destroyTime(2.0f) .booleanState(EAST) .booleanState(NORTH) .booleanState(SOUTH) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block CRIMSON_TRAPDOOR = register(new Block("crimson_trapdoor", builder() + public static final Block CRIMSON_TRAPDOOR = register(new Block("crimson_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block WARPED_TRAPDOOR = register(new Block("warped_trapdoor", builder() + public static final Block WARPED_TRAPDOOR = register(new Block("warped_trapdoor", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block CRIMSON_FENCE_GATE = register(new Block("crimson_fence_gate", builder() + public static final Block CRIMSON_FENCE_GATE = register(new Block("crimson_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WARPED_FENCE_GATE = register(new Block("warped_fence_gate", builder() + public static final Block WARPED_FENCE_GATE = register(new Block("warped_fence_gate", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(IN_WALL) .booleanState(OPEN) .booleanState(POWERED))); - public static final Block CRIMSON_STAIRS = register(new Block("crimson_stairs", builder() + public static final Block CRIMSON_STAIRS = register(new Block("crimson_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block WARPED_STAIRS = register(new Block("warped_stairs", builder() + public static final Block WARPED_STAIRS = register(new Block("warped_stairs", builder().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block CRIMSON_BUTTON = register(new Block("crimson_button", builder() + public static final Block CRIMSON_BUTTON = register(new Block("crimson_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block WARPED_BUTTON = register(new Block("warped_button", builder() + public static final Block WARPED_BUTTON = register(new Block("warped_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block CRIMSON_DOOR = register(new Block("crimson_door", builder() + public static final Block CRIMSON_DOOR = register(new Block("crimson_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WARPED_DOOR = register(new Block("warped_door", builder() + public static final Block WARPED_DOOR = register(new Block("warped_door", builder().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block CRIMSON_SIGN = register(new Block("crimson_sign", builder() + public static final Block CRIMSON_SIGN = register(new Block("crimson_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block WARPED_SIGN = register(new Block("warped_sign", builder() + public static final Block WARPED_SIGN = register(new Block("warped_sign", builder().setBlockEntity().destroyTime(1.0f) .intState(ROTATION_16, 0, 15) .booleanState(WATERLOGGED))); - public static final Block CRIMSON_WALL_SIGN = register(new Block("crimson_wall_sign", builder() + public static final Block CRIMSON_WALL_SIGN = register(new Block("crimson_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block WARPED_WALL_SIGN = register(new Block("warped_wall_sign", builder() + public static final Block WARPED_WALL_SIGN = register(new Block("warped_wall_sign", builder().setBlockEntity().destroyTime(1.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block STRUCTURE_BLOCK = register(new Block("structure_block", builder() + public static final Block STRUCTURE_BLOCK = register(new Block("structure_block", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(-1.0f) .enumState(STRUCTUREBLOCK_MODE, "save", "load", "corner", "data"))); - public static final Block JIGSAW = register(new Block("jigsaw", builder() + public static final Block JIGSAW = register(new Block("jigsaw", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(-1.0f) .enumState(ORIENTATION, "down_east", "down_north", "down_south", "down_west", "up_east", "up_north", "up_south", "up_west", "west_up", "east_up", "north_up", "south_up"))); - public static final Block COMPOSTER = register(new Block("composter", builder() + public static final Block COMPOSTER = register(new Block("composter", builder().destroyTime(0.6f) .intState(LEVEL_COMPOSTER, 0, 8))); - public static final Block TARGET = register(new Block("target", builder() + public static final Block TARGET = register(new Block("target", builder().destroyTime(0.5f) .intState(POWER, 0, 15))); - public static final Block BEE_NEST = register(new Block("bee_nest", builder() + public static final Block BEE_NEST = register(new Block("bee_nest", builder().setBlockEntity().destroyTime(0.3f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .intState(LEVEL_HONEY, 0, 5))); - public static final Block BEEHIVE = register(new Block("beehive", builder() + public static final Block BEEHIVE = register(new Block("beehive", builder().setBlockEntity().destroyTime(0.6f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .intState(LEVEL_HONEY, 0, 5))); public static final Block HONEY_BLOCK = register(new Block("honey_block", builder())); - public static final Block HONEYCOMB_BLOCK = register(new Block("honeycomb_block", builder())); - public static final Block NETHERITE_BLOCK = register(new Block("netherite_block", builder())); - public static final Block ANCIENT_DEBRIS = register(new Block("ancient_debris", builder())); - public static final Block CRYING_OBSIDIAN = register(new Block("crying_obsidian", builder())); - public static final Block RESPAWN_ANCHOR = register(new Block("respawn_anchor", builder() + public static final Block HONEYCOMB_BLOCK = register(new Block("honeycomb_block", builder().destroyTime(0.6f))); + public static final Block NETHERITE_BLOCK = register(new Block("netherite_block", builder().requiresCorrectToolForDrops().destroyTime(50.0f))); + public static final Block ANCIENT_DEBRIS = register(new Block("ancient_debris", builder().requiresCorrectToolForDrops().destroyTime(30.0f))); + public static final Block CRYING_OBSIDIAN = register(new Block("crying_obsidian", builder().requiresCorrectToolForDrops().destroyTime(50.0f))); + public static final Block RESPAWN_ANCHOR = register(new Block("respawn_anchor", builder().requiresCorrectToolForDrops().destroyTime(50.0f) .intState(RESPAWN_ANCHOR_CHARGES, 0, 4))); public static final Block POTTED_CRIMSON_FUNGUS = register(new Block("potted_crimson_fungus", builder())); public static final Block POTTED_WARPED_FUNGUS = register(new Block("potted_warped_fungus", builder())); public static final Block POTTED_CRIMSON_ROOTS = register(new Block("potted_crimson_roots", builder())); public static final Block POTTED_WARPED_ROOTS = register(new Block("potted_warped_roots", builder())); - public static final Block LODESTONE = register(new Block("lodestone", builder())); - public static final Block BLACKSTONE = register(new Block("blackstone", builder())); - public static final Block BLACKSTONE_STAIRS = register(new Block("blackstone_stairs", builder() + public static final Block LODESTONE = register(new Block("lodestone", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block BLACKSTONE = register(new Block("blackstone", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block BLACKSTONE_STAIRS = register(new Block("blackstone_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block BLACKSTONE_WALL = register(new Block("blackstone_wall", builder() + public static final Block BLACKSTONE_WALL = register(new Block("blackstone_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block BLACKSTONE_SLAB = register(new Block("blackstone_slab", builder() + public static final Block BLACKSTONE_SLAB = register(new Block("blackstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_BLACKSTONE = register(new Block("polished_blackstone", builder())); - public static final Block POLISHED_BLACKSTONE_BRICKS = register(new Block("polished_blackstone_bricks", builder())); - public static final Block CRACKED_POLISHED_BLACKSTONE_BRICKS = register(new Block("cracked_polished_blackstone_bricks", builder())); - public static final Block CHISELED_POLISHED_BLACKSTONE = register(new Block("chiseled_polished_blackstone", builder())); - public static final Block POLISHED_BLACKSTONE_BRICK_SLAB = register(new Block("polished_blackstone_brick_slab", builder() + public static final Block POLISHED_BLACKSTONE = register(new Block("polished_blackstone", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block POLISHED_BLACKSTONE_BRICKS = register(new Block("polished_blackstone_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block CRACKED_POLISHED_BLACKSTONE_BRICKS = register(new Block("cracked_polished_blackstone_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block CHISELED_POLISHED_BLACKSTONE = register(new Block("chiseled_polished_blackstone", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block POLISHED_BLACKSTONE_BRICK_SLAB = register(new Block("polished_blackstone_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_BLACKSTONE_BRICK_STAIRS = register(new Block("polished_blackstone_brick_stairs", builder() + public static final Block POLISHED_BLACKSTONE_BRICK_STAIRS = register(new Block("polished_blackstone_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_BLACKSTONE_BRICK_WALL = register(new Block("polished_blackstone_brick_wall", builder() + public static final Block POLISHED_BLACKSTONE_BRICK_WALL = register(new Block("polished_blackstone_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block GILDED_BLACKSTONE = register(new Block("gilded_blackstone", builder())); - public static final Block POLISHED_BLACKSTONE_STAIRS = register(new Block("polished_blackstone_stairs", builder() + public static final Block GILDED_BLACKSTONE = register(new Block("gilded_blackstone", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block POLISHED_BLACKSTONE_STAIRS = register(new Block("polished_blackstone_stairs", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_BLACKSTONE_SLAB = register(new Block("polished_blackstone_slab", builder() + public static final Block POLISHED_BLACKSTONE_SLAB = register(new Block("polished_blackstone_slab", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_BLACKSTONE_PRESSURE_PLATE = register(new Block("polished_blackstone_pressure_plate", builder() + public static final Block POLISHED_BLACKSTONE_PRESSURE_PLATE = register(new Block("polished_blackstone_pressure_plate", builder().requiresCorrectToolForDrops().destroyTime(0.5f) .booleanState(POWERED))); - public static final Block POLISHED_BLACKSTONE_BUTTON = register(new Block("polished_blackstone_button", builder() + public static final Block POLISHED_BLACKSTONE_BUTTON = register(new Block("polished_blackstone_button", builder().destroyTime(0.5f) .enumState(ATTACH_FACE, "floor", "wall", "ceiling") .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(POWERED))); - public static final Block POLISHED_BLACKSTONE_WALL = register(new Block("polished_blackstone_wall", builder() + public static final Block POLISHED_BLACKSTONE_WALL = register(new Block("polished_blackstone_wall", builder().requiresCorrectToolForDrops().destroyTime(2.0f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block CHISELED_NETHER_BRICKS = register(new Block("chiseled_nether_bricks", builder())); - public static final Block CRACKED_NETHER_BRICKS = register(new Block("cracked_nether_bricks", builder())); - public static final Block QUARTZ_BRICKS = register(new Block("quartz_bricks", builder())); - public static final Block CANDLE = register(new Block("candle", builder() + public static final Block CHISELED_NETHER_BRICKS = register(new Block("chiseled_nether_bricks", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block CRACKED_NETHER_BRICKS = register(new Block("cracked_nether_bricks", builder().requiresCorrectToolForDrops().destroyTime(2.0f))); + public static final Block QUARTZ_BRICKS = register(new Block("quartz_bricks", builder().requiresCorrectToolForDrops().destroyTime(0.8f))); + public static final Block CANDLE = register(new Block("candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block WHITE_CANDLE = register(new Block("white_candle", builder() + public static final Block WHITE_CANDLE = register(new Block("white_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block ORANGE_CANDLE = register(new Block("orange_candle", builder() + public static final Block ORANGE_CANDLE = register(new Block("orange_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block MAGENTA_CANDLE = register(new Block("magenta_candle", builder() + public static final Block MAGENTA_CANDLE = register(new Block("magenta_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block LIGHT_BLUE_CANDLE = register(new Block("light_blue_candle", builder() + public static final Block LIGHT_BLUE_CANDLE = register(new Block("light_blue_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block YELLOW_CANDLE = register(new Block("yellow_candle", builder() + public static final Block YELLOW_CANDLE = register(new Block("yellow_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block LIME_CANDLE = register(new Block("lime_candle", builder() + public static final Block LIME_CANDLE = register(new Block("lime_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block PINK_CANDLE = register(new Block("pink_candle", builder() + public static final Block PINK_CANDLE = register(new Block("pink_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block GRAY_CANDLE = register(new Block("gray_candle", builder() + public static final Block GRAY_CANDLE = register(new Block("gray_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block LIGHT_GRAY_CANDLE = register(new Block("light_gray_candle", builder() + public static final Block LIGHT_GRAY_CANDLE = register(new Block("light_gray_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block CYAN_CANDLE = register(new Block("cyan_candle", builder() + public static final Block CYAN_CANDLE = register(new Block("cyan_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block PURPLE_CANDLE = register(new Block("purple_candle", builder() + public static final Block PURPLE_CANDLE = register(new Block("purple_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block BLUE_CANDLE = register(new Block("blue_candle", builder() + public static final Block BLUE_CANDLE = register(new Block("blue_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block BROWN_CANDLE = register(new Block("brown_candle", builder() + public static final Block BROWN_CANDLE = register(new Block("brown_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block GREEN_CANDLE = register(new Block("green_candle", builder() + public static final Block GREEN_CANDLE = register(new Block("green_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block RED_CANDLE = register(new Block("red_candle", builder() + public static final Block RED_CANDLE = register(new Block("red_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block BLACK_CANDLE = register(new Block("black_candle", builder() + public static final Block BLACK_CANDLE = register(new Block("black_candle", builder().destroyTime(0.1f) .intState(CANDLES, 1, 4) .booleanState(LIT) .booleanState(WATERLOGGED))); - public static final Block CANDLE_CAKE = register(new Block("candle_cake", builder() + public static final Block CANDLE_CAKE = register(new Block("candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block WHITE_CANDLE_CAKE = register(new Block("white_candle_cake", builder() + public static final Block WHITE_CANDLE_CAKE = register(new Block("white_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block ORANGE_CANDLE_CAKE = register(new Block("orange_candle_cake", builder() + public static final Block ORANGE_CANDLE_CAKE = register(new Block("orange_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block MAGENTA_CANDLE_CAKE = register(new Block("magenta_candle_cake", builder() + public static final Block MAGENTA_CANDLE_CAKE = register(new Block("magenta_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block LIGHT_BLUE_CANDLE_CAKE = register(new Block("light_blue_candle_cake", builder() + public static final Block LIGHT_BLUE_CANDLE_CAKE = register(new Block("light_blue_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block YELLOW_CANDLE_CAKE = register(new Block("yellow_candle_cake", builder() + public static final Block YELLOW_CANDLE_CAKE = register(new Block("yellow_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block LIME_CANDLE_CAKE = register(new Block("lime_candle_cake", builder() + public static final Block LIME_CANDLE_CAKE = register(new Block("lime_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block PINK_CANDLE_CAKE = register(new Block("pink_candle_cake", builder() + public static final Block PINK_CANDLE_CAKE = register(new Block("pink_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block GRAY_CANDLE_CAKE = register(new Block("gray_candle_cake", builder() + public static final Block GRAY_CANDLE_CAKE = register(new Block("gray_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block LIGHT_GRAY_CANDLE_CAKE = register(new Block("light_gray_candle_cake", builder() + public static final Block LIGHT_GRAY_CANDLE_CAKE = register(new Block("light_gray_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block CYAN_CANDLE_CAKE = register(new Block("cyan_candle_cake", builder() + public static final Block CYAN_CANDLE_CAKE = register(new Block("cyan_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block PURPLE_CANDLE_CAKE = register(new Block("purple_candle_cake", builder() + public static final Block PURPLE_CANDLE_CAKE = register(new Block("purple_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block BLUE_CANDLE_CAKE = register(new Block("blue_candle_cake", builder() + public static final Block BLUE_CANDLE_CAKE = register(new Block("blue_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block BROWN_CANDLE_CAKE = register(new Block("brown_candle_cake", builder() + public static final Block BROWN_CANDLE_CAKE = register(new Block("brown_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block GREEN_CANDLE_CAKE = register(new Block("green_candle_cake", builder() + public static final Block GREEN_CANDLE_CAKE = register(new Block("green_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block RED_CANDLE_CAKE = register(new Block("red_candle_cake", builder() + public static final Block RED_CANDLE_CAKE = register(new Block("red_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block BLACK_CANDLE_CAKE = register(new Block("black_candle_cake", builder() + public static final Block BLACK_CANDLE_CAKE = register(new Block("black_candle_cake", builder().destroyTime(0.5f) .booleanState(LIT))); - public static final Block AMETHYST_BLOCK = register(new Block("amethyst_block", builder())); - public static final Block BUDDING_AMETHYST = register(new Block("budding_amethyst", builder())); - public static final Block AMETHYST_CLUSTER = register(new Block("amethyst_cluster", builder() + public static final Block AMETHYST_BLOCK = register(new Block("amethyst_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block BUDDING_AMETHYST = register(new Block("budding_amethyst", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block AMETHYST_CLUSTER = register(new Block("amethyst_cluster", builder().destroyTime(1.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(WATERLOGGED))); - public static final Block LARGE_AMETHYST_BUD = register(new Block("large_amethyst_bud", builder() + public static final Block LARGE_AMETHYST_BUD = register(new Block("large_amethyst_bud", builder().destroyTime(1.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(WATERLOGGED))); - public static final Block MEDIUM_AMETHYST_BUD = register(new Block("medium_amethyst_bud", builder() + public static final Block MEDIUM_AMETHYST_BUD = register(new Block("medium_amethyst_bud", builder().destroyTime(1.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(WATERLOGGED))); - public static final Block SMALL_AMETHYST_BUD = register(new Block("small_amethyst_bud", builder() + public static final Block SMALL_AMETHYST_BUD = register(new Block("small_amethyst_bud", builder().destroyTime(1.5f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(WATERLOGGED))); - public static final Block TUFF = register(new Block("tuff", builder())); - public static final Block TUFF_SLAB = register(new Block("tuff_slab", builder() + public static final Block TUFF = register(new Block("tuff", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block TUFF_SLAB = register(new Block("tuff_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block TUFF_STAIRS = register(new Block("tuff_stairs", builder() + public static final Block TUFF_STAIRS = register(new Block("tuff_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block TUFF_WALL = register(new Block("tuff_wall", builder() + public static final Block TUFF_WALL = register(new Block("tuff_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block POLISHED_TUFF = register(new Block("polished_tuff", builder())); - public static final Block POLISHED_TUFF_SLAB = register(new Block("polished_tuff_slab", builder() + public static final Block POLISHED_TUFF = register(new Block("polished_tuff", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block POLISHED_TUFF_SLAB = register(new Block("polished_tuff_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_TUFF_STAIRS = register(new Block("polished_tuff_stairs", builder() + public static final Block POLISHED_TUFF_STAIRS = register(new Block("polished_tuff_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_TUFF_WALL = register(new Block("polished_tuff_wall", builder() + public static final Block POLISHED_TUFF_WALL = register(new Block("polished_tuff_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block CHISELED_TUFF = register(new Block("chiseled_tuff", builder())); - public static final Block TUFF_BRICKS = register(new Block("tuff_bricks", builder())); - public static final Block TUFF_BRICK_SLAB = register(new Block("tuff_brick_slab", builder() + public static final Block CHISELED_TUFF = register(new Block("chiseled_tuff", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block TUFF_BRICKS = register(new Block("tuff_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block TUFF_BRICK_SLAB = register(new Block("tuff_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block TUFF_BRICK_STAIRS = register(new Block("tuff_brick_stairs", builder() + public static final Block TUFF_BRICK_STAIRS = register(new Block("tuff_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block TUFF_BRICK_WALL = register(new Block("tuff_brick_wall", builder() + public static final Block TUFF_BRICK_WALL = register(new Block("tuff_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(1.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block CHISELED_TUFF_BRICKS = register(new Block("chiseled_tuff_bricks", builder())); - public static final Block CALCITE = register(new Block("calcite", builder())); - public static final Block TINTED_GLASS = register(new Block("tinted_glass", builder())); - public static final Block POWDER_SNOW = register(new Block("powder_snow", builder())); - public static final Block SCULK_SENSOR = register(new Block("sculk_sensor", builder() + public static final Block CHISELED_TUFF_BRICKS = register(new Block("chiseled_tuff_bricks", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); + public static final Block CALCITE = register(new Block("calcite", builder().requiresCorrectToolForDrops().destroyTime(0.75f))); + public static final Block TINTED_GLASS = register(new Block("tinted_glass", builder().destroyTime(0.3f))); + public static final Block POWDER_SNOW = register(new Block("powder_snow", builder().destroyTime(0.25f))); + public static final Block SCULK_SENSOR = register(new Block("sculk_sensor", builder().setBlockEntity().destroyTime(1.5f) .intState(POWER, 0, 15) .enumState(SCULK_SENSOR_PHASE, "inactive", "active", "cooldown") .booleanState(WATERLOGGED))); - public static final Block CALIBRATED_SCULK_SENSOR = register(new Block("calibrated_sculk_sensor", builder() + public static final Block CALIBRATED_SCULK_SENSOR = register(new Block("calibrated_sculk_sensor", builder().setBlockEntity().destroyTime(1.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .intState(POWER, 0, 15) .enumState(SCULK_SENSOR_PHASE, "inactive", "active", "cooldown") .booleanState(WATERLOGGED))); - public static final Block SCULK = register(new Block("sculk", builder())); - public static final Block SCULK_VEIN = register(new Block("sculk_vein", builder() + public static final Block SCULK = register(new Block("sculk", builder().destroyTime(0.2f))); + public static final Block SCULK_VEIN = register(new Block("sculk_vein", builder().destroyTime(0.2f) .booleanState(DOWN) .booleanState(EAST) .booleanState(NORTH) @@ -2438,247 +2438,247 @@ public final class Blocks { .booleanState(UP) .booleanState(WATERLOGGED) .booleanState(WEST))); - public static final Block SCULK_CATALYST = register(new Block("sculk_catalyst", builder() + public static final Block SCULK_CATALYST = register(new Block("sculk_catalyst", builder().setBlockEntity().destroyTime(3.0f) .booleanState(BLOOM))); - public static final Block SCULK_SHRIEKER = register(new Block("sculk_shrieker", builder() + public static final Block SCULK_SHRIEKER = register(new Block("sculk_shrieker", builder().setBlockEntity().destroyTime(3.0f) .booleanState(CAN_SUMMON) .booleanState(SHRIEKING) .booleanState(WATERLOGGED))); - public static final Block COPPER_BLOCK = register(new Block("copper_block", builder())); - public static final Block EXPOSED_COPPER = register(new Block("exposed_copper", builder())); - public static final Block WEATHERED_COPPER = register(new Block("weathered_copper", builder())); - public static final Block OXIDIZED_COPPER = register(new Block("oxidized_copper", builder())); - public static final Block COPPER_ORE = register(new Block("copper_ore", builder())); - public static final Block DEEPSLATE_COPPER_ORE = register(new Block("deepslate_copper_ore", builder())); - public static final Block OXIDIZED_CUT_COPPER = register(new Block("oxidized_cut_copper", builder())); - public static final Block WEATHERED_CUT_COPPER = register(new Block("weathered_cut_copper", builder())); - public static final Block EXPOSED_CUT_COPPER = register(new Block("exposed_cut_copper", builder())); - public static final Block CUT_COPPER = register(new Block("cut_copper", builder())); - public static final Block OXIDIZED_CHISELED_COPPER = register(new Block("oxidized_chiseled_copper", builder())); - public static final Block WEATHERED_CHISELED_COPPER = register(new Block("weathered_chiseled_copper", builder())); - public static final Block EXPOSED_CHISELED_COPPER = register(new Block("exposed_chiseled_copper", builder())); - public static final Block CHISELED_COPPER = register(new Block("chiseled_copper", builder())); - public static final Block WAXED_OXIDIZED_CHISELED_COPPER = register(new Block("waxed_oxidized_chiseled_copper", builder())); - public static final Block WAXED_WEATHERED_CHISELED_COPPER = register(new Block("waxed_weathered_chiseled_copper", builder())); - public static final Block WAXED_EXPOSED_CHISELED_COPPER = register(new Block("waxed_exposed_chiseled_copper", builder())); - public static final Block WAXED_CHISELED_COPPER = register(new Block("waxed_chiseled_copper", builder())); - public static final Block OXIDIZED_CUT_COPPER_STAIRS = register(new Block("oxidized_cut_copper_stairs", builder() + public static final Block COPPER_BLOCK = register(new Block("copper_block", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block EXPOSED_COPPER = register(new Block("exposed_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WEATHERED_COPPER = register(new Block("weathered_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block OXIDIZED_COPPER = register(new Block("oxidized_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block COPPER_ORE = register(new Block("copper_ore", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block DEEPSLATE_COPPER_ORE = register(new Block("deepslate_copper_ore", builder().requiresCorrectToolForDrops().destroyTime(4.5f))); + public static final Block OXIDIZED_CUT_COPPER = register(new Block("oxidized_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WEATHERED_CUT_COPPER = register(new Block("weathered_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block EXPOSED_CUT_COPPER = register(new Block("exposed_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block CUT_COPPER = register(new Block("cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block OXIDIZED_CHISELED_COPPER = register(new Block("oxidized_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WEATHERED_CHISELED_COPPER = register(new Block("weathered_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block EXPOSED_CHISELED_COPPER = register(new Block("exposed_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block CHISELED_COPPER = register(new Block("chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_OXIDIZED_CHISELED_COPPER = register(new Block("waxed_oxidized_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_WEATHERED_CHISELED_COPPER = register(new Block("waxed_weathered_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_EXPOSED_CHISELED_COPPER = register(new Block("waxed_exposed_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_CHISELED_COPPER = register(new Block("waxed_chiseled_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block OXIDIZED_CUT_COPPER_STAIRS = register(new Block("oxidized_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block WEATHERED_CUT_COPPER_STAIRS = register(new Block("weathered_cut_copper_stairs", builder() + public static final Block WEATHERED_CUT_COPPER_STAIRS = register(new Block("weathered_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block EXPOSED_CUT_COPPER_STAIRS = register(new Block("exposed_cut_copper_stairs", builder() + public static final Block EXPOSED_CUT_COPPER_STAIRS = register(new Block("exposed_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block CUT_COPPER_STAIRS = register(new Block("cut_copper_stairs", builder() + public static final Block CUT_COPPER_STAIRS = register(new Block("cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block OXIDIZED_CUT_COPPER_SLAB = register(new Block("oxidized_cut_copper_slab", builder() + public static final Block OXIDIZED_CUT_COPPER_SLAB = register(new Block("oxidized_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block WEATHERED_CUT_COPPER_SLAB = register(new Block("weathered_cut_copper_slab", builder() + public static final Block WEATHERED_CUT_COPPER_SLAB = register(new Block("weathered_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block EXPOSED_CUT_COPPER_SLAB = register(new Block("exposed_cut_copper_slab", builder() + public static final Block EXPOSED_CUT_COPPER_SLAB = register(new Block("exposed_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block CUT_COPPER_SLAB = register(new Block("cut_copper_slab", builder() + public static final Block CUT_COPPER_SLAB = register(new Block("cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block WAXED_COPPER_BLOCK = register(new Block("waxed_copper_block", builder())); - public static final Block WAXED_WEATHERED_COPPER = register(new Block("waxed_weathered_copper", builder())); - public static final Block WAXED_EXPOSED_COPPER = register(new Block("waxed_exposed_copper", builder())); - public static final Block WAXED_OXIDIZED_COPPER = register(new Block("waxed_oxidized_copper", builder())); - public static final Block WAXED_OXIDIZED_CUT_COPPER = register(new Block("waxed_oxidized_cut_copper", builder())); - public static final Block WAXED_WEATHERED_CUT_COPPER = register(new Block("waxed_weathered_cut_copper", builder())); - public static final Block WAXED_EXPOSED_CUT_COPPER = register(new Block("waxed_exposed_cut_copper", builder())); - public static final Block WAXED_CUT_COPPER = register(new Block("waxed_cut_copper", builder())); - public static final Block WAXED_OXIDIZED_CUT_COPPER_STAIRS = register(new Block("waxed_oxidized_cut_copper_stairs", builder() + public static final Block WAXED_COPPER_BLOCK = register(new Block("waxed_copper_block", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_WEATHERED_COPPER = register(new Block("waxed_weathered_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_EXPOSED_COPPER = register(new Block("waxed_exposed_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_OXIDIZED_COPPER = register(new Block("waxed_oxidized_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_OXIDIZED_CUT_COPPER = register(new Block("waxed_oxidized_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_WEATHERED_CUT_COPPER = register(new Block("waxed_weathered_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_EXPOSED_CUT_COPPER = register(new Block("waxed_exposed_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_CUT_COPPER = register(new Block("waxed_cut_copper", builder().requiresCorrectToolForDrops().destroyTime(3.0f))); + public static final Block WAXED_OXIDIZED_CUT_COPPER_STAIRS = register(new Block("waxed_oxidized_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block WAXED_WEATHERED_CUT_COPPER_STAIRS = register(new Block("waxed_weathered_cut_copper_stairs", builder() + public static final Block WAXED_WEATHERED_CUT_COPPER_STAIRS = register(new Block("waxed_weathered_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block WAXED_EXPOSED_CUT_COPPER_STAIRS = register(new Block("waxed_exposed_cut_copper_stairs", builder() + public static final Block WAXED_EXPOSED_CUT_COPPER_STAIRS = register(new Block("waxed_exposed_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block WAXED_CUT_COPPER_STAIRS = register(new Block("waxed_cut_copper_stairs", builder() + public static final Block WAXED_CUT_COPPER_STAIRS = register(new Block("waxed_cut_copper_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block WAXED_OXIDIZED_CUT_COPPER_SLAB = register(new Block("waxed_oxidized_cut_copper_slab", builder() + public static final Block WAXED_OXIDIZED_CUT_COPPER_SLAB = register(new Block("waxed_oxidized_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block WAXED_WEATHERED_CUT_COPPER_SLAB = register(new Block("waxed_weathered_cut_copper_slab", builder() + public static final Block WAXED_WEATHERED_CUT_COPPER_SLAB = register(new Block("waxed_weathered_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block WAXED_EXPOSED_CUT_COPPER_SLAB = register(new Block("waxed_exposed_cut_copper_slab", builder() + public static final Block WAXED_EXPOSED_CUT_COPPER_SLAB = register(new Block("waxed_exposed_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block WAXED_CUT_COPPER_SLAB = register(new Block("waxed_cut_copper_slab", builder() + public static final Block WAXED_CUT_COPPER_SLAB = register(new Block("waxed_cut_copper_slab", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block COPPER_DOOR = register(new Block("copper_door", builder() + public static final Block COPPER_DOOR = register(new Block("copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block EXPOSED_COPPER_DOOR = register(new Block("exposed_copper_door", builder() + public static final Block EXPOSED_COPPER_DOOR = register(new Block("exposed_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block OXIDIZED_COPPER_DOOR = register(new Block("oxidized_copper_door", builder() + public static final Block OXIDIZED_COPPER_DOOR = register(new Block("oxidized_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WEATHERED_COPPER_DOOR = register(new Block("weathered_copper_door", builder() + public static final Block WEATHERED_COPPER_DOOR = register(new Block("weathered_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WAXED_COPPER_DOOR = register(new Block("waxed_copper_door", builder() + public static final Block WAXED_COPPER_DOOR = register(new Block("waxed_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WAXED_EXPOSED_COPPER_DOOR = register(new Block("waxed_exposed_copper_door", builder() + public static final Block WAXED_EXPOSED_COPPER_DOOR = register(new Block("waxed_exposed_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WAXED_OXIDIZED_COPPER_DOOR = register(new Block("waxed_oxidized_copper_door", builder() + public static final Block WAXED_OXIDIZED_COPPER_DOOR = register(new Block("waxed_oxidized_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block WAXED_WEATHERED_COPPER_DOOR = register(new Block("waxed_weathered_copper_door", builder() + public static final Block WAXED_WEATHERED_COPPER_DOOR = register(new Block("waxed_weathered_copper_door", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(DOUBLE_BLOCK_HALF, "upper", "lower") .enumState(DOOR_HINGE, "left", "right") .booleanState(OPEN) .booleanState(POWERED))); - public static final Block COPPER_TRAPDOOR = register(new Block("copper_trapdoor", builder() + public static final Block COPPER_TRAPDOOR = register(new Block("copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block EXPOSED_COPPER_TRAPDOOR = register(new Block("exposed_copper_trapdoor", builder() + public static final Block EXPOSED_COPPER_TRAPDOOR = register(new Block("exposed_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block OXIDIZED_COPPER_TRAPDOOR = register(new Block("oxidized_copper_trapdoor", builder() + public static final Block OXIDIZED_COPPER_TRAPDOOR = register(new Block("oxidized_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block WEATHERED_COPPER_TRAPDOOR = register(new Block("weathered_copper_trapdoor", builder() + public static final Block WEATHERED_COPPER_TRAPDOOR = register(new Block("weathered_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block WAXED_COPPER_TRAPDOOR = register(new Block("waxed_copper_trapdoor", builder() + public static final Block WAXED_COPPER_TRAPDOOR = register(new Block("waxed_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block WAXED_EXPOSED_COPPER_TRAPDOOR = register(new Block("waxed_exposed_copper_trapdoor", builder() + public static final Block WAXED_EXPOSED_COPPER_TRAPDOOR = register(new Block("waxed_exposed_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block WAXED_OXIDIZED_COPPER_TRAPDOOR = register(new Block("waxed_oxidized_copper_trapdoor", builder() + public static final Block WAXED_OXIDIZED_COPPER_TRAPDOOR = register(new Block("waxed_oxidized_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block WAXED_WEATHERED_COPPER_TRAPDOOR = register(new Block("waxed_weathered_copper_trapdoor", builder() + public static final Block WAXED_WEATHERED_COPPER_TRAPDOOR = register(new Block("waxed_weathered_copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .booleanState(OPEN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block COPPER_GRATE = register(new Block("copper_grate", builder() + public static final Block COPPER_GRATE = register(new Block("copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block EXPOSED_COPPER_GRATE = register(new Block("exposed_copper_grate", builder() + public static final Block EXPOSED_COPPER_GRATE = register(new Block("exposed_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block WEATHERED_COPPER_GRATE = register(new Block("weathered_copper_grate", builder() + public static final Block WEATHERED_COPPER_GRATE = register(new Block("weathered_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block OXIDIZED_COPPER_GRATE = register(new Block("oxidized_copper_grate", builder() + public static final Block OXIDIZED_COPPER_GRATE = register(new Block("oxidized_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block WAXED_COPPER_GRATE = register(new Block("waxed_copper_grate", builder() + public static final Block WAXED_COPPER_GRATE = register(new Block("waxed_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block WAXED_EXPOSED_COPPER_GRATE = register(new Block("waxed_exposed_copper_grate", builder() + public static final Block WAXED_EXPOSED_COPPER_GRATE = register(new Block("waxed_exposed_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block WAXED_WEATHERED_COPPER_GRATE = register(new Block("waxed_weathered_copper_grate", builder() + public static final Block WAXED_WEATHERED_COPPER_GRATE = register(new Block("waxed_weathered_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block WAXED_OXIDIZED_COPPER_GRATE = register(new Block("waxed_oxidized_copper_grate", builder() + public static final Block WAXED_OXIDIZED_COPPER_GRATE = register(new Block("waxed_oxidized_copper_grate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(WATERLOGGED))); - public static final Block COPPER_BULB = register(new Block("copper_bulb", builder() + public static final Block COPPER_BULB = register(new Block("copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block EXPOSED_COPPER_BULB = register(new Block("exposed_copper_bulb", builder() + public static final Block EXPOSED_COPPER_BULB = register(new Block("exposed_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block WEATHERED_COPPER_BULB = register(new Block("weathered_copper_bulb", builder() + public static final Block WEATHERED_COPPER_BULB = register(new Block("weathered_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block OXIDIZED_COPPER_BULB = register(new Block("oxidized_copper_bulb", builder() + public static final Block OXIDIZED_COPPER_BULB = register(new Block("oxidized_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block WAXED_COPPER_BULB = register(new Block("waxed_copper_bulb", builder() + public static final Block WAXED_COPPER_BULB = register(new Block("waxed_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block WAXED_EXPOSED_COPPER_BULB = register(new Block("waxed_exposed_copper_bulb", builder() + public static final Block WAXED_EXPOSED_COPPER_BULB = register(new Block("waxed_exposed_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block WAXED_WEATHERED_COPPER_BULB = register(new Block("waxed_weathered_copper_bulb", builder() + public static final Block WAXED_WEATHERED_COPPER_BULB = register(new Block("waxed_weathered_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block WAXED_OXIDIZED_COPPER_BULB = register(new Block("waxed_oxidized_copper_bulb", builder() + public static final Block WAXED_OXIDIZED_COPPER_BULB = register(new Block("waxed_oxidized_copper_bulb", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .booleanState(LIT) .booleanState(POWERED))); - public static final Block LIGHTNING_ROD = register(new Block("lightning_rod", builder() + public static final Block LIGHTNING_ROD = register(new Block("lightning_rod", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(FACING, Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN) .booleanState(POWERED) .booleanState(WATERLOGGED))); - public static final Block POINTED_DRIPSTONE = register(new Block("pointed_dripstone", builder() + public static final Block POINTED_DRIPSTONE = register(new Block("pointed_dripstone", builder().destroyTime(1.5f) .enumState(DRIPSTONE_THICKNESS, "tip_merge", "tip", "frustum", "middle", "base") .enumState(VERTICAL_DIRECTION, Direction.UP, Direction.DOWN) .booleanState(WATERLOGGED))); - public static final Block DRIPSTONE_BLOCK = register(new Block("dripstone_block", builder())); + public static final Block DRIPSTONE_BLOCK = register(new Block("dripstone_block", builder().requiresCorrectToolForDrops().destroyTime(1.5f))); public static final Block CAVE_VINES = register(new Block("cave_vines", builder() .intState(AGE_25, 0, 25) .booleanState(BERRIES))); @@ -2687,16 +2687,16 @@ public final class Blocks { public static final Block SPORE_BLOSSOM = register(new Block("spore_blossom", builder())); public static final Block AZALEA = register(new Block("azalea", builder())); public static final Block FLOWERING_AZALEA = register(new Block("flowering_azalea", builder())); - public static final Block MOSS_CARPET = register(new Block("moss_carpet", builder())); + public static final Block MOSS_CARPET = register(new Block("moss_carpet", builder().destroyTime(0.1f))); public static final Block PINK_PETALS = register(new Block("pink_petals", builder() .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .intState(FLOWER_AMOUNT, 1, 4))); - public static final Block MOSS_BLOCK = register(new Block("moss_block", builder())); - public static final Block BIG_DRIPLEAF = register(new Block("big_dripleaf", builder() + public static final Block MOSS_BLOCK = register(new Block("moss_block", builder().destroyTime(0.1f))); + public static final Block BIG_DRIPLEAF = register(new Block("big_dripleaf", builder().destroyTime(0.1f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(TILT, "none", "unstable", "partial", "full") .booleanState(WATERLOGGED))); - public static final Block BIG_DRIPLEAF_STEM = register(new Block("big_dripleaf_stem", builder() + public static final Block BIG_DRIPLEAF_STEM = register(new Block("big_dripleaf_stem", builder().destroyTime(0.1f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); public static final Block SMALL_DRIPLEAF = register(new Block("small_dripleaf", builder() @@ -2705,109 +2705,109 @@ public final class Blocks { .booleanState(WATERLOGGED))); public static final Block HANGING_ROOTS = register(new Block("hanging_roots", builder() .booleanState(WATERLOGGED))); - public static final Block ROOTED_DIRT = register(new Block("rooted_dirt", builder())); - public static final Block MUD = register(new Block("mud", builder())); - public static final Block DEEPSLATE = register(new Block("deepslate", builder() + public static final Block ROOTED_DIRT = register(new Block("rooted_dirt", builder().destroyTime(0.5f))); + public static final Block MUD = register(new Block("mud", builder().destroyTime(0.5f))); + public static final Block DEEPSLATE = register(new Block("deepslate", builder().requiresCorrectToolForDrops().destroyTime(3.0f) .enumState(AXIS, Axis.VALUES))); - public static final Block COBBLED_DEEPSLATE = register(new Block("cobbled_deepslate", builder())); - public static final Block COBBLED_DEEPSLATE_STAIRS = register(new Block("cobbled_deepslate_stairs", builder() + public static final Block COBBLED_DEEPSLATE = register(new Block("cobbled_deepslate", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block COBBLED_DEEPSLATE_STAIRS = register(new Block("cobbled_deepslate_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block COBBLED_DEEPSLATE_SLAB = register(new Block("cobbled_deepslate_slab", builder() + public static final Block COBBLED_DEEPSLATE_SLAB = register(new Block("cobbled_deepslate_slab", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block COBBLED_DEEPSLATE_WALL = register(new Block("cobbled_deepslate_wall", builder() + public static final Block COBBLED_DEEPSLATE_WALL = register(new Block("cobbled_deepslate_wall", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block POLISHED_DEEPSLATE = register(new Block("polished_deepslate", builder())); - public static final Block POLISHED_DEEPSLATE_STAIRS = register(new Block("polished_deepslate_stairs", builder() + public static final Block POLISHED_DEEPSLATE = register(new Block("polished_deepslate", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block POLISHED_DEEPSLATE_STAIRS = register(new Block("polished_deepslate_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block POLISHED_DEEPSLATE_SLAB = register(new Block("polished_deepslate_slab", builder() + public static final Block POLISHED_DEEPSLATE_SLAB = register(new Block("polished_deepslate_slab", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block POLISHED_DEEPSLATE_WALL = register(new Block("polished_deepslate_wall", builder() + public static final Block POLISHED_DEEPSLATE_WALL = register(new Block("polished_deepslate_wall", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block DEEPSLATE_TILES = register(new Block("deepslate_tiles", builder())); - public static final Block DEEPSLATE_TILE_STAIRS = register(new Block("deepslate_tile_stairs", builder() + public static final Block DEEPSLATE_TILES = register(new Block("deepslate_tiles", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block DEEPSLATE_TILE_STAIRS = register(new Block("deepslate_tile_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block DEEPSLATE_TILE_SLAB = register(new Block("deepslate_tile_slab", builder() + public static final Block DEEPSLATE_TILE_SLAB = register(new Block("deepslate_tile_slab", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block DEEPSLATE_TILE_WALL = register(new Block("deepslate_tile_wall", builder() + public static final Block DEEPSLATE_TILE_WALL = register(new Block("deepslate_tile_wall", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block DEEPSLATE_BRICKS = register(new Block("deepslate_bricks", builder())); - public static final Block DEEPSLATE_BRICK_STAIRS = register(new Block("deepslate_brick_stairs", builder() + public static final Block DEEPSLATE_BRICKS = register(new Block("deepslate_bricks", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block DEEPSLATE_BRICK_STAIRS = register(new Block("deepslate_brick_stairs", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .enumState(HALF, "top", "bottom") .enumState(STAIRS_SHAPE, "straight", "inner_left", "inner_right", "outer_left", "outer_right") .booleanState(WATERLOGGED))); - public static final Block DEEPSLATE_BRICK_SLAB = register(new Block("deepslate_brick_slab", builder() + public static final Block DEEPSLATE_BRICK_SLAB = register(new Block("deepslate_brick_slab", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(SLAB_TYPE, "top", "bottom", "double") .booleanState(WATERLOGGED))); - public static final Block DEEPSLATE_BRICK_WALL = register(new Block("deepslate_brick_wall", builder() + public static final Block DEEPSLATE_BRICK_WALL = register(new Block("deepslate_brick_wall", builder().requiresCorrectToolForDrops().destroyTime(3.5f) .enumState(EAST_WALL, "none", "low", "tall") .enumState(NORTH_WALL, "none", "low", "tall") .enumState(SOUTH_WALL, "none", "low", "tall") .booleanState(UP) .booleanState(WATERLOGGED) .enumState(WEST_WALL, "none", "low", "tall"))); - public static final Block CHISELED_DEEPSLATE = register(new Block("chiseled_deepslate", builder())); - public static final Block CRACKED_DEEPSLATE_BRICKS = register(new Block("cracked_deepslate_bricks", builder())); - public static final Block CRACKED_DEEPSLATE_TILES = register(new Block("cracked_deepslate_tiles", builder())); - public static final Block INFESTED_DEEPSLATE = register(new Block("infested_deepslate", builder() + public static final Block CHISELED_DEEPSLATE = register(new Block("chiseled_deepslate", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block CRACKED_DEEPSLATE_BRICKS = register(new Block("cracked_deepslate_bricks", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block CRACKED_DEEPSLATE_TILES = register(new Block("cracked_deepslate_tiles", builder().requiresCorrectToolForDrops().destroyTime(3.5f))); + public static final Block INFESTED_DEEPSLATE = register(new Block("infested_deepslate", builder().destroyTime(1.5f) .enumState(AXIS, Axis.VALUES))); - public static final Block SMOOTH_BASALT = register(new Block("smooth_basalt", builder())); - public static final Block RAW_IRON_BLOCK = register(new Block("raw_iron_block", builder())); - public static final Block RAW_COPPER_BLOCK = register(new Block("raw_copper_block", builder())); - public static final Block RAW_GOLD_BLOCK = register(new Block("raw_gold_block", builder())); + public static final Block SMOOTH_BASALT = register(new Block("smooth_basalt", builder().requiresCorrectToolForDrops().destroyTime(1.25f))); + public static final Block RAW_IRON_BLOCK = register(new Block("raw_iron_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block RAW_COPPER_BLOCK = register(new Block("raw_copper_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); + public static final Block RAW_GOLD_BLOCK = register(new Block("raw_gold_block", builder().requiresCorrectToolForDrops().destroyTime(5.0f))); public static final Block POTTED_AZALEA_BUSH = register(new Block("potted_azalea_bush", builder())); public static final Block POTTED_FLOWERING_AZALEA_BUSH = register(new Block("potted_flowering_azalea_bush", builder())); - public static final Block OCHRE_FROGLIGHT = register(new Block("ochre_froglight", builder() + public static final Block OCHRE_FROGLIGHT = register(new Block("ochre_froglight", builder().destroyTime(0.3f) .enumState(AXIS, Axis.VALUES))); - public static final Block VERDANT_FROGLIGHT = register(new Block("verdant_froglight", builder() + public static final Block VERDANT_FROGLIGHT = register(new Block("verdant_froglight", builder().destroyTime(0.3f) .enumState(AXIS, Axis.VALUES))); - public static final Block PEARLESCENT_FROGLIGHT = register(new Block("pearlescent_froglight", builder() + public static final Block PEARLESCENT_FROGLIGHT = register(new Block("pearlescent_froglight", builder().destroyTime(0.3f) .enumState(AXIS, Axis.VALUES))); public static final Block FROGSPAWN = register(new Block("frogspawn", builder())); - public static final Block REINFORCED_DEEPSLATE = register(new Block("reinforced_deepslate", builder())); - public static final Block DECORATED_POT = register(new Block("decorated_pot", builder() + public static final Block REINFORCED_DEEPSLATE = register(new Block("reinforced_deepslate", builder().destroyTime(55.0f))); + public static final Block DECORATED_POT = register(new Block("decorated_pot", builder().setBlockEntity() .booleanState(CRACKED) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(WATERLOGGED))); - public static final Block CRAFTER = register(new Block("crafter", builder() + public static final Block CRAFTER = register(new Block("crafter", builder().setBlockEntity().destroyTime(1.5f) .booleanState(CRAFTING) .enumState(ORIENTATION, "down_east", "down_north", "down_south", "down_west", "up_east", "up_north", "up_south", "up_west", "west_up", "east_up", "north_up", "south_up") .booleanState(TRIGGERED))); - public static final Block TRIAL_SPAWNER = register(new Block("trial_spawner", builder() + public static final Block TRIAL_SPAWNER = register(new Block("trial_spawner", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(50.0f) .booleanState(OMINOUS) .enumState(TRIAL_SPAWNER_STATE, "inactive", "waiting_for_players", "active", "waiting_for_reward_ejection", "ejecting_reward", "cooldown"))); - public static final Block VAULT = register(new Block("vault", builder() + public static final Block VAULT = register(new Block("vault", builder().setBlockEntity().requiresCorrectToolForDrops().destroyTime(50.0f) .enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST) .booleanState(OMINOUS) .enumState(VAULT_STATE, "inactive", "active", "unlocking", "ejecting"))); - public static final Block HEAVY_CORE = register(new Block("heavy_core", builder() + public static final Block HEAVY_CORE = register(new Block("heavy_core", builder().destroyTime(10.0f) .booleanState(WATERLOGGED))); private static T register(T block) { diff --git a/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java b/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java index 459f4a5af..84822ca16 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/type/Block.java @@ -41,10 +41,16 @@ public class Block { public static final int JAVA_AIR_ID = 0; private final String javaIdentifier; + private final boolean requiresCorrectToolForDrops; + private final boolean hasBlockEntity; + private final float destroyTime; private int javaId = -1; public Block(String javaIdentifier, Builder builder) { this.javaIdentifier = Identifier.formalize(javaIdentifier).intern(); + this.requiresCorrectToolForDrops = builder.requiresCorrectToolForDrops; + this.hasBlockEntity = builder.hasBlockEntity; + this.destroyTime = builder.destroyTime; builder.build(this); } @@ -52,6 +58,18 @@ public class Block { return javaIdentifier; } + public boolean requiresCorrectToolForDrops() { + return requiresCorrectToolForDrops; + } + + public boolean hasBlockEntity() { + return hasBlockEntity; + } + + public float destroyTime() { + return destroyTime; + } + public int javaId() { return javaId; } @@ -77,6 +95,9 @@ public class Block { public static final class Builder { private final Map, List>> states = new LinkedHashMap<>(); + private boolean requiresCorrectToolForDrops = false; + private boolean hasBlockEntity = false; + private float destroyTime; /** * For states that we're just tracking for mirroring Java states. @@ -107,6 +128,21 @@ public class Block { return this; } + public Builder requiresCorrectToolForDrops() { + this.requiresCorrectToolForDrops = true; + return this; + } + + public Builder setBlockEntity() { + this.hasBlockEntity = true; + return this; + } + + public Builder destroyTime(float destroyTime) { + this.destroyTime = destroyTime; + return this; + } + private void build(Block block) { if (states.isEmpty()) { BlockRegistries.BLOCK_STATES.get().add(new BlockState(block, BlockRegistries.BLOCK_STATES.get().size())); diff --git a/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java b/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java index ace110f78..b623bc043 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java +++ b/core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java @@ -51,6 +51,7 @@ import org.geysermc.geyser.api.block.custom.CustomBlockData; import org.geysermc.geyser.api.block.custom.CustomBlockState; import org.geysermc.geyser.api.block.custom.nonvanilla.JavaBlockState; import org.geysermc.geyser.level.block.BlockStateValues; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.level.physics.PistonBehavior; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.registry.type.BlockMapping; @@ -565,6 +566,15 @@ public final class BlockRegistryPopulator { .isBlockEntity(javaBlockState.hasBlockEntity()) .build(); + Block.Builder builder = Block.builder() + .destroyTime(javaBlockState.blockHardness()); + if (!javaBlockState.canBreakWithHand()) { + builder.requiresCorrectToolForDrops(); + } + if (javaBlockState.hasBlockEntity()) { + builder.setBlockEntity(); + } + String cleanJavaIdentifier = BlockUtils.getCleanIdentifier(javaBlockState.identifier()); String bedrockIdentifier = customBlockState.block().identifier(); diff --git a/core/src/main/java/org/geysermc/geyser/session/cache/TagCache.java b/core/src/main/java/org/geysermc/geyser/session/cache/TagCache.java index 38ac32214..6da354646 100644 --- a/core/src/main/java/org/geysermc/geyser/session/cache/TagCache.java +++ b/core/src/main/java/org/geysermc/geyser/session/cache/TagCache.java @@ -25,15 +25,16 @@ package org.geysermc.geyser.session.cache; -import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket; import it.unimi.dsi.fastutil.ints.IntList; import org.geysermc.geyser.GeyserLogger; import org.geysermc.geyser.inventory.GeyserItemStack; import org.geysermc.geyser.item.type.Item; +import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.registry.type.BlockMapping; import org.geysermc.geyser.session.GeyserSession; import org.geysermc.geyser.session.cache.tags.BlockTag; import org.geysermc.geyser.session.cache.tags.ItemTag; +import org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket; import javax.annotation.ParametersAreNonnullByDefault; import java.util.EnumMap; @@ -95,6 +96,17 @@ public final class TagCache { } } + /** + * @return true if the block tag is present and contains this block mapping's Java ID. + */ + public boolean is(BlockTag tag, Block block) { + IntList values = this.blocks.get(tag); + if (values != null) { + return values.contains(block.javaId()); + } + return false; + } + /** * @return true if the block tag is present and contains this block mapping's Java ID. */ diff --git a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockActionTranslator.java b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockActionTranslator.java index 690fdb371..861f55731 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockActionTranslator.java +++ b/core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/entity/player/BedrockActionTranslator.java @@ -40,6 +40,7 @@ import org.geysermc.geyser.entity.type.player.SessionPlayerEntity; import org.geysermc.geyser.inventory.GeyserItemStack; import org.geysermc.geyser.level.block.BlockStateValues; import org.geysermc.geyser.level.block.type.Block; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.network.GameProtocol; import org.geysermc.geyser.registry.BlockRegistries; import org.geysermc.geyser.registry.type.BlockMapping; @@ -160,7 +161,7 @@ public class BedrockActionTranslator extends PacketTranslator { @@ -42,7 +43,7 @@ public class JavaBlockDestructionTranslator extends PacketTranslator session.getTagCache().is(BlockTag.AXE_EFFECTIVE, blockMapping); - case "hoe" -> session.getTagCache().is(BlockTag.HOE_EFFECTIVE, blockMapping); - case "pickaxe" -> session.getTagCache().is(BlockTag.PICKAXE_EFFECTIVE, blockMapping); - case "shears" -> session.getTagCache().is(BlockTag.LEAVES, blockMapping) || session.getTagCache().is(BlockTag.WOOL, blockMapping); - case "shovel" -> session.getTagCache().is(BlockTag.SHOVEL_EFFECTIVE, blockMapping); - case "sword" -> blockMapping.getJavaBlockId() == BlockStateValues.JAVA_COBWEB_ID; + case "axe" -> session.getTagCache().is(BlockTag.AXE_EFFECTIVE, block); + case "hoe" -> session.getTagCache().is(BlockTag.HOE_EFFECTIVE, block); + case "pickaxe" -> session.getTagCache().is(BlockTag.PICKAXE_EFFECTIVE, block); + case "shears" -> session.getTagCache().is(BlockTag.LEAVES, block) || session.getTagCache().is(BlockTag.WOOL, block); + case "shovel" -> session.getTagCache().is(BlockTag.SHOVEL_EFFECTIVE, block); + case "sword" -> block == Blocks.COBWEB; default -> { session.getGeyser().getLogger().warning("Unknown tool type: " + itemToolType); yield false; @@ -71,7 +71,7 @@ public final class BlockUtils { }; } - private static boolean canToolTierBreakBlock(GeyserSession session, BlockMapping blockMapping, String toolTier) { + private static boolean canToolTierBreakBlock(GeyserSession session, Block block, String toolTier) { if (toolTier.equals("netherite") || toolTier.equals("diamond")) { // As of 1.17, these tiers can mine everything that is mineable return true; @@ -80,15 +80,15 @@ public final class BlockUtils { switch (toolTier) { // Use intentional fall-throughs to check each tier with this block default: - if (session.getTagCache().is(BlockTag.NEEDS_STONE_TOOL, blockMapping)) { + if (session.getTagCache().is(BlockTag.NEEDS_STONE_TOOL, block)) { return false; } case "stone": - if (session.getTagCache().is(BlockTag.NEEDS_IRON_TOOL, blockMapping)) { + if (session.getTagCache().is(BlockTag.NEEDS_IRON_TOOL, block)) { return false; } case "iron": - if (session.getTagCache().is(BlockTag.NEEDS_DIAMOND_TOOL, blockMapping)) { + if (session.getTagCache().is(BlockTag.NEEDS_DIAMOND_TOOL, block)) { return false; } } @@ -131,9 +131,9 @@ public final class BlockUtils { return 1.0 / speed; } - public static double getBreakTime(GeyserSession session, BlockMapping blockMapping, ItemMapping item, @Nullable DataComponents components, boolean isSessionPlayer) { - boolean isShearsEffective = session.getTagCache().is(BlockTag.LEAVES, blockMapping) || session.getTagCache().is(BlockTag.WOOL, blockMapping); //TODO called twice - boolean canHarvestWithHand = blockMapping.isCanBreakWithHand(); + public static double getBreakTime(GeyserSession session, Block block, ItemMapping item, @Nullable DataComponents components, boolean isSessionPlayer) { + boolean isShearsEffective = session.getTagCache().is(BlockTag.LEAVES, block) || session.getTagCache().is(BlockTag.WOOL, block); //TODO called twice + boolean canHarvestWithHand = !block.requiresCorrectToolForDrops(); String toolType = ""; String toolTier = ""; boolean correctTool = false; @@ -141,8 +141,8 @@ public final class BlockUtils { if (item.isTool()) { toolType = item.getToolType(); toolTier = item.getToolTier(); - correctTool = correctTool(session, blockMapping, toolType); - toolCanBreak = canToolTierBreakBlock(session, blockMapping, toolTier); + correctTool = correctTool(session, block, toolType); + toolCanBreak = canToolTierBreakBlock(session, block, toolTier); } int toolEfficiencyLevel = ItemUtils.getEnchantmentLevel(components, Enchantment.JavaEnchantment.EFFICIENCY); @@ -151,7 +151,7 @@ public final class BlockUtils { if (!isSessionPlayer) { // Another entity is currently mining; we have all the information we know - return calculateBreakTime(blockMapping.getHardness(), toolTier, canHarvestWithHand, correctTool, toolCanBreak, toolType, isShearsEffective, + return calculateBreakTime(block.destroyTime(), toolTier, canHarvestWithHand, correctTool, toolCanBreak, toolType, isShearsEffective, toolEfficiencyLevel, hasteLevel, miningFatigueLevel, false, true); } @@ -162,11 +162,11 @@ public final class BlockUtils { boolean insideOfWaterWithoutAquaAffinity = waterInEyes && ItemUtils.getEnchantmentLevel(session.getPlayerInventory().getItem(5).getComponents(), Enchantment.JavaEnchantment.AQUA_AFFINITY) < 1; - return calculateBreakTime(blockMapping.getHardness(), toolTier, canHarvestWithHand, correctTool, toolCanBreak, toolType, isShearsEffective, + return calculateBreakTime(block.destroyTime(), toolTier, canHarvestWithHand, correctTool, toolCanBreak, toolType, isShearsEffective, toolEfficiencyLevel, hasteLevel, miningFatigueLevel, insideOfWaterWithoutAquaAffinity, session.getPlayerEntity().isOnGround()); } - public static double getSessionBreakTime(GeyserSession session, BlockMapping blockMapping) { + public static double getSessionBreakTime(GeyserSession session, Block block) { PlayerInventory inventory = session.getPlayerInventory(); GeyserItemStack item = inventory.getItemInHand(); ItemMapping mapping = ItemMapping.AIR; @@ -175,7 +175,7 @@ public final class BlockUtils { mapping = item.getMapping(session); components = item.getComponents(); } - return getBreakTime(session, blockMapping, mapping, components, true); + return getBreakTime(session, block, mapping, components, true); } /** From 1cd0aad79fdb889ee989084cd1b0c05b1251e387 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Fri, 17 May 2024 15:02:12 -0400 Subject: [PATCH 6/7] Comment out snow collision Seems to be unnecessary as of 1.20.30. Will be deleted later if no problems are found! --- .../org/geysermc/geyser/translator/collision/SnowCollision.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/SnowCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/SnowCollision.java index fb83e357d..af2bcb7ea 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/SnowCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/SnowCollision.java @@ -30,7 +30,7 @@ import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.session.GeyserSession; @EqualsAndHashCode(callSuper = true) -@CollisionRemapper(regex = "^snow$", passDefaultBoxes = true, usesParams = true) +//@CollisionRemapper(regex = "^snow$", passDefaultBoxes = true, usesParams = true) TODO remove if no bugs are found. Seems fine with Bedrock 1.20.80 and 1.20.5 public class SnowCollision extends BlockCollision { private final int layers; From 06dc0d1ca83f820ec9fed233a7998eeead888363 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Fri, 17 May 2024 17:52:19 -0400 Subject: [PATCH 7/7] Collisions without BlockMapping --- .../java/org/geysermc/geyser/GeyserImpl.java | 2 - .../geyser/level/block/BlockStateValues.java | 3 - .../geyser/registry/BlockRegistries.java | 12 +-- .../geyser/registry/ListRegistry.java | 15 +++- .../loader/CollisionRegistryLoader.java | 76 +++++++++---------- .../populator/BlockRegistryPopulator.java | 11 +-- .../collision/CollisionRemapper.java | 6 -- .../collision/DirtPathCollision.java | 3 +- .../translator/collision/DoorCollision.java | 22 +++--- .../GlassPaneAndIronBarsCollision.java | 21 ++--- .../collision/ScaffoldingCollision.java | 3 +- .../translator/collision/SolidCollision.java | 3 +- .../collision/TrapdoorCollision.java | 47 ++++-------- core/src/main/resources/mappings | 2 +- 14 files changed, 100 insertions(+), 126 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java index 4f572ef63..e7237e8bf 100644 --- a/core/src/main/java/org/geysermc/geyser/GeyserImpl.java +++ b/core/src/main/java/org/geysermc/geyser/GeyserImpl.java @@ -69,7 +69,6 @@ import org.geysermc.geyser.event.GeyserEventBus; import org.geysermc.geyser.extension.GeyserExtensionManager; import org.geysermc.geyser.impl.MinecraftVersionImpl; import org.geysermc.geyser.level.WorldManager; -import org.geysermc.geyser.level.block.Blocks; import org.geysermc.geyser.network.GameProtocol; import org.geysermc.geyser.network.netty.GeyserServer; import org.geysermc.geyser.registry.BlockRegistries; @@ -258,7 +257,6 @@ public class GeyserImpl implements GeyserApi { VersionCheckUtils.checkForOutdatedJava(logger); - Blocks.VAULT.javaId(); for (int i = 0; i < BlockRegistries.JAVA_BLOCKS.get().length; i++) { String cleanIdentifier = BlockRegistries.JAVA_BLOCKS.get(i).getCleanJavaIdentifier(); String newIdentifier = BlockRegistries.BLOCK_STATES.get(i).block().javaIdentifier(); diff --git a/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java b/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java index 205486ced..e2a2cb5eb 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java @@ -69,9 +69,6 @@ public final class BlockStateValues { private static final Int2IntMap WATER_LEVEL = new Int2IntOpenHashMap(); private static final IntSet UPPER_DOORS = new IntOpenHashSet(); - public static final int JAVA_AIR_ID = 0; - - public static int JAVA_COBWEB_ID; public static int JAVA_FURNACE_ID; public static int JAVA_FURNACE_LIT_ID; public static int JAVA_HONEY_BLOCK_ID; diff --git a/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java b/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java index 54a36dc12..416ab7793 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java +++ b/core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java @@ -34,6 +34,7 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import org.geysermc.geyser.api.block.custom.CustomBlockData; import org.geysermc.geyser.api.block.custom.CustomBlockState; import org.geysermc.geyser.api.block.custom.nonvanilla.JavaBlockState; +import org.geysermc.geyser.level.block.Blocks; import org.geysermc.geyser.level.block.type.Block; import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.registry.loader.CollisionRegistryLoader; @@ -82,19 +83,13 @@ public class BlockRegistries { /** * A mapped registry containing which holds block IDs to its {@link BlockCollision}. */ - public static final IntMappedRegistry COLLISIONS; + public static final ListRegistry COLLISIONS; /** * A mapped registry containing the Java identifiers to IDs. */ public static final MappedRegistry> JAVA_IDENTIFIER_TO_ID = MappedRegistry.create(RegistryLoaders.empty(Object2IntOpenHashMap::new)); - /** - * A registry which stores unique Java IDs to its clean identifier - * This is used in the statistics form. - */ - public static final ArrayRegistry CLEAN_JAVA_IDENTIFIERS = ArrayRegistry.create(RegistryLoaders.uninitialized()); - /** * A registry containing all the waterlogged blockstates. */ @@ -141,12 +136,13 @@ public class BlockRegistries { public static final SimpleMappedRegistry CUSTOM_SKULLS = SimpleMappedRegistry.create(RegistryLoaders.empty(Object2ObjectOpenHashMap::new)); static { + Blocks.VAULT.javaId(); // FIXME CustomSkullRegistryPopulator.populate(); BlockRegistryPopulator.populate(BlockRegistryPopulator.Stage.PRE_INIT); CustomBlockRegistryPopulator.populate(CustomBlockRegistryPopulator.Stage.DEFINITION); CustomBlockRegistryPopulator.populate(CustomBlockRegistryPopulator.Stage.NON_VANILLA_REGISTRATION); BlockRegistryPopulator.populate(BlockRegistryPopulator.Stage.INIT_JAVA); - COLLISIONS = IntMappedRegistry.create(Pair.of("org.geysermc.geyser.translator.collision.CollisionRemapper", "mappings/collision.json"), CollisionRegistryLoader::new); + COLLISIONS = ListRegistry.create(Pair.of("org.geysermc.geyser.translator.collision.CollisionRemapper", "mappings/collisions.nbt"), CollisionRegistryLoader::new); CustomBlockRegistryPopulator.populate(CustomBlockRegistryPopulator.Stage.VANILLA_REGISTRATION); CustomBlockRegistryPopulator.populate(CustomBlockRegistryPopulator.Stage.CUSTOM_REGISTRATION); BlockRegistryPopulator.populate(BlockRegistryPopulator.Stage.INIT_BEDROCK); diff --git a/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java b/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java index bb5d2538c..d13c47ba8 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java +++ b/core/src/main/java/org/geysermc/geyser/registry/ListRegistry.java @@ -29,6 +29,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; import org.geysermc.geyser.registry.loader.RegistryLoader; import java.util.List; +import java.util.function.Supplier; public class ListRegistry extends Registry> { /** @@ -98,6 +99,18 @@ public class ListRegistry extends Registry> { * @return a new registry with the given RegistryLoader supplier */ public static ListRegistry create(RegistryLoader> registryLoader) { - return new ListRegistry(null, registryLoader); + return new ListRegistry<>(null, registryLoader); + } + + /** + * Creates a new integer mapped registry with the given {@link RegistryLoader} and input. + * + * @param registryLoader the registry loader + * @param the input + * @param the type value + * @return a new registry with the given RegistryLoader supplier + */ + public static ListRegistry create(I input, Supplier>> registryLoader) { + return new ListRegistry<>(input, registryLoader.get()); } } diff --git a/core/src/main/java/org/geysermc/geyser/registry/loader/CollisionRegistryLoader.java b/core/src/main/java/org/geysermc/geyser/registry/loader/CollisionRegistryLoader.java index 95e8bd2c1..7cf39b6d7 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/loader/CollisionRegistryLoader.java +++ b/core/src/main/java/org/geysermc/geyser/registry/loader/CollisionRegistryLoader.java @@ -25,18 +25,19 @@ package org.geysermc.geyser.registry.loader; -import com.fasterxml.jackson.databind.node.ArrayNode; import it.unimi.dsi.fastutil.Pair; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import lombok.AllArgsConstructor; import org.checkerframework.checker.nullness.qual.Nullable; +import org.cloudburstmc.nbt.NbtList; +import org.cloudburstmc.nbt.NbtMap; +import org.cloudburstmc.nbt.NbtType; +import org.cloudburstmc.nbt.NbtUtils; import org.geysermc.geyser.GeyserImpl; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.registry.BlockRegistries; -import org.geysermc.geyser.registry.type.BlockMapping; import org.geysermc.geyser.translator.collision.BlockCollision; import org.geysermc.geyser.translator.collision.CollisionRemapper; import org.geysermc.geyser.translator.collision.OtherCollision; @@ -51,41 +52,43 @@ import java.util.regex.Pattern; /** * Loads collision data from the given resource path. */ -public class CollisionRegistryLoader extends MultiResourceRegistryLoader> { +public class CollisionRegistryLoader extends MultiResourceRegistryLoader> { @Override - public Int2ObjectMap load(Pair input) { - Int2ObjectMap collisions = new Int2ObjectOpenHashMap<>(); - + public List load(Pair input) { Map, CollisionInfo> annotationMap = new IdentityHashMap<>(); for (Class clazz : FileUtils.getGeneratedClassesForAnnotation(CollisionRemapper.class.getName())) { GeyserImpl.getInstance().getLogger().debug("Found annotated collision translator: " + clazz.getCanonicalName()); CollisionRemapper collisionRemapper = clazz.getAnnotation(CollisionRemapper.class); - annotationMap.put(clazz, new CollisionInfo(collisionRemapper, Pattern.compile(collisionRemapper.regex()), Pattern.compile(collisionRemapper.paramRegex()))); + annotationMap.put(clazz, new CollisionInfo(collisionRemapper, Pattern.compile(collisionRemapper.regex()))); } // Load collision mappings file + int[] indices; List collisionList; try (InputStream stream = GeyserImpl.getInstance().getBootstrap().getResourceOrThrow(input.value())) { - ArrayNode collisionNode = (ArrayNode) GeyserImpl.JSON_MAPPER.readTree(stream); - collisionList = loadBoundingBoxes(collisionNode); + NbtMap collisionData = (NbtMap) NbtUtils.createGZIPReader(stream).readTag(); + indices = collisionData.getIntArray("indices"); + //SuppressWarnings unchecked + collisionList = loadBoundingBoxes(collisionData.getList("collisions", NbtType.LIST)); } catch (Exception e) { throw new AssertionError("Unable to load collision data", e); } - BlockMapping[] blockMappings = BlockRegistries.JAVA_BLOCKS.get(); + List blockStates = BlockRegistries.BLOCK_STATES.get(); + List collisions = new ObjectArrayList<>(blockStates.size()); // Map of unique collisions to its instance Map collisionInstances = new Object2ObjectOpenHashMap<>(); - for (int i = 0; i < blockMappings.length; i++) { - BlockMapping blockMapping = blockMappings[i]; - if (blockMapping == null) { - GeyserImpl.getInstance().getLogger().warning("Missing block mapping for Java block " + i); + for (int i = 0; i < blockStates.size(); i++) { + BlockState state = blockStates.get(i); + if (state == null) { + GeyserImpl.getInstance().getLogger().warning("Missing block state for Java block " + i); continue; } - BlockCollision newCollision = instantiateCollision(blockMapping, annotationMap, collisionList); + BlockCollision newCollision = instantiateCollision(state, annotationMap, indices[i], collisionList); if (newCollision != null) { // If there's an existing instance equal to this one, use that instead @@ -97,33 +100,27 @@ public class CollisionRegistryLoader extends MultiResourceRegistryLoader, CollisionInfo> annotationMap, List collisionList) { - String[] blockIdParts = mapping.getJavaIdentifier().split("\\["); - String blockName = blockIdParts[0].replace("minecraft:", ""); - String params = ""; - if (blockIdParts.length == 2) { - params = "[" + blockIdParts[1]; - } - int collisionIndex = mapping.getCollisionIndex(); + private @Nullable BlockCollision instantiateCollision(BlockState state, Map, CollisionInfo> annotationMap, int collisionIndex, List collisionList) { + String blockName = state.block().javaIdentifier().substring("minecraft:".length()); for (Map.Entry, CollisionInfo> collisionRemappers : annotationMap.entrySet()) { Class type = collisionRemappers.getKey(); CollisionInfo collisionInfo = collisionRemappers.getValue(); CollisionRemapper annotation = collisionInfo.collisionRemapper; - if (collisionInfo.pattern.matcher(blockName).find() && collisionInfo.paramsPattern.matcher(params).find()) { + if (collisionInfo.pattern.matcher(blockName).find()) { try { if (annotation.passDefaultBoxes()) { // Create an OtherCollision instance and get the bounding boxes BoundingBox[] defaultBoxes = collisionList.get(collisionIndex); - return (BlockCollision) type.getDeclaredConstructor(String.class, BoundingBox[].class).newInstance(params, defaultBoxes); + return (BlockCollision) type.getDeclaredConstructor(BlockState.class, BoundingBox[].class).newInstance(state, defaultBoxes); } else { - return (BlockCollision) type.getDeclaredConstructor(String.class).newInstance(params); + return (BlockCollision) type.getDeclaredConstructor(BlockState.class).newInstance(state); } } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e) { throw new RuntimeException(e); @@ -138,25 +135,25 @@ public class CollisionRegistryLoader extends MultiResourceRegistryLoader loadBoundingBoxes(ArrayNode collisionNode) { + private List loadBoundingBoxes(List collisionNode) { List collisions = new ObjectArrayList<>(); for (int collisionIndex = 0; collisionIndex < collisionNode.size(); collisionIndex++) { - ArrayNode boundingBoxArray = (ArrayNode) collisionNode.get(collisionIndex); + @SuppressWarnings("unchecked") NbtList> boundingBoxArray = (NbtList>) collisionNode.get(collisionIndex); BoundingBox[] boundingBoxes = new BoundingBox[boundingBoxArray.size()]; for (int i = 0; i < boundingBoxArray.size(); i++) { - ArrayNode boxProperties = (ArrayNode) boundingBoxArray.get(i); - boundingBoxes[i] = new BoundingBox(boxProperties.get(0).asDouble(), - boxProperties.get(1).asDouble(), - boxProperties.get(2).asDouble(), - boxProperties.get(3).asDouble(), - boxProperties.get(4).asDouble(), - boxProperties.get(5).asDouble()); + NbtList boxProperties = boundingBoxArray.get(i); + boundingBoxes[i] = new BoundingBox(boxProperties.get(0), + boxProperties.get(1), + boxProperties.get(2), + boxProperties.get(3), + boxProperties.get(4), + boxProperties.get(5)); } // Sorting by lowest Y first fixes some bugs @@ -173,6 +170,5 @@ public class CollisionRegistryLoader extends MultiResourceRegistryLoader cleanIdentifiers = new ArrayDeque<>(); int javaRuntimeId = -1; - int cobwebBlockId = -1; int furnaceRuntimeId = -1; int furnaceLitRuntimeId = -1; int honeyBlockRuntimeId = -1; @@ -485,10 +484,7 @@ public final class BlockRegistryPopulator { // It's possible to only have this store differences in names, but the key set of all Java names is used in sending command suggestions BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier.intern(), bedrockIdentifier.intern()); - if (javaId.contains("cobweb")) { - cobwebBlockId = uniqueJavaId; - - } else if (javaId.startsWith("minecraft:furnace[facing=north")) { + if (javaId.startsWith("minecraft:furnace[facing=north")) { if (javaId.contains("lit=true")) { furnaceLitRuntimeId = javaRuntimeId; } else { @@ -507,11 +503,6 @@ public final class BlockRegistryPopulator { } } - if (cobwebBlockId == -1) { - throw new AssertionError("Unable to find cobwebs in palette"); - } - BlockStateValues.JAVA_COBWEB_ID = cobwebBlockId; - if (furnaceRuntimeId == -1) { throw new AssertionError("Unable to find furnace in palette"); } diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/CollisionRemapper.java b/core/src/main/java/org/geysermc/geyser/translator/collision/CollisionRemapper.java index 6980968ab..fb93a14d5 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/CollisionRemapper.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/CollisionRemapper.java @@ -37,12 +37,6 @@ public @interface CollisionRemapper { */ String regex(); - /** - * Regex of block state parameters to apply this collision to - * Defaults to matching any value - */ - String paramRegex() default ".*"; - /** * Signals if a new instance needs to created for every block state */ diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/DirtPathCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/DirtPathCollision.java index dcbad4758..d44187a0c 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/DirtPathCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/DirtPathCollision.java @@ -26,13 +26,14 @@ package org.geysermc.geyser.translator.collision; import lombok.EqualsAndHashCode; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.level.physics.CollisionManager; @EqualsAndHashCode(callSuper = true) @CollisionRemapper(regex = "^dirt_path$", passDefaultBoxes = true) public class DirtPathCollision extends BlockCollision { - public DirtPathCollision(String params, BoundingBox[] defaultBoxes) { + public DirtPathCollision(BlockState state, BoundingBox[] defaultBoxes) { super(defaultBoxes); } diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/DoorCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/DoorCollision.java index b47b187c4..33c85ce07 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/DoorCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/DoorCollision.java @@ -26,6 +26,8 @@ package org.geysermc.geyser.translator.collision; import lombok.EqualsAndHashCode; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.session.GeyserSession; @@ -40,20 +42,18 @@ public class DoorCollision extends BlockCollision { */ private int facing; - public DoorCollision(String params, BoundingBox[] defaultBoxes) { + public DoorCollision(BlockState state, BoundingBox[] defaultBoxes) { super(defaultBoxes); - if (params.contains("facing=north")) { - facing = 1; - } else if (params.contains("facing=east")) { - facing = 2; - } else if (params.contains("facing=south")) { - facing = 3; - } else if (params.contains("facing=west")) { - facing = 4; - } + facing = switch (state.getValue(Properties.HORIZONTAL_FACING)) { + case NORTH -> 1; + case EAST -> 2; + case SOUTH -> 3; + case WEST -> 4; + default -> throw new IllegalStateException(); + }; // If the door is open it changes direction - if (params.contains("open=true")) { + if (state.getValue(Properties.OPEN)) { facing = facing % 2 + 1; } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/GlassPaneAndIronBarsCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/GlassPaneAndIronBarsCollision.java index 14439645a..35874348c 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/GlassPaneAndIronBarsCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/GlassPaneAndIronBarsCollision.java @@ -26,6 +26,8 @@ package org.geysermc.geyser.translator.collision; import lombok.EqualsAndHashCode; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.session.GeyserSession; @@ -44,24 +46,23 @@ public class GlassPaneAndIronBarsCollision extends BlockCollision { */ private int facing; - public GlassPaneAndIronBarsCollision(String params, BoundingBox[] defaultBoxes) { + public GlassPaneAndIronBarsCollision(BlockState state, BoundingBox[] defaultBoxes) { super(defaultBoxes); - //east=true,north=true,south=true,west=true - if (params.contains("north=true") && params.contains("east=true")) { + if (state.getValue(Properties.NORTH) && state.getValue(Properties.EAST)) { facing = 5; - } else if (params.contains("east=true") && params.contains("south=true")) { + } else if (state.getValue(Properties.EAST) && state.getValue(Properties.SOUTH)) { facing = 6; - } else if (params.contains("south=true") && params.contains("west=true")) { + } else if (state.getValue(Properties.SOUTH) && state.getValue(Properties.WEST)) { facing = 7; - } else if (params.contains("west=true") && params.contains("north=true")) { + } else if (state.getValue(Properties.WEST) && state.getValue(Properties.NORTH)) { facing = 8; - } else if (params.contains("north=true")) { + } else if (state.getValue(Properties.NORTH)) { facing = 1; - } else if (params.contains("east=true")) { + } else if (state.getValue(Properties.EAST)) { facing = 2; - } else if (params.contains("south=true")) { + } else if (state.getValue(Properties.SOUTH)) { facing = 3; - } else if (params.contains("west=true")) { + } else if (state.getValue(Properties.WEST)) { facing = 4; } } diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/ScaffoldingCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/ScaffoldingCollision.java index dfbd1c8b8..7449987c6 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/ScaffoldingCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/ScaffoldingCollision.java @@ -26,6 +26,7 @@ package org.geysermc.geyser.translator.collision; import lombok.EqualsAndHashCode; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.session.GeyserSession; @@ -35,7 +36,7 @@ import org.geysermc.geyser.session.GeyserSession; @EqualsAndHashCode(callSuper = true) @CollisionRemapper(regex = "^scaffolding$", usesParams = true, passDefaultBoxes = true) public class ScaffoldingCollision extends BlockCollision { - public ScaffoldingCollision(String params, BoundingBox[] defaultBoxes) { + public ScaffoldingCollision(BlockState state, BoundingBox[] defaultBoxes) { super(defaultBoxes); } diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/SolidCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/SolidCollision.java index 822202ff2..51d1038c0 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/SolidCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/SolidCollision.java @@ -26,12 +26,13 @@ package org.geysermc.geyser.translator.collision; import lombok.EqualsAndHashCode; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; @EqualsAndHashCode(callSuper = true) @CollisionRemapper(regex = "shulker_box$") // These have no collision in the mappings as it depends on the NBT data public class SolidCollision extends BlockCollision { - public SolidCollision(String params) { + public SolidCollision(BlockState state) { super(new BoundingBox[] { new BoundingBox(0.5, 0.5, 0.5, 1, 1, 1) }); diff --git a/core/src/main/java/org/geysermc/geyser/translator/collision/TrapdoorCollision.java b/core/src/main/java/org/geysermc/geyser/translator/collision/TrapdoorCollision.java index 836c05711..909761166 100644 --- a/core/src/main/java/org/geysermc/geyser/translator/collision/TrapdoorCollision.java +++ b/core/src/main/java/org/geysermc/geyser/translator/collision/TrapdoorCollision.java @@ -26,42 +26,27 @@ package org.geysermc.geyser.translator.collision; import lombok.EqualsAndHashCode; +import org.geysermc.geyser.level.block.property.Properties; +import org.geysermc.geyser.level.block.type.BlockState; import org.geysermc.geyser.level.physics.BoundingBox; import org.geysermc.geyser.level.physics.CollisionManager; +import org.geysermc.geyser.level.physics.Direction; import org.geysermc.geyser.session.GeyserSession; @EqualsAndHashCode(callSuper = true) @CollisionRemapper(regex = "_trapdoor$", usesParams = true, passDefaultBoxes = true) public class TrapdoorCollision extends BlockCollision { - /** - * 1 = north - * 2 = east - * 3 = south - * 4 = west - * 5 = up - * 6 = down - */ - private int facing; + private final Direction facing; - public TrapdoorCollision(String params, BoundingBox[] defaultBoxes) { + public TrapdoorCollision(BlockState state, BoundingBox[] defaultBoxes) { super(defaultBoxes); - if (params.contains("open=true")) { - if (params.contains("facing=north")) { - facing = 1; - } else if (params.contains("facing=east")) { - facing = 2; - } else if (params.contains("facing=south")) { - facing = 3; - } else if (params.contains("facing=west")) { - facing = 4; - } + if (state.getValue(Properties.OPEN)) { + facing = state.getValue(Properties.HORIZONTAL_FACING); } else { - if (params.contains("half=bottom")) { - // Up - facing = 5; + if (state.getValue(Properties.HALF).equals("bottom")) { + facing = Direction.UP; } else { - // Down - facing = 6; + facing = Direction.DOWN; } } } @@ -72,22 +57,22 @@ public class TrapdoorCollision extends BlockCollision { // Check for door bug (doors are 0.1875 blocks thick on Java but 0.1825 blocks thick on Bedrock) if (this.checkIntersection(x, y, z, playerCollision)) { switch (facing) { - case 1: // North + case NORTH: playerCollision.setMiddleZ(z + 0.5125); break; - case 2: // East + case EAST: playerCollision.setMiddleX(x + 0.5125); break; - case 3: // South + case SOUTH: playerCollision.setMiddleZ(z + 0.4875); break; - case 4: // West + case WEST: playerCollision.setMiddleX(x + 0.4875); break; - case 5: + case UP: // Up-facing trapdoors are handled by the step-up check break; - case 6: // Down + case DOWN: // (top y of trap door) - (trap door thickness) = top y of player playerCollision.setMiddleY(y + 1 - (3.0 / 16.0) - playerCollision.getSizeY() / 2.0 - CollisionManager.COLLISION_TOLERANCE); break; diff --git a/core/src/main/resources/mappings b/core/src/main/resources/mappings index 7c01501ed..6b661f0d5 160000 --- a/core/src/main/resources/mappings +++ b/core/src/main/resources/mappings @@ -1 +1 @@ -Subproject commit 7c01501ed6a0ee8848a66d729000539f2661f785 +Subproject commit 6b661f0d517d895aebc1f55a25d2c86f033beb1d