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. Two possibilities I see [*]energyUsed isn't changing at all (not likely) [*]Or your if checking in detectAndSendChanges is not working (correctly). To fix this since you don't have that many variables to work with you can manually do it, look at ContainerFurnace#detectAndSendChanges for an example of manual.
  2. You will be getting an Integer. Yes I know that, but what would I put into the get method ( What obj ) A ChunkPos(your key). Did you read that link I sent you?
  3. You will be getting an Integer.
  4. Put a println in Container#updateProgressBar so that it prints id and data.
  5. You should get an error because there is no key for the get method.
  6. No the integer is your energy... the x and y values are in the ChunkPos...
  7. Remove any part that removes energy and tell me what happens.
  8. https://docs.oracle.com/javase/7/docs/api/java/util/Map.html
  9. It is definitely possible you just need to deal with threads. Your window should run on its own Thread, and use Listeners (like you would with a Packet) to get the data you need.
  10. Not as in depth as you want for this one assuming you mean the code.
  11. public Map<ChunkPos, Integer> chunkData; is never initialized.
  12. As far as I know it is still not supporting 1.7.10 and down, everything above that is good.
  13. Could you show me what you mean in a video or gif? And... What?
  14. What version are you using?
  15. Your problem is your setField, it doesn't set everything which is used to update the values on the client side.
  16. Do you mean BloomeryGUIHandler and GuiHandlerRegistry? GuiHandlerRegistry is just to register all of my Gui's and BloomeryGUIHandler is specificly for the Bloomery. Well I meant why are you going to have more than one. Why don't you just use a switch statement or an if else statement to handle your GUIs and Containers? item.getMetadata(1) // Doesn't work the way you think it does. "// TODO: Figure out difference between simulate = true and simulate = false" If simulate is true then the process doesn't happen, if false it does happen. In this case if true it doesn't mess with your ItemStacks, if false the ItemStacks change. Also quick question did you follow a tutorial? I originally followed TheGreyGhost's code here but I'm trying to switch it to Forge's capability system. Also, checked getMetadata, thought it just returned the int I put in, but I switched it to getMetadata(ItemStack) now. For that todo I originally had insertItem, but I switched it to setStackInSlot. I'm guessing it would be better to use insertItem? Thank you for explaining it though. Yes it would be better to use insertItem and extractItem because it already handles the current slot being null. And you are going to need to create your own implementation of insertItem and possibly extract item. Also... That is not what you told it to do. Edit: Also that is not what TGG did.
  17. Do you mean BloomeryGUIHandler and GuiHandlerRegistry? GuiHandlerRegistry is just to register all of my Gui's and BloomeryGUIHandler is specificly for the Bloomery. Well I meant why are you going to have more than one. Why don't you just use a switch statement or an if else statement to handle your GUIs and Containers? item.getMetadata(1) // Doesn't work the way you think it does. "// TODO: Figure out difference between simulate = true and simulate = false" If simulate is true then the process doesn't happen, if false it does happen. In this case if true it doesn't mess with your ItemStacks, if false the ItemStacks change. Also quick question did you follow a tutorial?
  18. ...There is no reference of a PacketHandler in the crash report, i have no idea how you thought that was the problem. Post your PacketSyncDataClient class.
  19. Why do you have multiple GuiHandlers?
  20. Awesome i didn't know that, never needed it myself.
  21. That would do what you want. What I am saying is that you can't assign it directly IE it saves directly to the Chunk. You will save it to the world, but there will be one for every chunk. Example in my first post. Map<ChunkPos, Integer> chunkData; // Probably going to have to make ChunkPos which will just hold an x and a z. You will get the Chunks x and z like so World#getBlockFromBlockCoord(getPos()).xPosition World#getBlockFromBlockCoord(getPos()).zPosition And then get your capability and do capability.chunkData.get(new ChunkPos(chunkX, chunkZ)); Then you have your energy in that chunk.
  22. Yes you could access it through a TE(How do you think Chunk Loaders work). You are not assigning the data to each chunk. You are saving data to the world using an identifier that is the Chunks coords(ChunkPos).

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.