9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-25 09:59:20 +00:00

命名更正

This commit is contained in:
XiaoMoMi
2025-07-24 17:36:02 +08:00
parent 59b29b9494
commit 16e4f4ee88
2 changed files with 5 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ public class BukkitBlockBehaviors extends BlockBehaviors {
public static final Key SLAB_BLOCK = Key.from("craftengine:slab_block");
public static final Key STAIRS_BLOCK = Key.from("craftengine:stairs_block");
public static final Key PRESSURE_PLATE_BLOCK = Key.from("craftengine:pressure_plate_block");
public static final Key DOUBLE_BLOCK = Key.from("craftengine:double_block");
public static final Key DOUBLE_HIGH_BLOCK = Key.from("craftengine:double_high_block");
public static void init() {
register(EMPTY, (block, args) -> EmptyBlockBehavior.INSTANCE);
@@ -51,6 +51,6 @@ public class BukkitBlockBehaviors extends BlockBehaviors {
register(SLAB_BLOCK, SlabBlockBehavior.FACTORY);
register(STAIRS_BLOCK, StairsBlockBehavior.FACTORY);
register(PRESSURE_PLATE_BLOCK, PressurePlateBlockBehavior.FACTORY);
register(DOUBLE_BLOCK, DoubleBlockBehavior.FACTORY);
register(DOUBLE_HIGH_BLOCK, DoubleHighBlockBehavior.FACTORY);
}
}

View File

@@ -21,11 +21,11 @@ import java.util.Map;
import java.util.concurrent.Callable;
public class DoubleBlockBehavior extends BukkitBlockBehavior {
public class DoubleHighBlockBehavior extends BukkitBlockBehavior {
public static final Factory FACTORY = new Factory();
private final Property<DoubleBlockHalf> halfProperty;
public DoubleBlockBehavior(CustomBlock customBlock, Property<DoubleBlockHalf> halfProperty) {
public DoubleHighBlockBehavior(CustomBlock customBlock, Property<DoubleBlockHalf> halfProperty) {
super(customBlock);
this.halfProperty = halfProperty;
}
@@ -84,7 +84,7 @@ public class DoubleBlockBehavior extends BukkitBlockBehavior {
@Override
public BlockBehavior create(CustomBlock block, Map<String, Object> arguments) {
Property<DoubleBlockHalf> half = (Property<DoubleBlockHalf>) ResourceConfigUtils.requireNonNullOrThrow(block.getProperty("half"), "warning.config.block.behavior.double.missing_half");
return new DoubleBlockBehavior(block, half);
return new DoubleHighBlockBehavior(block, half);
}
}
}