Search in sources :

Example 6 with TileEntityFlowerPot

use of net.minecraft.server.v1_8_R1.TileEntityFlowerPot in project acidisland by tastybento.

the class NMSHandler method setFlowerPotBlock.

/* (non-Javadoc)
     * @see com.wasteofplastic.askyblock.nms.NMSAbstraction#setBlock(org.bukkit.block.Block, org.bukkit.inventory.ItemStack)
     * Credis: Mister_Frans (THANK YOU VERY MUCH !)
     */
@Override
public void setFlowerPotBlock(Block block, ItemStack itemStack) {
    Location loc = block.getLocation();
    CraftWorld cw = (CraftWorld) block.getWorld();
    BlockPosition bp = new BlockPosition(loc.getX(), loc.getY(), loc.getZ());
    TileEntityFlowerPot te = (TileEntityFlowerPot) cw.getHandle().getTileEntity(bp);
    // Bukkit.getLogger().info("Debug: flowerpot materialdata = " + (new ItemStack(potItem, 1,(short) potItemData).toString()));
    net.minecraft.server.v1_8_R2.ItemStack cis = CraftItemStack.asNMSCopy(itemStack);
    te.a(cis.getItem(), cis.getData());
    te.update();
}
Also used : BlockPosition(net.minecraft.server.v1_8_R2.BlockPosition) TileEntityFlowerPot(net.minecraft.server.v1_8_R2.TileEntityFlowerPot) CraftWorld(org.bukkit.craftbukkit.v1_8_R2.CraftWorld) Location(org.bukkit.Location)

Example 7 with TileEntityFlowerPot

use of net.minecraft.server.v1_8_R1.TileEntityFlowerPot in project acidisland by tastybento.

the class NMSHandler method setFlowerPotBlock.

/* (non-Javadoc)
     * @see com.wasteofplastic.askyblock.nms.NMSAbstraction#setBlock(org.bukkit.block.Block, org.bukkit.inventory.ItemStack)
     * Credis: Mister_Frans (THANK YOU VERY MUCH !)
     */
@Override
public void setFlowerPotBlock(Block block, ItemStack itemStack) {
    Location loc = block.getLocation();
    CraftWorld cw = (CraftWorld) block.getWorld();
    BlockPosition bp = new BlockPosition(loc.getX(), loc.getY(), loc.getZ());
    TileEntityFlowerPot te = (TileEntityFlowerPot) cw.getHandle().getTileEntity(bp);
    // Bukkit.getLogger().info("Debug: flowerpot materialdata = " + (new ItemStack(potItem, 1,(short) potItemData).toString()));
    net.minecraft.server.v1_8_R3.ItemStack cis = CraftItemStack.asNMSCopy(itemStack);
    te.a(cis.getItem(), cis.getData());
    te.update();
}
Also used : BlockPosition(net.minecraft.server.v1_8_R3.BlockPosition) TileEntityFlowerPot(net.minecraft.server.v1_8_R3.TileEntityFlowerPot) CraftWorld(org.bukkit.craftbukkit.v1_8_R3.CraftWorld) Location(org.bukkit.Location)

Example 8 with TileEntityFlowerPot

use of net.minecraft.server.v1_8_R1.TileEntityFlowerPot in project acidisland by tastybento.

the class NMSHandler method setFlowerPotBlock.

/* (non-Javadoc)
     * @see com.wasteofplastic.askyblock.nms.NMSAbstraction#setBlock(org.bukkit.block.Block, org.bukkit.inventory.ItemStack)
     * Credis: Mister_Frans (THANK YOU VERY MUCH !)
     */
@Override
public void setFlowerPotBlock(Block block, ItemStack itemStack) {
    Location loc = block.getLocation();
    CraftWorld cw = (CraftWorld) block.getWorld();
    BlockPosition bp = new BlockPosition(loc.getX(), loc.getY(), loc.getZ());
    TileEntityFlowerPot te = (TileEntityFlowerPot) cw.getHandle().getTileEntity(bp);
    // Bukkit.getLogger().info("Debug: flowerpot materialdata = " + (new ItemStack(potItem, 1,(short) potItemData).toString()));
    net.minecraft.server.v1_9_R1.ItemStack cis = CraftItemStack.asNMSCopy(itemStack);
    te.a(cis.getItem(), cis.getData());
    te.update();
}
Also used : BlockPosition(net.minecraft.server.v1_9_R1.BlockPosition) TileEntityFlowerPot(net.minecraft.server.v1_9_R1.TileEntityFlowerPot) CraftWorld(org.bukkit.craftbukkit.v1_9_R1.CraftWorld) Location(org.bukkit.Location)

Example 9 with TileEntityFlowerPot

use of net.minecraft.server.v1_8_R1.TileEntityFlowerPot in project acidisland by tastybento.

the class NMSHandler method setFlowerPotBlock.

/* (non-Javadoc)
     * @see com.wasteofplastic.askyblock.nms.NMSAbstraction#setBlock(org.bukkit.block.Block, org.bukkit.inventory.ItemStack)
     * Credis: Mister_Frans (THANK YOU VERY MUCH !)
     */
@Override
public void setFlowerPotBlock(Block block, ItemStack itemStack) {
    Location loc = block.getLocation();
    CraftWorld cw = (CraftWorld) block.getWorld();
    BlockPosition bp = new BlockPosition(loc.getX(), loc.getY(), loc.getZ());
    TileEntityFlowerPot te = (TileEntityFlowerPot) cw.getHandle().getTileEntity(bp);
    // Bukkit.getLogger().info("Debug: flowerpot materialdata = " + (new ItemStack(potItem, 1,(short) potItemData).toString()));
    net.minecraft.server.v1_9_R2.ItemStack cis = CraftItemStack.asNMSCopy(itemStack);
    te.a(cis.getItem(), cis.getData());
    te.update();
}
Also used : BlockPosition(net.minecraft.server.v1_9_R2.BlockPosition) TileEntityFlowerPot(net.minecraft.server.v1_9_R2.TileEntityFlowerPot) CraftWorld(org.bukkit.craftbukkit.v1_9_R2.CraftWorld) Location(org.bukkit.Location)

Example 10 with TileEntityFlowerPot

use of net.minecraft.server.v1_8_R1.TileEntityFlowerPot in project acidisland by tastybento.

the class NMSHandler method setFlowerPotBlock.

/* (non-Javadoc)
     * @see com.wasteofplastic.askyblock.nms.NMSAbstraction#setBlock(org.bukkit.block.Block, org.bukkit.inventory.ItemStack)
     * Credis: Mister_Frans (THANK YOU VERY MUCH !)
     */
@Override
public void setFlowerPotBlock(Block block, ItemStack itemStack) {
    Location loc = block.getLocation();
    CraftWorld cw = (CraftWorld) block.getWorld();
    TileEntityFlowerPot te = (TileEntityFlowerPot) cw.getHandle().getTileEntity(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
    Bukkit.getLogger().info("Debug: flowerpot materialdata = " + itemStack.toString());
    net.minecraft.server.v1_7_R3.ItemStack cis = CraftItemStack.asNMSCopy(itemStack);
    te.a(cis.getItem(), cis.getData());
    te.update();
}
Also used : TileEntityFlowerPot(net.minecraft.server.v1_7_R3.TileEntityFlowerPot) CraftWorld(org.bukkit.craftbukkit.v1_7_R3.CraftWorld) Location(org.bukkit.Location)

Aggregations

Location (org.bukkit.Location)10 BlockPosition (net.minecraft.server.v1_10_R1.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_10_R1.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_11_R1.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_11_R1.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_12_R1.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_12_R1.TileEntityFlowerPot)1 TileEntityFlowerPot (net.minecraft.server.v1_7_R3.TileEntityFlowerPot)1 TileEntityFlowerPot (net.minecraft.server.v1_7_R4.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_8_R1.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_8_R1.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_8_R2.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_8_R2.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_8_R3.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_8_R3.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_9_R1.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_9_R1.TileEntityFlowerPot)1 BlockPosition (net.minecraft.server.v1_9_R2.BlockPosition)1 TileEntityFlowerPot (net.minecraft.server.v1_9_R2.TileEntityFlowerPot)1 CraftWorld (org.bukkit.craftbukkit.v1_10_R1.CraftWorld)1