Bug Fixes
This commit is contained in:
parent
9068e3d3d6
commit
f7103e32c5
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
**1.0.4**
|
||||||
|
* Bug Fixes
|
||||||
|
|
||||||
**1.0.3**
|
**1.0.3**
|
||||||
* Final Tweaks
|
* Final Tweaks
|
||||||
|
|
||||||
|
|
|
@ -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.3
|
mod_version = 1.0.4
|
||||||
maven_group = com.thebrokenrail
|
maven_group = com.thebrokenrail
|
||||||
archives_base_name = reliccraft
|
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) {
|
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
||||||
if (isActive(world, pos)) {
|
if (isActive(world, pos)) {
|
||||||
if (random.nextInt(100) == 0) {
|
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) {
|
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.damage.DamageSource;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemGroup;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
@ -33,7 +34,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class TargetedEnderPearlItem extends Item {
|
public class TargetedEnderPearlItem extends Item {
|
||||||
public TargetedEnderPearlItem() {
|
public TargetedEnderPearlItem() {
|
||||||
super(new Settings().rarity(Rarity.UNCOMMON).maxCount(16));
|
super(new Settings().rarity(Rarity.UNCOMMON).group(ItemGroup.MISC).maxCount(16));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -48,7 +49,7 @@ public class TargetedEnderPearlItem extends Item {
|
||||||
if (!world.isClient()) {
|
if (!world.isClient()) {
|
||||||
CompoundTag tag = stack.getTag();
|
CompoundTag tag = stack.getTag();
|
||||||
if (tag == null) {
|
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"));
|
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) {
|
if (user.dimension != dimension || dimension == null) {
|
||||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_in_different_dimension"));
|
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_in_different_dimension"));
|
||||||
} else {
|
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||||
if (((TeleportationRestrictorBlock.TeleportingEntity) user).cannotTeleport()) {
|
} else if (((TeleportationRestrictorBlock.TeleportingEntity) user).cannotTeleport()) {
|
||||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_restricted"));
|
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)) {
|
} 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"));
|
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".missing_teleportation_beacon"));
|
||||||
|
return new TypedActionResult<>(ActionResult.FAIL, stack);
|
||||||
} else {
|
} else {
|
||||||
Vec3d oldPos = user.getPos();
|
Vec3d oldPos = user.getPos();
|
||||||
if (user.teleport(teleportTarget.getX(), teleportTarget.getY(), teleportTarget.getZ(), true)) {
|
if (user.teleport(teleportTarget.getX(), teleportTarget.getY(), teleportTarget.getZ(), true)) {
|
||||||
|
@ -79,7 +82,7 @@ public class TargetedEnderPearlItem extends Item {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
user.sendMessage(new TranslatableText("chat." + RelicCraft.NAMESPACE + ".teleportation_beacon_obstructed"));
|
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();
|
CompoundTag tag = stack.getTag();
|
||||||
if (tag == null) {
|
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.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.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));
|
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": {
|
"use": {
|
||||||
"trigger": "reliccraft:use_teleportation_beacon"
|
"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