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. You don't cancel events inside the method, there's no event there. That method only runs when the block is added to the world. It will not fire if the player sleeps in a bed.
  2. You can also hover over it and click on the name (or green dot) in the tooltip. There's also the Navigate menu, and "Open Declaration."
  3. Seriously? if(event.getEntity() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.getEntity(); } Fuck.
  4. Why are you not performing this creation effect in the Block's onBlockPlaced method?
  5. o..O What on earth are you trying to accomplish?
  6. It's not that hard. Hover over the Property declaration (the class name, not the variable name) and click on the tooltip that comes up and navigate to the class by clicking on the class name in the tooltip. Or highlight it and press Ctrl-Shit-T in Eclipse. Or use the Navigate menu to "Open Type" or "Jump to Declaration" or similar. You don't have to read the method contents for this, just the method names. I'll help out a bit by saying to scroll down to line 1100 and start there.
  7. Why are you checking event.isCancelable() at all? That said, why are you using Minecraft mc = Minecraft.getMinecraft(); on the server? And why are you getting the player from the client side class rather than from the event? You check event.getEntity() to see if it's a player...
  8. Your best resource example is the giant wealth of knowledge that exists inside the source code. Look at the objects you're working with and look at their property names and method names. We've already told you that you need to use the Property object. See if you can find something in it that will do what you want to do. (Hint: there is)
  9. Not here, though. Forge has ceased support for 1.7. You will need to go elsewhere. That said: You haven't shown enough of your code for me to even guess at what's going wrong. You also didn't post the crash report which often narrows the problem down to a single line.
  10. You need to use if-checks to check to see if the block placed is one of your blocks. If it's not, do nothing, if it is, run the code. -or- You could write a custom ItemBlock class. Which is more better. You control your own blocks, you can write code that only occurs within your own blocks by writing the code IN your OWN blocks.
  11. Actually, while Raycoms has pointed out the error, it is an error that's caused by another error: Caused by: java.io.FileNotFoundException: minecraft:models/item/generateed.json Although both point at the problem: generateed is not speelled correectly.
  12. Stop using the model mesher. Use ModelLoader.setCustomModelResourceLocation
  13. ...You know that vanilla already does that for you, right? public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { if (hasTileEntity(state) && !(this instanceof BlockContainer)) { worldIn.removeTileEntity(pos); } }
  14. No. The config can save values as well, the problem here is that Trusak does not have a basic understanding of object oriented programming. Trusak, if you want the config value to change, you need to set the property and then save the config.
  15. Wait. Hold on. You're "updating the packet"? Please explain.
  16. Yes. GL states aren't affected by push/pop matrix. The translation matrix only handles translation, rotation, and scale. Color, blending, light, culling, ztest, and so on are not covered by push/pop matrix.
  17. Should be able to do it with an OBJ.
  18. Install the JSON Editor Plugin in Eclipse, or if you are using IntelliJ, find an equivalent plugin.
  19. Or a working example https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/axel.json
  20. Not going to happen. Mojang already made the change.
  21. The question is: Why do you need 10 values for each of 6 different properties?
  22. Property prop = config.get("name","category",false); prop.getBoolean();

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.