mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
fix chunkregion entity spawn crash
This commit is contained in:
+1
-3
@@ -81,10 +81,8 @@ public abstract class ChunkRegionMixin {
|
|||||||
this.config = ((ServerWorld) world).getPack();
|
this.config = ((ServerWorld) world).getPack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public Entity terraWorld$spawnEntity(Vector3 location, EntityType entityType) {
|
public Entity terraWorld$spawnEntity(Vector3 location, EntityType entityType) {
|
||||||
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(
|
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(null);
|
||||||
((ChunkRegion) (Object) this).toServerWorld());
|
|
||||||
entity.setPos(location.getX(), location.getY(), location.getZ());
|
entity.setPos(location.getX(), location.getY(), location.getZ());
|
||||||
((ChunkRegion) (Object) this).spawnEntity(entity);
|
((ChunkRegion) (Object) this).spawnEntity(entity);
|
||||||
return (Entity) entity;
|
return (Entity) entity;
|
||||||
|
|||||||
Reference in New Issue
Block a user