mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Performant fictional entities
- Fixed crash with the Performant mod when entities are present in a ponder scene
This commit is contained in:
parent
747849d52e
commit
1fd6b4360c
2 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package com.simibubi.create.content.schematics;
|
package com.simibubi.create.content.schematics;
|
||||||
|
|
||||||
import com.simibubi.create.Create;
|
import com.simibubi.create.Create;
|
||||||
|
import com.simibubi.create.foundation.utility.worldWrappers.WrappedChunkProvider;
|
||||||
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
import com.simibubi.create.foundation.utility.worldWrappers.WrappedWorld;
|
||||||
import net.minecraft.block.AbstractFurnaceBlock;
|
import net.minecraft.block.AbstractFurnaceBlock;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -42,7 +43,7 @@ public class SchematicWorld extends WrappedWorld implements IServerWorld {
|
||||||
}
|
}
|
||||||
|
|
||||||
public SchematicWorld(BlockPos anchor, World original) {
|
public SchematicWorld(BlockPos anchor, World original) {
|
||||||
super(original);
|
super(original, new WrappedChunkProvider());
|
||||||
this.blocks = new HashMap<>();
|
this.blocks = new HashMap<>();
|
||||||
this.tileEntities = new HashMap<>();
|
this.tileEntities = new HashMap<>();
|
||||||
this.bounds = new MutableBoundingBox();
|
this.bounds = new MutableBoundingBox();
|
||||||
|
|
|
@ -54,6 +54,9 @@ public class WrappedChunkProvider extends AbstractChunkProvider {
|
||||||
|
|
||||||
public WrappedChunk getChunk(int x, int z) {
|
public WrappedChunk getChunk(int x, int z) {
|
||||||
long pos = ChunkPos.asLong(x, z);
|
long pos = ChunkPos.asLong(x, z);
|
||||||
|
|
||||||
|
if (chunks == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
WrappedChunk chunk = chunks.get(pos);
|
WrappedChunk chunk = chunks.get(pos);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue