diff --git a/build.gradle b/build.gradle index 0b28214..1de3be0 100644 --- a/build.gradle +++ b/build.gradle @@ -111,6 +111,7 @@ dependencies { // Example of deobfuscating a dependency // implementation rfg.deobf('curse.maven:had-enough-items-557549:4543375') implementation rfg.deobf('curse.maven:thaumcraft-223628:2629023') + implementation rfg.deobf('curse.maven:baubles-227083:2518667') implementation rfg.deobf('curse.maven:thaumic-augmentation-319441:5129455') implementation 'curse.maven:just-enough-resources-jer-240630:4440936' runtimeOnly 'curse.maven:jei-238222:4538010' diff --git a/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java b/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java index df90755..ebcf923 100644 --- a/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java +++ b/src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java @@ -5,6 +5,7 @@ import mod.icarus.crimsonrevelations.item.CRItemArrow; import mod.icarus.crimsonrevelations.item.CRItemSword; import mod.icarus.crimsonrevelations.item.armor.ItemCultistArcherArmor; +import mod.icarus.crimsonrevelations.item.baubles.CRItemRunicBauble; import mod.icarus.crimsonrevelations.item.weapons.ItemBoneBow; import net.minecraft.block.BlockDoor; import net.minecraft.block.BlockSlab; @@ -31,6 +32,8 @@ import javax.annotation.Nonnull; +import baubles.api.BaubleType; + @SuppressWarnings("deprecation") @EventBusSubscriber(modid = NewCrimsonRevelations.MODID) @GameRegistry.ObjectHolder(NewCrimsonRevelations.MODID) @@ -63,6 +66,12 @@ public class CRItems { public static Item perditioArrow; @GameRegistry.ObjectHolder("terra_arrow") public static Item terraArrow; + @GameRegistry.ObjectHolder("runic_amulet") + public static Item runicAmulet; + @GameRegistry.ObjectHolder("runic_girdle") + public static Item runicGirdle; + @GameRegistry.ObjectHolder("runic_ring") + public static Item runicRing; public static ArmorMaterial ARMOR_CULTIST_ARCHER = EnumHelper.addArmorMaterial("CULTIST_ARCHER", "CULTIST_ARCHER", 17, new int[]{2, 5, 5, 2}, 13, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0.0F).setRepairItem(new ItemStack(crimsonPlate)); @@ -88,7 +97,11 @@ public static void registerItems(@Nonnull final RegistryEvent.Register eve CRRegistry.setup(new CRItemArrow(EnumRarity.UNCOMMON), "ignis_arrow"), CRRegistry.setup(new CRItemArrow(EnumRarity.UNCOMMON), "ordo_arrow"), CRRegistry.setup(new CRItemArrow(EnumRarity.UNCOMMON), "perditio_arrow"), - CRRegistry.setup(new CRItemArrow(EnumRarity.UNCOMMON), "terra_arrow") + CRRegistry.setup(new CRItemArrow(EnumRarity.UNCOMMON), "terra_arrow"), + + CRRegistry.setup(new CRItemRunicBauble(BaubleType.RING, EnumRarity.UNCOMMON, 5), "runic_ring"), + CRRegistry.setup(new CRItemRunicBauble(BaubleType.AMULET, EnumRarity.UNCOMMON, 8), "runic_amulet"), + CRRegistry.setup(new CRItemRunicBauble(BaubleType.BELT, EnumRarity.UNCOMMON, 10), "runic_girdle") ); // Item Blocks diff --git a/src/main/java/mod/icarus/crimsonrevelations/item/baubles/CRItemRunicBauble.java b/src/main/java/mod/icarus/crimsonrevelations/item/baubles/CRItemRunicBauble.java new file mode 100644 index 0000000..f526ed2 --- /dev/null +++ b/src/main/java/mod/icarus/crimsonrevelations/item/baubles/CRItemRunicBauble.java @@ -0,0 +1,37 @@ +package mod.icarus.crimsonrevelations.item.baubles; + +import baubles.api.BaubleType; +import baubles.api.IBauble; +import mod.icarus.crimsonrevelations.item.CRItem; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagByte; +import net.minecraft.util.NonNullList; + +public class CRItemRunicBauble extends CRItem implements IBauble { + BaubleType type; + EnumRarity rarity; + int amount; + + public CRItemRunicBauble(BaubleType type, EnumRarity rarity, int amount) { + super(rarity); + this.maxStackSize = 1; + this.type = type; + this.rarity = rarity; + this.amount = amount; + } + + @Override + public BaubleType getBaubleType(ItemStack stack) { + return type; + } + + public void getSubItems(CreativeTabs tab, NonNullList items) { + if (this.isInCreativeTab(tab)) { + ItemStack stack = new ItemStack(this); + stack.setTagInfo("TC.RUNIC", new NBTTagByte((byte) amount)); + items.add(stack); + } + } +} diff --git a/src/main/resources/assets/crimsonrevelations/lang/en_us.lang b/src/main/resources/assets/crimsonrevelations/lang/en_us.lang index dc8c0f0..36ab987 100644 --- a/src/main/resources/assets/crimsonrevelations/lang/en_us.lang +++ b/src/main/resources/assets/crimsonrevelations/lang/en_us.lang @@ -21,6 +21,9 @@ item.crimsonrevelations.embellished_crimson_fabric.name=Embellished Crimson Fabr item.crimsonrevelations.ignis_arrow.name=Ignis Arrow item.crimsonrevelations.ordo_arrow.name=Ordo Arrow item.crimsonrevelations.perditio_arrow.name=Perditio Arrow +item.crimsonrevelations.runic_amulet.name=Amulet of Runic Shielding +item.crimsonrevelations.runic_girdle.name=Belt of Runic Shielding +item.crimsonrevelations.runic_ring.name=Ring of Runic Shielding item.crimsonrevelations.terra_arrow.name=Terra Arrow # Research diff --git a/src/main/resources/assets/crimsonrevelations/models/item/runic_amulet.json b/src/main/resources/assets/crimsonrevelations/models/item/runic_amulet.json new file mode 100644 index 0000000..c6611af --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/models/item/runic_amulet.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "crimsonrevelations:items/runic_amulet" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/crimsonrevelations/models/item/runic_girdle.json b/src/main/resources/assets/crimsonrevelations/models/item/runic_girdle.json new file mode 100644 index 0000000..07fdf78 --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/models/item/runic_girdle.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "crimsonrevelations:items/runic_girdle" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/crimsonrevelations/models/item/runic_ring.json b/src/main/resources/assets/crimsonrevelations/models/item/runic_ring.json new file mode 100644 index 0000000..888bcec --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/models/item/runic_ring.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "crimsonrevelations:items/runic_ring" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_amulet.png b/src/main/resources/assets/crimsonrevelations/textures/items/runic_amulet.png new file mode 100644 index 0000000..c95dc65 Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/textures/items/runic_amulet.png differ diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_amulet.png.mcmeta b/src/main/resources/assets/crimsonrevelations/textures/items/runic_amulet.png.mcmeta new file mode 100644 index 0000000..7e77c64 --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/textures/items/runic_amulet.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_girdle.png b/src/main/resources/assets/crimsonrevelations/textures/items/runic_girdle.png new file mode 100644 index 0000000..518ed91 Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/textures/items/runic_girdle.png differ diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_girdle.png.mcmeta b/src/main/resources/assets/crimsonrevelations/textures/items/runic_girdle.png.mcmeta new file mode 100644 index 0000000..7e77c64 --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/textures/items/runic_girdle.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring.png b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring.png new file mode 100644 index 0000000..df99614 Binary files /dev/null and b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring.png differ diff --git a/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring.png.mcmeta b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring.png.mcmeta new file mode 100644 index 0000000..7e77c64 --- /dev/null +++ b/src/main/resources/assets/crimsonrevelations/textures/items/runic_ring.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 2 + } +} \ No newline at end of file