Fixed item being unusable on dedicated servers.
This commit is contained in:
@ -89,7 +89,7 @@ public class StrawTotemItem extends Item {
|
|||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
@ParametersAreNonnullByDefault
|
@ParametersAreNonnullByDefault
|
||||||
public ActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
|
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;
|
ItemStack charge;
|
||||||
if (hand.equals(Hand.MAIN_HAND)) {
|
if (hand.equals(Hand.MAIN_HAND)) {
|
||||||
charge = playerEntity.getOffhandItem();
|
charge = playerEntity.getOffhandItem();
|
||||||
|
Reference in New Issue
Block a user