chips might say you're fat idk if it works
This commit is contained in:
parent
c5eeafadd6
commit
23c6e1f338
@ -5,6 +5,7 @@ import net.minecraft.entity.effect.StatusEffects;
|
|||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.TypedActionResult;
|
import net.minecraft.util.TypedActionResult;
|
||||||
@ -20,12 +21,14 @@ int potatoChipsConsumed = 0;
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
||||||
PlayerEntity.getHungerManager().add(1, 0f);
|
PlayerEntity.getHungerManager().add(1, 10f);
|
||||||
PlayerEntity.getStackInHand(Hand).decrement(1);
|
PlayerEntity.getStackInHand(Hand).decrement(1);
|
||||||
potatoChipsConsumed++;
|
potatoChipsConsumed++;
|
||||||
if (potatoChipsConsumed == 69) {
|
if (potatoChipsConsumed == 69) {
|
||||||
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 20 * 15, 4));
|
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 20 * 15, 4));
|
||||||
potatoChipsConsumed -= 69;
|
potatoChipsConsumed -= 69;
|
||||||
|
PlayerEntity.sendMessage(new LiteralText("I'm really fat/test"), false);
|
||||||
|
System.out.println("I'm really fat\n/test");
|
||||||
}
|
}
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user