コード例 #1
0
 private void dropTieredResource(
     World world, int x, int y, int z, int dx, int dy, int dz, Block id, int meta2) {
   Collection<ItemStack> li =
       ((BlockTieredResource) id).getHarvestResources(world, dx, dy, dz, 10, this.getPlacer());
   this.dropItems(world, x, y, z, li);
   this.getFillerBlock(world, dx, dy, dz, id, meta2).place(world, dx, dy, dz);
   ReikaSoundHelper.playBreakSound(world, dx, dy, dz, id);
   ReikaPacketHelper.sendDataPacket(
       DragonAPIInit.packetChannel,
       PacketIDs.BREAKPARTICLES.ordinal(),
       world,
       dx,
       dy,
       dz,
       Block.getIdFromBlock(id),
       meta2);
 }
コード例 #2
0
 private void dropBlock(
     World world, int x, int y, int z, int dx, int dy, int dz, Block id, int meta2) {
   if (this.silkTouch()) {
     this.dropItems(world, x, y, z, ReikaJavaLibrary.makeListFrom(new ItemStack(id, 1, meta2)));
   } else {
     this.dropItems(world, x, y, z, id.getDrops(world, dx, dy, dz, meta2, 0));
   }
   this.getFillerBlock(world, dx, dy, dz, id, meta2).place(world, dx, dy, dz);
   ReikaSoundHelper.playBreakSound(world, dx, dy, dz, id);
   ReikaPacketHelper.sendDataPacket(
       DragonAPIInit.packetChannel,
       PacketIDs.BREAKPARTICLES.ordinal(),
       world,
       dx,
       dy,
       dz,
       Block.getIdFromBlock(id),
       meta2);
 }