Jump to content

Armeleon

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by Armeleon

  1. Hey all. I'm trying to edit cocoa behavior by adding a new type of wood it can be planted on. I don't want to overwrite the base classes if possible, and would like to just change where it checks for blocks type by overwriting. In the code, cocoa is placed when the if statement 'if (block == Blocks.log && BlockLog.func_150165_c(i1) == 3)' is met. I want to add my own wood to the code. Any ideas?
  2. Ah cool. Thanks for that. I've been trying to update from 1.5 and I keep missing things.
  3. I'm having a really odd issue with adding a new recipe. When I try and add a shapeless recipe using my blocks, it won't work. When I try and do it using my items, it works fine. Here are my shapeless recipe adds. The one with asterisks doesn't work. Anyone know why? //Recipe Stuff ItemStack bowl = new ItemStack(Item.getItemById(281)); //bowl ItemStack redMush = new ItemStack(Block.getBlockById(40)); //red ItemStack brownMush = new ItemStack(Block.getBlockById(39)); //brown ItemStack yellowMush = new ItemStack(lemoncup); ItemStack orangeMush = new ItemStack(orangecap); ItemStack mushroomStew = new ItemStack(Item.getItemById(282)); //mushroomstew GameRegistry.addShapelessRecipe(mushroomStew, new Object[]{bowl, yellowMush, orangeMush}); GameRegistry.addShapelessRecipe(mushroomStew, new Object[]{bowl, yellowMush, redMush}); GameRegistry.addShapelessRecipe(mushroomStew, new Object[]{bowl, yellowMush, brownMush}); GameRegistry.addShapelessRecipe(mushroomStew, new Object[]{bowl, redMush, orangeMush}); GameRegistry.addShapelessRecipe(mushroomStew, new Object[]{bowl, brownMush, orangeMush}); **GameRegistry.addShapelessRecipe(new ItemStack(this.lemoncupPlanks), new ItemStack(this.lemoncupTrunk));** GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Blocks.acacia_stairs)); EDIT: Solved it! Finally. Like was said below, you have to use the accessor classes Blocks and Items to call vanilla items and blocks to ItemStacks going forward. For some reason, I had to set up my own accessor class to get my blocks to work in ItemStacks as well. I can reference item instances just fine, but I have to reference blocks through my own personal Blocks class (I called it ModBlocks) which included nothing but a bunch of variables for each block (public static block Name = (Block)BlockRegistry.Name;). It somehow changes the accessibility of the block. Don't know why.
  4. That works! Thank you. But now it seems like I've got to give it its own texture and everything. I've never done an entity before, can you point me in the right direction? I don't need anything fancy. Like I said in my first post, I want it to look and act exactly like an item frame, just without the ability to drop items.
  5. That would be it. How would I register an entity?
  6. Hello! I have a small issue with registering a new Item Frame. I want to make it so that breaking an item frame doesn't drop any items. I figured the easiest way to do this was to copy the EntityItemFrame class into my mod, change the name and extend it from the original EntityItemFrame class. That way, I could change the ItemDropChance variable to 0. It works great, but it doesn't register properly with the world, and when I quit and come back in, my customized frames are gone. I've posted my new class, CheatingItemFrame, here. Can anyone help?
  7. Perfect! You've been more than helpful
  8. Oh, so you have to place it from the Entity side, cool, thanks. While I have you here, is there an accessor method in the Entity class for placing items in the frame? I can check when I get back to my computer, but are there any tricks I should know there?
  9. Basically what the title says. How do I place Item Frames in world gen? I can make a dozen or so blocks to get around the issue, but I'd rather just place Item Frame entities on the wall. Is there a way to do this?
  10. Well. I solved it. And you will never guess how. For some reason, with a mac, it will not work as a zipped folder. It just won't. I accidentally left it unzipped before starting, and it worked. Textures and all. Thank you for everything, again.
  11. Not to get off topic, but that difference doesn't work for some reason. Do I have to place it outside the class? It doesn't like the 'new' declaration. Deleting it (so it reads 'Flora instance;' instead of 'new Flora instance;') gives me no errors. But thank you. Thank you so much for all your help. Hopefully I will find the answer somewhere.
  12. I agree with that guy ^^. THe first opaque block from the top of the sky. However, I want to add that if you gen your stuff too early, trees might not be in place yet. I had that problem once.
  13. My bad. I was experimenting with a couple things. Basically, I just got rid of the mod folder and made it simply spelunking. So it says package spelunking; Here's the code: package spelunking; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = Flora.modid, name = "spelunking", version = "1.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = "spelunking", packetHandler = FloraPacketHandler.class) public class Flora { @Instance public static Flora instance = new Flora(); public static final String modid = "spelunking"; //Plant list public static Block caveWheatBlock; public static Block lemoncupBlock; public static Block orangecapBlock; public static Item caveWheatSeeds; public static Item caveWheat; public static Item caveWheatBread; public static Item lemoncup; public static Item orangecap; BonemealHandler bonemealHandler = new BonemealHandler(); @PreInit public void PreInit(FMLPreInitializationEvent event) { //Plant Init caveWheatBlock = new BlockCaveWheat(900).setUnlocalizedName("cavewheat").setLightValue(0.4F); lemoncupBlock = new BlockLemoncup(901).setUnlocalizedName("lemoncups").setLightValue(0.4F); orangecapBlock = new BlockOrangecap(902).setUnlocalizedName("orangecaps").setLightValue(0.4F) ; //Item Init caveWheatSeeds = (new ItemCaveWheatSeeds(910, caveWheatBlock.blockID, Block.gravel.blockID)).setUnlocalizedName("cavewheatseeds"); caveWheat = (new ItemCaveWheat(911)).setUnlocalizedName("cavewheat").setCreativeTab(CreativeTabs.tabMaterials); caveWheatBread = (new ItemCaveBread(912, 5, 0.6F, false)).setUnlocalizedName("cavebread"); lemoncup = (new ItemLemoncup(913, 2, 0.8F, lemoncupBlock.blockID, Block.gravel.blockID)).setUnlocalizedName("lemoncup"); orangecap = (new ItemOrangecap(914, 2, 0.8F, orangecapBlock.blockID, Block.gravel.blockID)).setUnlocalizedName("orangecap"); //Recipe Stuff ItemStack bowl = new ItemStack(Item.bowlEmpty); ItemStack redMush = new ItemStack(Block.mushroomRed); ItemStack brownMush = new ItemStack(Block.mushroomBrown); ItemStack yellowMush = new ItemStack(lemoncup); ItemStack orangeMush = new ItemStack(orangecap); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, yellowMush, orangeMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, yellowMush, redMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, yellowMush, brownMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, redMush, orangeMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, brownMush, orangeMush}); GameRegistry.addRecipe(new ItemStack(caveWheatBread), new Object[]{" ", "www", "www", 'w', new ItemStack(caveWheat)}); //Game Registry stuff GameRegistry.registerBlock(caveWheatBlock, modid + (caveWheatBlock).getUnlocalizedName()); GameRegistry.registerBlock(lemoncupBlock, modid + (lemoncupBlock).getUnlocalizedName()); GameRegistry.registerBlock(orangecapBlock, modid + (orangecapBlock).getUnlocalizedName()); //Language Registry Stuff LanguageRegistry.addName(caveWheatBlock, "Cave Wheat"); LanguageRegistry.addName(lemoncupBlock, "Lemoncup"); LanguageRegistry.addName(orangecapBlock, "Orangecap"); LanguageRegistry.addName(caveWheatSeeds, "Cave Wheat Seeds"); LanguageRegistry.addName(caveWheat, "Cave Wheat"); LanguageRegistry.addName(caveWheatBread, "Cave Bread"); LanguageRegistry.addName(lemoncup, "Lemoncup"); LanguageRegistry.addName(orangecap, "Orangecap"); MinecraftForge.EVENT_BUS.register(bonemealHandler); } }
  14. You understood me. However, forge does't like that structure. Here are the screenshots. This is my mod structure: Notice that my package directory is on the same level as assets. (And yes, I changed the space to an underscore, oops) This is the error I am getting: More detail: I know how to fix it. I just have to move my package structure up one level, and make spelunking the name of the zip. But then I can't get assets to be on the same level. What am I doing wrong?
  15. Excellent. I think I understand. I need a zip folder, and in that zip folder I need to have an assets folder and a directory that matches the package structure in eclipse. However, when I run Minecraft on it, it crashes because it can't find the main class file. According to forge, the package root needs to be the name of the zip folder. But then I can't connect it to assets. Does that make sense?
  16. It worked! Partly. I finally got my textures into Eclipse! Thank you. You are the only person to tell me the right location for my assets folder, everyone else has it all wrong. But when I export my mod and play it in Minecraft, where do I put them? I have a .zip, and I've tried .zip/assets/modname/textures/blocks etc. but that doesn't work. Can you tell me the location for the build version? Here is what I have tried: I have package modname in which all my class files are. In order for these files to work, they have to be in a zip folder of the same name, so their package declaration works. Parallel to this package I have package assets. I have tried putting this package next to the zip folder in the mods folder, but that doesn't work. I have also tried putting it in the zip folder, but that doesn't work either. Thoughts?
  17. Alright. I've changed that part. But the textures are still not being loaded. I know that it must be bug in my code that happened during the switch to 1.6, but I don't see it. Can anyone see it in any of my classes? Here is my main mod class: package mods.Spelunking; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = Flora.modid, name = "spelunking", version = "1.0") @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = "spelunking", packetHandler = FloraPacketHandler.class) public class Flora { @Instance public static Flora instance = new Flora(); public static final String modid = "spelunking"; //Plant list public static Block caveWheatBlock; public static Block lemoncupBlock; public static Block orangecapBlock; public static Item caveWheatSeeds; public static Item caveWheat; public static Item caveWheatBread; public static Item lemoncup; public static Item orangecap; BonemealHandler bonemealHandler = new BonemealHandler(); @EventHandler public void Init(FMLInitializationEvent event) { //Plant Init caveWheatBlock = new BlockCaveWheat(900).setUnlocalizedName("cavewheat").setLightValue(0.4F); lemoncupBlock = new BlockLemoncup(901).setUnlocalizedName("lemoncups").setLightValue(0.4F); orangecapBlock = new BlockOrangecap(902).setUnlocalizedName("orangecaps").setLightValue(0.4F) ; //Item Init caveWheatSeeds = (new ItemCaveWheatSeeds(910, caveWheatBlock.blockID, Block.gravel.blockID)).setUnlocalizedName("cavewheatseeds"); caveWheat = (new ItemCaveWheat(911)).setUnlocalizedName("cavewheat").setCreativeTab(CreativeTabs.tabMaterials); caveWheatBread = (new ItemCaveBread(912, 5, 0.6F, false)).setUnlocalizedName("cavebread"); lemoncup = (new ItemLemoncup(913, 2, 0.8F, lemoncupBlock.blockID, Block.gravel.blockID)).setUnlocalizedName("lemoncup"); orangecap = (new ItemOrangecap(914, 2, 0.8F, orangecapBlock.blockID, Block.gravel.blockID)).setUnlocalizedName("orangecap"); //Recipe Stuff ItemStack bowl = new ItemStack(Item.bowlEmpty); ItemStack redMush = new ItemStack(Block.mushroomRed); ItemStack brownMush = new ItemStack(Block.mushroomBrown); ItemStack yellowMush = new ItemStack(lemoncup); ItemStack orangeMush = new ItemStack(orangecap); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, yellowMush, orangeMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, yellowMush, redMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, yellowMush, brownMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, redMush, orangeMush}); GameRegistry.addShapelessRecipe(new ItemStack(Item.bowlSoup), new Object[]{bowl, brownMush, orangeMush}); GameRegistry.addRecipe(new ItemStack(caveWheatBread), new Object[]{" ", "www", "www", 'w', new ItemStack(caveWheat)}); //Game Registry stuff GameRegistry.registerBlock(caveWheatBlock, modid + (caveWheatBlock).getUnlocalizedName()); GameRegistry.registerBlock(lemoncupBlock, modid + (lemoncupBlock).getUnlocalizedName()); GameRegistry.registerBlock(orangecapBlock, modid + (orangecapBlock).getUnlocalizedName()); //Language Registry Stuff LanguageRegistry.addName(caveWheatBlock, "Cave Wheat"); LanguageRegistry.addName(lemoncupBlock, "Lemoncup"); LanguageRegistry.addName(orangecapBlock, "Orangecap"); LanguageRegistry.addName(caveWheatSeeds, "Cave Wheat Seeds"); LanguageRegistry.addName(caveWheat, "Cave Wheat"); LanguageRegistry.addName(caveWheatBread, "Cave Bread"); LanguageRegistry.addName(lemoncup, "Lemoncup"); LanguageRegistry.addName(orangecap, "Orangecap"); MinecraftForge.EVENT_BUS.register(bonemealHandler); } } Here is a block for reference, BlockCaveWheat: package mods.Spelunking; import java.util.ArrayList; import java.util.Random; import mods.Spelunking.Flora; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.IPlantable; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockCaveWheat extends Block implements IPlantable { @SideOnly(Side.CLIENT) private Icon[] iconArray; public BlockCaveWheat(int par1) { super(par1, Material.plants); this.setTickRandomly(true); float f = 0.5F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); this.setCreativeTab((CreativeTabs)null); this.setHardness(0.0F); this.setStepSound(soundGrassFootstep); this.disableStats(); } /** * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of * blockID passed in. Args: blockID */ protected boolean canThisPlantGrowOnThisBlockID(int par1) { return par1 == Block.gravel.blockID; } /** * Ticks the block if it's been scheduled */ public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.updateTick(par1World, par2, par3, par4, par5Random); if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 7) { int l = par1World.getBlockMetadata(par2, par3, par4); if (l < 7) { float f = this.getGrowthRate(par1World, par2, par3, par4); if (par5Random.nextInt((int)(25.0F / f) + 1) == 0) { ++l; par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); } } } } /** * Apply bonemeal to the crops. */ public void fertilize(World par1World, int par2, int par3, int par4) { int l = par1World.getBlockMetadata(par2, par3, par4) + MathHelper.getRandomIntegerInRange(par1World.rand, 2, 5); if (l > 7) { l = 7; } par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); } /** * Gets the growth rate for the crop. Setup to encourage rows by halving growth rate if there is diagonals, crops on * different sides that aren't opposing, and by adding growth for every crop next to this one (and for crop below * this one). Args: x, y, z */ private float getGrowthRate(World par1World, int par2, int par3, int par4) { float f = 1.0F; int l = par1World.getBlockId(par2, par3, par4 - 1); int i1 = par1World.getBlockId(par2, par3, par4 + 1); int j1 = par1World.getBlockId(par2 - 1, par3, par4); int k1 = par1World.getBlockId(par2 + 1, par3, par4); int l1 = par1World.getBlockId(par2 - 1, par3, par4 - 1); int i2 = par1World.getBlockId(par2 + 1, par3, par4 - 1); int j2 = par1World.getBlockId(par2 + 1, par3, par4 + 1); int k2 = par1World.getBlockId(par2 - 1, par3, par4 + 1); boolean flag = j1 == this.blockID || k1 == this.blockID; boolean flag1 = l == this.blockID || i1 == this.blockID; boolean flag2 = l1 == this.blockID || i2 == this.blockID || j2 == this.blockID || k2 == this.blockID; for (int l2 = par2 - 1; l2 <= par2 + 1; ++l2) { for (int i3 = par4 - 1; i3 <= par4 + 1; ++i3) { int j3 = par1World.getBlockId(l2, par3 - 1, i3); float f1 = 0.0F; if (blocksList[j3] != null && blocksList[j3].canSustainPlant(par1World, l2, par3 - 1, i3, ForgeDirection.UP, this)) { f1 = 1.0F; if (blocksList[j3].isFertile(par1World, l2, par3 - 1, i3)) { f1 = 3.0F; } } if (l2 != par2 || i3 != par4) { f1 /= 4.0F; } f += f1; } } if (flag2 || flag && flag1) { f /= 2.0F; } return f; } @SideOnly(Side.CLIENT) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { if (par2 < 0 || par2 > 7) { par2 = 7; } return this.iconArray[par2]; } /** * The type of render function that is called for this block */ public int getRenderType() { return 6; } /** * Generate a seed ItemStack for this crop. */ protected int getSeedItem() { return Flora.caveWheatSeeds.itemID; } /** * Generate a crop produce ItemStack for this crop. */ protected int getCropItem() { return Flora.caveWheat.itemID; } /** * Drops the block items with a specified chance of dropping the specified items */ public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0); } @Override public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> ret = super.getBlockDropped(world, x, y, z, metadata, fortune); if (metadata >= 7) { for (int n = 0; n < 3 + fortune; n++) { if (world.rand.nextInt(15) <= metadata) { ret.add(new ItemStack(this.getSeedItem(), 1, 0)); } } } return ret; } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return par1 == 7 ? this.getCropItem() : this.getSeedItem(); } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random par1Random) { return 1; } @SideOnly(Side.CLIENT) /** * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) */ public int idPicked(World par1World, int par2, int par3, int par4) { return this.getSeedItem(); } @SideOnly(Side.CLIENT) /** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ public void registerIcons(IconRegister par1IconRegister) { this.iconArray = new Icon[8]; for (int i = 0; i < this.iconArray.length; ++i) { System.out.println(this.getUnlocalizedName().substring(5)+i); this.iconArray[i] = par1IconRegister.registerIcon(Flora.modid + ":"+this.getUnlocalizedName().substring(5)+(i+1)); } } @Override public EnumPlantType getPlantType(World world, int x, int y, int z) { return EnumPlantType.Crop; } @Override public int getPlantID(World world, int x, int y, int z) { // TODO Auto-generated method stub return blockID; } @Override public int getPlantMetadata(World world, int x, int y, int z) { // TODO Auto-generated method stub return 0; } /** * 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; } } And finally, an item class for reference, ItemCaveBread: package mods.Spelunking; import mods.Spelunking.Flora; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemFood; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemCaveBread extends ItemFood{ public ItemCaveBread(int par1, int hunger, float saturation, boolean wolfEats) { super(par1, hunger, saturation, wolfEats); this.setCreativeTab(CreativeTabs.tabMaterials); // TODO Auto-generated constructor stub } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister){ this.itemIcon = par1IconRegister.registerIcon(Flora.modid + ":" + this.getUnlocalizedName().substring(5)); } }
  18. Thank you both for the helpful replies, but even in Eclipse the textures still don't register. I have placed the texture files (for eclipse) in mcp/src/minecraft/assets/modname/textures/blocks or items etc. I have tried changing my @Init method to @PreInit or @EventHandler with no success I register my icons using modId + ":" + unlocalizedName().substring(5) Also, When the error appears in the output, it says: "unable to load: modname:textures/blocks/texture.png. Every variable is correct, and the file exists in the right location. But it is not being loaded. I know I am missing something obvious. Can anyone tell me what step I left out?
  19. I have a mod that works great on 1.5, textures and all. I updated to 1.6, however, and it all fell apart. Textures no longer work. Here is how I have it set up: I have one directory in the minecraft/versions folder which houses my custommod.jar and custommod.json file. I then put the mod file in the minecraft/mods file. Then I load up mine craft. It works fine, but the textures don't render. Currently, I have the textures in the custom mod.jar under assets/custommod/textures/blocks , items, gui, etc. All the same as 1.5 except for the assets. I dropped my folder next the the minecraft folder in the already existing assets folder in the jar. Everything is lowercase. But nothing works. I don't know why. Is there an update tutorial I can read? I haven't found anything yet..
  20. I have spent the last 6 hours looking for any help, and have found nothing. I have a mod that works in Eclipse. It is a project that is dependent on a separate Minecraft project I have created. I want to take this project and turn it into a .zip folder that can be put into the Forge mods folder and played. As a last ditch effort, I have literally copied the entire project directory, added the texture folder, zipped it up and dropped it in there. Unfortunately, it didn't work. Surprisingly, forge actually recognized the mod, but it couldn't find my main class (it said 'Class not found: main.Gems.class' (where Gems is my main mod class)), despite my main mod class being in the mentioned directory. I know I am doing something wrong, and want an easy, step by step way to turn this Eclipse project into a Forge readable .zip folder. Can anyone help?
  21. Bad wording on my part! I use IWorldGenerator for actually placing my blocks and things, but I have a method that tells me where to place them. And this method is unique for each world. Thus, it need to be initialized every time the World Loads, which is where the tick handler comes in. I would do it another way if I could, but I can't think of any other way to gen a unique structure for each world. But back to my original question. Is there a way to force regenerate chunks? Or, even better, find a hook that will initialize this structure before anything is generated.
  22. I have some World Gen in my world, and I'm using a Tick Handler to implement a structure that tells me to place things in IWorldGen. However, because of how the Tick Handler works, the first couple dozen chunks around spawn are generated before the Tick Handler creates my Gen structure. Everything else is generated fine, but there is an empty circle around spawn. Is there a way I can respawn these chunks after my structure has been initialized? Or even better, is there a way to initialize a class on World Load before any chunks get generated?
  23. Exactly what I was looking for! I expected it to be dirty, seeing as Forge doesn't really have a hook for it yet. But its better than trying to override the entire biome! Thank you!
  24. Thank you stranger! Exactly what I was looking for.
  25. I am having trouble with my Event Manager class. What I want it to do is create a single instance of my framework class (kind of a randomizd mathamatical framework that tells me where to place things) every time a new World is created, then keep a reference to that object active for every time the World loads. Right now I have managed to create either A) 1 object used for ALL worlds, or B) A new object created every time a world is loaded, not created. I know there has to be a way to do this. What am I missing?
×
×
  • Create New...

Important Information

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