diff --git a/fabric/src/main/java/net/blay09/mods/waystones/datagen/WaystonesItemTagProvider.java b/fabric/src/main/java/net/blay09/mods/waystones/datagen/WaystonesItemTagProvider.java index 68497f38..0bfb00a2 100644 --- a/fabric/src/main/java/net/blay09/mods/waystones/datagen/WaystonesItemTagProvider.java +++ b/fabric/src/main/java/net/blay09/mods/waystones/datagen/WaystonesItemTagProvider.java @@ -23,6 +23,8 @@ protected void addTags(HolderLookup.Provider lookup) { getOrCreateTagBuilder(ModItemTags.RETURN_SCROLLS).add(ModItems.returnScroll); getOrCreateTagBuilder(ModItemTags.BOUND_SCROLLS).add(ModItems.boundScroll); getOrCreateTagBuilder(ModItemTags.WARP_STONES).add(ModItems.warpStone); + getOrCreateTagBuilder(ModItemTags.WARP_SHARDS).add(ModItems.attunedShard, ModItems.crumblingAttunedShard); + getOrCreateTagBuilder(ModItemTags.SINGLE_USE_WARP_SHARDS).add(ModItems.crumblingAttunedShard); getOrCreateTagBuilder(ModItemTags.WAYSTONES).add(ModBlocks.waystone.asItem(), ModBlocks.mossyWaystone.asItem(), ModBlocks.sandyWaystone.asItem()); FabricTagProvider.FabricTagBuilder sharestonesTag = getOrCreateTagBuilder(ModItemTags.SHARESTONES); sharestonesTag.add(ModBlocks.sharestone.asItem()); diff --git a/shared/src/main/generated/data/waystones/tags/items/single_use_warp_shards.json b/shared/src/main/generated/data/waystones/tags/items/single_use_warp_shards.json new file mode 100644 index 00000000..498e0da2 --- /dev/null +++ b/shared/src/main/generated/data/waystones/tags/items/single_use_warp_shards.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "waystones:crumbling_attuned_shard" + ] +} \ No newline at end of file diff --git a/shared/src/main/generated/data/waystones/tags/items/warp_shards.json b/shared/src/main/generated/data/waystones/tags/items/warp_shards.json new file mode 100644 index 00000000..7d265917 --- /dev/null +++ b/shared/src/main/generated/data/waystones/tags/items/warp_shards.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "waystones:attuned_shard", + "waystones:crumbling_attuned_shard" + ] +} \ No newline at end of file diff --git a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java b/shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java index 5d3f8a0f..08fa3856 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java +++ b/shared/src/main/java/net/blay09/mods/waystones/block/entity/WarpPlateBlockEntity.java @@ -4,13 +4,17 @@ import net.blay09.mods.balm.api.container.ImplementedContainer; import net.blay09.mods.balm.api.menu.BalmMenuProvider; import net.blay09.mods.waystones.Waystones; -import net.blay09.mods.waystones.api.*; +import net.blay09.mods.waystones.api.IMutableWaystone; +import net.blay09.mods.waystones.api.IWaystone; +import net.blay09.mods.waystones.api.WaystoneOrigin; +import net.blay09.mods.waystones.api.WaystonesAPI; import net.blay09.mods.waystones.block.WarpPlateBlock; import net.blay09.mods.waystones.config.WaystonesConfig; import net.blay09.mods.waystones.core.*; import net.blay09.mods.waystones.menu.WarpPlateContainer; import net.blay09.mods.waystones.recipe.ModRecipes; import net.blay09.mods.waystones.recipe.WarpPlateRecipe; +import net.blay09.mods.waystones.tag.ModItemTags; import net.blay09.mods.waystones.worldgen.namegen.NameGenerationMode; import net.blay09.mods.waystones.worldgen.namegen.NameGenerator; import net.minecraft.ChatFormatting; @@ -37,7 +41,6 @@ import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.level.ServerLevelAccessor; import net.minecraft.world.level.block.state.BlockState; @@ -268,9 +271,10 @@ public void serverTick() { if (!entity.isAlive() || !isEntityOnWarpPlate(entity)) { iterator.remove(); } else if (ticksPassed > useTime) { - IWaystone targetWaystone = getTargetWaystone(); + ItemStack targetAttunementStack = getTargetAttunementStack(); + IWaystone targetWaystone = WaystonesAPI.getBoundWaystone(targetAttunementStack).orElse(null); if (targetWaystone != null && targetWaystone.isValid()) { - teleportToWarpPlate(entity, targetWaystone); + teleportToWarpPlate(entity, targetWaystone, targetAttunementStack); } if (entity instanceof Player) { @@ -307,9 +311,16 @@ private int getWarpPlateUseTime() { return Mth.clamp((int) (configuredUseTime * useTimeMultiplier), 1, configuredUseTime * 2); } - private void teleportToWarpPlate(Entity entity, IWaystone targetWaystone) { - PlayerWaystoneManager.tryTeleportToWaystone(entity, targetWaystone, WarpMode.WARP_PLATE, getWaystone()) - .ifLeft(entities -> entities.forEach(this::applyWarpPlateEffects)); + private void teleportToWarpPlate(Entity entity, IWaystone targetWaystone, ItemStack targetAttunementStack) { + WaystonesAPI.createDefaultTeleportContext(entity, targetWaystone, WarpMode.WARP_PLATE, getWaystone()) + .flatMap(ctx -> { + ctx.setWarpItem(targetAttunementStack); + ctx.setConsumesWarpItem(targetAttunementStack.is(ModItemTags.SINGLE_USE_WARP_SHARDS)); + return PlayerWaystoneManager.tryTeleport(ctx); + }) + .ifRight(PlayerWaystoneManager.informRejectedTeleport(entity)) + .ifLeft(entities -> entities.forEach(this::applyWarpPlateEffects)) + .left(); } private void applyWarpPlateEffects(Entity entity) { @@ -372,34 +383,46 @@ private WarpPlateRecipe trySelectRecipe() { if (!readyForAttunement || level == null) { return null; } + if (getItem(0).getCount() > 1) { + return null; //prevents crafting when more than 1 ingredient is present + } return level.getRecipeManager().getRecipeFor(ModRecipes.warpPlateRecipeType, this, level) .map(RecipeHolder::value).orElse(null); } - @Nullable - public IWaystone getTargetWaystone() { - boolean useRoundRobin = false; + public ItemStack getTargetAttunementStack() { + boolean shouldRoundRobin = false; + boolean shouldPrioritizeSingleUseShards = false; List attunedShards = new ArrayList<>(); for (int i = 0; i < getContainerSize(); i++) { ItemStack itemStack = getItem(i); - if (itemStack.getItem() instanceof IAttunementItem) { - IWaystone waystoneAttunedTo = ((IAttunementItem) itemStack.getItem()).getWaystoneAttunedTo(level.getServer(), itemStack); + if (itemStack.is(ModItemTags.WARP_SHARDS)) { + IWaystone waystoneAttunedTo = WaystonesAPI.getBoundWaystone(itemStack).orElse(null); if (waystoneAttunedTo != null && !waystoneAttunedTo.getWaystoneUid().equals(getWaystone().getWaystoneUid())) { attunedShards.add(itemStack); } } else if (itemStack.getItem() == Items.QUARTZ) { - useRoundRobin = true; + shouldRoundRobin = true; + } else if (itemStack.getItem() == Items.SPIDER_EYE) { + shouldPrioritizeSingleUseShards = true; } } + if (shouldPrioritizeSingleUseShards && attunedShards.stream().anyMatch(stack -> stack.is(ModItemTags.SINGLE_USE_WARP_SHARDS))) { + attunedShards.removeIf(stack -> !stack.is(ModItemTags.SINGLE_USE_WARP_SHARDS)); + } if (!attunedShards.isEmpty()) { lastAttunementSlot = (lastAttunementSlot + 1) % attunedShards.size(); - ItemStack itemStack = useRoundRobin ? attunedShards.get(lastAttunementSlot) : attunedShards.get(random.nextInt(attunedShards.size())); - return ((IAttunementItem) itemStack.getItem()).getWaystoneAttunedTo(level.getServer(), itemStack); + return shouldRoundRobin ? attunedShards.get(lastAttunementSlot) : attunedShards.get(random.nextInt(attunedShards.size())); } - return null; + return ItemStack.EMPTY; + } + + @Nullable + public IWaystone getTargetWaystone() { + return WaystonesAPI.getBoundWaystone(getTargetAttunementStack()).orElse(null); } public int getMaxAttunementTicks() { diff --git a/shared/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java b/shared/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java index 6190a2ba..a1b581eb 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java +++ b/shared/src/main/java/net/blay09/mods/waystones/core/PlayerWaystoneManager.java @@ -48,6 +48,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.function.Consumer; public class PlayerWaystoneManager { @@ -205,15 +206,19 @@ private static void informPlayer(Entity entity, String translationKey) { } } + public static Consumer informRejectedTeleport(final Entity entityToInform) { + return error -> { + logger.info("Rejected teleport: " + error.getClass().getSimpleName()); + if (error.getTranslationKey() != null) { + informPlayer(entityToInform, error.getTranslationKey()); + } + }; + } + public static Either, WaystoneTeleportError> tryTeleportToWaystone(Entity entity, IWaystone waystone, WarpMode warpMode, @Nullable IWaystone fromWaystone) { return WaystonesAPI.createDefaultTeleportContext(entity, waystone, warpMode, fromWaystone) .flatMap(PlayerWaystoneManager::tryTeleport) - .ifRight(error -> { - logger.info("Rejected teleport: " + error.getClass().getSimpleName()); - if (error.getTranslationKey() != null) { - informPlayer(entity, error.getTranslationKey()); - } - }); + .ifRight(informRejectedTeleport(entity)); } public static Either, WaystoneTeleportError> tryTeleport(IWaystoneTeleportContext context) { diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java b/shared/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java new file mode 100644 index 00000000..05395007 --- /dev/null +++ b/shared/src/main/java/net/blay09/mods/waystones/item/AbstractAttunedShardItem.java @@ -0,0 +1,89 @@ +package net.blay09.mods.waystones.item; + +import net.blay09.mods.balm.api.Balm; +import net.blay09.mods.waystones.api.IAttunementItem; +import net.blay09.mods.waystones.api.IWaystone; +import net.blay09.mods.waystones.block.WarpPlateBlock; +import net.blay09.mods.waystones.core.WaystoneProxy; +import net.blay09.mods.waystones.menu.WarpPlateContainer; +import net.minecraft.ChatFormatting; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtUtils; +import net.minecraft.nbt.Tag; +import net.minecraft.network.chat.Component; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Objects; + +public abstract class AbstractAttunedShardItem extends Item implements IAttunementItem { + + public AbstractAttunedShardItem(Properties properties) { + super(properties); + } + + @Override + public boolean isFoil(ItemStack itemStack) { + IWaystone waystoneAttunedTo = getWaystoneAttunedTo(null, itemStack); + return waystoneAttunedTo != null && waystoneAttunedTo.isValid(); + } + + @Override + public void appendHoverText(ItemStack stack, @Nullable Level world, List list, TooltipFlag flag) { + super.appendHoverText(stack, world, list, flag); + + IWaystone attunedWarpPlate = getWaystoneAttunedTo(null, stack); + if (attunedWarpPlate == null || !attunedWarpPlate.isValid()) { + var textComponent = Component.translatable("tooltip.waystones.attuned_shard.attunement_lost"); + textComponent.withStyle(ChatFormatting.GRAY); + list.add(textComponent); + return; + } + + list.add(WarpPlateBlock.getGalacticName(attunedWarpPlate)); + + Player player = Balm.getProxy().getClientPlayer(); + if (player != null && player.containerMenu instanceof WarpPlateContainer) { + IWaystone currentWarpPlate = ((WarpPlateContainer) player.containerMenu).getWaystone(); + if (attunedWarpPlate.getWaystoneUid().equals(currentWarpPlate.getWaystoneUid())) { + list.add(Component.translatable("tooltip.waystones.attuned_shard.move_to_other_warp_plate")); + } else { + list.add(Component.translatable("tooltip.waystones.attuned_shard.plug_into_warp_plate")); + } + } else { + list.add(Component.translatable("tooltip.waystones.attuned_shard.plug_into_warp_plate")); + } + } + + @Nullable + @Override + public IWaystone getWaystoneAttunedTo(MinecraftServer server, ItemStack itemStack) { + CompoundTag compound = itemStack.getTag(); + if (compound != null && compound.contains("AttunedToWaystone", Tag.TAG_INT_ARRAY)) { + return new WaystoneProxy(server, NbtUtils.loadUUID(Objects.requireNonNull(compound.get("AttunedToWaystone")))); + } + + return null; + } + + @Override + public void setWaystoneAttunedTo(ItemStack itemStack, @Nullable IWaystone waystone) { + CompoundTag tagCompound = itemStack.getTag(); + if (tagCompound == null) { + tagCompound = new CompoundTag(); + itemStack.setTag(tagCompound); + } + + if (waystone != null) { + tagCompound.put("AttunedToWaystone", NbtUtils.createUUID(waystone.getWaystoneUid())); + } else { + tagCompound.remove("AttunedToWaystone"); + } + } +} diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java b/shared/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java index 3017bb99..0412da18 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java +++ b/shared/src/main/java/net/blay09/mods/waystones/item/AttunedShardItem.java @@ -1,89 +1,9 @@ package net.blay09.mods.waystones.item; -import net.blay09.mods.balm.api.Balm; -import net.blay09.mods.waystones.api.IAttunementItem; -import net.blay09.mods.waystones.api.IWaystone; -import net.blay09.mods.waystones.block.WarpPlateBlock; -import net.blay09.mods.waystones.menu.WarpPlateContainer; -import net.blay09.mods.waystones.core.WaystoneProxy; -import net.minecraft.ChatFormatting; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.NbtUtils; -import net.minecraft.nbt.Tag; -import net.minecraft.network.chat.Component; -import net.minecraft.server.MinecraftServer; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.Level; -import org.jetbrains.annotations.Nullable; - -import java.util.List; -import java.util.Objects; - -public class AttunedShardItem extends Item implements IAttunementItem { +public class AttunedShardItem extends AbstractAttunedShardItem { public AttunedShardItem(Properties properties) { super(properties.stacksTo(1)); } - @Override - public boolean isFoil(ItemStack itemStack) { - IWaystone waystoneAttunedTo = getWaystoneAttunedTo(null, itemStack); - return waystoneAttunedTo != null && waystoneAttunedTo.isValid(); - } - - @Override - public void appendHoverText(ItemStack stack, @Nullable Level world, List list, TooltipFlag flag) { - super.appendHoverText(stack, world, list, flag); - - IWaystone attunedWarpPlate = getWaystoneAttunedTo(null, stack); - if (attunedWarpPlate == null || !attunedWarpPlate.isValid()) { - var textComponent = Component.translatable("tooltip.waystones.attuned_shard.attunement_lost"); - textComponent.withStyle(ChatFormatting.GRAY); - list.add(textComponent); - return; - } - - list.add(WarpPlateBlock.getGalacticName(attunedWarpPlate)); - - Player player = Balm.getProxy().getClientPlayer(); - if (player != null && player.containerMenu instanceof WarpPlateContainer) { - IWaystone currentWarpPlate = ((WarpPlateContainer) player.containerMenu).getWaystone(); - if (attunedWarpPlate.getWaystoneUid().equals(currentWarpPlate.getWaystoneUid())) { - list.add(Component.translatable("tooltip.waystones.attuned_shard.move_to_other_warp_plate")); - } else { - list.add(Component.translatable("tooltip.waystones.attuned_shard.plug_into_warp_plate")); - } - } else { - list.add(Component.translatable("tooltip.waystones.attuned_shard.plug_into_warp_plate")); - } - } - - @Nullable - @Override - public IWaystone getWaystoneAttunedTo(MinecraftServer server, ItemStack itemStack) { - CompoundTag compound = itemStack.getTag(); - if (compound != null && compound.contains("AttunedToWaystone", Tag.TAG_INT_ARRAY)) { - return new WaystoneProxy(server, NbtUtils.loadUUID(Objects.requireNonNull(compound.get("AttunedToWaystone")))); - } - - return null; - } - - @Override - public void setWaystoneAttunedTo(ItemStack itemStack, @Nullable IWaystone waystone) { - CompoundTag tagCompound = itemStack.getTag(); - if (tagCompound == null) { - tagCompound = new CompoundTag(); - itemStack.setTag(tagCompound); - } - - if (waystone != null) { - tagCompound.put("AttunedToWaystone", NbtUtils.createUUID(waystone.getWaystoneUid())); - } else { - tagCompound.remove("AttunedToWaystone"); - } - } } diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java b/shared/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java new file mode 100644 index 00000000..9b016707 --- /dev/null +++ b/shared/src/main/java/net/blay09/mods/waystones/item/CrumblingAttunedShardItem.java @@ -0,0 +1,42 @@ +package net.blay09.mods.waystones.item; + +import net.blay09.mods.balm.api.Balm; +import net.blay09.mods.waystones.api.IWaystone; +import net.blay09.mods.waystones.menu.WarpPlateContainer; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class CrumblingAttunedShardItem extends AbstractAttunedShardItem { + + public CrumblingAttunedShardItem(Properties properties) { + super(properties.stacksTo(4)); + } + + @Override + public void appendHoverText(ItemStack stack, @Nullable Level world, List list, TooltipFlag flag) { + super.appendHoverText(stack, world, list, flag); + + IWaystone attunedWarpPlate = getWaystoneAttunedTo(null, stack); + if (attunedWarpPlate != null && attunedWarpPlate.isValid()) { + var textComponent = Component.translatable("tooltip.waystones.attuned_shard.attunement_crumbling"); + textComponent.withStyle(ChatFormatting.WHITE).withStyle(ChatFormatting.ITALIC); + + Player player = Balm.getProxy().getClientPlayer(); + if (player != null && player.containerMenu instanceof WarpPlateContainer wpc) { + if (!attunedWarpPlate.getWaystoneUid().equals(wpc.getWaystone().getWaystoneUid())) { + list.add(textComponent); + } + } else { + list.add(textComponent); + } + } + } + +} diff --git a/shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java b/shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java index 8f2473e0..18ebd535 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java +++ b/shared/src/main/java/net/blay09/mods/waystones/item/ModItems.java @@ -19,6 +19,7 @@ public class ModItems { public static Item warpStone; public static Item warpDust; public static Item attunedShard; + public static Item crumblingAttunedShard; public static void initialize(BalmItems items) { items.registerItem(() -> returnScroll = new ReturnScrollItem(items.itemProperties()), id("return_scroll")); @@ -27,6 +28,7 @@ public static void initialize(BalmItems items) { items.registerItem(() -> warpStone = new WarpStoneItem(items.itemProperties()), id("warp_stone")); items.registerItem(() -> warpDust = new WarpDustItem(items.itemProperties()), id("warp_dust")); items.registerItem(() -> attunedShard = new AttunedShardItem(items.itemProperties()), id("attuned_shard"), null); + items.registerItem(() -> crumblingAttunedShard = new CrumblingAttunedShardItem(items.itemProperties()), id("crumbling_attuned_shard"), null); creativeModeTab = items.registerCreativeModeTab(id("waystones"), () -> new ItemStack(ModBlocks.waystone)); } diff --git a/shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java b/shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java index 1a735107..968e44ad 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java +++ b/shared/src/main/java/net/blay09/mods/waystones/menu/WarpPlateAttunementSlot.java @@ -1,6 +1,7 @@ package net.blay09.mods.waystones.menu; import net.blay09.mods.waystones.block.entity.WarpPlateBlockEntity; +import net.blay09.mods.waystones.tag.ModItemTags; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; diff --git a/shared/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java b/shared/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java index 5a832864..bc8d578b 100644 --- a/shared/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java +++ b/shared/src/main/java/net/blay09/mods/waystones/tag/ModItemTags.java @@ -11,6 +11,8 @@ public class ModItemTags { public static final TagKey RETURN_SCROLLS = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "return_scrolls")); public static final TagKey WARP_SCROLLS = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "warp_scrolls")); public static final TagKey WARP_STONES = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "warp_stones")); + public static final TagKey WARP_SHARDS = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "warp_shards")); + public static final TagKey SINGLE_USE_WARP_SHARDS = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "single_use_warp_shards")); public static final TagKey WAYSTONES = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "waystones")); public static final TagKey SHARESTONES = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "sharestones")); public static final TagKey DYED_SHARESTONES = TagKey.create(Registries.ITEM, new ResourceLocation(Waystones.MOD_ID, "dyed_sharestones")); diff --git a/shared/src/main/resources/assets/waystones/lang/en_us.json b/shared/src/main/resources/assets/waystones/lang/en_us.json index cad271a7..35a07f3f 100644 --- a/shared/src/main/resources/assets/waystones/lang/en_us.json +++ b/shared/src/main/resources/assets/waystones/lang/en_us.json @@ -29,6 +29,7 @@ "item.waystones.bound_scroll": "Bound Scroll", "item.waystones.warp_dust": "Warp Dust", "item.waystones.attuned_shard": "Attuned Shard", + "item.waystones.crumbling_attuned_shard": "Crumbling Attuned Shard", "container.waystones.waystone_selection": "Select your destination:", "container.waystones.waystone_settings": "Enter waystone name:", "container.waystones.warp_plate": "Warp Plate", @@ -84,6 +85,7 @@ "tooltip.waystones.black_sharestone": "Teleport to any other Black Sharestone", "tooltip.waystones.attuned_shard.move_to_other_warp_plate": "Bring this shard to another warp plate.", "tooltip.waystones.attuned_shard.plug_into_warp_plate": "Insert this shard into a warp plate.", + "tooltip.waystones.attuned_shard.attunement_crumbling": "It will be consumed on next teleport.", "tooltip.waystones.attuned_shard.attunement_lost": "This shard has lost its attunement.", "tooltip.waystones.not_enough_xp": "Not enough experience! (%d levels needed)", "tooltip.waystones.undiscovered": "Undiscovered", diff --git a/shared/src/main/resources/assets/waystones/models/item/crumbling_attuned_shard.json b/shared/src/main/resources/assets/waystones/models/item/crumbling_attuned_shard.json new file mode 100644 index 00000000..ac397568 --- /dev/null +++ b/shared/src/main/resources/assets/waystones/models/item/crumbling_attuned_shard.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "waystones:item/crumbling_attuned_shard" + } +} diff --git a/shared/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png b/shared/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png new file mode 100644 index 00000000..ef912aec Binary files /dev/null and b/shared/src/main/resources/assets/waystones/textures/item/crumbling_attuned_shard.png differ diff --git a/shared/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json b/shared/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json new file mode 100644 index 00000000..d0b643ed --- /dev/null +++ b/shared/src/main/resources/data/waystones/recipes/crumbling_attuned_shard.json @@ -0,0 +1,24 @@ +{ + "type": "waystones:warp_plate", + "result": { + "item": "waystones:crumbling_attuned_shard", + "count": 4 + }, + "primary": { + "item": "minecraft:ender_pearl" + }, + "secondary": [ + { + "item": "minecraft:amethyst_shard" + }, + { + "item": "minecraft:amethyst_shard" + }, + { + "item": "minecraft:amethyst_shard" + }, + { + "item": "minecraft:amethyst_shard" + } + ] +}