Skip to content

Commit

Permalink
Fix Geb's Toil issues. Closes #196
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Jul 18, 2020
1 parent d3ac8be commit 1635fb8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class GebsToilItem extends ShovelItem {

public GebsToilItem() {
super(ItemTier.DIAMOND, 1.5F, -4.0F, new Item.Properties().rarity(Rarity.RARE).group(Atum.GROUP));
super(ItemTier.DIAMOND, 2.0F, -3.0F, new Item.Properties().rarity(Rarity.RARE).group(Atum.GROUP));
}

@Override
Expand All @@ -26,13 +26,14 @@ public boolean hasEffect(@Nonnull ItemStack stack) {
}

@Override
public boolean onBlockDestroyed(@Nonnull ItemStack stack, World world, @Nonnull BlockState state, @Nonnull BlockPos pos, @Nonnull LivingEntity entityLiving) {
public boolean onBlockDestroyed(@Nonnull ItemStack stack, @Nonnull World world, @Nonnull BlockState state, @Nonnull BlockPos pos, @Nonnull LivingEntity entityLiving) {
super.onBlockDestroyed(stack, world, state, pos, entityLiving);
if (entityLiving instanceof PlayerEntity && !world.isRemote) {
((PlayerEntity) entityLiving).getFoodStats().addExhaustion(-0.005F);
if (random.nextFloat() <= 0.10F) {
world.addEntity(new ExperienceOrbEntity(world, pos.getX(), pos.getY(), pos.getZ(), 1));
}
}
return false;
return true;
}
}

0 comments on commit 1635fb8

Please sign in to comment.