Jump to content

Items With Both ReplaceOnUse and ReplaceOnCooked


Soul Filcher

Recommended Posts

Cooking an item that has both ReplaceOnUse and ReplaceOnCooked item values closes the game and goes back to the main menu. In my opinion ReplaceOnUse should simply be ignored for this case.

 

As an example you fill a cooking pot with food, and you want it to turn into a separate item when cooked, both the original and the resulting item should have ReplaceOnUse = Pot but right now if the original item has that line it causes the bug.

Link to comment
Share on other sites

java.lang.NullPointerException
	at zombie.inventory.types.Food.update(Food.java:260)
	at zombie.iso.IsoCell.ProcessItems(IsoCell.java:1913)
	at zombie.iso.IsoCell.update(IsoCell.java:5726)
	at zombie.iso.IsoWorld.update(IsoWorld.java:3074)
	at zombie.gameStates.IngameState.update(IngameState.java:1322)
	at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
	at zombie.GameWindow.logic(GameWindow.java:675)
	at zombie.GameWindow.run(GameWindow.java:1301)
	at zombie.GameWindow.maina(GameWindow.java:1077)
	at zombie.gameStates.MainScreenState.main(MainScreenState.java:183)

I made some tests when trying to replicate it, and apparently the bugs doesn't happen when I test it overriding a base item (tried with Base.Egg), only with my own mymodule.Myitem.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...