added hunger, saturation, and exhaustion entity API calls.

This commit is contained in:
gnembon committed 2020-06-07 18:53:17 -03:00
1 parent d9ed35676f
commit 73cb9d6968
4 files changed
+33 -11

No files matched your search

@@ -1,20 +1,20 @@
package carpet.mixins;
import carpet.fakes.EntityInterface;
import carpet.fakes.HungerManagerInterface;
import carpet.script.EntityEventsGroup;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.HungerManager;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(HungerManager.class)
public class HungerManagerMixin_scarpetEventsMixin implements HungerManagerInterface {
@Shadow private float exhaustion;
public float getExhaustion(){
public float getExhaustionCM(){
return exhaustion;
}
}
@Override
public void setExhaustionCM(float exhaust)
{
exhaustion = exhaust;
}
}