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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Change uvlock to false, now model rotation will also rotate texture.
  2. The teletype tag, tt. This is some inline code.
  3. Property prop = config.get(...) boolean b = prop.getBoolean(); //do stuff prop.set(b); config.save(); Jesus H Christ. I can't believe I had to spell that out.
  4. Gets the light value at the block coordinates the TE is at, in a combined manner: i << 20 | j << 4 where i is SkyLight and j is BlockLight. "15728640" is just a "if the actual block light is less than this value, use this value" value. This means that regardless of the total light in the space, this value will be used pretty much guaranteed (as 15728640 is definitely more than 15). Because of the way the math works, you may as well replace the function call with the value 15728640 (and ignore all lighting). Which you could then divide and modulo by 65536 yourself. (...wasn't that the whole point? To ignore lighting conditions?)
  5. Gets the light value at the block coordinates the TE is at, in a combined manner: i << 20 | j << 4 where i is SkyLight and j is BlockLight. "15728640" is just a "if the actual block light is less than this value, use this value" value. This means that regardless of the total light in the space, this value will be used pretty much guaranteed (as 15728640 is definitely more than 15). Because of the way the math works, you may as well replace the function call with the value 15728655 (and ignore all lighting). Which you could then divide and modulo by 65536 yourself. (...wasn't that the whole point? To ignore lighting conditions?)
  6. ...You don't know how to invoke methods and create variable references inside a button?
  7. In Eclipse, under the Package Explorer, there should be a "folder" called Referenced Libraries (there might not be, in which case skip this). Inside that will be a file called "forgeSrc-[mc version]-[forge version].jar" You will be able to open up that jar file and brows the MC source code. TNT will be down under: - net.minecraft.blocks - net.minecraft.entities
  8. Description: Loading screen debug info This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
  9. Or getAllInBox(pos.add(-1,-1,-1), pos.add(1,1,1);
  10. (you know....because they don't exist/aren't connected to a server...)
  11. inventory.deserializeNBT((NBTTagCompound) compound.getTag("inventory")); Also, I recommend naming your nbt tag with your mod ID.
  12. You will need to call ItemStackHandler#serializeNBT() and ItemStackHandler#deserializeNBT() yourself.
  13. And even if you do need a TESR, don't do Minecraft.getMinecraft().getTextureManager() a lot. Save the reference to a variable and that'll clean up your code A LOT.
  14. This will be very tricky with block models. But you'd have to store the block being used inside a (non-ticking) TE to start with. From there you should be able to write a BakedModel implementation that returns the baked quads for the saved block, or at the very least, quads using the same texture.
  15. You forgot the "new" keyword.
  16. Do that in the onBlockPlaced method. If the placement is invalid, drop the block as an item and set the space to air.
  17. 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.
  18. 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."
  19. Seriously? if(event.getEntity() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.getEntity(); } Fuck.
  20. Why are you not performing this creation effect in the Block's onBlockPlaced method?

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.