mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-11 10:16:15 +00:00
implement spawnEntity in ChunkRegionMixin
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user