Jump to content

vandy22

Members
  • Posts

    224
  • Joined

  • Last visited

Everything posted by vandy22

  1. I have a tree generation issue with my mod. I can generate trees in my dimension but then it will also generate trees in the overworld. My goal is to have a custom tree that just generates in my dimension. Here is the code that causes this issue: package com.mjj.colormod.handler; import java.util.Random; import com.mjj.colormod.dimension.WorldGenCrypticMinable; import com.mjj.colormod.maps.CrypticWorldGenTrees; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; public class EventManager implements IWorldGenerator { public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch (world.provider.dimensionId) { case -1: generateNether(world, random, chunkX * 16, chunkZ * 16); case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); case 1: generateEnd(world, random, chunkX * 16, chunkZ * 16); case 3: generateCryptic(world, random, chunkX * 16, chunkZ * 16); } } private void generateEnd(World world, Random random, int x, int z) { } private void generateCryptic(World world, Random random, int x, int z) { for (int i = 0; i < 10; i++) { //16x16 area up to y = 64 int randPosX = x + random.nextInt(16); int randPosY = random.nextInt(64); int randPosZ = z + random.nextInt(16); // 10 blocks per vein (new WorldGenCrypticMinable(BlockHandler.blueOre, 50)).generate(world, random, randPosX, randPosY, randPosZ); } for(int t = 0; t < 20; t++){ int chunkX = x + random.nextInt(16); int chunkY = random.nextInt(90); int chunkZ = z + random.nextInt(16); (new CrypticWorldGenTrees(false, 7, 0, 0, false)).generate(world, random, chunkX, chunkY, chunkZ); } } private void generateSurface(World world, Random random, int x, int z) { this.addOreSpawn(BlockHandler.blueOre, world, random, x, z, 16, 16, 8, 6, 10, 65); this.addOreSpawn(BlockHandler.greenOre, world, random, x, z, 16, 16, 7, 5, 18, 45); this.addOreSpawn(BlockHandler.purpleOre, world, random, x, z, 16, 16, 6, 4, 2, 25); this.addOreSpawn(BlockHandler.redOre, world, random, x, z, 16, 16, 8, 6, 10, 65); this.addOreSpawn(BlockHandler.orangeOre, world, random, x, z, 16, 16, 7, 5, 18, 45); this.addOreSpawn(BlockHandler.yellowOre, world, random, x, z, 16, 16, 6, 4, 2, 25); } private void generateNether(World world, Random random, int x, int z) { } /** * Adds an Ore Spawn to Minecraft. Simply register all Ores to spawn with this method in your Generation method in your IWorldGeneration extending Class * * @param The Block to spawn * @param The World to spawn in * @param A Random object for retrieving random positions within the world to spawn the Block * @param An int for passing the X-Coordinate for the Generation method * @param An int for passing the Z-Coordinate for the Generation method * @param An int for setting the maximum X-Coordinate values for spawning on the X-Axis on a Per-Chunk basis * @param An int for setting the maximum Z-Coordinate values for spawning on the Z-Axis on a Per-Chunk basis * @param An int for setting the maximum size of a vein * @param An int for the Number of chances available for the Block to spawn per-chunk * @param An int for the minimum Y-Coordinate height at which this block may spawn * @param An int for the maximum Y-Coordinate height at which this block may spawn **/ public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY) { assert maxY > minY : "The maximum Y must be greater than the Minimum Y"; assert maxX > 0 && maxX <= 16 : "addOreSpawn: The Maximum X must be greater than 0 and less than 16"; assert minY > 0 : "addOreSpawn: The Minimum Y must be greater than 0"; assert maxY < 256 && maxY > 0 : "addOreSpawn: The Maximum Y must be less than 256 but greater than 0"; assert maxZ > 0 && maxZ <= 16 : "addOreSpawn: The Maximum Z must be greater than 0 and less than 16"; int diffBtwnMinMaxY = maxY - minY; for (int x = 0; x < chancesToSpawn; x++) { int posX = blockXPos + random.nextInt(maxX); int posY = minY + random.nextInt(diffBtwnMinMaxY); int posZ = blockZPos + random.nextInt(maxZ); (new WorldGenMinable(block, maxVeinSize)).generate(world, random, posX, posY, posZ); } } } If I comment out: for(int t = 0; t < 20; t++){ int chunkX = x + random.nextInt(16); int chunkY = random.nextInt(90); int chunkZ = z + random.nextInt(16); (new CrypticWorldGenTrees(false, 7, 0, 0, false)).generate(world, random, chunkX, chunkY, chunkZ); } that ^^^ it will remove both trees from the overworld and the custom dimension. I don't understand why though considering the the for loop is in the generateCryptic method not the generateSurface method. Any help would be much appriciated. Thanks ~vandy22
  2. Thanks guys, I appropriate the information
  3. I recently made a way so that tools can be healed durability using the crafting table with an ingot. I have a lot of tools in my mod so I had to make a shapeless recipe for a ton of tools! I could tell as soon as i got in game the fps had dropped by about 10-30 and seemed to have more lag spikes. Don't call me out so much on the fps stuff my main issue is how to clear up some space. Here is a small piece of code from my CraftHandler class that registers all recipes: GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.greenPickaxe), new ItemStack(ItemHandler.greenPickaxe, 1, WILDCARD_VALUE), ItemHandler.greenIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.greenSpade), new ItemStack(ItemHandler.greenSpade, 1, WILDCARD_VALUE), ItemHandler.greenIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.greenAxe), new ItemStack(ItemHandler.greenAxe, 1, WILDCARD_VALUE), ItemHandler.greenIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.greenSword), new ItemStack(ItemHandler.greenSword, 1, WILDCARD_VALUE), ItemHandler.greenIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.purplePickaxe), new ItemStack(ItemHandler.purplePickaxe, 1, WILDCARD_VALUE), ItemHandler.purpleIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.purpleSpade), new ItemStack(ItemHandler.purpleSpade, 1, WILDCARD_VALUE), ItemHandler.purpleIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.purpleAxe), new ItemStack(ItemHandler.purpleAxe, 1, WILDCARD_VALUE), ItemHandler.purpleIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.purpleSword), new ItemStack(ItemHandler.purpleSword, 1, WILDCARD_VALUE), ItemHandler.purpleIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.redPickaxe), new ItemStack(ItemHandler.redPickaxe, 1, WILDCARD_VALUE), ItemHandler.redIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.redSpade), new ItemStack(ItemHandler.redSpade, 1, WILDCARD_VALUE), ItemHandler.redIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.redAxe), new ItemStack(ItemHandler.redAxe, 1, WILDCARD_VALUE), ItemHandler.redIngot); GameRegistry.addShapelessRecipe(new ItemStack(ItemHandler.redSword), new ItemStack(ItemHandler.redSword, 1, WILDCARD_VALUE), ItemHandler.redIngot); There are many more tools than this also. You can see though that this would take up a lot of memory and make the gaming experience not as good. Is there anyway that these recipes could be called from one register? For example I have one CustomPickaxe class that I can use to initialize all my pickaxes. Same for the other tools. Is there any way I can have a small piece of code like that, that can do all this work for me instead of me having to type it out. Don't think the problem is typing it out. The problem is I want the best experience for the player so any FPS I can keep is good. Here's a piece of code that shows you kind of what I'm trying to do: GameRegistry.addShapelessRecipe(new ItemStack(tools), new ItemStack(tools, 1, WILDCARD_VALUE), ingots); You can see I replaced the actual items with tools and ingots. I was going to try and make the other tools be registered through those variables. I may be completely wrong I'm just trying to figure things out. I'm trying to take a simple piece of code that can register all these other items but in one way instead of 100. I hope I made it clear the issue because it's kind of confusing to understand. If you have any questions please ask! Or answers ! Also there may be no solution, I'm not sure. I hope someone will know the answer to this that has been stumping me over the past couple days. Thanks ~vandy22
  4. Thanks man, it worked! With what you said I figured it was the problem with the portal class, and it was! The dimensionId was wrong for some reason, which somehow made a really strange glitch with coordinates but any how, thanks so much for helping me figure out this problem. Its funny how one integer can do that much damage. Thanks again ~vandy22
  5. Bump. But also a little more progress this is what I did to try to get it to work. Since i new the values changed according to these lines of code: int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posY) - 1; int k = MathHelper.floor_double(par1Entity.posZ); What I did was grab the position of the player when entering the portal in the overworld in the blockportal class: public class BlockPortalCryptic extends BlockPortal { public static double x; public static double y; public static double z; public BlockPortalCryptic() { super(); setBlockName("portalCrypticBlock"); setCreativeTab(ColorMod.colorModTab); } @Override public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { EntityPlayerMP player = (EntityPlayerMP) par5Entity; MinecraftServer mServer = MinecraftServer.getServer(); if (player.timeUntilPortal > 0) { player.timeUntilPortal = 10; } else if (player.dimension != ColorMod.dimensionId) { player.timeUntilPortal = 10; y = player.posY; System.out.println(y); player.mcServer.getConfigurationManager().transferPlayerToDimension(player, ColorMod.dimensionId, new CrypticTeleporter(mServer.worldServerForDimension(ColorMod.dimensionId))); } else { player.timeUntilPortal = 10; player.mcServer.getConfigurationManager().transferPlayerToDimension(player, 0, new CrypticTeleporter(mServer.worldServerForDimension(1))); } } } Then when I entered the portal it would send the y coordinant to my console and it would be correct. I made public variables to grab the information in order to transfer it over to the teleporter class. In here I put the y variable in the j spot. public class CrypticTeleporter extends Teleporter { private final WorldServer worldServerInstance; /** A private Random() function in Teleporter */ private final Random random; /** Stores successful portal placement locations for rapid lookup. */ private final LongHashMap destinationCoordinateCache = new LongHashMap(); /** * A list of valid keys for the destinationCoordainteCache. These are based on the X & Z of the players initial * location. */ private final List destinationCoordinateKeys = new ArrayList(); private static final String __OBFID = "CL_00000153"; //Here grab the location and bring it over private final double y_position = BlockPortalCryptic.y; public CrypticTeleporter(WorldServer par1WorldServer) { super(par1WorldServer); this.worldServerInstance = par1WorldServer; this.random = new Random(par1WorldServer.getSeed()); } /** * Place an entity in a nearby portal, creating one if necessary. */ public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { if (this.worldServerInstance.provider.dimensionId != 1) { if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { this.makePortal(par1Entity); this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); } } else { int i = MathHelper.floor_double(par1Entity.posX); //I check to see the location System.out.println(y_position); //I plug in the Y variable int j = MathHelper.floor_double(y_position); //I check to see the location System.out.println(y_position); int k = MathHelper.floor_double(par1Entity.posZ); byte b0 = 1; byte b1 = 0; for (int l = -2; l <= 2; ++l) { for (int i1 = -2; i1 <= 2; ++i1) { for (int j1 = -1; j1 < 3; ++j1) { int k1 = i + i1 * b0 + l * b1; int l1 = j + j1; int i2 = k + i1 * b1 - l * b0; boolean flag = j1 < 0; this.worldServerInstance.setBlock(k1, l1, i2, flag ? BlockHandler.rainbowBlock : Blocks.air); } } } par1Entity.setLocationAndAngles((double)i, (double)j, (double)k, par1Entity.rotationYaw, 0.0F); par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } } You can see how I did this and in fact it did still display the correct #'s according to the original players Y value. (This is all sent the console when going through the portal). Then when re-entering the overworld from the dimension it changes the y_position to the Y value of the player in the dimension + 1. Example: Portal in overworld at: Y: 86 Console: 86 Console: 86 In the dimension im at: Y: 70 I go back into the overworld Console: 71 Console: 71 (Btw whatever the console displays is what Y coordinate im landing on. Just making that clear) Im not sure what the issue is here, I even made the variable that gets the double from BlockPortal final just so it wouldn't change but somehow it does. If anyone knows how to fix this I feel like its more of a java error not so much digging into minecraft jars and looking at dimensional classes. Thanks ~vandy22
  6. With the error thats being thrown its a pretty simple fix, in your main class your .setBlockTextureName is blank.. So the error is giving a blank png, and its going to the minecraft textures. To fix this in your main mod class you should have a modid and this is how your block init should look: blockAstralLensBlock = new AstralLens(Material.iron).setBlockName("arcaneLens").setBlockTextureName(YourModClass.modid + ":" + "nameOfBlock"); This is basic minecraft forge modding, if your having trouble with this simple of an error, I wouldn't post here before checking tons of tutorials.
  7. I still have found anything out yet, I do strongly believe though that its this method: public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { if (this.worldServerInstance.provider.dimensionId != 1) { if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { this.makePortal(par1Entity); this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); } } else { int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posY) - 1; int k = MathHelper.floor_double(par1Entity.posZ); byte b0 = 1; byte b1 = 0; for (int l = -2; l <= 2; ++l) { for (int i1 = -2; i1 <= 2; ++i1) { for (int j1 = -1; j1 < 3; ++j1) { int k1 = i + i1 * b0 + l * b1; int l1 = j + j1; int i2 = k + i1 * b1 - l * b0; boolean flag = j1 < 0; this.worldServerInstance.setBlock(k1, l1, i2, flag ? BlockHandler.rainbowBlock : Blocks.air); } } } par1Entity.setLocationAndAngles((double)i, (double)j, (double)k, par1Entity.rotationYaw, 0.0F); par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } } Because if I miss with the the int j which is the Y then it will change it, for example: int j = MathHelper.floor_double(par1Entity.posY) + 5; It will change where I spawn in the world, +5 onto that. Considering changing that value has an effect directly to the position of my character i really think this method is somehow the problem. Also this method im using is the vanilla one which also makes it weird. But if anyone knows how to fix this please speak up because i honestly have no clue! Thanks ~vandy22
  8. I did what you said and it had no effect. Thinking about it more, what your saying involves the portal rather than the entity(player). The problem is coming from the entity spawning in the wrong location, not necessarily the position of the portal. The portal's in both dimensions stay where there at, its the player (when coming into the normal world) that gets thrown around on the Y coordinate relative to the Y coordinate of portal position in the dimension. I can see why the problem probably doesn't lye in the portal class considering that doesn't really have anything to do about the location of the player or portal. I do know its a very strange problem though, its like I need some code to compare it to. I actually copied the vanilla Teleporter class into mine, changing everything so it worked, and it still had the same error. I find that very strange, since It obviously works right in vanilla. It could somehow be the portal class but I think it may be something were still missing. Again I'm not sure exactly what it is considering I don't understand this code very well, but its something that I know we can fix. Thanks ~vandy22
  9. Thanks Bektor, With my knowledge of programming this is a little over my head. Minecraft uses ALOT of math when it comes to this stuff, and so it can be hard to understand. What I can do is show you some of the methods I believe could be involved in the problem. It's not to hard figure it out, you just need to look at the method name and the parameters. Here are the two methods that I think could or may be causing the problem. /** * Place an entity in a nearby portal, creating one if necessary. */ @Override public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { if (this.worldServerInstance.provider.dimensionId != 1) { if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { this.makePortal(par1Entity); this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); } } else { int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posY) - 1; int k = MathHelper.floor_double(par1Entity.posZ); byte b0 = 1; byte b1 = 0; for (int l = -2; l <= 2; ++l) { for (int i1 = -2; i1 <= 2; ++i1) { for (int j1 = -1; j1 < 3; ++j1) { int k1 = i + i1 * b0 + l * b1; int l1 = j + j1; int i2 = k + i1 * b1 - l * b0; boolean flag = j1 < 0; this.worldServerInstance.setBlock(k1, l1, i2, flag ? Blocks.sandstone : Blocks.air); } } } par1Entity.setLocationAndAngles((double)i, (double)j, (double)k, par1Entity.rotationYaw, 0.0F); par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } } /** * Place an entity in a nearby portal which already exists. */ @SuppressWarnings("unchecked") @Override public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { short short1 = 128; double d3 = -1.0D; int i = 0; int j = 0; int k = 0; int l = MathHelper.floor_double(par1Entity.posX); int i1 = MathHelper.floor_double(par1Entity.posZ); long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1); boolean flag = true; double d4; int k1; if (this.destinationCoordinateCache.containsItem(j1)) { PortalPosition portalposition = (PortalPosition)this.destinationCoordinateCache.getValueByKey(j1); d3 = 0.0D; i = portalposition.posX; j = portalposition.posY; k = portalposition.posZ; portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); flag = false; } else { for (k1 = l - short1; k1 <= l + short1; ++k1) { double d5 = (double)k1 + 0.5D - par1Entity.posX; for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) { double d6 = (double)l1 + 0.5D - par1Entity.posZ; for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) { if (this.worldServerInstance.getBlock(k1, i2, l1) == BlockHandler.portalCrypticBlock) { while (this.worldServerInstance.getBlock(k1, i2 - 1, l1) == BlockHandler.portalCrypticBlock) { --i2; } d4 = (double)i2 + 0.5D - par1Entity.posY; double d7 = d5 * d5 + d4 * d4 + d6 * d6; if (d3 < 0.0D || d7 < d3) { d3 = d7; i = k1; j = i2; k = l1; } } } } } } if (d3 >= 0.0D) { if (flag) { this.destinationCoordinateCache.add(j1, new PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); this.destinationCoordinateKeys.add(Long.valueOf(j1)); } double d8 = (double)i + 0.5D; double d9 = (double)j + 0.5D; d4 = (double)k + 0.5D; int j2 = -1; if (this.worldServerInstance.getBlock(i - 1, j, k) == BlockHandler.portalCrypticBlock) { j2 = 2; } if (this.worldServerInstance.getBlock(i + 1, j, k) == BlockHandler.portalCrypticBlock) { j2 = 0; } if (this.worldServerInstance.getBlock(i, j, k - 1) == BlockHandler.portalCrypticBlock) { j2 = 3; } if (this.worldServerInstance.getBlock(i, j, k + 1) == BlockHandler.portalCrypticBlock) { j2 = 1; } int k2 = par1Entity.getTeleportDirection(); if (j2 > -1) { int l2 = Direction.rotateLeft[j2]; int i3 = Direction.offsetX[j2]; int j3 = Direction.offsetZ[j2]; int k3 = Direction.offsetX[l2]; int l3 = Direction.offsetZ[l2]; boolean flag1 = !this.worldServerInstance.isAirBlock(i + i3 + k3, j, k + j3 + l3) || !this.worldServerInstance.isAirBlock(i + i3 + k3, j + 1, k + j3 + l3); boolean flag2 = !this.worldServerInstance.isAirBlock(i + i3, j, k + j3) || !this.worldServerInstance.isAirBlock(i + i3, j + 1, k + j3); if (flag1 && flag2) { j2 = Direction.rotateOpposite[j2]; l2 = Direction.rotateOpposite[l2]; i3 = Direction.offsetX[j2]; j3 = Direction.offsetZ[j2]; k3 = Direction.offsetX[l2]; l3 = Direction.offsetZ[l2]; k1 = i - k3; d8 -= (double)k3; int i4 = k - l3; d4 -= (double)l3; flag1 = !this.worldServerInstance.isAirBlock(k1 + i3 + k3, j, i4 + j3 + l3) || !this.worldServerInstance.isAirBlock(k1 + i3 + k3, j + 1, i4 + j3 + l3); flag2 = !this.worldServerInstance.isAirBlock(k1 + i3, j, i4 + j3) || !this.worldServerInstance.isAirBlock(k1 + i3, j + 1, i4 + j3); } float f1 = 0.5F; float f2 = 0.5F; if (!flag1 && flag2) { f1 = 1.0F; } else if (flag1 && !flag2) { f1 = 0.0F; } else if (flag1 && flag2) { f2 = 0.0F; } d8 += (double)((float)k3 * f1 + f2 * (float)i3); d4 += (double)((float)l3 * f1 + f2 * (float)j3); float f3 = 0.0F; float f4 = 0.0F; float f5 = 0.0F; float f6 = 0.0F; if (j2 == k2) { f3 = 1.0F; f4 = 1.0F; } else if (j2 == Direction.rotateOpposite[k2]) { f3 = -1.0F; f4 = -1.0F; } else if (j2 == Direction.rotateRight[k2]) { f5 = 1.0F; f6 = -1.0F; } else { f5 = -1.0F; f6 = 1.0F; } double d10 = par1Entity.motionX; double d11 = par1Entity.motionZ; par1Entity.motionX = d10 * (double)f3 + d11 * (double)f6; par1Entity.motionZ = d10 * (double)f5 + d11 * (double)f4; par1Entity.rotationYaw = par8 - (float)(k2 * 90) + (float)(j2 * 90); } else { par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } par1Entity.setLocationAndAngles(d8, d9, d4, par1Entity.rotationYaw, par1Entity.rotationPitch); return true; } else { return false; } } I don't know how good you are at coding, or your coding background but I do know that this stuff can be pretty hard to decipher. I can understand most of it, its really just taking the time to really really look. My problem is trying to understand what it means, but some of it is self explanatory. Thanks so much for all the help you have given! Hope to talk to you tomorrow Thanks again ~vandy22
  10. Thanks it worked But now that I have the portal working theirs another problem that is occuring. Whenever I go into my dimension, and come back to the normal world, i spawn underground or in the air or in blocks, etc... The problem is where ever I spawn in the dimensional world if I go back into the normal world I spawn on the same Y coordinate as I was in the dimensional world. So I could be underground, fall from the sky, etc. etc... For example: Make portal in normal world at: Y: 65 I walk in the portal I get randomly spawned in my dimension at: Y: 55 I walk back into the portal to go to the normal world I am now at Y: 55 somewhere underground and a block or two away from the portal. It's very weird and im not sure why its happening. Considering in the vanilla version when coming into the normal world you should spawn on top of the bottom block of the portal(Exactly where you entered from). I hope this makes since, and you may have had this problem in your mod, not sure though. Thanks
  11. Im not sure what you getting at? Also with that example code, Im not sure what class your implying that code is written in. I do know that last time I made a dimension in earlier versions when I made a mod, in the BlockFire I believe it had something that reacted with the object your trying to light (aka: sandstone). What I'm trying to say is I'm looking at all the vanilla classes to see if I can see anything related to lighting an obsidian to make a portal. I can't find anything in the BlockFire class BlockFire class: package net.minecraft.block; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.IdentityHashMap; import java.util.Map.Entry; import java.util.Random; import com.google.common.collect.Maps; import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.WorldProviderEnd; import net.minecraftforge.common.util.ForgeDirection; import static net.minecraftforge.common.util.ForgeDirection.*; public class BlockFire extends Block { @Deprecated private int[] field_149849_a = new int[4096]; @Deprecated private int[] field_149848_b = new int[4096]; @SideOnly(Side.CLIENT) private IIcon[] field_149850_M; private static final String __OBFID = "CL_00000245"; protected BlockFire() { super(Material.fire); this.setTickRandomly(true); } public static void func_149843_e() { Blocks.fire.func_149842_a(getIdFromBlock(Blocks.planks), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.double_wooden_slab), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.wooden_slab), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.fence), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.oak_stairs), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.birch_stairs), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.spruce_stairs), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.jungle_stairs), 5, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.log), 5, 5); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.log2), 5, 5); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.leaves), 30, 60); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.leaves2), 30, 60); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.bookshelf), 30, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.tnt), 15, 100); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.tallgrass), 60, 100); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.double_plant), 60, 100); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.yellow_flower), 60, 100); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.red_flower), 60, 100); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.wool), 30, 60); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.vine), 15, 100); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.coal_block), 5, 5); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.hay_block), 60, 20); Blocks.fire.func_149842_a(getIdFromBlock(Blocks.carpet), 60, 20); } @Deprecated // Use setFireInfo public void func_149842_a(int p_149842_1_, int p_149842_2_, int p_149842_3_) { this.setFireInfo((Block)Block.blockRegistry.getObjectById(p_149842_1_), p_149842_2_, p_149842_3_); } /** * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been * cleared to be reused) */ public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; } /** * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. */ public boolean isOpaqueCube() { return false; } /** * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) */ public boolean renderAsNormalBlock() { return false; } /** * The type of render function that is called for this block */ public int getRenderType() { return 3; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random p_149745_1_) { return 0; } /** * How many world ticks before ticking */ public int tickRate(World p_149738_1_) { return 30; } /** * Ticks the block if it's been scheduled */ public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) { if (p_149674_1_.getGameRules().getGameRuleBooleanValue("doFireTick")) { boolean flag = p_149674_1_.getBlock(p_149674_2_, p_149674_3_ - 1, p_149674_4_).isFireSource(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP); if (!this.canPlaceBlockAt(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_)) { p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); } if (!flag && p_149674_1_.isRaining() && (p_149674_1_.canLightningStrikeAt(p_149674_2_, p_149674_3_, p_149674_4_) || p_149674_1_.canLightningStrikeAt(p_149674_2_ - 1, p_149674_3_, p_149674_4_) || p_149674_1_.canLightningStrikeAt(p_149674_2_ + 1, p_149674_3_, p_149674_4_) || p_149674_1_.canLightningStrikeAt(p_149674_2_, p_149674_3_, p_149674_4_ - 1) || p_149674_1_.canLightningStrikeAt(p_149674_2_, p_149674_3_, p_149674_4_ + 1))) { p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); } else { int l = p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_); if (l < 15) { p_149674_1_.setBlockMetadataWithNotify(p_149674_2_, p_149674_3_, p_149674_4_, l + p_149674_5_.nextInt(3) / 2, 4); } p_149674_1_.scheduleBlockUpdate(p_149674_2_, p_149674_3_, p_149674_4_, this, this.tickRate(p_149674_1_) + p_149674_5_.nextInt(10)); if (!flag && !this.canNeighborBurn(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_)) { if (!World.doesBlockHaveSolidTopSurface(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_) || l > 3) { p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); } } else if (!flag && !this.canCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, UP) && l == 15 && p_149674_5_.nextInt(4) == 0) { p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_); } else { boolean flag1 = p_149674_1_.isBlockHighHumidity(p_149674_2_, p_149674_3_, p_149674_4_); byte b0 = 0; if (flag1) { b0 = -50; } this.tryCatchFire(p_149674_1_, p_149674_2_ + 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l, WEST ); this.tryCatchFire(p_149674_1_, p_149674_2_ - 1, p_149674_3_, p_149674_4_, 300 + b0, p_149674_5_, l, EAST ); this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ - 1, p_149674_4_, 250 + b0, p_149674_5_, l, UP ); this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_ + 1, p_149674_4_, 250 + b0, p_149674_5_, l, DOWN ); this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ - 1, 300 + b0, p_149674_5_, l, SOUTH); this.tryCatchFire(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_ + 1, 300 + b0, p_149674_5_, l, NORTH); for (int i1 = p_149674_2_ - 1; i1 <= p_149674_2_ + 1; ++i1) { for (int j1 = p_149674_4_ - 1; j1 <= p_149674_4_ + 1; ++j1) { for (int k1 = p_149674_3_ - 1; k1 <= p_149674_3_ + 4; ++k1) { if (i1 != p_149674_2_ || k1 != p_149674_3_ || j1 != p_149674_4_) { int l1 = 100; if (k1 > p_149674_3_ + 1) { l1 += (k1 - (p_149674_3_ + 1)) * 100; } int i2 = this.getChanceOfNeighborsEncouragingFire(p_149674_1_, i1, k1, j1); if (i2 > 0) { int j2 = (i2 + 40 + p_149674_1_.difficultySetting.getDifficultyId() * 7) / (l + 30); if (flag1) { j2 /= 2; } if (j2 > 0 && p_149674_5_.nextInt(l1) <= j2 && (!p_149674_1_.isRaining() || !p_149674_1_.canLightningStrikeAt(i1, k1, j1)) && !p_149674_1_.canLightningStrikeAt(i1 - 1, k1, p_149674_4_) && !p_149674_1_.canLightningStrikeAt(i1 + 1, k1, j1) && !p_149674_1_.canLightningStrikeAt(i1, k1, j1 - 1) && !p_149674_1_.canLightningStrikeAt(i1, k1, j1 + 1)) { int k2 = l + p_149674_5_.nextInt(5) / 4; if (k2 > 15) { k2 = 15; } p_149674_1_.setBlock(i1, k1, j1, this, k2, 3); } } } } } } } } } } public boolean func_149698_L() { return false; } /** * Tries to set block on fire. Deprecated in favour of side-sensitive version. */ @Deprecated private void tryCatchFire(World p_149841_1_, int p_149841_2_, int p_149841_3_, int p_149841_4_, int p_149841_5_, Random p_149841_6_, int p_149841_7_) { this.tryCatchFire(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, p_149841_5_, p_149841_6_, p_149841_7_, UP); } private void tryCatchFire(World p_149841_1_, int p_149841_2_, int p_149841_3_, int p_149841_4_, int p_149841_5_, Random p_149841_6_, int p_149841_7_, ForgeDirection face) { int j1 = p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_).getFlammability(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, face); if (p_149841_6_.nextInt(p_149841_5_) < j1) { boolean flag = p_149841_1_.getBlock(p_149841_2_, p_149841_3_, p_149841_4_) == Blocks.tnt; if (p_149841_6_.nextInt(p_149841_7_ + 10) < 5 && !p_149841_1_.canLightningStrikeAt(p_149841_2_, p_149841_3_, p_149841_4_)) { int k1 = p_149841_7_ + p_149841_6_.nextInt(5) / 4; if (k1 > 15) { k1 = 15; } p_149841_1_.setBlock(p_149841_2_, p_149841_3_, p_149841_4_, this, k1, 3); } else { p_149841_1_.setBlockToAir(p_149841_2_, p_149841_3_, p_149841_4_); } if (flag) { Blocks.tnt.onBlockDestroyedByPlayer(p_149841_1_, p_149841_2_, p_149841_3_, p_149841_4_, 1); } } } /** * Returns true if at least one block next to this one can burn. */ private boolean canNeighborBurn(World p_149847_1_, int p_149847_2_, int p_149847_3_, int p_149847_4_) { return this.canCatchFire(p_149847_1_, p_149847_2_ + 1, p_149847_3_, p_149847_4_, WEST ) || this.canCatchFire(p_149847_1_, p_149847_2_ - 1, p_149847_3_, p_149847_4_, EAST ) || this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ - 1, p_149847_4_, UP ) || this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_ + 1, p_149847_4_, DOWN ) || this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ - 1, SOUTH) || this.canCatchFire(p_149847_1_, p_149847_2_, p_149847_3_, p_149847_4_ + 1, NORTH); } /** * Gets the highest chance of a neighbor block encouraging this block to catch fire */ private int getChanceOfNeighborsEncouragingFire(World p_149845_1_, int p_149845_2_, int p_149845_3_, int p_149845_4_) { byte b0 = 0; if (!p_149845_1_.isAirBlock(p_149845_2_, p_149845_3_, p_149845_4_)) { return 0; } else { int l = b0; l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_ + 1, p_149845_3_, p_149845_4_, l, WEST ); l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_ - 1, p_149845_3_, p_149845_4_, l, EAST ); l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_ - 1, p_149845_4_, l, UP ); l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_ + 1, p_149845_4_, l, DOWN ); l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_, p_149845_4_ - 1, l, SOUTH); l = this.getChanceToEncourageFire(p_149845_1_, p_149845_2_, p_149845_3_, p_149845_4_ + 1, l, NORTH); return l; } } /** * Returns if this block is collidable (only used by Fire). Args: x, y, z */ public boolean isCollidable() { return false; } /** * Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z */ @Deprecated public boolean canBlockCatchFire(IBlockAccess p_149844_1_, int p_149844_2_, int p_149844_3_, int p_149844_4_) { return canCatchFire(p_149844_1_, p_149844_2_, p_149844_3_, p_149844_4_, UP); } @Deprecated public int func_149846_a(World p_149846_1_, int p_149846_2_, int p_149846_3_, int p_149846_4_, int p_149846_5_) { return getChanceToEncourageFire(p_149846_1_, p_149846_2_, p_149846_3_, p_149846_4_, p_149846_5_, UP); } /** * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z */ public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) { return World.doesBlockHaveSolidTopSurface(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_) || this.canNeighborBurn(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_); } /** * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are * their own) Args: x, y, z, neighbor Block */ public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_) { if (!World.doesBlockHaveSolidTopSurface(p_149695_1_, p_149695_2_, p_149695_3_ - 1, p_149695_4_) && !this.canNeighborBurn(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_)) { p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_); } } /** * Called whenever the block is added into the world. Args: world, x, y, z */ public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) { if (p_149726_1_.provider.dimensionId > 0 || !Blocks.portal.func_150000_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_)) { if (!World.doesBlockHaveSolidTopSurface(p_149726_1_, p_149726_2_, p_149726_3_ - 1, p_149726_4_) && !this.canNeighborBurn(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_)) { p_149726_1_.setBlockToAir(p_149726_2_, p_149726_3_, p_149726_4_); } else { p_149726_1_.scheduleBlockUpdate(p_149726_2_, p_149726_3_, p_149726_4_, this, this.tickRate(p_149726_1_) + p_149726_1_.rand.nextInt(10)); } } } /** * A randomly called display update to be able to add particles or other items for display */ @SideOnly(Side.CLIENT) public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) { if (p_149734_5_.nextInt(24) == 0) { p_149734_1_.playSound((double)((float)p_149734_2_ + 0.5F), (double)((float)p_149734_3_ + 0.5F), (double)((float)p_149734_4_ + 0.5F), "fire.fire", 1.0F + p_149734_5_.nextFloat(), p_149734_5_.nextFloat() * 0.7F + 0.3F, false); } int l; float f; float f1; float f2; if (!World.doesBlockHaveSolidTopSurface(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_) && !Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ - 1, p_149734_4_, UP)) { if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ - 1, p_149734_3_, p_149734_4_, EAST)) { for (l = 0; l < 2; ++l) { f = (float)p_149734_2_ + p_149734_5_.nextFloat() * 0.1F; f1 = (float)p_149734_3_ + p_149734_5_.nextFloat(); f2 = (float)p_149734_4_ + p_149734_5_.nextFloat(); p_149734_1_.spawnParticle("largesmoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D); } } if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_ + 1, p_149734_3_, p_149734_4_, WEST)) { for (l = 0; l < 2; ++l) { f = (float)(p_149734_2_ + 1) - p_149734_5_.nextFloat() * 0.1F; f1 = (float)p_149734_3_ + p_149734_5_.nextFloat(); f2 = (float)p_149734_4_ + p_149734_5_.nextFloat(); p_149734_1_.spawnParticle("largesmoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D); } } if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ - 1, SOUTH)) { for (l = 0; l < 2; ++l) { f = (float)p_149734_2_ + p_149734_5_.nextFloat(); f1 = (float)p_149734_3_ + p_149734_5_.nextFloat(); f2 = (float)p_149734_4_ + p_149734_5_.nextFloat() * 0.1F; p_149734_1_.spawnParticle("largesmoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D); } } if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_ + 1, NORTH)) { for (l = 0; l < 2; ++l) { f = (float)p_149734_2_ + p_149734_5_.nextFloat(); f1 = (float)p_149734_3_ + p_149734_5_.nextFloat(); f2 = (float)(p_149734_4_ + 1) - p_149734_5_.nextFloat() * 0.1F; p_149734_1_.spawnParticle("largesmoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D); } } if (Blocks.fire.canCatchFire(p_149734_1_, p_149734_2_, p_149734_3_ + 1, p_149734_4_, DOWN)) { for (l = 0; l < 2; ++l) { f = (float)p_149734_2_ + p_149734_5_.nextFloat(); f1 = (float)(p_149734_3_ + 1) - p_149734_5_.nextFloat() * 0.1F; f2 = (float)p_149734_4_ + p_149734_5_.nextFloat(); p_149734_1_.spawnParticle("largesmoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D); } } } else { for (l = 0; l < 3; ++l) { f = (float)p_149734_2_ + p_149734_5_.nextFloat(); f1 = (float)p_149734_3_ + p_149734_5_.nextFloat() * 0.5F + 0.5F; f2 = (float)p_149734_4_ + p_149734_5_.nextFloat(); p_149734_1_.spawnParticle("largesmoke", (double)f, (double)f1, (double)f2, 0.0D, 0.0D, 0.0D); } } } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister p_149651_1_) { this.field_149850_M = new IIcon[] {p_149651_1_.registerIcon(this.getTextureName() + "_layer_0"), p_149651_1_.registerIcon(this.getTextureName() + "_layer_1")}; } @SideOnly(Side.CLIENT) public IIcon getFireIcon(int p_149840_1_) { return this.field_149850_M[p_149840_1_]; } /** * Gets the block's texture. Args: side, meta */ @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { return this.field_149850_M[0]; } public MapColor getMapColor(int p_149728_1_) { return MapColor.tntColor; } /*================================= Forge Start ======================================*/ private static class FireInfo { private int encouragement = 0; private int flammibility = 0; } private IdentityHashMap<Block, FireInfo> blockInfo = Maps.newIdentityHashMap(); public void setFireInfo(Block block, int encouragement, int flammibility) { if (block == Blocks.air) throw new IllegalArgumentException("Tried to set air on fire... This is bad."); int id = Block.getIdFromBlock(block); this.field_149849_a[id] = encouragement; this.field_149848_b[id] = flammibility; FireInfo info = getInfo(block, true); info.encouragement = encouragement; info.flammibility = flammibility; } private FireInfo getInfo(Block block, boolean garentee) { FireInfo ret = blockInfo.get(block); if (ret == null && garentee) { ret = new FireInfo(); blockInfo.put(block, ret); } return ret; } public void rebuildFireInfo() { for (int x = 0; x < 4096; x++) { //If we care.. we could detect changes in here and make sure we keep them, however //it's my thinking that anyone who hacks into the private variables should DIAF and we don't care about them. field_149849_a[x] = 0; field_149848_b[x] = 0; } for (Entry<Block, FireInfo> e : blockInfo.entrySet()) { int id = Block.getIdFromBlock(e.getKey()); if (id >= 0 && id < 4096) { field_149849_a[id] = e.getValue().encouragement; field_149848_b[id] = e.getValue().flammibility; } } } public int getFlammability(Block block) { int id = Block.getIdFromBlock(block); return id >= 0 && id < 4096 ? field_149848_b[id] : 0; } public int getEncouragement(Block block) { int id = Block.getIdFromBlock(block); return id >= 0 && id < 4096 ? field_149849_a[id] : 0; } /** * Side sensitive version that calls the block function. * * @param world The current world * @param x X Position * @param y Y Position * @param z Z Position * @param face The side the fire is coming from * @return True if the face can catch fire. */ public boolean canCatchFire(IBlockAccess world, int x, int y, int z, ForgeDirection face) { return world.getBlock(x, y, z).isFlammable(world, x, y, z, face); } /** * Side sensitive version that calls the block function. * * @param world The current world * @param x X Position * @param y Y Position * @param z Z Position * @param oldChance The previous maximum chance. * @param face The side the fire is coming from * @return The chance of the block catching fire, or oldChance if it is higher */ public int getChanceToEncourageFire(IBlockAccess world, int x, int y, int z, int oldChance, ForgeDirection face) { int newChance = world.getBlock(x, y, z).getFireSpreadSpeed(world, x, y, z, face); return (newChance > oldChance ? newChance : oldChance); } /*================================= Forge Start ======================================*/ } I also cannot find anything in the Flint and Steel Class, i can see why though because all it does is start a fire. You would think the actual BlockFire class would handle the reaction of the fire and obsidian to create a portal. Again, I was just looking for anything in vanilla (specifically a method) that connects the fire and the obsidian. I'm sure theirs a simple reason around this, and you might have already stated it, but I'm not understanding what you saying. Hopes this helps show you want I'm thinking about how to fix the problem. Thanks
  12. I made a dimension in my mod called the cryptic. The problem is with it, whenever I use flint and steel to try to light my portal (made out of sandstone) it doesn't make the portal(the purple animation stuff). For testing to see if the dimension actually worked, i went ahead and added the actual portal block i made to my custom creative tab, placed it and it worked. The dimension is working properly, the problem is getting in the dimension the correct way. Im going to show you all my dimensional code. Cryptic Teleporter: package com.mjj.colormod.dimension; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Random; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.Direction; import net.minecraft.util.LongHashMap; import net.minecraft.util.MathHelper; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.Teleporter; import net.minecraft.world.WorldServer; import com.mjj.colormod.ColorMod; import com.mjj.colormod.handler.BlockHandler; public class CrypticTeleporter extends Teleporter { private final WorldServer worldServerInstance; /** A private Random() function in Teleporter */ private final Random random; /** Stores successful portal placement locations for rapid lookup. */ private final LongHashMap destinationCoordinateCache = new LongHashMap(); /** * A list of valid keys for the destinationCoordainteCache. These are based on the X & Z of the players initial * location. */ @SuppressWarnings("rawtypes") private final List destinationCoordinateKeys = new ArrayList(); public CrypticTeleporter(WorldServer par1WorldServer) { super(par1WorldServer); this.worldServerInstance = par1WorldServer; this.random = new Random(par1WorldServer.getSeed()); } /** * Place an entity in a nearby portal, creating one if necessary. */ @Override public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { if (this.worldServerInstance.provider.dimensionId != 1) { if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) { this.makePortal(par1Entity); this.placeInExistingPortal(par1Entity, par2, par4, par6, par8); } } else { int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posY) - 1; int k = MathHelper.floor_double(par1Entity.posZ); byte b0 = 1; byte b1 = 0; for (int l = -2; l <= 2; ++l) { for (int i1 = -2; i1 <= 2; ++i1) { for (int j1 = -1; j1 < 3; ++j1) { int k1 = i + i1 * b0 + l * b1; int l1 = j + j1; int i2 = k + i1 * b1 - l * b0; boolean flag = j1 < 0; this.worldServerInstance.setBlock(k1, l1, i2, flag ? Blocks.sandstone : Blocks.air); } } } par1Entity.setLocationAndAngles((double)i, (double)j, (double)k, par1Entity.rotationYaw, 0.0F); par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } } /** * Place an entity in a nearby portal which already exists. */ @SuppressWarnings("unchecked") @Override public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) { short short1 = 128; double d3 = -1.0D; int i = 0; int j = 0; int k = 0; int l = MathHelper.floor_double(par1Entity.posX); int i1 = MathHelper.floor_double(par1Entity.posZ); long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1); boolean flag = true; double d4; int k1; if (this.destinationCoordinateCache.containsItem(j1)) { PortalPosition portalposition = (PortalPosition)this.destinationCoordinateCache.getValueByKey(j1); d3 = 0.0D; i = portalposition.posX; j = portalposition.posY; k = portalposition.posZ; portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime(); flag = false; } else { for (k1 = l - short1; k1 <= l + short1; ++k1) { double d5 = (double)k1 + 0.5D - par1Entity.posX; for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) { double d6 = (double)l1 + 0.5D - par1Entity.posZ; for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) { if (this.worldServerInstance.getBlock(k1, i2, l1) == BlockHandler.portalCrypticBlock) { while (this.worldServerInstance.getBlock(k1, i2 - 1, l1) == BlockHandler.portalCrypticBlock) { --i2; } d4 = (double)i2 + 0.5D - par1Entity.posY; double d7 = d5 * d5 + d4 * d4 + d6 * d6; if (d3 < 0.0D || d7 < d3) { d3 = d7; i = k1; j = i2; k = l1; } } } } } } if (d3 >= 0.0D) { if (flag) { this.destinationCoordinateCache.add(j1, new PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime())); this.destinationCoordinateKeys.add(Long.valueOf(j1)); } double d8 = (double)i + 0.5D; double d9 = (double)j + 0.5D; d4 = (double)k + 0.5D; int j2 = -1; if (this.worldServerInstance.getBlock(i - 1, j, k) == BlockHandler.portalCrypticBlock) { j2 = 2; } if (this.worldServerInstance.getBlock(i + 1, j, k) == BlockHandler.portalCrypticBlock) { j2 = 0; } if (this.worldServerInstance.getBlock(i, j, k - 1) == BlockHandler.portalCrypticBlock) { j2 = 3; } if (this.worldServerInstance.getBlock(i, j, k + 1) == BlockHandler.portalCrypticBlock) { j2 = 1; } int k2 = par1Entity.getTeleportDirection(); if (j2 > -1) { int l2 = Direction.rotateLeft[j2]; int i3 = Direction.offsetX[j2]; int j3 = Direction.offsetZ[j2]; int k3 = Direction.offsetX[l2]; int l3 = Direction.offsetZ[l2]; boolean flag1 = !this.worldServerInstance.isAirBlock(i + i3 + k3, j, k + j3 + l3) || !this.worldServerInstance.isAirBlock(i + i3 + k3, j + 1, k + j3 + l3); boolean flag2 = !this.worldServerInstance.isAirBlock(i + i3, j, k + j3) || !this.worldServerInstance.isAirBlock(i + i3, j + 1, k + j3); if (flag1 && flag2) { j2 = Direction.rotateOpposite[j2]; l2 = Direction.rotateOpposite[l2]; i3 = Direction.offsetX[j2]; j3 = Direction.offsetZ[j2]; k3 = Direction.offsetX[l2]; l3 = Direction.offsetZ[l2]; k1 = i - k3; d8 -= (double)k3; int i4 = k - l3; d4 -= (double)l3; flag1 = !this.worldServerInstance.isAirBlock(k1 + i3 + k3, j, i4 + j3 + l3) || !this.worldServerInstance.isAirBlock(k1 + i3 + k3, j + 1, i4 + j3 + l3); flag2 = !this.worldServerInstance.isAirBlock(k1 + i3, j, i4 + j3) || !this.worldServerInstance.isAirBlock(k1 + i3, j + 1, i4 + j3); } float f1 = 0.5F; float f2 = 0.5F; if (!flag1 && flag2) { f1 = 1.0F; } else if (flag1 && !flag2) { f1 = 0.0F; } else if (flag1 && flag2) { f2 = 0.0F; } d8 += (double)((float)k3 * f1 + f2 * (float)i3); d4 += (double)((float)l3 * f1 + f2 * (float)j3); float f3 = 0.0F; float f4 = 0.0F; float f5 = 0.0F; float f6 = 0.0F; if (j2 == k2) { f3 = 1.0F; f4 = 1.0F; } else if (j2 == Direction.rotateOpposite[k2]) { f3 = -1.0F; f4 = -1.0F; } else if (j2 == Direction.rotateRight[k2]) { f5 = 1.0F; f6 = -1.0F; } else { f5 = -1.0F; f6 = 1.0F; } double d10 = par1Entity.motionX; double d11 = par1Entity.motionZ; par1Entity.motionX = d10 * (double)f3 + d11 * (double)f6; par1Entity.motionZ = d10 * (double)f5 + d11 * (double)f4; par1Entity.rotationYaw = par8 - (float)(k2 * 90) + (float)(j2 * 90); } else { par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D; } par1Entity.setLocationAndAngles(d8, d9, d4, par1Entity.rotationYaw, par1Entity.rotationPitch); return true; } else { return false; } } @Override public boolean makePortal(Entity par1Entity) { byte b0 = 16; double d0 = -1.0D; int i = MathHelper.floor_double(par1Entity.posX); int j = MathHelper.floor_double(par1Entity.posY); int k = MathHelper.floor_double(par1Entity.posZ); int l = i; int i1 = j; int j1 = k; int k1 = 0; int l1 = this.random.nextInt(4); int i2; double d1; double d2; int j2; int k2; int l2; int i3; int j3; int k3; int l3; int i4; int j4; int k4; double d3; double d4; for (i2 = i - b0; i2 <= i + b0; ++i2) { d1 = (double)i2 + 0.5D - par1Entity.posX; for (j2 = k - b0; j2 <= k + b0; ++j2) { d2 = (double)j2 + 0.5D - par1Entity.posZ; label274: for (k2 = this.worldServerInstance.getActualHeight() - 1; k2 >= 0; --k2) { if (this.worldServerInstance.isAirBlock(i2, k2, j2)) { while (k2 > 0 && this.worldServerInstance.isAirBlock(i2, k2 - 1, j2)) { --k2; } for (i3 = l1; i3 < l1 + 4; ++i3) { l2 = i3 % 2; k3 = 1 - l2; if (i3 % 4 >= 2) { l2 = -l2; k3 = -k3; } for (j3 = 0; j3 < 3; ++j3) { for (i4 = 0; i4 < 4; ++i4) { for (l3 = -1; l3 < 4; ++l3) { k4 = i2 + (i4 - 1) * l2 + j3 * k3; j4 = k2 + l3; int l4 = j2 + (i4 - 1) * k3 - j3 * l2; if (l3 < 0 && !this.worldServerInstance.getBlock(k4, j4, l4).getMaterial().isSolid() || l3 >= 0 && !this.worldServerInstance.isAirBlock(k4, j4, l4)) { continue label274; } } } } d4 = (double)k2 + 0.5D - par1Entity.posY; d3 = d1 * d1 + d4 * d4 + d2 * d2; if (d0 < 0.0D || d3 < d0) { d0 = d3; l = i2; i1 = k2; j1 = j2; k1 = i3 % 4; } } } } } } if (d0 < 0.0D) { for (i2 = i - b0; i2 <= i + b0; ++i2) { d1 = (double)i2 + 0.5D - par1Entity.posX; for (j2 = k - b0; j2 <= k + b0; ++j2) { d2 = (double)j2 + 0.5D - par1Entity.posZ; label222: for (k2 = this.worldServerInstance.getActualHeight() - 1; k2 >= 0; --k2) { if (this.worldServerInstance.isAirBlock(i2, k2, j2)) { while (k2 > 0 && this.worldServerInstance.isAirBlock(i2, k2 - 1, j2)) { --k2; } for (i3 = l1; i3 < l1 + 2; ++i3) { l2 = i3 % 2; k3 = 1 - l2; for (j3 = 0; j3 < 4; ++j3) { for (i4 = -1; i4 < 4; ++i4) { l3 = i2 + (j3 - 1) * l2; k4 = k2 + i4; j4 = j2 + (j3 - 1) * k3; if (i4 < 0 && !this.worldServerInstance.getBlock(l3, k4, j4).getMaterial().isSolid() || i4 >= 0 && !this.worldServerInstance.isAirBlock(l3, k4, j4)) { continue label222; } } } d4 = (double)k2 + 0.5D - par1Entity.posY; d3 = d1 * d1 + d4 * d4 + d2 * d2; if (d0 < 0.0D || d3 < d0) { d0 = d3; l = i2; i1 = k2; j1 = j2; k1 = i3 % 2; } } } } } } } int i5 = l; int j5 = i1; j2 = j1; int k5 = k1 % 2; int l5 = 1 - k5; if (k1 % 4 >= 2) { k5 = -k5; l5 = -l5; } boolean flag; if (d0 < 0.0D) { if (i1 < 70) { i1 = 70; } if (i1 > this.worldServerInstance.getActualHeight() - 10) { i1 = this.worldServerInstance.getActualHeight() - 10; } j5 = i1; for (k2 = -1; k2 <= 1; ++k2) { for (i3 = 1; i3 < 3; ++i3) { for (l2 = -1; l2 < 3; ++l2) { k3 = i5 + (i3 - 1) * k5 + k2 * l5; j3 = j5 + l2; i4 = j2 + (i3 - 1) * l5 - k2 * k5; flag = l2 < 0; this.worldServerInstance.setBlock(k3, j3, i4, flag ? Blocks.sandstone : Blocks.air); } } } } for (k2 = 0; k2 < 4; ++k2) { for (i3 = 0; i3 < 4; ++i3) { for (l2 = -1; l2 < 4; ++l2) { k3 = i5 + (i3 - 1) * k5; j3 = j5 + l2; i4 = j2 + (i3 - 1) * l5; flag = i3 == 0 || i3 == 3 || l2 == -1 || l2 == 3; this.worldServerInstance.setBlock(k3, j3, i4, flag ? Blocks.sandstone : BlockHandler.portalCrypticBlock, 0, 2); } } for (i3 = 0; i3 < 4; ++i3) { for (l2 = -1; l2 < 4; ++l2) { k3 = i5 + (i3 - 1) * k5; j3 = j5 + l2; i4 = j2 + (i3 - 1) * l5; this.worldServerInstance.notifyBlocksOfNeighborChange(k3, j3, i4, this.worldServerInstance.getBlock(k3, j3, i4)); } } } return true; } /** * called periodically to remove out-of-date portal locations from the cache list. Argument par1 is a * WorldServer.getTotalWorldTime() value. */ @SuppressWarnings("rawtypes") @Override public void removeStalePortalLocations(long par1) { if (par1 % 100L == 0L) { Iterator iterator = this.destinationCoordinateKeys.iterator(); long j = par1 - 600L; while (iterator.hasNext()) { Long olong = (Long)iterator.next(); PortalPosition portalposition = (PortalPosition)this.destinationCoordinateCache.getValueByKey(olong.longValue()); if (portalposition == null || portalposition.lastUpdateTime < j) { iterator.remove(); this.destinationCoordinateCache.remove(olong.longValue()); } } } } public class PortalPosition extends ChunkCoordinates { /** The worldtime at which this PortalPosition was last verified */ public long lastUpdateTime; public PortalPosition(int par2, int par3, int par4, long par5) { super(par2, par3, par4); this.lastUpdateTime = par5; } } } BlockPortalCryptic: package com.mjj.colormod.dimension; import net.minecraft.block.Block; import net.minecraft.block.BlockPortal; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import com.mjj.colormod.ColorMod; import com.mjj.colormod.handler.BlockHandler; public class BlockPortalCryptic extends BlockPortal { public BlockPortalCryptic() { super(); setBlockName("portalCrypticBlock"); setCreativeTab(ColorMod.colorModTab); } @Override public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) { if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) { EntityPlayerMP player = (EntityPlayerMP) par5Entity; MinecraftServer mServer = MinecraftServer.getServer(); if (player.timeUntilPortal > 0) { player.timeUntilPortal = 10; } else if (player.dimension != ColorMod.dimensionId) { player.timeUntilPortal = 10; player.mcServer.getConfigurationManager().transferPlayerToDimension(player, ColorMod.dimensionId, new CrypticTeleporter(mServer.worldServerForDimension(ColorMod.dimensionId))); } else { player.timeUntilPortal = 10; player.mcServer.getConfigurationManager().transferPlayerToDimension(player, 0, new CrypticTeleporter(mServer.worldServerForDimension(1))); } } } @Override public boolean func_150000_e(World par1World, int par2, int par3, int par4) { byte b0 = 0; byte b1 = 0; if (par1World.getBlock(par2 - 1, par3, par4) == Blocks.sandstone || par1World.getBlock(par2 + 1, par3, par4) == Blocks.sandstone) { b0 = 1; } if (par1World.getBlock(par2, par3, par4 - 1) == Blocks.sandstone || par1World.getBlock(par2, par3, par4 + 1) == Blocks.sandstone) { b1 = 1; } if (b0 == b1) { return false; } else { if (par1World.isAirBlock(par2 - b0, par3, par4 - b1)) { par2 -= b0; par4 -= b1; } int l; int i1; for (l = -1; l <= 2; ++l) { for (i1 = -1; i1 <= 3; ++i1) { boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3; if (l != -1 && l != 2 || i1 != -1 && i1 != 3) { Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); boolean isAirBlock = par1World.isAirBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l); if (flag) { if (j1 != Blocks.sandstone) { return false; } } else if (!isAirBlock && j1 != Blocks.fire) { return false; } } } } for (l = 0; l < 2; ++l) { for (i1 = 0; i1 < 3; ++i1) { par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, BlockHandler.portalCrypticBlock, 0, 2); } } return true; } } @Override public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, Block par5) { byte b0 = 0; byte b1 = 1; if (par1World.getBlock(par2 - 1, par3, par4) == this || par1World.getBlock(par2 + 1, par3, par4) == this) { b0 = 1; b1 = 0; } int i1; for (i1 = par3; par1World.getBlock(par2, i1 - 1, par4) == this; --i1) { ; } if (par1World.getBlock(par2, i1 - 1, par4) != Blocks.sandstone) { par1World.setBlockToAir(par2, par3, par4); } else { int j1; for (j1 = 1; j1 < 4 && par1World.getBlock(par2, i1 + j1, par4) == this; ++j1) { ; } if (j1 == 3 && par1World.getBlock(par2, i1 + j1, par4) == Blocks.sandstone) { boolean flag = par1World.getBlock(par2 - 1, par3, par4) == this || par1World.getBlock(par2 + 1, par3, par4) == this; boolean flag1 = par1World.getBlock(par2, par3, par4 - 1) == this || par1World.getBlock(par2, par3, par4 + 1) == this; if (flag && flag1) { par1World.setBlockToAir(par2, par3, par4); } else { if ((par1World.getBlock(par2 + b0, par3, par4 + b1) != Blocks.sandstone || par1World.getBlock(par2 - b0, par3, par4 - b1) != this) && (par1World.getBlock(par2 - b0, par3, par4 - b1) != Blocks.sandstone || par1World.getBlock(par2 + b0, par3, par4 + b1) != this)) { par1World.setBlockToAir(par2, par3, par4); } } } else { par1World.setBlockToAir(par2, par3, par4); } } } } WorldProviderCryptic: package com.mjj.colormod.dimension; import com.mjj.colormod.ColorMod; import net.minecraft.world.WorldProvider; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.WorldChunkManagerHell; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.ChunkProviderFlat; public class WorldProviderCryptic extends WorldProvider { public void registerWorldChunkManager() { this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.desertHills, 0.1F); this.dimensionId = ColorMod.dimensionId; } public IChunkProvider createChunkGenerator() { return new ChunkProviderFlat(worldObj, worldObj.getSeed(), true, field_82913_c); } @Override public String getDimensionName() { return "Cryptic"; } } If you need any more example code don't be afraid to ask. I hope someone knows how to fix the problem. Thanks ~vandy22
  13. Turns out, all you have to do is keep setUnlocalizedName in the constructor, but when you chain it onto the end of the item it will override the constructor, so in that way you can use one class for multiple items. Thanks
  14. Alix, Thanks for your response, but I'm misunderstanding one thing, can you give me an example on what you mean by casting my item object to my item class when initializing? Here is my green pickaxe now (in the mod file): greenPickaxe = new GreenPickaxe(greenMaterial).setUnlocalizedName("greenMaterial").setTextureName("greenMaterial"); The thing is, which I'm assuming gets fixed in step 3, whenever I launch the game it doesn't understand .setUnlocalizedName. It want's it in the constructor for some reason. I assume you already know all of this and I'm stupid for typing it, but I don't understand so If you could give an example of what I need to change. I know that in the actual Item class they call .setUnlocalizedName from out of the constructor on the actual object but I'm not sure how I need to do that myself. I hope you understand what I'm saying here and can answer my question. Thanks
  15. Thank you it worked . Such a dumb mistake
  16. I am making multiple blocks and items, so what I wanted was a class for items and for blocks that I could call multiple times for each item and block in code, instead of having a class for every item and block just because it has a different unlocalizedname. Is there a way I can do this? This is my current item class (Just for a pickaxe): package com.mjj.colormod.items; import com.mjj.colormod.ColorMod; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemPickaxe; public class GreenPickaxe extends ItemPickaxe { public GreenPickaxe(ToolMaterial material) { super(material); setUnlocalizedName("greenPickaxe"); setTextureName(ColorMod.modid + ":" + getUnlocalizedName().substring(5)); setCreativeTab(CreativeTabs.tabTools); } }
  17. In the new update I'm making a simple mod, and right now the problem is I cant get the language file to work. Heres how I have it saved: src/main/resources/assets/colormod/lang/en_US.lang here is my lang file: item.greenPickaxe.name =Green Pickaxe and here is my mod file: package com.mjj.colormod; import com.mjj.colormod.handler.ItemHandler; import com.mjj.colormod.items.GreenPickaxe; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = ColorMod.modid , version = ColorMod.version) public class ColorMod { public static final String modid = "colormod"; public static final String version = "1.7.2"; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Item handler, handles all items ItemHandler.loadItems(); } } Heres my pickaxe code: package com.mjj.colormod.items; import com.mjj.colormod.ColorMod; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemPickaxe; public class GreenPickaxe extends ItemPickaxe { public GreenPickaxe(ToolMaterial material) { super(material); setUnlocalizedName("greenPickaxe"); setTextureName(ColorMod.modid + ":" + getUnlocalizedName().substring(5)); setCreativeTab(CreativeTabs.tabTools); } } And just in case you need it here is my ItemHandler: package com.mjj.colormod.handler; import com.mjj.colormod.items.GreenPickaxe; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; public class ItemHandler { //Tools public static Item greenPickaxe; //Items //Armor //Materials static ToolMaterial greenMaterial = EnumHelper.addToolMaterial("greenMaterial", 2, 255, 6.0F, 2.0F, 15); public static void loadItems() { //Tools greenPickaxe = new GreenPickaxe(greenMaterial); GameRegistry.registerItem(greenPickaxe, "greenPickaxe"); //Items //Armor } } The problem is in game the weapon name is: item.greenPickaxe.name As far as I know I have everything correct, thats why im confused. If you need anymore of my code posted please respond and I will send it. Thanks ~vandy22
  18. Oh haha wow thank so much! I was only missing a number
  19. Im looking for an answer if you have one?! Thanks!
  20. Ok so i guess I got in game and tested the bonemeal and It didnt work. Here is the line of code I used that I thought would work: GameRegistry.addRecipe(new ItemStack(FertalizerCan, 1), new Object[]{ " cb", " b ", " b ", 'c', Item.coal, 'b', new ItemStack(Item.dyePowder, [glow=red,2,300]15[/glow]) }); The glowing number is where I thought the damage value would be declared but I dont know why its not working I tested out different numbers and none of the powders work. If you know how to fix this please help! THANKS!
  21. Haha wow thank you. I was so used to something like that being an item but now thinking about it since it generates it would have to have a block structure
  22. Ok thanks I figured that out, do you know the group a flower falls under? I was looking all around and theres really nothing on it.
  23. How would you desplay a damage value in code? Like Item.dyePowder:15 or what?
  24. Im currently working on a new mod, and in this mod I have an item that needs to be created using bonemeal. When I say created using bonemeal I dont mean when this item is on the ground it will grow or something with a right click of bonemeal. Im saying that in the crafting table I need an actual recipe that involves bonemeal. The problem is whenever I look in the items class theres not name that I can see that represents bone meal. If anyone knows the answer to this please help! Thanks!
  25. [glow=red,2,300]BUMP[/glow]
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.