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(Block block : BLOCKS) {
|
||||||
for(State state : block.getValidStates()) {
|
|
||||||
STATE_NAMES.put(state, state.getId());
|
|
||||||
}
|
|
||||||
for(State state : block.getSavedStates()) {
|
for(State state : block.getSavedStates()) {
|
||||||
STATE_MAP.put(STATE_NAMES.get(state), state);
|
String name = state.getId();
|
||||||
STATE_IDS.put(state, STATES.size());
|
STATE_MAP.put(name, state);
|
||||||
|
int id = STATES.size();
|
||||||
STATES.add(state);
|
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