use of net.minecraft.server.v1_16_R3.EntityItemFrame in project Citizens2 by CitizensDev.
the class ItemFrameController method createEntity.
@Override
protected Entity createEntity(Location at, NPC npc) {
Entity e = super.createEntity(at, npc);
EntityItemFrame item = (EntityItemFrame) ((CraftEntity) e).getHandle();
item.setDirection(EnumDirection.EAST);
item.blockPosition = new BlockPosition(at.getX(), at.getY(), at.getZ());
return e;
}
use of net.minecraft.server.v1_16_R3.EntityItemFrame in project Citizens2 by CitizensDev.
the class ItemFrameController method createEntity.
@Override
protected Entity createEntity(Location at, NPC npc) {
Entity e = super.createEntity(at, npc);
EntityItemFrame item = (EntityItemFrame) ((CraftEntity) e).getHandle();
item.setDirection(EnumDirection.EAST);
item.blockPosition = new BlockPosition(at.getX(), at.getY(), at.getZ());
return e;
}
use of net.minecraft.server.v1_16_R3.EntityItemFrame in project Citizens2 by CitizensDev.
the class ItemFrameController method createEntity.
@Override
protected Entity createEntity(Location at, NPC npc) {
Entity e = super.createEntity(at, npc);
EntityItemFrame item = (EntityItemFrame) ((CraftEntity) e).getHandle();
item.setDirection(EnumDirection.EAST);
item.blockPosition = new BlockPosition(at.getX(), at.getY(), at.getZ());
return e;
}
use of net.minecraft.server.v1_16_R3.EntityItemFrame in project PaperDev by Kamillaova.
the class CraftItemFrame method update.
private void update() {
EntityItemFrame old = this.getHandle();
WorldServer world = ((CraftWorld) getWorld()).getHandle();
BlockPosition position = old.getBlockPosition();
EnumDirection direction = old.getDirection();
ItemStack item = old.getItem() != null ? old.getItem().cloneItemStack() : null;
old.die();
EntityItemFrame frame = new EntityItemFrame(world, position, direction);
frame.setItem(item);
world.addEntity(frame);
this.entity = frame;
}
Aggregations