-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bug: [CrafTweaker] NullPointerException when trying to read data from a block #291
Comments
This issue is probably caused by crafttweaker itself. Idk why its in this version and the old one no. Maybe its random... |
also its duplicate of #290 |
It could be caused by some change you made to the base block itself It only does this if you mine it By guess is that it's updating while it's being mined for some reason |
@MineDragonCZ I wonder if it has to do with the recent implementation of being able to wrench a block Whatever it is; my educated guess is that a change that you made to the Anyhow, thanks for looking into this, even if it doesn't yield anything If you like what my script is doing by prohibiting world generated, nonplayer placed gates when feel free to implement it, because essentially this script was supposed to use as a utility |
It appears to be very similar however @MR-Spagetty If you look at the line in their crash report it's writing to NBT. It could be because of updates that that crash was happening in #290 In my situation, it was reading it and technically it's not a crash in my situation, but it does prevent the script from working correctly because it's throwing a NPE with that block in particular |
While it is two different issues; they're all being caused by the same thing I believe; something that is causing the NBT data to be absent when it's being checked. it's acting like it wiping and then re-writing itself whenever it updates or something |
Describe the bug
when using a script (Provided below) will cause a NullPointException to be thrown when it previously dint in
4.11.1.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The script itself no longer producing a NullPointerException whenever it ties to mine a block with this script like it did in 4.11.1.0
Screenshots
![image](https://private-user-images.githubusercontent.com/38770780/282000727-99ccc082-386e-4a9f-98d0-3ef3db6ee0b8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkwMDUyMjAsIm5iZiI6MTcxOTAwNDkyMCwicGF0aCI6Ii8zODc3MDc4MC8yODIwMDA3MjctOTljY2MwODItMzg2ZS00YTlmLTk4ZDAtM2VmM2RiNmVlMGI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDIxMjIwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1M2ZjNDc3ZmIzOGQ3YzcxOTI5NDhmMmM1M2VlYWQ1Mjg3ODA5NjEwNWU1YjY1N2JkY2ZmOTMzZjBhYzkzYzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.n0r6Hs0tMXdc4e9yFZqzHzxsOYCKHtklPZWNGeMS-LE)
the erroing portion of the CT log (tip: if you need to access this look inside the logs folder)
Mod version
4.11.2.3
Additional context
The Script is made to allow for world-generated stargates to be unmineable unless you have a specific tool(s) that accept it; if you don't have it then it will cancel the onBlockBreaking event that takes place when mining it. This does not happen If a tag
isPlayerPlaced: true
is present; this is done by using a clever trick by writing it inside of ForgeData when the block is placed by a player. To be real with you it was working before 4.11.2.0 and I was proud of it since it took me a long time to figure out a way for this to work lel.It also should be noted that the gate base blocks are the only blocks having this issue, as the other blocks do not have this problem.
Script (minor modifications from the actual; changes only what the valid tools are [iron_hoe, gold_axe, diamond_shovel] (place into the slots folder once you run an instance with CT once)
gated_stargate_salvage_protecter_V1.zip
My whole JSG config (as .zip)
jsg.zip
The text was updated successfully, but these errors were encountered: