-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checks for valid block data in Block#getEnchantPowerBonus #4
Comments
I will fix it asap! once i get home from work 💃 |
Looks like I'm going home late can you do me a favor and write the code here or make a pull request so i can add it once i get home its around 4 am here and still at work |
yea i had added that code in there and i have no clue how to fix this problem |
@runescapejon are you referring to the wrong item name showing up on the HUD? If so, that is unrelated to this issue. This issue is related to a NullPointerException that happens while looking at the block in your inventory. The broken translation name is due to an issue with your unlocalized block name not matching the one in your language file. You set the unlocalized name to You might want to merge my PR first. not sure if you fixing the naming issue will cause merge conflicts. |
i had already did block.adventurebackpack:AdventureBackpack.name in en_US.lang and it didn't fix the problem |
The issue is that it is not looking for that localization key. If you look at the link I included in my post, you have it set to look for |
got it https://gyazo.com/279b91ac48d375d0ee48bc78b995f694 |
Fixed https://github.com/runescapejon/AdventureBackpack2/releases :D thanks |
This issue is related to the conflict between AdventureBackpack2 and Wawla. The issue is caused by Wawla making a call to Block#getEnchantPowerBonus while hovering over a block in the inventory. The goal of this is to add the enchanting bonus to the tooltip of the block. Since the Inventory does not have access to XYZ coords some devs will use Origin (0,0,0) or the players position for this.
I patched this issue on Wawla's end by swallowing the exception, however to improve performance and to futureproof AdventureBackpack you should look into adding some safety checks on your end. After looking into your mod source, adding a check to see if the TileEntity is null in BlockAdventureBackpack#getAssociatedTileColorName and return an empty or error name would completely resolve this issue.
The text was updated successfully, but these errors were encountered: