BUG: [ 1.20.1 ] A mismatched code for pose.pushPose() & pose.popPose()
Xelbayria opened this issue ยท 7 comments
Minecraft Version
1.20.1
Forge Version
47.3.0
Lightman's Currency Version
2.2.3.2
Environment Type
Minecraft Client (Bug/crash happened in a single-player world or while the game was booting)
Other relevant Mods
Every Compat
Describe the bug
I was just about to be finished with supporting the mod via Every Compat with the exception of BWG, BOP and Quark. However I ran into a problem. According to another DEV, he said it can affect your mod under a certain circumstance. Not just Every Compat.
The crash happened when I try to place the auction_stand_<type>
from Every Compat but i had no problem with placing auction_stand_oak
The decompiled Code, AuctionStandBlockEntityRenderer.java
has a mismatched code for pose.pushPose()
and pose.popPose()
. Here's what it looks like on my side via the picture.
The picture should allow you clearly see the problem. The best way to fix this is to ensure they are matched.
My solution on my side: is to leave auction_stand
out for now until the bug is fixed.
To Reproduce
- In my case, its just opening IDEA
- Importing using "curse.maven:lightmans-currency-472521:5740209"
- Take a look at the
AuctionStandBlockEntityRenderer.java
The version of the mod is v2.2.3.2 (latest to date)
Screenshots/Logs/Crash Reports
Crash-Report via IDEA - Here should help you see what's going on.
This is very odd, as the decompiled code does not match the source code for that file (which can be found here). I'll double-check when I get home, but if this is the case in the compiled version of my mod I need to ask some very serious questions as to what gradle is thinking when compiling my code...
Edit: Actually I think I just noticed the issue. The true issue is that it'll push the pose, and then return when the positions list is empty, resulting in the pose stack having a floating push that hasn't been popped, which explains the "pose stack not empty" error you're experiencing.
it is indeed very odd. This is the first time I've seen a problem in a de-compiled code where it's not the same structure as source code. I'll await for what you find out on your side.
Issue should be fixed in v2.2.3.3.
As a nice QoL update as well, I also tweaked how the Item Position Data is parsed/assigned so to get your add-ons new wooden blocks to draw the items correctly all you need to do is give them the appropriate block tag (lightmanscurrency:auction_stand
, etc.) instead of having to do a whole bunch of other complicated stuff with my item position rendering resources to get them to work. The tag keys for all of the relevant wooden blocks can of course be found as constants in the LCTags#Blocks class for easy datagen if that's what's convenient for you :)
I'll run some tests with the updated codes you've made in the mod. and you can take a look at LightmansCurrencyMODULE if you like
it's current WIP. I'll be making some tweaking. Are both FORGE & FABRIC's source code same in term of structure and class naming? EDIT: Got the answer myself.
UPDATED:
I've take a quick look at the AucionStandBlockEntityRenderer.java
, there is no longer mismatched.
UPDATED 2:
I've tweaked the Module to include the blockTags for these 3 blocks that have getItemPositionData()
. It's working and i don't have to extend the class for ShelfBlock and others.
I can placed the auction_stand_<type>
without any problem and all is good. Thanks for the fixes.
Oh, the rendering of Item. Let me know if that's the final patch of the mod for 1.19.2 and 1.18.2.
If so, then i'll need to create a custom class that will just use OAK's file.json that give the data of how to render the item.
EDIT:
nvm. I forgot about the tag that allow the block to use the data to properly render the item
Hello again, @Lightman314
I just added the mod to EveryCompat 1.19.2 and got the same problem as 1.20.1 regarding the mismatched pose in the code block via AuctionStandBlockEntityRenderer.java
I'm planning to include it in 1.18.2 (FORGE only). I hope you are not troubled by this. no rush. Take your time.