use of net.minecraft.server.v1_16_R3.IBlockData in project RoseStacker by Rosewood-Development.
the class StackedSpawnerTileImpl method updateTile.
private void updateTile() {
World level = this.a();
if (level != null) {
level.b(this.blockPos, this.blockEntity);
IBlockData var1 = this.a().getType(this.b());
this.a().notify(this.blockPos, var1, var1, 3);
}
}
use of net.minecraft.server.v1_16_R3.IBlockData in project RoseStacker by Rosewood-Development.
the class StackedSpawnerTileImpl method updateTile.
private void updateTile() {
World level = this.a();
if (level != null) {
level.b(this.blockPos, this.blockEntity);
IBlockData var1 = this.a().getType(this.b());
this.a().notify(this.blockPos, var1, var1, 3);
}
}
use of net.minecraft.server.v1_16_R3.IBlockData in project SSB-OneBlock by BG-Software-LLC.
the class NMSAdapter_v1_8_R3 method simulateToolBreak.
@Override
public void simulateToolBreak(Player bukkitPlayer, org.bukkit.block.Block bukkitBlock) {
EntityPlayer entityPlayer = ((CraftPlayer) bukkitPlayer).getHandle();
ItemStack itemStack = entityPlayer.bZ();
WorldServer worldServer = ((CraftWorld) bukkitBlock.getWorld()).getHandle();
BlockPosition blockPosition = new BlockPosition(bukkitBlock.getX(), bukkitBlock.getY(), bukkitBlock.getZ());
IBlockData blockData = worldServer.getType(blockPosition);
itemStack.a(worldServer, blockData.getBlock(), blockPosition, entityPlayer);
if (itemStack.count == 0)
entityPlayer.ca();
}
use of net.minecraft.server.v1_16_R3.IBlockData in project SSB-OneBlock by BG-Software-LLC.
the class NMSAdapter_v1_12_R1 method simulateToolBreak.
@Override
public void simulateToolBreak(Player bukkitPlayer, org.bukkit.block.Block bukkitBlock) {
EntityPlayer entityPlayer = ((CraftPlayer) bukkitPlayer).getHandle();
ItemStack itemStack = entityPlayer.getItemInMainHand();
WorldServer worldServer = ((CraftWorld) bukkitBlock.getWorld()).getHandle();
BlockPosition blockPosition = new BlockPosition(bukkitBlock.getX(), bukkitBlock.getY(), bukkitBlock.getZ());
IBlockData blockData = worldServer.getType(blockPosition);
assert itemStack != null;
itemStack.a(worldServer, blockData, blockPosition, entityPlayer);
}
use of net.minecraft.server.v1_16_R3.IBlockData in project SSB-OneBlock by BG-Software-LLC.
the class NMSAdapter_v1_16_R3 method simulateToolBreak.
@Override
public void simulateToolBreak(Player bukkitPlayer, org.bukkit.block.Block bukkitBlock) {
EntityPlayer entityPlayer = ((CraftPlayer) bukkitPlayer).getHandle();
ItemStack itemStack = entityPlayer.getItemInMainHand();
WorldServer worldServer = ((CraftWorld) bukkitBlock.getWorld()).getHandle();
BlockPosition blockPosition = new BlockPosition(bukkitBlock.getX(), bukkitBlock.getY(), bukkitBlock.getZ());
IBlockData blockData = worldServer.getType(blockPosition);
assert itemStack != null;
itemStack.a(worldServer, blockData, blockPosition, entityPlayer);
}
Aggregations