From 64fb7483bc1e075cbac1d9a794d71793eab32138 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 14 Jan 2021 23:42:53 +0100 Subject: [PATCH] added eye of the pillager --- .../models/item/outpost_finder.json | 6 ++++ .../items/ItemStructureFinder.java | 6 ++-- .../ellpeck/naturesaura/reg/ModRegistry.java | 5 ++-- .../assets/naturesaura/lang/en_us.json | 1 + .../textures/item/outpost_finder.png | Bin 0 -> 502 bytes .../en_us/entries/items/outpost_finder.json | 17 ++++++++++++ .../naturesaura/recipes/outpost_finder.json | 26 ++++++++++++++++++ 7 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 src/generated/resources/assets/naturesaura/models/item/outpost_finder.json create mode 100644 src/main/resources/assets/naturesaura/textures/item/outpost_finder.png create mode 100644 src/main/resources/data/naturesaura/patchouli_books/book/en_us/entries/items/outpost_finder.json create mode 100644 src/main/resources/data/naturesaura/recipes/outpost_finder.json 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 0000000000000000000000000000000000000000..d7148fb20f6d243065db5be52c525cb1e816674e GIT binary patch literal 502 zcmV1t-A|ZDw7D2aj>F>m zk^xv;U&3)5>a`lv`8+Gts&xHG7_X47i*^TqmzObftL02hE~|NZa?Eyl+30PTmpMH- z{v6O~HN|XUh9C^_ygq~5&=3x8C;cD{8IMN%yt;b7#H{39cDf(dL1;qlN>Lg|XtbJQ zJQ^us9LL0Q%0Mq%rVFZ*p37;aRAv#Dm>SouEglg&#zyRq+ sm;@+EqLBmFj|2