mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
parent
e3d6b488bb
commit
23a99d2f4b
1 changed files with 6 additions and 1 deletions
|
@ -28,7 +28,12 @@ public class CommonEvents {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onChunkCapsAttach(AttachCapabilitiesEvent<Chunk> event) {
|
public void onChunkCapsAttach(AttachCapabilitiesEvent<Chunk> event) {
|
||||||
Chunk chunk = event.getObject();
|
Chunk chunk = event.getObject();
|
||||||
IAuraType type = IAuraType.forWorld(chunk.getWorld());
|
World world = chunk.getWorld();
|
||||||
|
if (world == null) {
|
||||||
|
NaturesAura.LOGGER.warn("Chunk with null world found. This is most likely due to OptiFine doing stuff that should really be disallowed. I don't know if this will cause any further issues, but hopefully not.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
IAuraType type = IAuraType.forWorld(world);
|
||||||
event.addCapability(new ResourceLocation(NaturesAura.MOD_ID, "aura"), new AuraChunk(chunk, type));
|
event.addCapability(new ResourceLocation(NaturesAura.MOD_ID, "aura"), new AuraChunk(chunk, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue