implement spawnEntity in ChunkRegionMixin

This commit is contained in:
dfsek
2022-01-28 22:46:09 -07:00
parent c131d81686
commit 9fe8ac7b32

View File

@@ -135,6 +135,13 @@ public abstract class ChunkRegionMixin {
.getBiomeSource()).getProvider();
}
public Entity terraWorld$spawnEntity(double x, double y, double z, EntityType entityType) {
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(world);
entity.setPos(x, y, z);
((ChunkRegion) (Object) this).spawnEntity(entity);
return (Entity) entity;
}
public int terraWorld$centerChunkX() {
return centerPos.getPos().x;
}