use of net.minecraft.server.v1_16_R1.World in project Movecraft by APDevTeam.
the class IWorldHandler method setBlockFast.
@Override
public void setBlockFast(@NotNull Location location, @NotNull MovecraftRotation rotation, @NotNull BlockData data) {
IBlockData blockData;
if (data instanceof CraftBlockData) {
blockData = ((CraftBlockData) data).getState();
} else {
blockData = (IBlockData) data;
}
blockData = blockData.a(ROTATION[rotation.ordinal()]);
World world = ((CraftWorld) (location.getWorld())).getHandle();
BlockPosition blockPosition = locationToPosition(bukkit2MovecraftLoc(location));
setBlockFast(world, blockPosition, blockData);
}
use of net.minecraft.server.v1_16_R1.World in project Movecraft by APDevTeam.
the class IWorldHandler method setBlockFast.
@Override
public void setBlockFast(@NotNull Location location, @NotNull MovecraftRotation rotation, @NotNull BlockData data) {
IBlockData blockData;
if (data instanceof CraftBlockData) {
blockData = ((CraftBlockData) data).getState();
} else {
blockData = (IBlockData) data;
}
blockData = blockData.a(ROTATION[rotation.ordinal()]);
World world = ((CraftWorld) (location.getWorld())).getHandle();
BlockPosition blockPosition = locationToPosition(bukkit2MovecraftLoc(location));
setBlockFast(world, blockPosition, blockData);
}
use of net.minecraft.server.v1_16_R1.World in project TheAPI by TheDevTec.
the class v1_16_R1 method packetBlockChange.
@Override
public Object packetBlockChange(World world, Position position) {
PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange();
packet.block = (IBlockData) position.getIBlockData();
try {
pos.set(packet, position.getBlockPosition());
} catch (Exception e) {
}
return packet;
}
use of net.minecraft.server.v1_16_R1.World in project Slabbo by Sven65.
the class SlabboAPI_v1_8_R1 method setChestName.
public void setChestName(Block chestBlock, String name) {
Chest chest = (Chest) chestBlock.getState();
World nmsWorld = ((CraftWorld) chestBlock.getWorld()).getHandle();
TileEntity tileEntity = nmsWorld.getTileEntity(new BlockPosition(chestBlock.getX(), chestBlock.getY(), chestBlock.getZ()));
if (!(tileEntity instanceof TileEntityChest))
return;
((TileEntityChest) tileEntity).a(name);
chest.update();
}
use of net.minecraft.server.v1_16_R1.World in project PaperDev by Kamillaova.
the class CraftRabbit method setRabbitType.
@Override
public void setRabbitType(Type type) {
EntityRabbit entity = getHandle();
if (getRabbitType() == Type.THE_KILLER_BUNNY) {
// Reset goals and target finders.
World world = ((CraftWorld) this.getWorld()).getHandle();
entity.goalSelector = new PathfinderGoalSelector(world != null && world.methodProfiler != null ? world.methodProfiler : null);
entity.targetSelector = new PathfinderGoalSelector(world != null && world.methodProfiler != null ? world.methodProfiler : null);
entity.initializePathFinderGoals();
}
entity.setRabbitType(CraftMagicMapping.toMagic(type));
}
Aggregations