コード例 #1
0
 private void doIgnition(World world, int x, int y, int z) {
   world.setBlockToAir(x, y, z);
   world.newExplosion(null, x, y, z, 4.0F, true, true);
   BlockCoord c = new BlockCoord(x, y, z);
   for (BlockCoord n : c.getAdjacent()) {
     if (n.getBlock(world).equals(ArtificeBlocks.blockFuel)) doIgnition(world, n.x, n.y, n.z);
   }
 }
コード例 #2
0
  @Override
  @SideOnly(Side.CLIENT)
  public void onNeighborBlockChange(World world, int x, int y, int z, int neighborID) {
    Integer worldID = world.provider.dimensionId;
    BlockCoord coord = new BlockCoord(x, y, z);
    ChunkCoord chunk = new ChunkCoord(coord);
    int meta = coord.getMeta(world);

    int[] old = ArtificeCore.textureCache.get(worldID, chunk, coord);
    int[] indices = new int[6];
    for (int i = 0; i < indices.length; i++)
      indices[i] = this.getTextureRenderer(i, meta).getTextureIndex(world, x, y, z, i);
    ArtificeCore.textureCache.add(worldID, chunk, coord, indices);
  }