Added hunger, saturation and exhaustion modification and querying (#286)
* Added hunger querying and modification * Cleaning up old code * forgot semicolon * Added saturation querying and modification and exhaustion modification working on exhaustion querying * added if statements to avoid crash * more if statements * o ye boi! Co-authored-by: Ghoulboy78 <53367549+Ghoulboy-78@users.noreply.github.com>
This commit is contained in:
1 parent
fb3a5cfa64
commit
d9ed35676f
4 files changed
+59
-11
No files matched your search
@@ -0,0 +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(){
|
||||
return exhaustion;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user