Add TrapDoorBlock

This commit is contained in:
AJ Ferguson 2024-05-20 00:28:40 -04:00
parent 1b075badce
commit f489fd3b98
2 changed files with 52 additions and 20 deletions

View File

@ -655,55 +655,55 @@ public final class Blocks {
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)
public static final Block OAK_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block SPRUCE_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block BIRCH_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block JUNGLE_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block ACACIA_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block CHERRY_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block DARK_OAK_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block MANGROVE_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block BAMBOO_TRAPDOOR = register(new TrapDoorBlock("bamboo_trapdoor", builder().destroyTime(3.0f)
.enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST)
.enumState(HALF, "top", "bottom")
.booleanState(OPEN)
@ -1196,7 +1196,7 @@ public final class Blocks {
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().requiresCorrectToolForDrops().destroyTime(5.0f)
public static final Block IRON_TRAPDOOR = register(new TrapDoorBlock("iron_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(5.0f)
.enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST)
.enumState(HALF, "top", "bottom")
.booleanState(OPEN)
@ -2102,13 +2102,13 @@ public final class Blocks {
.booleanState(SOUTH)
.booleanState(WATERLOGGED)
.booleanState(WEST)));
public static final Block CRIMSON_TRAPDOOR = register(new Block("crimson_trapdoor", builder().destroyTime(3.0f)
public static final Block CRIMSON_TRAPDOOR = register(new TrapDoorBlock("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().destroyTime(3.0f)
public static final Block WARPED_TRAPDOOR = register(new TrapDoorBlock("warped_trapdoor", builder().destroyTime(3.0f)
.enumState(HORIZONTAL_FACING, Direction.NORTH, Direction.SOUTH, Direction.WEST, Direction.EAST)
.enumState(HALF, "top", "bottom")
.booleanState(OPEN)
@ -2583,49 +2583,49 @@ public final class Blocks {
.enumState(DOOR_HINGE, "left", "right")
.booleanState(OPEN)
.booleanState(POWERED)));
public static final Block COPPER_TRAPDOOR = register(new Block("copper_trapdoor", builder().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block EXPOSED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block OXIDIZED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block WEATHERED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block WAXED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block WAXED_EXPOSED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block WAXED_OXIDIZED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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().requiresCorrectToolForDrops().destroyTime(3.0f)
public static final Block WAXED_WEATHERED_COPPER_TRAPDOOR = register(new TrapDoorBlock("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)

View File

@ -0,0 +1,32 @@
/*
* 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 TrapDoorBlock extends Block {
public TrapDoorBlock(String javaIdentifier, Builder builder) {
super(javaIdentifier, builder);
}
}