Skip to content

Commit

Permalink
Rename all arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Aug 17, 2024
1 parent 1341d0f commit 8b7acf5
Show file tree
Hide file tree
Showing 24 changed files with 138 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void onUpdate() {
for (int i = 0; i < 4; ++i) {
this.world.spawnParticle(EnumParticleTypes.WATER_BUBBLE, this.posX - this.motionX * 0.25D, this.posY - this.motionY * 0.25D, this.posZ - this.motionZ * 0.25D, this.motionX, this.motionY, this.motionZ);
}
if (this.getArrowType() != 3 || this.getArrowType() != 0) {
if (this.getArrowType() != 0 || this.getArrowType() != 1) {
// Motion change does not affect Water/Air Arrows
motionMultiplier = 0.6F;
}
Expand All @@ -217,7 +217,7 @@ public void onUpdate() {
@Override
public void onEntityUpdate() {
// Water Arrows are never set on fire
if (this.getArrowType() == 3) {
if (this.getArrowType() == 1) {
this.isImmuneToFire = true;
}

Expand All @@ -237,8 +237,8 @@ protected float computeTotalDamage() {
// More Damage - Fire
damage = damage * 1.25D;
break;
case 3:
case 4:
case 5:
// Less Damage - Entropy/Order
damage = damage * 0.8D;
break;
Expand All @@ -250,14 +250,14 @@ protected DamageSource getDamageSource() {
Entity shooter = (this.shootingEntity == null) ? this : this.shootingEntity;
DamageSource damageSource = new EntityDamageSourceIndirect("arrow", this, shooter);
switch (this.getArrowType()) {
case 1:
// Armor Penetration - Earth
damageSource = damageSource.setProjectile().setDamageBypassesArmor();
break;
case 2:
// Fire Damage - Fire
damageSource = damageSource.setProjectile().setFireDamage();
break;
case 5:
// Armor Penetration - Earth
damageSource = damageSource.setProjectile().setDamageBypassesArmor();
break;
default:
// Default Damage - Air/Entropy/Earth
damageSource = damageSource.setProjectile();
Expand All @@ -269,7 +269,7 @@ protected DamageSource getDamageSource() {
protected int getFireDuration() {
int duration = 0;
// Water Arrows will never light targets on fire
if (this.isBurning() && this.getArrowType() != 3) {
if (this.isBurning() && this.getArrowType() != 1) {
duration += 5;
}
// Fire Arrows will always light targets on fire (fire enchantments will extend duration)
Expand Down Expand Up @@ -363,15 +363,15 @@ protected void onHit(RayTraceResult raytraceResultIn) {
protected void arrowHit(EntityLivingBase living) {
super.arrowHit(living);
switch (this.getArrowType()) {
case 3:
case 1:
// Slowness V Effect - Water (10 seconds)
living.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 10 * 20, 4));
break;
case 4:
case 3:
// Weakness V Effect - Order (10 seconds)
living.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 10 * 20, 4));
break;
case 5:
case 4:
// Wither III Effect - Entropy (10 seconds)
living.addPotionEffect(new PotionEffect(MobEffects.WITHER, 10 * 20, 2));
break;
Expand Down
34 changes: 17 additions & 17 deletions src/main/java/mod/icarus/crimsonrevelations/init/RecipeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,54 +97,54 @@ public static void initArcaneCrafting() {
"EIE",
"EPE",
'P', RegistryHandler.crimsonPlate, 'I', new ItemStack(Items.IRON_SWORD, 1, OreDictionary.WILDCARD_VALUE), 'E', Items.SPIDER_EYE));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "air_primal_arrow"), new ShapedArcaneRecipe(
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "aer_arrow"), new ShapedArcaneRecipe(
defaultGroup, "PRIMAL_ARROWS", 10,
new AspectList(),
new ItemStack(RegistryHandler.airPrimalArrow, 4),
new ItemStack(RegistryHandler.aerArrow, 4),
" A ",
"ACA",
" A ",
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.AIR))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "earth_primal_arrow"), new ShapedArcaneRecipe(
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "aqua_arrow"), new ShapedArcaneRecipe(
defaultGroup, "PRIMAL_ARROWS", 10,
new AspectList(),
new ItemStack(RegistryHandler.earthPrimalArrow, 4),
new ItemStack(RegistryHandler.aquaArrow, 4),
" A ",
"ACA",
" A ",
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.EARTH))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "entropy_primal_arrow"), new ShapedArcaneRecipe(
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.WATER))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "ignis_arrow"), new ShapedArcaneRecipe(
defaultGroup, "PRIMAL_ARROWS", 10,
new AspectList(),
new ItemStack(RegistryHandler.entropyPrimalArrow, 4),
new ItemStack(RegistryHandler.ignisArrow, 4),
" A ",
"ACA",
" A ",
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.ENTROPY))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "fire_primal_arrow"), new ShapedArcaneRecipe(
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.FIRE))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "ordo_arrow"), new ShapedArcaneRecipe(
defaultGroup, "PRIMAL_ARROWS", 10,
new AspectList(),
new ItemStack(RegistryHandler.firePrimalArrow, 4),
new ItemStack(RegistryHandler.ordoArrow, 4),
" A ",
"ACA",
" A ",
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.FIRE))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "order_primal_arrow"), new ShapedArcaneRecipe(
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.ORDER))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "perditio_arrow"), new ShapedArcaneRecipe(
defaultGroup, "PRIMAL_ARROWS", 10,
new AspectList(),
new ItemStack(RegistryHandler.orderPrimalArrow, 4),
new ItemStack(RegistryHandler.perditioArrow, 4),
" A ",
"ACA",
" A ",
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.ORDER))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "water_primal_arrow"), new ShapedArcaneRecipe(
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.ENTROPY))));
ThaumcraftApi.addArcaneCraftingRecipe(new ResourceLocation(CrimsonRevelations.MODID, "terra_arrow"), new ShapedArcaneRecipe(
defaultGroup, "PRIMAL_ARROWS", 10,
new AspectList(),
new ItemStack(RegistryHandler.waterPrimalArrow, 4),
new ItemStack(RegistryHandler.terraArrow, 4),
" A ",
"ACA",
" A ",
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.WATER))));
'A', Items.ARROW, 'C', new IngredientNBTTC(ThaumcraftApiHelper.makeCrystal(Aspect.EARTH))));
}

public static void initCrucible() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
@EventBusSubscriber(modid = CrimsonRevelations.MODID)
@GameRegistry.ObjectHolder(CrimsonRevelations.MODID)
public class RegistryHandler {
@GameRegistry.ObjectHolder("air_primal_arrow")
public static Item airPrimalArrow;
@GameRegistry.ObjectHolder("aer_arrow")
public static Item aerArrow;
@GameRegistry.ObjectHolder("aqua_arrow")
public static Item aquaArrow;
@GameRegistry.ObjectHolder("bone_bow")
public static Item boneBow;
@GameRegistry.ObjectHolder("crimson_archer_helmet")
Expand All @@ -69,18 +71,16 @@ public class RegistryHandler {
public static Item crimsonPlate;
@GameRegistry.ObjectHolder("crimson_sword")
public static Item crimsonSword;
@GameRegistry.ObjectHolder("earth_primal_arrow")
public static Item earthPrimalArrow;
@GameRegistry.ObjectHolder("embellished_crimson_fabric")
public static Item embellishedCrimsonFabric;
@GameRegistry.ObjectHolder("entropy_primal_arrow")
public static Item entropyPrimalArrow;
@GameRegistry.ObjectHolder("fire_primal_arrow")
public static Item firePrimalArrow;
@GameRegistry.ObjectHolder("order_primal_arrow")
public static Item orderPrimalArrow;
@GameRegistry.ObjectHolder("water_primal_arrow")
public static Item waterPrimalArrow;
@GameRegistry.ObjectHolder("ignis_arrow")
public static Item ignisArrow;
@GameRegistry.ObjectHolder("ordo_arrow")
public static Item ordoArrow;
@GameRegistry.ObjectHolder("perditio_arrow")
public static Item perditioArrow;
@GameRegistry.ObjectHolder("terra_arrow")
public static Item terraArrow;

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 @@ -99,12 +99,12 @@ public static void registerItems(RegistryEvent.Register<Item> event) {
setup(new ItemCultistArcherArmor(EntityEquipmentSlot.LEGS), "crimson_archer_leggings"),

setup(new ItemBoneBow(), "bone_bow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "air_primal_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "fire_primal_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "water_primal_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "earth_primal_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "order_primal_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "entropy_primal_arrow")
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "aer_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "aqua_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "ignis_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "ordo_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "perditio_arrow"),
setup(new ItemCRArrow(EnumRarity.UNCOMMON), "terra_arrow")
);
}

Expand All @@ -119,7 +119,7 @@ public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
public static void registerEntities(RegistryEvent.Register<EntityEntry> event) {
int id = 0;

registerEntity("cultist_archer", EntityCultistArcher.class, id++, 64, 3, true, 0x1C1A2F, 0x5649B4);
//registerEntity("cultist_archer", EntityCultistArcher.class, id++, 64, 3, true, 0x1C1A2F, 0x5649B4);
registerEntity("primal_arrow", EntityPrimalArrow.class, id++, 64, 1, true);

if (Loader.isModLoaded("thaumicaugmentation") && CRConfig.general_settings.TA_INTEGRATION)
Expand Down
74 changes: 37 additions & 37 deletions src/main/java/mod/icarus/crimsonrevelations/item/ItemCRArrow.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@ public EnumRarity getRarity(ItemStack stack) {

@Override
public EntityArrow createArrow(World world, ItemStack stack, EntityLivingBase shooter) {
if (this == RegistryHandler.airPrimalArrow) {
EntityPrimalArrow airArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.airPrimalArrow);
airArrow.setArrowType(0);
airArrow.setKnockbackStrength(2);
airArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return airArrow;
} else if (this == RegistryHandler.earthPrimalArrow) {
EntityPrimalArrow earthArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.earthPrimalArrow);
earthArrow.setArrowType(1);
earthArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return earthArrow;
} else if (this == RegistryHandler.firePrimalArrow) {
EntityPrimalArrow fireArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.firePrimalArrow);
fireArrow.setArrowType(2);
fireArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return fireArrow;
} else if (this == RegistryHandler.waterPrimalArrow) {
EntityPrimalArrow waterArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.waterPrimalArrow);
waterArrow.setArrowType(3);
waterArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return waterArrow;
} else if (this == RegistryHandler.orderPrimalArrow) {
EntityPrimalArrow orderArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.orderPrimalArrow);
orderArrow.setArrowType(4);
orderArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return orderArrow;
} else if (this == RegistryHandler.entropyPrimalArrow) {
EntityPrimalArrow entropyArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.entropyPrimalArrow);
entropyArrow.setArrowType(5);
entropyArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return entropyArrow;
if (this == RegistryHandler.aerArrow) {
EntityPrimalArrow aerArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.aerArrow);
aerArrow.setArrowType(0);
aerArrow.setKnockbackStrength(2);
aerArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return aerArrow;
} else if (this == RegistryHandler.aquaArrow) {
EntityPrimalArrow aquaArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.aquaArrow);
aquaArrow.setArrowType(1);
aquaArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return aquaArrow;
} else if (this == RegistryHandler.ignisArrow) {
EntityPrimalArrow ignisArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.ignisArrow);
ignisArrow.setArrowType(2);
ignisArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return ignisArrow;
} else if (this == RegistryHandler.ordoArrow) {
EntityPrimalArrow ordoArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.ordoArrow);
ordoArrow.setArrowType(3);
ordoArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return ordoArrow;
} else if (this == RegistryHandler.perditioArrow) {
EntityPrimalArrow perditioArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.perditioArrow);
perditioArrow.setArrowType(4);
perditioArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return perditioArrow;
} else if (this == RegistryHandler.terraArrow) {
EntityPrimalArrow terraArrow = new EntityPrimalArrow(world, shooter, RegistryHandler.terraArrow);
terraArrow.setArrowType(5);
terraArrow.playSound(SoundsTC.hhoff, 0.6F, 0.8F / (itemRand.nextFloat() * 0.4F + 0.8F));
return terraArrow;
}

return new EntitySpectralArrow(world, shooter);
Expand All @@ -69,12 +69,12 @@ public EntityArrow createArrow(World world, ItemStack stack, EntityLivingBase sh
public boolean isInfinite(ItemStack stack, ItemStack item, EntityPlayer player) {
int enchantLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, item);

if (this == RegistryHandler.airPrimalArrow ||
this == RegistryHandler.earthPrimalArrow ||
this == RegistryHandler.entropyPrimalArrow ||
this == RegistryHandler.firePrimalArrow ||
this == RegistryHandler.orderPrimalArrow ||
this == RegistryHandler.waterPrimalArrow) {
if (this == RegistryHandler.aerArrow ||
this == RegistryHandler.aquaArrow ||
this == RegistryHandler.ignisArrow ||
this == RegistryHandler.ordoArrow ||
this == RegistryHandler.perditioArrow ||
this == RegistryHandler.terraArrow) {
if (enchantLevel <= 0) {
return false;
} else {
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/assets/crimsonrevelations/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ itemGroup.CrimsonRevelationsTab=New Crimson Revelations
entity.crimsonrevelations.cultist_archer.name=Crimson Archer
entity.crimsonrevelations.overgrown_taintacle.name=Overgrown Taintacle

item.crimsonrevelations.air_primal_arrow.name=Air Primal Arrow
item.crimsonrevelations.aer_arrow.name=Aer Arrow
item.crimsonrevelations.aqua_arrow.name=Aqua Arrow
item.crimsonrevelations.bone_bow.name=Bow of Bone
item.crimsonrevelations.crimson_archer_helmet.name=Crimson Archer Helm
item.crimsonrevelations.crimson_archer_chestplate.name=Crimson Archer Chestplate
item.crimsonrevelations.crimson_archer_leggings.name=Crimson Archer Greaves
item.crimsonrevelations.crimson_fabric.name=Crimson Fabric
item.crimsonrevelations.crimson_plate.name=Crimson Plate
item.crimsonrevelations.crimson_sword.name=Crimson Cult Sword
item.crimsonrevelations.earth_primal_arrow.name=Earth Primal Arrow
item.crimsonrevelations.entropy_primal_arrow.name=Entropy Primal Arrow
item.crimsonrevelations.embellished_crimson_fabric.name=Embellished Crimson Fabric
item.crimsonrevelations.fire_primal_arrow.name=Fire Primal Arrow
item.crimsonrevelations.order_primal_arrow.name=Order Primal Arrow
item.crimsonrevelations.water_primal_arrow.name=Water Primal Arrow
item.crimsonrevelations.ignis_arrow.name=Ignis Arrow
item.crimsonrevelations.ordo_arrow.name=Ordo Arrow
item.crimsonrevelations.perditio_arrow.name=Perditio Arrow
item.crimsonrevelations.terra_arrow.name=Terra Arrow

tc.research_category.REVELATIONS=Revelations

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/arrow_aer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/arrow_aqua"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/arrow_ignis"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/arrow_ordo"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/arrow_perditio"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "crimsonrevelations:items/arrow_terra"
}
}
Loading

0 comments on commit 8b7acf5

Please sign in to comment.