コード例 #1
0
ファイル: ItemDust.java プロジェクト: asiekierka/Railcraft
 @Override
 public void defineRecipes() {
   if (IC2Plugin.isModInstalled() && RailcraftConfig.getRecipeConfig("ic2.macerator.charcoal")) {
     IC2Plugin.addMaceratorRecipe(
         new ItemStack(Items.coal, 1, 1), new ItemStack(this, 1, EnumDust.CHARCOAL.ordinal()));
   }
 }
コード例 #2
0
 @Override
 public void onPostBlockPlaced(World world, int x, int y, int z, int meta) {
   super.onPostBlockPlaced(world, x, y, z, meta);
   if (RailcraftConfig.printSignalDebug()) {
     Game.logTrace(Level.INFO, 10, "Signal Block onPostBlockPlaced. [{0}, {1}, {2}]", x, y, y);
   }
   TileEntity tile = world.getTileEntity(x, y, z);
   if (tile instanceof TileSignalFoundation) ((TileSignalFoundation) tile).onBlockPlaced();
 }
コード例 #3
0
 @Override
 public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
   if (RailcraftConfig.printSignalDebug()) {
     Game.logTrace(Level.INFO, 10, "Signal Block breakBlock. [{0}, {1}, {2}]", x, y, z);
   }
   TileEntity tile = world.getTileEntity(x, y, z);
   if (tile instanceof TileSignalFoundation) ((TileSignalFoundation) tile).onBlockRemoval();
   super.breakBlock(world, x, y, z, block, meta);
 }
コード例 #4
0
 @Override
 public void onBlockPlacedBy(
     World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack) {
   if (RailcraftConfig.printSignalDebug()) {
     Game.logTrace(Level.INFO, 10, "Signal Block onBlockPlacedBy. [{0}, {1}, {2}]", x, y, z);
   }
   TileEntity tile = world.getTileEntity(x, y, z);
   if (tile instanceof TileSignalFoundation)
     ((TileSignalFoundation) tile).onBlockPlacedBy(entityliving, stack);
 }