Jump to content

Items With Both ReplaceOnUse and ReplaceOnCooked


Soul Filcher
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...