Jump to content

Spyeedy

Forge Modder
  • Posts

    136
  • Joined

  • Last visited

Everything posted by Spyeedy

  1. An update on this, I'm not too sure how or why, but, coming back a couple of hours later and re-running the gradle sync task several times with failures. It finally managed to complete the task successfully.
  2. So I updated my build.gradle to 1.16.5, namely the snapshot and forge versions. (My build.gradle is in the spoiler tag below) However, gradle sync was not successful. The log: Did I input the wrong version numbers? Why is this happening? I've re-run the gradle sync task multiple times, it always has this same output
  3. Oh hold on, I forgot about the refresh gradle option. I refreshed the project and it downloaded new jars. That's weird, the last time I opened the workspace and started the game, it was working fine. Sorry for wasting your time. 😓
  4. I wish I could do that, except that's it, there's no crash report. I'll paste the entire text from my console instead.
  5. My game is crashing immediately after the gradle completes it's task I'm running Java 8, forge 1.16.4-35.0.18
  6. There's no isSneaking... only isCrouching, hence my assumption the method got renamed to isCrouching
  7. Okaaaaay, this is weird, the console prints for Render thread, so that's client, it doesn't print for server? Idk if the NBT really gets saved, because the output always come out as: Before:0 After:1 at these lines https://gist.github.com/Spyeedy/104a892bd3970d189aaf42a10f8645d7#file-lightswitchblockitem-java-L30-L33
  8. Possibly, but the thing is, in the onBlockPlacedBy method, I printed the stack's NBT list count, it returns 0, despite that the item does have content inside the list, hmm https://gist.github.com/Spyeedy/104a892bd3970d189aaf42a10f8645d7#file-lightswitchblock-java-L33
  9. Possibly, but the thing is, in the onBlockPlacedBy method, I printed the stack's NBT list count, it returns 0, despite that the item does have content inside the list, hmm https://gist.github.com/Spyeedy/104a892bd3970d189aaf42a10f8645d7#file-lightswitchblock-java-L33
  10. I've fixed that typo, and I've added a print statement in my Block's onBlockPlacedBy to look at the nbt list's size, weirdly enough, it prints out 0, even though in the item's nbt list, it has contents. As well as set the tag compound back into the ItemStack's NBT, just to be extremely sure the Item has the new NBT Updated the gist: https://gist.github.com/Spyeedy/104a892bd3970d189aaf42a10f8645d7
  11. Well, that first line is part of a commented out block, but hmm, I ain't putting the list tag into the BlockEntityTag since I commented out the code inside Block#onBlockPlacedBy, I'll try uncommenting inside onBlockPlacedBy and fixing that typo
  12. As the title says, my ItemStack's NBT tags aren't getting transferred to my Block's TileEntity NBT. This worked back on 1.12.2, so I'm not sure why it isn't working now. In the gist linked below are the Item, Block and TileEntity classes. https://gist.github.com/Spyeedy/104a892bd3970d189aaf42a10f8645d7 Thanks for responding :)
  13. Looking at Minecraft's widgets for scrolling list, I've found ExtendedList which extends AbstractList. The latter of which handles all the logic for scrolling, etc. I looked into AbstractList and discovered that render renders the dirt background as well, which I don't want. I only want the ability to scroll, scroll bar and hiding other content that is out-of-view. With this, will I have to make my own widget for scrolling list? If not, then what other alternatives are there provided by Forge or Minecraft that I've not found?
  14. So I understand that ContainerScreen are registered with a ContainerType through ScreenManager.registerFactory. But what about client-only screen, meaning only the GUI itself, do I need to have any registration? How will I open them? I'm not too sure.
  15. Your earlier link relates to 1.15, this one is for 1.13/1.14, which I'm not developing for. But thanks for helping, or rather, mentioning that 1.15 no longer has forge blockstates
  16. awwww, this is going to suck a lot . Well then, they should've removed the Forge Blockstate JSON section from the docs
  17. No, the console doesn't seem to be complaining about the textures, even though there is the purple-black-checkered texture all over my model. As for my model, it's as follow, I didn't define any textures in my model as I wanted to apply the textures in the blockstate file, as I had other blocks registered that used the same model but different set of textures.
  18. I'm using forge blockstates, and the file is as follows. (Please ignore that I used the same model for all the variants) I'm not too sure why my textures set in the default section is not applied to the model. The texture path is correct.
  19. I managed to solve it after a week or so of racking my brain for a solution. I had a thought, why not modify the vertex data of the BakedQuad itself and change the numbers myself. I didn't know how to modify the vertex data, so I did some googling and it pointed me to this thread. Which in turn lead me to this chunk of code here. That's where I got stuck (yes, my mind was too fixated on that chunk of code to actually post an update here). So I printed the float array provided by IVertexConsumer#put and I was scratching my head over the set of floats it was giving me, then today, it hit me, those were coordinates, specifically translation coordinates for Minecraft to draw a quad. That's when I did some math (multiplication by 16) with the coordinates to determine which coordinate affect the 3 axes of a model, X Y Z. And then, I came to my solution here. I just took the data
  20. Thought I should make a new thread instead of continuing my other thread, seeing as I've successfully managed to attach other models onto the same model. So I'm adding a Baked Model's quads to my main item's Baked Model, and that renders successfully. The problem I'm stuck at is, how do I move a BakedQuad, so basically changing it's position? Here's my Baked Model code where I'm adding other Baked Models to my main item's Baked Model https://gist.github.com/Spyeedy/2cdf9d335eb57dbe54bca1a9198650f8
  21. Alright, I've had the time to implement the Baked Models suggestion. The card appears on the model! Yay! But I've run into a snag, my item's camera transformation is screwed when my new Baked Model replaces the item model. On a side note, I'm not too sure how I can perform transformations on the card to move it. Here's my code. PackageDiendDriver is where I do the ModelBakeEvent, while the others are the Baked Model classes. Edit: Oh nevermind, I looked into IBakedModel and saw that it uses Forge's default perspectives, so that's why my camera transformations were botched. Fixed that. Still unsure on performing transformations on the card model.
×
×
  • Create New...

Important Information

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