Handle JEIDs/NEIDs on Forge 1.10.2
This commit is contained in:
parent
107bff47a6
commit
ba926036a7
1 changed files with 8 additions and 3 deletions
|
|
@ -163,12 +163,17 @@ public class DynmapPlugin
|
||||||
* Initialize block states (org.dynmap.blockstate.DynmapBlockState)
|
* Initialize block states (org.dynmap.blockstate.DynmapBlockState)
|
||||||
*/
|
*/
|
||||||
public void initializeBlockStates() {
|
public void initializeBlockStates() {
|
||||||
stateByID = new DynmapBlockState[4096*16]; // Simple meta+id map
|
stateByID = new DynmapBlockState[512*16]; // Simple meta+id map
|
||||||
Arrays.fill(stateByID, DynmapBlockState.AIR); // Default to air
|
Arrays.fill(stateByID, DynmapBlockState.AIR); // Default to air
|
||||||
|
|
||||||
for (int i = 0; i < 4096; i++) {
|
for (Block b : Block.REGISTRY) {
|
||||||
Block b = getBlockByID(i);
|
|
||||||
if (b == null) continue;
|
if (b == null) continue;
|
||||||
|
int i = Block.getIdFromBlock(b);
|
||||||
|
if (i >= (stateByID.length >> 4)) {
|
||||||
|
int plen = stateByID.length;
|
||||||
|
stateByID = Arrays.copyOf(stateByID, (i+1) << 4);
|
||||||
|
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
|
||||||
|
}
|
||||||
ResourceLocation ui = null;
|
ResourceLocation ui = null;
|
||||||
try {
|
try {
|
||||||
ui = Block.REGISTRY.getNameForObject(b);
|
ui = Block.REGISTRY.getNameForObject(b);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue