Skip to content

Commit

Permalink
Start runic baubles
Browse files Browse the repository at this point in the history
Recipes soon...
  • Loading branch information
IcarussOne committed Aug 28, 2024
1 parent 98bc289 commit 3cf9c53
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
15 changes: 14 additions & 1 deletion src/main/java/mod/icarus/crimsonrevelations/init/CRItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,6 +32,8 @@

import javax.annotation.Nonnull;

import baubles.api.BaubleType;

@SuppressWarnings("deprecation")
@EventBusSubscriber(modid = NewCrimsonRevelations.MODID)
@GameRegistry.ObjectHolder(NewCrimsonRevelations.MODID)
Expand Down Expand Up @@ -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));

Expand All @@ -88,7 +97,11 @@ public static void registerItems(@Nonnull final RegistryEvent.Register<Item> 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
Expand Down
Original file line number Diff line number Diff line change
@@ -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<ItemStack> items) {
if (this.isInCreativeTab(tab)) {
ItemStack stack = new ItemStack(this);
stack.setTagInfo("TC.RUNIC", new NBTTagByte((byte) amount));
items.add(stack);
}
}
}
3 changes: 3 additions & 0 deletions src/main/resources/assets/crimsonrevelations/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/runic_amulet"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/runic_girdle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/runic_ring"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"animation": {
"frametime": 2
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"animation": {
"frametime": 2
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"animation": {
"frametime": 2
}
}

0 comments on commit 3cf9c53

Please sign in to comment.