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

Tweaks
This commit is contained in:
TheBrokenRail 2020-04-04 16:45:56 -04:00
parent ff8910cdf8
commit 9412c68414
5 changed files with 32 additions and 7 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
**1.0.2**
* Tweaks
**1.0.1** **1.0.1**
* Update Advancements * Update Advancements

View File

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

View File

@ -46,8 +46,6 @@ public class TargetedEnderPearlItem extends Item {
ItemStack stack = user.getStackInHand(hand); ItemStack stack = user.getStackInHand(hand);
if (!world.isClient()) { if (!world.isClient()) {
RelicCraft.playRelicSound(user);
CompoundTag tag = stack.getTag(); CompoundTag tag = stack.getTag();
if (tag == null) { if (tag == null) {
tag = new CompoundTag(); tag = new CompoundTag();
@ -75,6 +73,10 @@ public class TargetedEnderPearlItem extends Item {
user.damage(DamageSource.FALL, 16.0f); user.damage(DamageSource.FALL, 16.0f);
user.fallDistance = 0f; user.fallDistance = 0f;
if (!user.isCreative()) {
stack.decrement(1);
}
} else { } else {
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_obstructed")); 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); return new TypedActionResult<>(ActionResult.SUCCESS, stack);
} }

View File

@ -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;
}
}
}

View File

@ -7,6 +7,7 @@
], ],
"mixins": [ "mixins": [
"CriteriaRegistryHook", "CriteriaRegistryHook",
"MixinBlockItem",
"MixinEnderDragonFight", "MixinEnderDragonFight",
"MixinEnderPearlItem", "MixinEnderPearlItem",
"MixinEntity", "MixinEntity",