Jump to content

BeardlessBrady

Members
  • Posts

    398
  • Joined

  • Last visited

Everything posted by BeardlessBrady

  1. For some reason when I try to send a packet from the server to client the server will crash and a NullPointerException for the player is occurring. Crash: https://pastebin.com/86nErgga Packet Initialized: https://github.com/BeardlessBrady/Currency-Mod/blob/4783ae787e504321146f2aa39db783f5061eb374/src/main/java/gunn/modcurrency/mod/container/ContainerVending.java#L352-L356 Packet: https://github.com/BeardlessBrady/Currency-Mod/blob/2467ad93ebb80982fd2c864e3c0ee07842b5d02b/src/main/java/gunn/modcurrency/mod/network/PacketCheckGhostStacksToClient.java
  2. Wondering if there is a way to disable being able to drag and split items in a container, or more specifically in certain slots. EDIT: I mean formally disabling it as just canceling it out when the slotID is -999 just makes moving items annoying
  3. My mod's container slots are very finicky, where when you click on a slot you have to click a few times to either put an item in the slot or pull it out. Whenever this occurs it seems the slotID it's trying to place it in is '-999' which obviously doesnt exist. Linked below is one of my containers slotClick methods https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.12/src/main/java/gunn/modcurrency/mod/container/ContainerVending.java#L140-L184
  4. Thank you, I'm backporting to 1.10 from 1.11. At this point I was just trying random things (hence the weird null check)
  5. So the goal of my itemHandler is to only accept items which already exist in the slot and nothing else. When I try and place lets say yellow wool into a slot that has yellow wool it crashes. Item Handler: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.10.2/src/main/java/gunn/modcurrency/mod/container/itemhandler/ItemHandlerVendor.java#L26-L38 Crash: https://pastebin.com/jVKYtEW8
  6. Ah now that makes sense, sorry I didn't quite understand. Thanks for helping me through it
  7. Ok I didn't realize you guys were telling me to set the Blocks registry name, I thought it was an extra step for something else. I already set the registry name in the blocks constructor method, so when I create the new block should the registry name not already be set?
  8. Im not understanding what Im calling .setRegistryName from, surely not event.setRegistryName, so what?
  9. where do I do that? in the event right before I register each block?
  10. Hmm now it is spouting out an issue about null names regarding the ItemBlocks. https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.12/src/main/java/gunn/modcurrency/mod/block/ModBlocks.java#L29 https://pastebin.com/aKphMdNk
  11. I added the console output.
  12. Im assuming the way Im doing it is completely wrong. No need for sass, was just asking for help on the right way to use the new registry system since there arent many examples out there.
  13. So I'm trying my best to figure out how the registries work but I'm having a hard time. Common Proxy: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.12/src/main/java/gunn/modcurrency/mod/proxy/CommonProxy.java#L32-L33 ModBlock Class: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.12/src/main/java/gunn/modcurrency/mod/block/ModBlocks.java ModItem Class https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.12/src/main/java/gunn/modcurrency/mod/item/ModItems.java Console Output; https://pastebin.com/cR1P39fG
  14. Derp, That makes sense. Thanks
  15. Alright so my button is appearing behind the background texture Button defined here: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11.2/src/main/java/gunn/modcurrency/mod/client/gui/GuiGuide.java#L49 Background drawn: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11.2/src/main/java/gunn/modcurrency/mod/client/gui/GuiGuide.java#L56
  16. Yes but will this layer drawn things correctly? With Background and Foreground methods you can specify what goes behind what
  17. With the GuiContainer there are methods #drawGuiContainerBackgroundLayer and #drawGuiContainerForegroundLayer but there are no similar methods (that I can find) in Gui Screen. Any ideas how to layer draw on Gui Screen?
  18. So Im attempting to raise items max stack well in my container. So far I've just changed how the slotClick method works, where when it clicks an item thats the same it will just add to the count instead of the usual way. Anywho all that works, thats not my problem though. My problem is when I exit the world and reopen it the container items are gone, I feel like it has something to do with the read/writefromNBT so I tried saving the itemCounts to an integer array and setting all the item counts to 1, then on read I will set all the counts from the array, it didn't seem to do anything. Any ideas?
  19. Lol I knew I forgot something! thanks
  20. So basically I have it where if you place another of the same block on top of itself it will change the states of both and make them 'connect' (Shown in pictures below) Picture 3 show's what happens once I reload the world, not quite sure why it;s resetting that specific blockstate but not the facing one. I'm probably missing something obvious but please help me out. State change when placed: https://github.com/BeardlessBrady/Currency-Mod/blob/57ef291600d5b6714c0c07e276b3abf0c6c2299e/src/main/java/gunn/modcurrency/mod/block/BlockVending.java#L109-L143 State change when broken: https://github.com/BeardlessBrady/Currency-Mod/blob/57ef291600d5b6714c0c07e276b3abf0c6c2299e/src/main/java/gunn/modcurrency/mod/block/BlockVending.java#L149-L179 Tile Entity: https://github.com/BeardlessBrady/Currency-Mod/blob/57ef291600d5b6714c0c07e276b3abf0c6c2299e/src/main/java/gunn/modcurrency/mod/tileentity/TileVending.java
  21. You are correct, it is not being called.
  22. Its all good, I know its an obscure thing I'm trying to do. ClientProxy: https://github.com/BeardlessBrady/Carts-Mod/blob/d7ae34010cb870e3eba29ab21572afe5fbbd4c80/src/main/java/gunn/modcarts/mod/core/handler/EventHandlerClient.java MovementInput: https://github.com/BeardlessBrady/Carts-Mod/blob/d7ae34010cb870e3eba29ab21572afe5fbbd4c80/src/main/java/gunn/modcarts/mod/CartMovementInput.java I'm copying the MovementInputFromOptions and just commenting out the left movement part but I can still move left
  23. It is not for anti-cheat server's. Anyways thanks for helping me.
  24. I originally had it on the client handler, at this point I was just trying things. I also had no idea the event is called for all entities, let me try and check for a player entity first What I'm trying to do: (in certain circumstances) prevent the player from strafing. EDIT: Alright moved it back to the client and checking for EntityPlayerSP got me into the world! Thanks a bunch Unfortunately though this way isn't working, if I try and stop strafing even in my modified movementInput it still wont stop it, any ideas?
  25. Im realizing this is probably the wrong way to add item models to a block model. Should I not be doing this through the ModelBakeEvent?
×
×
  • Create New...

Important Information

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