Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

shiftedIndex -> itemID

Also some code with BasicWorldGen that should be ignored.
  • Loading branch information...
commit 245ed84467eccc94c27c84799a06ece32f2e5c79 1 parent 33ad243
@Havvy authored
View
1  .gitignore
@@ -14,3 +14,4 @@ common/fml_at.cfg
common/fml_marker.cfg
common/fmlversion.properties
common/forge_at.cfg
+*sublime*
View
15 tutorial/generic/BasicWorldGen.java
@@ -13,13 +13,24 @@
@Override
public void generate (Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
- compass(random, chunkX * 16, chunkZ * 16, world, chunkGenerator, chunkProvider);
+ int x = chunkX * 16;
+ int z = chunkZ * 16;
+
+ compass(random, x, z, world, chunkGenerator, chunkProvider);
+ ore(random, x, z, world, chunkGenerator, chunkProvider);
}
private void compass (Random random, int x, int z, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
- world.setBlock(x, 72, z, Block.obsidian.blockID);
+ world.setBlock(x+8, 72, z+15, Block.obsidian.blockID);
+ world.setBlock(x+7, 72, z, Block.cobblestoneMossy.blockID);
+ world.setBlock(x, 72, z+7, Block.blockLapis.blockID);
+ world.setBlock(x+15, 72, z+8, Block.blockGold.blockID);
}
+ private void ore (Random random, int x, int z, World world,
+ IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
+ // TODO
+ }
}
View
2  tutorial/generic/GenericOre.java
@@ -23,6 +23,6 @@ public String getTextureFile () {
@Override
public int idDropped (int par1, Random random, int par2) {
- return Generic.genericIngot.shiftedIndex;
+ return Generic.genericIngot.itemID;
}
}
View
6 tutorial/generic/TomatoCrop.java
@@ -72,9 +72,9 @@ public boolean canBlockStay (World world, int x, int y, int z) {
public int idDropped (int metadata, Random random, int par2) {
switch (metadata) {
case 0:
- return Generic.tomatoSeeds.shiftedIndex;
+ return Generic.tomatoSeeds.itemID;
case 1:
- return Generic.tomatoFruit.shiftedIndex;
+ return Generic.tomatoFruit.itemID;
default:
// Error case!
return -1; // air
@@ -83,6 +83,6 @@ public int idDropped (int metadata, Random random, int par2) {
@Override
public int idPicked (World world, int x, int y, int z) {
- return Generic.tomatoSeeds.shiftedIndex;
+ return Generic.tomatoSeeds.itemID;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.