Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Awesome_Spider

Forge Modder
  • Posts

    892
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Awesome_Spider

  1. world.setBlock(Blocks.air); something like that.
  2. Well, I've never been very good at bukkit. But I do know this, if you asking how it works it is open source. You can find it on github. But why would you be asking that on a forge forum anyway?
  3. A nullpointerexception is when you are trying to access a variable that is null. This means if you don't initialize a variable before using it, you will get this exception.
  4. What do mean by repackage? Take the code out of the jar and place it in my mod?
  5. Would it work to just add the jar to my build path? I'm guessing not.
  6. I need help with installing a library. I know how to install a library in normal java and maven, but I'm now sure how to do it in forge. My best guess is something with build.gradle? But I don't know. The library I want to install is Jsoup, to check if a new version is available for my mod by checking my website.
  7. Uhh, looking at your code on gitHub your main mod class doesn't have any code. That is fine but there needs to be a @Mod annotation on the main mod class. Also, as far as I know (I'm new at this) something with the @EventHandler annotation will only be called if it is in the main mod class (the one with a @Mod annotation above it). Hope this helps!
  8. Thanks for the suggestion. I will go through the code. Btw, I don't get discouraged easily. Edit: Ok, I've gone through the generation code, figured out how it works, and figured out what the problem might be. My custom leaf block extends Block instead of BlockLeaves. A lot of the if statements check for if there is leaves in a given location. But my leaf block, MaztrixLeaf wouldn't count as a leaf, causing errors. So if I change it to BlockLeaves it should work. Edit Again: It Worked! The color of the leaves is a little off but I can fix that.
  9. It looks like this: package com.awsp8.wizardry.Gen; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import cpw.mods.fml.common.IWorldGenerator; public class Generate implements IWorldGenerator { public void generate(Random random, int x, int z, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){ switch (world.provider.dimensionId){ case -1: generateNether(world, random, x * 16, z * 16); break; case 0: generateSurface(world, random, x * 16, z * 16); break; case 1: generateEnd(world, random, x * 16, z * 16); break; } } private void generateEnd(World world, Random random, int x, int z){ } private void generateSurface(World world, Random random, int x, int z){ for(int i = 0; i < 15; i++){ // 15 is rarity int randPosX= x + random.nextInt(16); int randPosZ= z + random.nextInt(16); int randPosY= world.getHeightValue(randPosX, randPosZ); (new MaztrixTreeGen(false, 4, 0, 0, false)).generate(world, random, randPosX, randPosY, randPosZ); } } private void generateNether(World world, Random random, int x, int z){ } }
  10. Well, yea. That's what I'd do, however I do not have even the slightest knowledge how the world generation works in Minecraft but that's how I'd do it. Another thing to note is that you might want to check the max-height there. Afaik the terrain in minecraft can sometimes reach about 240 blocks up (technically I think it may go all the way to 256 but it's not likely) but that means that if your tree is 11 blocks high and you create it at a height of 245 your tree will try to grow outside of the world. This is just a side-note and is doubtfully the cause of your crash but it's noteworthy. That's true. Well, it did run, but every time I add any form of generation code it doesn't run. However, now it's doing something funny where when I remove all the generation code it still doesn't run. I saw on Minecraft Forum that someone was having this same problem with some other code and it is caused be lack of LWJGL for some reason. I'm running gradlew.bat setupDecompWorkspace --refresh-dependencies again to see if that solves the problem. Edit: Well, that fixed the crash, I added the generation code back in and it launches now. Yay! The bad news: World Corruption (Aqain!). I was flying through my test world looking for my custom tree, then the chucks stoped loading and the loaded chunks were unloading. I said to myself, "Uh oh." I clicked escape and exited out of the world. The forge took forever to shutdown the world, and once it did, it then took forever to quit the game. I have no idea what's going on.
  11. so what you're saying is this: int randPosY= world.getHeightValue(randPosX, randPosZ); instead of this: int randPosY=random.nextInt(250); //Max Y coordinate Edit: It still has this crash.
  12. Then you need to learn basic java. Understanding the == operator is basic java. Even if you are just starting with the basics you should know that creating an ItemStack with your EventHandler as the argument makes no sense. Still would not make sense, it would just disallow flying always. In 1.6.4 and earlier it was. It is @SubscribeEvent in 1.7. Oh ok, thx for the info. Oh, btw I'm out of ideas.
  13. a)Thanks, I didn't know that. b)lol, sorry I'm still not a complete expert at modding c)typo I meant event.player.capabilities.allowFlying = false d)Ok, I didn't know that either, lol e) Oh ya I'm still a noob at events, sorry. It's @ForgeSubscribe right?
  14. So something like this: @EventHandler public void onTick(PlayerTickEvent event){ if (event.player.inventory.armorInventory[1] == new ItemStack(this)) event.player.capabilities = false; } I'm not sure I'm following
  15. Using onUpdate then checking if the chestplate is equipped could solve the problem. Other than that I'm out of ideas.
  16. Oh right, I didn't think of that. I thought there was setTickRandomly or something but there wasn't (maybe that is entities). But there is onPlayerStoppedUsing, you could try that.
  17. I have seen a problem like this posted on the Minecraft Forum. I would try adding something like this to your onArmorTick method: if (player.inventory.armorInventory[1] != armor) player.capabilities.allowFlying=false;
  18. I'm trying to generate a tree with a custom leaf type and log type (already implemented). Oh, also I will look at the tree generation classes again, but which class is that generates oak trees? I can't find it There is just WorldGenAbstractTree and WorldGenBigTree that I can find. Edit: Oh, and on doing more digging in net.minecraft.world.gen.feature, I also found WorldGenCanopyTree. That might beit, but I just need confirmation.
  19. Sorry, I've recently updated my mod to 1.7.10 so I don't have access to the crash logs. But if this helps it was saying something about an ArrayIndexOutOfBoundsException.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.