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. Bingo. @EventHandler public void onTick(TickEvent event) { //a tick happened //increment counter pressTime++; }
  2. Dude. Seriously. All of that code runs in a single tick. It doesn't actually "wait" (even if real-time it takes it four seconds). That's why the game appears to freeze. In order for you to perform an operation over time you need to count ticks. Open up TileEntityFurnace and look at the burnTime variable. Look at what it does.
  3. You need to override and implement getUpdateTag
  4. "GUI" and "NBT" should never be used in the same sentence. And GUIs don't contain Inventory items, they display Inventory items. TL;DR: You're doing everything wrong. Block -> creates TileEntity TileEntity -> contains Items Container -> wraps around TileEntity GuiContainer -> displays Container
  5. You can't use a while loop to check passage of time. They explicitly do not exit (forcing thread halt) until their conditions are met, in this case, the release of the pressed key.
  6. I can't tell from the code snippet. There may be also something else they did that I can't see.
  7. You can't store information in the Block class, you must store it elsewhere (TileEntity, Player Capability, etc.)
  8. This is basically wrong. For onCollide to work, the block needs to be smaller than a full cube, that's it. I don't know why his code isn't working though.
  9. if(NullPointer) { GoTo $Location; CheckForPossibleNullObjects(); Debug(); }
  10. You won't be ABLE to get it to work without switching.
  11. OreDictionary.getName(stack) iirc. I don't have a working environment at the moment, but there IS a method to get all the names a given stack is registered as.
  12. Or check % 23999 .
  13. Actually, world#getWorldTime() is not %24000, TheMasterGabriel is incorrect about that (or rather, his assumption based off a particular piece of lying Javadoc). If you trace its usage you will find that it is not moduloed anywhere in the code, and in fact is used to track the current world time (cough, as expected, cough) and (IIRC) is used to calculate the current moon phase. World#getTotalWorldTime() on the other hand, returns the realtime the world has existed, meaning that if you sleep, the timer is not incremented respective to world#getWorldTime() .
  14. There are three methods that are important. If you do a search in BlockFurnace for where it uses the PropertyDirection, you'll find what you need. We are not here to GIVE you code, we're here to HELP you code.
  15. Yeah, you've done NONE of the things required for a block to have blockstates. Congrats, you have a PropertyDirection static enum. You never use it.
  16. Show your Block class.
  17. Please use strongly typed lists.
  18. Quick note: Your fake light block should return true for all checks that ask if the block is Air. Otherwise you'll get some funky behavior with other mods. e.g. a while back Computer Craft turtles would bump into the light columns produced by...I think it was Atomic Stryker's Dynamic Lights mod: the floodlights would point downwards and produce a column of fake light blocks until it encountered another block. Those blocks did not detect as "air" or anything else that the turtle could path through, so it would get stuck on it.
  19. I'm away from my dev space, but if you know how to register the burn time for an item, use your IDE to Find All References and you should be able to find where the vanilla items are set.
  20. TileEntityFurnace All smelting times are the same. (Unless you mean the fuel burn time).
  21. Funny. You don't say. Try reading this post again:
  22. YOU aren't, but SOME OTHER MOD COULD BE. That's the distinction: someone else might chunkload something, and the interaction with your code causes it to break.
  23. You can still chunk-load in SSP and the player doesn't need to be in the same dimension, which is the same as 0 players online.

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.