Java Code Examples for org.bukkit.craftbukkit.CraftWorld#getTileEntityAt()

The following examples show how to use org.bukkit.craftbukkit.CraftWorld#getTileEntityAt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftCommandBlock.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
public CraftCommandBlock(Block block) {
    super(block);

    CraftWorld world = (CraftWorld) block.getWorld();
    commandBlock = (TileEntityCommandBlock) world.getTileEntityAt(getX(), getY(), getZ());
    command = commandBlock.func_145993_a().field_145763_e;
    name = commandBlock.func_145993_a().getCommandSenderName();
}
 
Example 2
Source File: CraftSign.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
public CraftSign(final Block block) {
    super(block);

    CraftWorld world = (CraftWorld) block.getWorld();
    sign = (net.minecraft.tileentity.TileEntitySign) world.getTileEntityAt(getX(), getY(), getZ());
    // Spigot start
    if (sign == null) {
        lines = new String[]{"", "", "", ""};
        return;
    }
    // Spigot end
    lines = new String[sign.signText.length];
    System.arraycopy(sign.signText, 0, lines, 0, lines.length);
}
 
Example 3
Source File: CraftSkull.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
public CraftSkull(final Block block) {
    super(block);

    CraftWorld world = (CraftWorld) block.getWorld();
    skull = (TileEntitySkull) world.getTileEntityAt(getX(), getY(), getZ());
    profile = skull.func_152108_a();
    skullType = getSkullType(skull.func_145904_a());
    rotation = (byte) skull.getRotation();
}
 
Example 4
Source File: CraftCustomContainer.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public CraftCustomContainer(Block block) {
    super(block);
    world = (CraftWorld) block.getWorld();
    container = (IInventory) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 5
Source File: CraftJukebox.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftJukebox(final Block block) {
    super(block);

    world = (CraftWorld) block.getWorld();
    jukebox = (TileEntityJukebox) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 6
Source File: CraftNoteBlock.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftNoteBlock(final Block block) {
    super(block);

    world = (CraftWorld) block.getWorld();
    note = (TileEntityNote) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 7
Source File: CraftDropper.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftDropper(final Block block) {
    super(block);

    world = (CraftWorld) block.getWorld();
    dropper = (TileEntityDropper) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 8
Source File: CraftDispenser.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftDispenser(final Block block) {
    super(block);

    world = (CraftWorld) block.getWorld();
    dispenser = (TileEntityDispenser) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 9
Source File: CraftBeacon.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftBeacon(final Block block) {
    super(block);

    world = (CraftWorld) block.getWorld();
    beacon = (TileEntityBeacon) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 10
Source File: CraftChest.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftChest(final Block block) {
    super(block);

    world = (CraftWorld) block.getWorld();
    chest = (TileEntityChest) world.getTileEntityAt(getX(), getY(), getZ());
}
 
Example 11
Source File: CraftCustomContainer.java    From Thermos with GNU General Public License v3.0 4 votes vote down vote up
public CraftCustomContainer(Block block) {
    super(block);
    world = (CraftWorld) block.getWorld();
    container = (IInventory)world.getTileEntityAt(getX(), getY(), getZ());
}