mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 17:07:55 -04:00
refactor Block byLegacy Function
This commit is contained in:
parent
19f2c4a654
commit
b968d772ba
@ -89,7 +89,7 @@ public enum Block {
|
||||
return legacyData;
|
||||
}
|
||||
|
||||
public static Block getBlockByIdentifier(Identifier identifier) {
|
||||
public static Block byIdentifier(Identifier identifier) {
|
||||
for (Block b : values()) {
|
||||
if (b.getIdentifier().equals(identifier)) {
|
||||
return b;
|
||||
@ -98,7 +98,7 @@ public enum Block {
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
||||
public static Block getBlockByLegacy(int id, int data) {
|
||||
public static Block byLegacy(int id, int data) {
|
||||
for (Block b : values()) {
|
||||
if (b.getLegacyId() == id && b.getLegacyData() == data) {
|
||||
return b;
|
||||
@ -107,8 +107,8 @@ public enum Block {
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
||||
public static Block getBlockByLegacy(int id) {
|
||||
return getBlockByLegacy(id, 0);
|
||||
public static Block byLegacy(int id) {
|
||||
return byLegacy(id, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ public class PacketChunkBulk implements ClientboundPacket {
|
||||
|
||||
|
||||
// ToDo light, biome
|
||||
blockMap.put(new ChunkNibbleLocation(nibbleX, nibbleY, nibbleZ), Block.getBlockByLegacy(singeBlockId, singleMeta));
|
||||
blockMap.put(new ChunkNibbleLocation(nibbleX, nibbleY, nibbleZ), Block.byLegacy(singeBlockId, singleMeta));
|
||||
arrayPos++;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user