Fixed item being unusable on dedicated servers.

This commit is contained in:
2022-01-16 22:21:09 +00:00
parent 2b1cdf98c1
commit e1868ac200

View File

@ -89,7 +89,7 @@ public class StrawTotemItem extends Item {
@OnlyIn(Dist.CLIENT)
@ParametersAreNonnullByDefault
public ActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
if (!Config.Server.getStrawTotemConfig().getIsEnabled() || world.isClientSide) { return super.use(world, playerEntity, hand); }
if (!Config.Server.getStrawTotemConfig().getIsEnabled() || !world.isClientSide) { return super.use(world, playerEntity, hand); }
ItemStack charge;
if (hand.equals(Hand.MAIN_HAND)) {
charge = playerEntity.getOffhandItem();