1.0.21
All checks were successful
RelicCraft/pipeline/head This commit looks good

Tweak Statistics
This commit is contained in:
TheBrokenRail 2020-04-15 18:53:31 -04:00
parent 4763e9a76b
commit c851d9b002
4 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,8 @@
# Changelog
**1.0.21**
* Tweak Statistics
**1.0.20**
* Tweak Item Handling in Creative Mode

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.7.10+build.191
# Mod Properties
mod_version = 1.0.20
mod_version = 1.0.21
maven_group = com.thebrokenrail
archives_base_name = reliccraft

View File

@ -9,6 +9,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.stat.Stats;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.ActionResult;
@ -30,6 +31,8 @@ public class GenerateRelicItem extends Item {
ItemStack stack = user.getStackInHand(hand);
if (!world.isClient()) {
user.incrementStat(Stats.USED.getOrCreateStat(this));
RelicCraft.playRelicSound(user);
ItemStack newStack;

View File

@ -47,9 +47,10 @@ public class TargetedEnderPearlItem extends Item {
ItemStack stack = user.getStackInHand(hand);
user.getItemCooldownManager().set(this, 20);
user.incrementStat(Stats.USED.getOrCreateStat(this));
if (!world.isClient()) {
user.incrementStat(Stats.USED.getOrCreateStat(this));
CompoundTag tag = stack.getTag();
if (tag == null) {
return new TypedActionResult<>(ActionResult.FAIL, stack);