Exemplo n.º 1
0
  public void didBreakBlock(World world, BlockPos pos, IBlockState state) {
    world.withTileEntity(
        pos,
        TileEntityDispenser.class,
        t -> {
          InventoryHelper.dropInventoryItems(world, pos, t);
          world.updateComparatorOutputLevel(pos, this);
        });

    super.didBreakBlock(world, pos, state);
  }
Exemplo n.º 2
0
 /* Event hooks */
 public void didPlaceBlock(World world, BlockPos pos, IBlockState state) {
   super.didPlaceBlock(world, pos, state);
   this.setDefaultDirection(world, pos, state);
 }