Fix mixin crash outside dev
This commit is contained in:
parent
ce6ce1d341
commit
c73cb8115e
|
|
@ -32,8 +32,11 @@ public class ChunkMapMixin {
|
||||||
* <br>
|
* <br>
|
||||||
* A different patch is necessary for 1.17+, if the issue can be reproduced there, as entity loading
|
* A different patch is necessary for 1.17+, if the issue can be reproduced there, as entity loading
|
||||||
* works differently.
|
* works differently.
|
||||||
|
* <br>
|
||||||
|
* Because of the method arguments being appended to this redirect handler, it will only target the lambda inside
|
||||||
|
* protoChunkToFullChunk.
|
||||||
*/
|
*/
|
||||||
@Redirect(method = "*(Lnet/minecraft/server/level/ChunkHolder;Lnet/minecraft/world/level/chunk/ChunkAccess;)Lnet/minecraft/world/level/chunk/ChunkAccess;", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/chunk/LevelChunk;getEntitySections()[Lnet/minecraft/util/ClassInstanceMultiMap;"))
|
@Redirect(method = "*", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/chunk/LevelChunk;getEntitySections()[Lnet/minecraft/util/ClassInstanceMultiMap;"))
|
||||||
private ClassInstanceMultiMap<?>[] getEntitySections(LevelChunk chunk, ChunkHolder holder, ChunkAccess access) {
|
private ClassInstanceMultiMap<?>[] getEntitySections(LevelChunk chunk, ChunkHolder holder, ChunkAccess access) {
|
||||||
((ILevelChunk)chunk).setEntityLoadHook(() -> {
|
((ILevelChunk)chunk).setEntityLoadHook(() -> {
|
||||||
List<Entity> list = null;
|
List<Entity> list = null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user