Permalink
Browse files

shiftedIndex -> itemID

Also some code with BasicWorldGen that should be ignored.
  • Loading branch information...
1 parent 33ad243 commit 245ed84467eccc94c27c84799a06ece32f2e5c79 @Havvy committed Jan 24, 2013
Showing with 18 additions and 6 deletions.
  1. +1 −0 .gitignore
  2. +13 −2 tutorial/generic/BasicWorldGen.java
  3. +1 −1 tutorial/generic/GenericOre.java
  4. +3 −3 tutorial/generic/TomatoCrop.java
View
@@ -14,3 +14,4 @@ common/fml_at.cfg
common/fml_marker.cfg
common/fmlversion.properties
common/forge_at.cfg
+*sublime*
@@ -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
+ }
}
@@ -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;
}
}
@@ -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;
}
}

0 comments on commit 245ed84

Please sign in to comment.