Tweaks
This commit is contained in:
parent
ff8910cdf8
commit
9412c68414
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
**1.0.2**
|
||||
* Tweaks
|
||||
|
||||
**1.0.1**
|
||||
* Update Advancements
|
||||
|
||||
|
@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||
fabric_loader_version = 0.7.10+build.191
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.1
|
||||
mod_version = 1.0.2
|
||||
maven_group = com.thebrokenrail
|
||||
archives_base_name = reliccraft
|
||||
|
||||
|
@ -46,8 +46,6 @@ public class TargetedEnderPearlItem extends Item {
|
||||
ItemStack stack = user.getStackInHand(hand);
|
||||
|
||||
if (!world.isClient()) {
|
||||
RelicCraft.playRelicSound(user);
|
||||
|
||||
CompoundTag tag = stack.getTag();
|
||||
if (tag == null) {
|
||||
tag = new CompoundTag();
|
||||
@ -75,6 +73,10 @@ public class TargetedEnderPearlItem extends Item {
|
||||
user.damage(DamageSource.FALL, 16.0f);
|
||||
|
||||
user.fallDistance = 0f;
|
||||
|
||||
if (!user.isCreative()) {
|
||||
stack.decrement(1);
|
||||
}
|
||||
} else {
|
||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_obstructed"));
|
||||
}
|
||||
@ -82,10 +84,6 @@ public class TargetedEnderPearlItem extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
if (!user.isCreative()) {
|
||||
stack.decrement(1);
|
||||
}
|
||||
|
||||
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.thebrokenrail.reliccraft.mixin;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Mixin(BlockItem.class)
|
||||
public class MixinBlockItem {
|
||||
@ModifyVariable(at = @At("HEAD"), method = "<init>", argsOnly = true)
|
||||
private static Item.Settings init(Item.Settings value, Block block, Item.Settings settings) {
|
||||
if (block == Blocks.DRAGON_EGG) {
|
||||
return settings.group(ItemGroup.MISC);
|
||||
} else {
|
||||
return settings;
|
||||
}
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
],
|
||||
"mixins": [
|
||||
"CriteriaRegistryHook",
|
||||
"MixinBlockItem",
|
||||
"MixinEnderDragonFight",
|
||||
"MixinEnderPearlItem",
|
||||
"MixinEntity",
|
||||
|
Reference in New Issue
Block a user