Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. A breakpoint and a break are two different things. Look up how to set a breakpoint in eclipse.
  2. I suggest stepping through your code in the debugger set a breakpoint at the top of getArmorModel.
  3. I'm pretty sure it is the fact that your Collar uses ArmorMaterial.LEATHER. Make a custom one and use that instead.
  4. You will need to use a Capabilty and attach it to the player to store the card they are supposed to get. And how is the player opening the gui, right clicking on a block? If so you can get the TileEntity from there and get the initial card.
  5. Where did you declare the variable.
  6. How much Java experience do you have?
  7. Yes that method of registry is outdated. That is correct if your changed the Block in Register<Block> to Item
  8. Could you post your DragonNest class? I'm pretty sure you are going to need that BlockPos.
  9. Anywhere in your project. It doesn't really matter where.
  10. It is really simple and if I get anything wrong I really want someone to correct me. Make a class that has the @Mod.EventBusSubscriber and in that class put the method in the documentation. @SubscribeEvent public void registerBlocks(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll(block1, block2, ...); } And where it says Register<Block> you can change Block to any class that extends IForgeRegistryEntry.Impl. This includes Item. Then event.getRegistry().register... is how you register your Items, Blocks, etc.
  11. That piece of code is entirely useless for your means. You are checking if a 9x6x11 space is AIR. You don't want to do that.
  12. This is documentation on the new registration system.
  13. This part checks to see if a 9x11xHeight space is AIR. Which will almost never happen underground.
  14. Random#nextInt(78 - 65) + 65 Will give you a random number between 65 and 78.
  15. Pretty much. At most your structure of 30x30 could belong in 4 chunks. Which means 3 extra chunks are possible when the world is generating, but the problem with that is when it loads those chunks it is possible that, that chunk will also want to generate it there to. There is almost nothing you can do about it taking up four chunks and those chunks generating.
  16. Yes, now it will spawn 78 blocks below the top of the ground, which could be negative, which is out of bounds so you will want to check for that.
  17. To make it generate underground you just need to make the y variable smaller.
  18. What you will want to do is make a List of ChunkPos that it has generated in. And if the position is to close to one in the list don't generate.
  19. You also need to override getMaxItemUseDuration
  20. You will have to make a method to do it, I would not necessarily do it before because then you will have to call World#setBlockState more times than necessary. Instead place your building in the world and then clear the area above it. Also do take into account what jeffryfisher said because what he said can and will happen which causes world gen lag because it can spiral out of control. It is called Runaway Chunk Generation.
  21. If I am not mistaken you do not need a ChunkProvider for Structure Generation. I think the biggest problem you have is that you check if the block is replaceable, why? Instead you should get the first ground block at the x, z position you get, and then tell the game to generate your structure. If there are air blocks or plants underneath then simply replace them with a foundation type of block. Kinda like what Minecraft does with it's village buildings, and then clear above your structure by replacing with air. Not all the way up to build height mind you, maybe a couple blocks if the structure is huge and if not clear until there is nothing connected above it.
×
×
  • Create New...

Important Information

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