Jump 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Post your block registration code, in full, along with JSON files.
  2. http://www.minecraftforge.net/forum/index.php/topic,41630.msg221131.html#msg221131
  3. That is the proper way. @Deprecated means "do not invoke this" not "this is not used."
  4. Why are you using Minecraft.getMinecraft().theWorld ? This is both client side only and unnecessary as a world object was passed to the method already: onItemRightClick(ItemStack item, World world, EntityPlayer player)
  5. Unlocalized names are purely for display, so yes, they still exist and don't point back to something else.
  6. I think you mean 0. Yes. I typoed that.
  7. I believe there is another method you need to override, I know in 1.7.10 it was: getBlocksMovement I am not sure if the name has changed.
  8. That int is the metadata value. For most things, this will be 1. For blocks with variants, you'll pass in the metadata equivalent of the state you want to register (cough, you'll have to call this multiple times for more than one state). https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/client/ClientProxy.java#L48-L57
  9. I believe it changed in one of the more recent updates. Same as moving from Block.dirt to Blocks.dirt (and then again to Blocks.DIRT).
  10. You are currently doing this: 1) The player has right clicked with this item 2) We give the player instant health 3) World is the server, so we continue 4) Spawn a bullet entity and send it on its way 5) Subtract ammo from the player: oops it doesn't have any 6) Damage the item You create the bullet before ever checking if there's ammo. And in fact, you don't check. The two line snippet (that does basically nothing) does check, but isn't wrapped around anything important. You need to reorder these steps and wrap the subtract ammo line into an if statement.
  11. Right, just that vanilla isn't a reference point any more.
  12. override drawGuiContainerForegroundLayer Pretty much look at any vanilla GUI.
  13. I'm sorry, this is not a chat room, it's a forum. Don't bump your thread after an hour. Point is: Don't create the bullet entity unless the player has ammo.
  14. Lets work this out. Stepping through the method... 1) The player has right clicked with this item 2) We give the player instant health 3) World is the server, so we continue 4) Spawn a bullet entity and send it on its way 5) Subtract ammo from the player: oops it doesn't have any 6) Damage the item Think about it for a minute.
  15. These don't actually exist anymore, the item override mechanic is used instead of the hardcoded texture classes. Ah, thanks diesieben07. I think I'd glimpsed that, but didn't look very far into it. Also, away from my dev environ.
  16. Largely speaking, you need to look up how to use OpenGL / GL11. VertexBuffer's second paramter is the same one passed to GL11.Begin() (which typically you want to use GL11.GL_QUADS). Last time I tried using lines I had trouble.
  17. This is a forum, not Stack Exchange. You don't. If you want to edit your original post and change the title so it says "[sOLVED]" that's sufficient, but not required. You're also free to click the "thanks" button if you want.
  18. Check out my Client/Common proxy files (linked above). I boiled it down to a nice, clean "proxy.registerBlock," "proxy.registerBlockWithItem," etc. which does the game registry stuff and the rendering stuff all at once, and if it needs an item, then it gets an item registered automatically. All that gets passed is the block (or item) and the registry name, so it looks very similar to 1.8 and prior.
  19. Look at the chunk of code and manually step through it. Use the debugger if you have to. The error it obvious.
  20. You can't change the hard coded number, no. You'll have to take a different approach.
  21. Then either: You haven't imported the Enchantments class or You're using the wrong class. I don't have an environment set up at the moment to check.
  22. Run it and see.

Important Information

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

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.