Jump to content

BeardlessBrady

Members
  • Posts

    398
  • Joined

  • Last visited

Everything posted by BeardlessBrady

  1. Sorry for another post, Is there a resource I can look at to see what classes have been renamed to?
  2. Hello, I am trying to find where IntArray went in 1.17.1. In the container class it seems to implement IIntArray but I cannot find that class and don't seem to have access to it
  3. Is there anyway to override this? Or another method to sync server to client
  4. Hello. I am tracking an Int Array to sync the data value between server and client. For some reason the tracked IntArray's max value is the Short Max Value, 32767 and when passing that, it overloads. https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainer.java#L113 Is this normal, if not any ideas what could be causing this? The value is fine when being set up until I get the value from the client
  5. I figured it out. Apparently you dont need to do all that anymore to make part of your block transparent.
  6. I am trying to render a model in layers. In 1.12 one had to override the #canRenderInLayer method and use forge multi-layer json format, I am unsure how it works in 1.16.5
  7. I am sending a packet from client to server to update data but when another client opens the GUI the data has not been updated. Packet to Server: https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/network/MessageSetPrice.java Sending Packet: https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainerScreen.java#L296 Should I be sending a packet to the client when it opens the GUI, if so how do I determine the information has changed and they need an update?
  8. Oh I see, I wasn't sure what you meant by that, thank you that has made it work!
  9. Yes. Ill attach the files here incase I did something wrong Build.Gradle: https://github.com/Beardlessbrady/Currency-Mod/blob/44372f478306780136a2e572064419841a89c40e/build.gradle#L24 AccessTransfomer: https://github.com/Beardlessbrady/Currency-Mod/blob/44372f478306780136a2e572064419841a89c40e/src/main/resources/META-INF/accesstransformer.cfg
  10. I have added the file yet Intellij will not allow me to build as it still thinks the variable is final.
  11. In previous versions one could change the x and y positions, these positions seem to be final now and can't be changed. Any idea how to change them?
  12. I am trying to send a network packet from Server to Client on GUI open. For some reason when I attempt this, on the client side it states "Unknown custom packet identifier: gocurrency:main_channel " which means it is not registered correctly on the client side but I am fairly positive I registered it correctly. Any ideas? Where packet is being sent from server: https://github.com/Beardlessbrady/Currency-Mod/blob/8c4274c8ae99f4435113f4339194c061a90ecbca/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingBlock.java#L55-L62 Packet Registration: https://github.com/Beardlessbrady/Currency-Mod/blob/8c4274c8ae99f4435113f4339194c061a90ecbca/src/main/java/com/beardlessbrady/gocurrency/network/NetworkHandler.java#L30 Message: https://github.com/Beardlessbrady/Currency-Mod/blob/8c4274c8ae99f4435113f4339194c061a90ecbca/src/main/java/com/beardlessbrady/gocurrency/network/MessageVendingStackSizeToClient.java
  13. It does work, I forgot to push and pop the matrixStack. Thanks!
  14. I can't get it to work. For some reason One is appearing infront, the rest aren't. Code: https://github.com/Beardlessbrady/Currency-Mod/blob/d1bf4d63f8a2292f44aa759e233f832bfed52f2e/src/main/java/com/beardlessbrady/gocurrency/blocks/vending/VendingContainerScreen.java#L141 Screenshot example:
  15. I am wondering if it is possible to draw text infront of itemstacks. I can draw textures but for some reason text always appears behind itemstacks. Is this normal, if not I am probably doing something wrong.
  16. Hello, I am wondering if it is possible to hide all itemstack count rendering in your customized GUI
  17. Didn't you say not to send the pos through the constructor? That is how Im currently getting the tile?
  18. Thanks for the help, I really do appreciate it! Is there a way to detect in the containerScreen or container when one of the tracked data is changed on the client so it can trigger something in the containerScreen. If I try to do it with the mouseClick button in the containerScreen it seems like the mouseClick is called before the data is updated on the client side, so it uses the previous data value. In terms of putting the tile in the constructor I run into the 'new' way to register things in Forge not being happy: https://github.com/Beardlessbrady/Currency-Mod/blob/master-1.16/src/main/java/com/beardlessbrady/gocurrency/init/CommonRegistry.java#L49 How would I include the tile here?
  19. For example if I just output the data via init() in the clientScreen, click the button, close and reopen the GUI to run the init() method, it is still zero. Also in terms of what you said earlier about getting the tile on the client side. Yes I can add whatever method I want to the container but I don't see how running a get tile method on the client container (itself) would get the tile?
  20. Yes you are correct. I suppose my issue is more pulling the data from inside the containerScreen. If I try to get the data in the containerScreen it just returns 0 as if it wasn't changed.
×
×
  • Create New...

Important Information

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