Jump to content

[41.77.9] [Singleplayer/Multiplayer] Drainable items can't be cooked if IsCookable is set


Soul

Recommended Posts

    • Version  41.77.9
    • Singleplayer and Multiplayer  (tested in Singleplayer)
    • Mods  None / When you create your own mod item

    • Reproduction steps:
    
Description:

If a new item is created (items.txt from modding) with the following conditions, the item can never be cooked.
Type = Drainable,
IsCookable = TRUE,

 

ReplaceOnCooked = whatever

I checked this in the decompiled "DrainableComboItem.java". The updated() method checks if the item is cookable and if yes the CookingTime is used to check if the item is cooked after x minutes.
But the CookingTime will never be increased like in the "Food.java" file. The Food.java has a line which updates the CookingTime ->

this.CookingTime += var3;

The DrainableComboItem.java has nothing like this in the "if (this.IsCookable)" section.

The steps:

1. Create a new item with the said conditions in your mod
2. Spawn it in and put it in an oven and turn it on

3. Nothing happens with the item

 

Expected behavior:
The item gets cooked and is being replaced by the new item defined with "ReplaceOnCooked" and if "OnCooked" is defined the LUA function is called.

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...