parent
e7f86f8687
commit
4a8e0487bc
|
|
@ -30,8 +30,15 @@ public abstract class PalettedContainerMixin<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(empty && storArray.length > 0) {
|
if(empty && storArray.length > 0) {
|
||||||
|
T value;
|
||||||
/* it means the chunk is oversized and wasting memory, take the ID out of the palette and recreate a smaller chunk */
|
/* it means the chunk is oversized and wasting memory, take the ID out of the palette and recreate a smaller chunk */
|
||||||
T value = this.data.palette().valueFor(0);
|
try {
|
||||||
|
value = this.data.palette().valueFor(0);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// Some mods/servers seem to generate buggy palettes. This is not our fault (the game will likely crash later),
|
||||||
|
// but we catch it here to avoid receiving bug reports for an issue we didn't cause.
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.data = this.createOrReuseData(null, 0);
|
this.data = this.createOrReuseData(null, 0);
|
||||||
this.data.palette().idFor(value);
|
this.data.palette().idFor(value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user