Closed primetoxinz closed 6 years ago
To be clear, you're talking about BlockCake
, right?
Correct, being able to somehow pass ignore to if (player.canEat(false))
in BlockCake
Hm, I see two possible implementations, and I'm not sure which would be better.
BlockCake
implement IEdible
and then add a setAlwaysEdible
method to IEdible
a la ItemFood
. Then, to make BlockCake
always edible you'd do something like ((IEdible)Blocks.CAKE).setAlwaysEdible(true)
at startup.The second would be faster as it'd avoid having to fire events, but it might be more confusing for developers because IEdible wouldn't show up as implemented by BlockCake
in their IDEs...
I also think the latter would be preferable, as long as it is well documented I don't think the IDE information is too big of a deal. Doubt many people will need this hook anyways
Sounds good, will try to get this done in the next few days.
Ok, got it tested and working in 1.7.10. Need to port it forward now (which might take a little while ☹️ ). Just FYI, the way to do it will be: ((IEdibleBlock) Blocks.CAKE).setEdibleAtMaxHunger(true)
Awesome. Take your time, not dire on my end. Thanks for the hard work though :)
Released v3.1.0: http://www.ryanliptak.com/maven/
Let me know if you have any issues with it.
Works great, thanks :)
as per title. As per BTW cake is supposed to be edible even when hunger is full.