use of net.minecraft.world.level.LevelAccessor in project MinecraftForge by MinecraftForge.
the class BlockSnapshot method getLevel.
@Nullable
public LevelAccessor getLevel() {
LevelAccessor world = this.level != null ? this.level.get() : null;
if (world == null) {
world = ServerLifecycleHooks.getCurrentServer().getLevel(this.dim);
this.level = new WeakReference<LevelAccessor>(world);
}
return world;
}
Aggregations