Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. Where did you declare the variable.
  2. Where is the ItemStack stored?
  3. How much Java experience do you have?
  4. Yes that method of registry is outdated. That is correct if your changed the Block in Register<Block> to Item
  5. Could you post your DragonNest class? I'm pretty sure you are going to need that BlockPos.
  6. Anywhere in your project. It doesn't really matter where.
  7. 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.
  8. 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.
  9. This is documentation on the new registration system.
  10. This part checks to see if a 9x11xHeight space is AIR. Which will almost never happen underground.
  11. Random#nextInt(78 - 65) + 65 Will give you a random number between 65 and 78.
  12. 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.
  13. 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.
  14. To make it generate underground you just need to make the y variable smaller.
  15. 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.
  16. You also need to override getMaxItemUseDuration
  17. 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.
  18. 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.
  19. If it returns true it believes you did something and the onItemRighClick/onItemUse shouldn't be called. Edit: It also tells the client to play the animation of the player moving their hand when true is returned.
  20. Ok....so you registered a world generator that possibly generates a house 10 times per every chunk that gets loaded. In the exact same place as it was the first time it generated in that chunk. Also i think your house is a 9 * 9 * 6 prism of stone brick. Try Not generating it 10 times every chunk and instead make it only appear in 1/50 chunks by removing the for loop in NeemWorldGenerator#generateOverWorld.
  21. Sorry I miss the small details a lot, have you tried stepping through it with the debugger because it is not popping out at me.
  22. I was taking a shot in the dark...where are you appending that "X" at?
  23. Change this to return itemStack.getTagCompound();

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.