mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
spawn entity in serverworld with no world object
This commit is contained in:
@@ -42,8 +42,7 @@ import com.dfsek.terra.fabric.util.FabricUtil;
|
||||
@Implements(@Interface(iface = ServerWorld.class, prefix = "terra$"))
|
||||
public abstract class ServerWorldMixin {
|
||||
public Entity terra$spawnEntity(double x, double y, double z, EntityType entityType) {
|
||||
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(
|
||||
((net.minecraft.server.world.ServerWorld) (Object) this));
|
||||
net.minecraft.entity.Entity entity = ((net.minecraft.entity.EntityType<?>) entityType).create(null);
|
||||
entity.setPos(x, y, z);
|
||||
((net.minecraft.server.world.ServerWorld) (Object) this).spawnEntity(entity);
|
||||
return (Entity) entity;
|
||||
|
||||
Reference in New Issue
Block a user