Tweak Statistics
This commit is contained in:
parent
4763e9a76b
commit
c851d9b002
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
**1.0.21**
|
||||
* Tweak Statistics
|
||||
|
||||
**1.0.20**
|
||||
* Tweak Item Handling in Creative Mode
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user