mattstat716 Posted December 30, 2019 Share Posted December 30, 2019 Removing held item + placing it = crashes server. Anybody got a fix? The item in particular is a skull. Code: on right click: set {_name} to name of player's tool if {_name} contains "&btest": remove 1 of tool from tool Link to comment Share on other sites More sharing options...
HyperFlame Posted December 30, 2019 Share Posted December 30, 2019 (edited) It seems that you are removing the tool from itself? I'm guessing that you meant to remove the tool from the player's inventory. Try this instead: remove 1 of tool from the player's inventory Edited December 30, 2019 by HyperFlame Link to comment Share on other sites More sharing options...
mattstat716 Posted December 30, 2019 Author Share Posted December 30, 2019 It's removing one of the item right now, but the issue is that, because it's a skull, if the player places it due to rightclicking triggering both it and consuming the item, it crashes the server. Link to comment Share on other sites More sharing options...
HyperFlame Posted December 30, 2019 Share Posted December 30, 2019 May I ask why you are removing the item from the player's inventory when it would be naturally removed assuming that the player would be in survival? Link to comment Share on other sites More sharing options...
mattstat716 Posted December 30, 2019 Author Share Posted December 30, 2019 (edited) To consume it like a food item. Rightclicking it should remove 1 of the heads in the stack, and give saturation + a buff to the player. But due to the fact that it can be placed, it crashes the server whenever it is both placed + consumed. Edited December 30, 2019 by mattstat716 Link to comment Share on other sites More sharing options...
mattstat716 Posted December 31, 2019 Author Share Posted December 31, 2019 (edited) Nevermind, fixed it myself. For anyone else also having the problem or just wanting to quickly use it for their own consumable items finalized code | V on rightclick on air holding (item) set {_name} to name of player's tool if {_name} contains "(name)": remove 1 of tool from tool (insert effects) Edited December 31, 2019 by mattstat716 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now