fix block id registering
This commit is contained in:
parent
244220f78c
commit
0f82ccb890
1 changed files with 9 additions and 5 deletions
|
@ -662,13 +662,17 @@ public abstract class BlockRegistry {
|
|||
}
|
||||
|
||||
for(Block block : BLOCKS) {
|
||||
for(State state : block.getValidStates()) {
|
||||
STATE_NAMES.put(state, state.getId());
|
||||
}
|
||||
for(State state : block.getSavedStates()) {
|
||||
STATE_MAP.put(STATE_NAMES.get(state), state);
|
||||
STATE_IDS.put(state, STATES.size());
|
||||
String name = state.getId();
|
||||
STATE_MAP.put(name, state);
|
||||
int id = STATES.size();
|
||||
STATES.add(state);
|
||||
for(State sub : block.getValidStates()) {
|
||||
if(sub.getId().equals(name)) {
|
||||
STATE_NAMES.put(sub, name);
|
||||
STATE_IDS.put(sub, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue