mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-12 18:31:41 +01:00
Fix connection
This commit is contained in:
parent
042311d5e3
commit
b31f76615a
@ -274,7 +274,7 @@ class BlockImpl implements Block {
|
||||
state.get("pushReaction").getAsString(),
|
||||
state.get("blocksMotion").getAsBoolean(),
|
||||
state.get("isFlammable").getAsBoolean(),
|
||||
state.get("air").getAsBoolean(),
|
||||
state.get("isAir").getAsBoolean(),
|
||||
state.get("isLiquid").getAsBoolean(),
|
||||
state.get("isReplaceable").getAsBoolean(),
|
||||
state.get("isSolid").getAsBoolean(),
|
||||
|
@ -25,9 +25,8 @@ class BlockRegistry {
|
||||
|
||||
public static synchronized @Nullable Block fromStateId(short stateId) {
|
||||
Block.Supplier supplier = stateSet.get(stateId);
|
||||
if(supplier == null){
|
||||
System.out.println("state "+stateId);
|
||||
return Block.STONE;
|
||||
if (supplier == null) {
|
||||
return null;
|
||||
}
|
||||
return supplier.get(stateId);
|
||||
}
|
||||
@ -39,8 +38,7 @@ class BlockRegistry {
|
||||
public static synchronized void register(@NotNull NamespaceID namespaceID, @NotNull Block block,
|
||||
@NotNull IntRange range, @NotNull Block.Supplier blockSupplier) {
|
||||
namespaceMap.put(namespaceID, block);
|
||||
IntStream.range(range.getMinimum(), range.getMaximum()).forEach(value -> stateSet.put((short) value, blockSupplier));
|
||||
IntStream.range(range.getMinimum(), range.getMaximum() + 1).forEach(value -> stateSet.put((short) value, blockSupplier));
|
||||
blockSet.put(block.getBlockId(), block);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user