temp fixed block id removal
This commit is contained in:
parent
dd3ac39530
commit
7c8a51bcac
1 changed files with 3 additions and 1 deletions
|
@ -136,6 +136,8 @@ public abstract class BlockRegistry {
|
||||||
private static final String AIR_ID = "air";
|
private static final String AIR_ID = "air";
|
||||||
public static final RegistryNamespacedDefaultedByKey<String, Block> REGISTRY = new RegistryNamespacedDefaultedByKey(AIR_ID);
|
public static final RegistryNamespacedDefaultedByKey<String, Block> REGISTRY = new RegistryNamespacedDefaultedByKey(AIR_ID);
|
||||||
public static final ObjectIntIdentityMap<State> STATEMAP = new ObjectIntIdentityMap();
|
public static final ObjectIntIdentityMap<State> STATEMAP = new ObjectIntIdentityMap();
|
||||||
|
|
||||||
|
private static int nextBlockId = 1;
|
||||||
|
|
||||||
public static int getIdFromBlock(Block block) {
|
public static int getIdFromBlock(Block block) {
|
||||||
return REGISTRY.getIDForObject(block);
|
return REGISTRY.getIDForObject(block);
|
||||||
|
@ -212,7 +214,7 @@ public abstract class BlockRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerBlock(int id, String name, Block block) {
|
private static void registerBlock(int id, String name, Block block) {
|
||||||
BlockRegistry.REGISTRY.register(id, name, block);
|
BlockRegistry.REGISTRY.register(nextBlockId++, name, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerFluid(int idd, int ids, String name, String display, boolean infinite, LiquidType type, boolean opaque,
|
private static void registerFluid(int idd, int ids, String name, String display, boolean infinite, LiquidType type, boolean opaque,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue