コード例 #1
0
ファイル: BlockHopper.java プロジェクト: Miner239/TFCraft
  /** Called when the block is placed in the world. */
  @Override
  public void onBlockPlacedBy(
      World world, int x, int y, int z, EntityLivingBase entity, ItemStack is) {
    super.onBlockPlacedBy(world, x, y, z, entity, is);

    if (is.hasDisplayName()) {
      TEHopper tileentityhopper = getHopperTE(world, x, y, z);
      tileentityhopper.setCustomName(is.getDisplayName());
    }
  }