Only generate mana from items on server side. Might fix #3195

This commit is contained in:
Vincent Lee committed 2020-03-12 20:11:38 -05:00
1 parent ed1005b57b
commit 888b3235ea
3 files changed
+3 -3

No files matched your search

@@ -53,7 +53,7 @@ public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDisc
@Override
public void onArmorTick(ItemStack stack, World world, PlayerEntity player) {
super.onArmorTick(stack, world, player);
if(hasArmorSet(player)) {
if(!world.isRemote && hasArmorSet(player)) {
int food = player.getFoodStats().getFoodLevel();
if(food > 0 && food < 18 && player.shouldHeal() && player.ticksExisted % 80 == 0)
player.heal(1F);
@@ -24,7 +24,7 @@ public class ItemAuraRing extends ItemBauble implements IManaGivingItem {
@Override
public void onWornTick(ItemStack stack, LivingEntity player) {
if (player instanceof PlayerEntity && player.ticksExisted % 10 == 0)
if (!player.world.isRemote && player instanceof PlayerEntity && player.ticksExisted % 10 == 0)
ManaItemHandler.dispatchManaExact(stack, (PlayerEntity) player, 1, true);
}
}
@@ -24,7 +24,7 @@ public class ItemGreaterAuraRing extends ItemBauble implements IManaGivingItem {
@Override
public void onWornTick(ItemStack stack, LivingEntity player) {
if (player instanceof PlayerEntity && player.ticksExisted % 2 == 0)
if (!player.world.isRemote && player instanceof PlayerEntity && player.ticksExisted % 2 == 0)
ManaItemHandler.dispatchManaExact(stack, (PlayerEntity) player, 1, true);
}
}