diff --git a/src/generated/resources/assets/naturesaura/models/item/outpost_finder.json b/src/generated/resources/assets/naturesaura/models/item/outpost_finder.json new file mode 100644 index 00000000..e142cddc --- /dev/null +++ b/src/generated/resources/assets/naturesaura/models/item/outpost_finder.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "naturesaura:item/outpost_finder" + } +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemStructureFinder.java b/src/main/java/de/ellpeck/naturesaura/items/ItemStructureFinder.java index e1c139da..d84b9c41 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemStructureFinder.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemStructureFinder.java @@ -15,11 +15,13 @@ import net.minecraft.world.server.ServerWorld; public class ItemStructureFinder extends ItemImpl { private final Structure structureName; private final int color; + private final int radius; - public ItemStructureFinder(String baseName, Structure structureName, int color) { + public ItemStructureFinder(String baseName, Structure structureName, int color, int radius) { super(baseName); this.structureName = structureName; this.color = color; + this.radius = radius; } @Override @@ -27,7 +29,7 @@ public class ItemStructureFinder extends ItemImpl { ItemStack stack = playerIn.getHeldItem(handIn); // ServerWorld.getStructureManager().doesGenerateFeatures() if (!worldIn.isRemote && ((ServerWorld) worldIn).func_241112_a_().func_235005_a_()) { - BlockPos pos = ((ServerWorld) worldIn).getChunkProvider().getChunkGenerator().func_235956_a_((ServerWorld) worldIn, this.structureName, playerIn.getPosition(), 1024, false); + BlockPos pos = ((ServerWorld) worldIn).getChunkProvider().getChunkGenerator().func_235956_a_((ServerWorld) worldIn, this.structureName, playerIn.getPosition(), this.radius, false); if (pos != null) { EntityStructureFinder entity = new EntityStructureFinder(ModEntities.STRUCTURE_FINDER, worldIn); entity.setPosition(playerIn.getPosX(), playerIn.getPosYHeight(0.5D), playerIn.getPosZ()); diff --git a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java index e3c68b5b..2634c682 100644 --- a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java +++ b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java @@ -221,8 +221,9 @@ public final class ModRegistry { new ItemArmor("sky_chest", ModArmorMaterial.SKY, EquipmentSlotType.CHEST), new ItemArmor("sky_pants", ModArmorMaterial.SKY, EquipmentSlotType.LEGS), new ItemArmor("sky_shoes", ModArmorMaterial.SKY, EquipmentSlotType.FEET), - new ItemStructureFinder("fortress_finder", Structure.field_236378_n_, 0xba2800), - new ItemStructureFinder("end_city_finder", Structure.field_236379_o_, 0xca5cd6), + new ItemStructureFinder("fortress_finder", Structure.field_236378_n_, 0xba2800, 1024), + new ItemStructureFinder("end_city_finder", Structure.field_236379_o_, 0xca5cd6, 1024), + new ItemStructureFinder("outpost_finder", Structure.field_236366_b_, 0xab9f98, 2048), new ItemBreakPrevention(), new ItemPetReviver(), new ItemNetheriteFinder() diff --git a/src/main/resources/assets/naturesaura/lang/en_us.json b/src/main/resources/assets/naturesaura/lang/en_us.json index 0ff539e6..bc481538 100644 --- a/src/main/resources/assets/naturesaura/lang/en_us.json +++ b/src/main/resources/assets/naturesaura/lang/en_us.json @@ -137,6 +137,7 @@ "item.naturesaura.light_staff": "Staff of Baldur", "item.naturesaura.fortress_finder": "Eye of the Blaze", "item.naturesaura.end_city_finder": "Eye of the Shulker", + "item.naturesaura.outpost_finder": "Eye of the Pillager", "item.naturesaura.break_prevention": "Eir's Token", "item.naturesaura.pet_reviver": "Token of Undying Friendship", "item.naturesaura.netherite_finder": "Staff of Ancient Knowledge", diff --git a/src/main/resources/assets/naturesaura/textures/item/outpost_finder.png b/src/main/resources/assets/naturesaura/textures/item/outpost_finder.png new file mode 100644 index 00000000..d7148fb2 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/item/outpost_finder.png differ diff --git a/src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/items/outpost_finder.json b/src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/items/outpost_finder.json new file mode 100644 index 00000000..76f8d8c0 --- /dev/null +++ b/src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/items/outpost_finder.json @@ -0,0 +1,17 @@ +{ + "name": "Eye of the Pillager", + "icon": "naturesaura:outpost_finder", + "category": "items", + "advancement": "naturesaura:aura_bottle_overworld", + "pages": [ + { + "type": "text", + "text": "For several occurences in the world, $(item)Explorer Maps$() can be used to find them easily. However, these maps cannot be found for all of the structures in the world. Specifically, $(thing)Pillager Outposts$() cannot be discovered in this manner. To solve this issue, magical botanists have constructed the $(item)Eye of the Pillager$(), which, upon being thrown, will fly towards the nearest $(thing)Pillager Outpost$()." + }, + { + "type": "crafting", + "text": "Creating the $(item)Eye of the Pillager$()", + "recipe": "naturesaura:outpost_finder" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/naturesaura/recipes/outpost_finder.json b/src/main/resources/data/naturesaura/recipes/outpost_finder.json new file mode 100644 index 00000000..7641430d --- /dev/null +++ b/src/main/resources/data/naturesaura/recipes/outpost_finder.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " B ", + "CEC", + " B " + ], + "key": { + "E": { + "item": "minecraft:ender_eye" + }, + "C": { + "item": "minecraft:tripwire_hook" + }, + "B": { + "type": "forge:nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:overworld" + } + } + }, + "result": { + "item": "naturesaura:outpost_finder" + } +} \ No newline at end of file