mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
implement spawnEntity in ChunkRegionMixin
This commit is contained in:
+7
@@ -135,6 +135,13 @@ public abstract class ChunkRegionMixin {
|
|||||||
.getBiomeSource()).getProvider();
|
.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() {
|
public int terraWorld$centerChunkX() {
|
||||||
return centerPos.getPos().x;
|
return centerPos.getPos().x;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user