Bug Fixes
This commit is contained in:
parent
9068e3d3d6
commit
f7103e32c5
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
**1.0.4**
|
||||
* Bug Fixes
|
||||
|
||||
**1.0.3**
|
||||
* Final Tweaks
|
||||
|
||||
|
@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||
fabric_loader_version = 0.7.10+build.191
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.3
|
||||
mod_version = 1.0.4
|
||||
maven_group = com.thebrokenrail
|
||||
archives_base_name = reliccraft
|
||||
|
||||
|
@ -84,7 +84,7 @@ public abstract class AbstractDragonEggHolderBlock extends Block implements Bloc
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
||||
if (isActive(world, pos)) {
|
||||
if (random.nextInt(100) == 0) {
|
||||
world.playSound(null, pos, SoundEvents.BLOCK_PORTAL_AMBIENT, SoundCategory.BLOCKS, 0.5F, random.nextFloat() * 0.4F + 0.8F);
|
||||
world.playSound((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, SoundEvents.BLOCK_PORTAL_AMBIENT, SoundCategory.BLOCKS, 0.5F, random.nextFloat() * 0.4F + 0.8F, false);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 24; ++i) {
|
||||
|
@ -9,6 +9,7 @@ import net.minecraft.client.item.TooltipContext;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
@ -33,7 +34,7 @@ import java.util.List;
|
||||
|
||||
public class TargetedEnderPearlItem extends Item {
|
||||
public TargetedEnderPearlItem() {
|
||||
super(new Settings().rarity(Rarity.UNCOMMON).maxCount(16));
|
||||
super(new Settings().rarity(Rarity.UNCOMMON).group(ItemGroup.MISC).maxCount(16));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -48,7 +49,7 @@ public class TargetedEnderPearlItem extends Item {
|
||||
if (!world.isClient()) {
|
||||
CompoundTag tag = stack.getTag();
|
||||
if (tag == null) {
|
||||
tag = new CompoundTag();
|
||||
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||
}
|
||||
|
||||
BlockPos target = new BlockPos(tag.getInt("TargetX"), tag.getInt("TargetY"), tag.getInt("TargetZ"));
|
||||
@ -57,11 +58,13 @@ public class TargetedEnderPearlItem extends Item {
|
||||
|
||||
if (user.dimension != dimension || dimension == null) {
|
||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_in_different_dimension"));
|
||||
} else {
|
||||
if (((TeleportationRestrictorBlock.TeleportingEntity) user).cannotTeleport()) {
|
||||
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||
} else if (((TeleportationRestrictorBlock.TeleportingEntity) user).cannotTeleport()) {
|
||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_restricted"));
|
||||
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||
} else if (world.getBlockState(target).getBlock() != RelicCraft.TELEPORTATION_BEACON_BLOCK || !world.getBlockState(target).get(AbstractDragonEggHolderBlock.ACTIVE)) {
|
||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".missing_teleportation_beacon"));
|
||||
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||
} else {
|
||||
Vec3d oldPos = user.getPos();
|
||||
if (user.teleport(teleportTarget.getX(), teleportTarget.getY(), teleportTarget.getZ(), true)) {
|
||||
@ -79,7 +82,7 @@ public class TargetedEnderPearlItem extends Item {
|
||||
}
|
||||
} else {
|
||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_obstructed"));
|
||||
}
|
||||
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -94,8 +97,9 @@ public class TargetedEnderPearlItem extends Item {
|
||||
|
||||
CompoundTag tag = stack.getTag();
|
||||
if (tag == null) {
|
||||
tag = new CompoundTag();
|
||||
return;
|
||||
}
|
||||
|
||||
tooltip.add(new TranslatableText("item." + RelicCraft.NAMESPACE + ".tooltip.targeted_ender_pearl.x", new LiteralText(String.valueOf(tag.getInt("TargetX"))).formatted(Formatting.GRAY)).formatted(Formatting.WHITE));
|
||||
tooltip.add(new TranslatableText("item." + RelicCraft.NAMESPACE + ".tooltip.targeted_ender_pearl.y", new LiteralText(String.valueOf(tag.getInt("TargetY"))).formatted(Formatting.GRAY)).formatted(Formatting.WHITE));
|
||||
tooltip.add(new TranslatableText("item." + RelicCraft.NAMESPACE + ".tooltip.targeted_ender_pearl.z", new LiteralText(String.valueOf(tag.getInt("TargetZ"))).formatted(Formatting.GRAY)).formatted(Formatting.WHITE));
|
||||
|
@ -19,5 +19,10 @@
|
||||
"use": {
|
||||
"trigger": "reliccraft:use_teleportation_beacon"
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"reliccraft:reset_targeted_ender_pearl"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "reliccraft:targeted_ender_pearl"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "minecraft:ender_pearl"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user