Skip to content

Commit 1f69811

Browse files
committed
Rework ancient silver material for Tinkers'
-Renamed Speed Demon tool trait to Silver Hoplite. -Added Speed Demon trait for armor. Replacing the reused Lightweight trait.
1 parent 99b1571 commit 1f69811

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

src/main/java/drzhark/mocreatures/compat/tinkers/ConstructsArmoryIntegration.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import drzhark.mocreatures.compat.tinkers.traits.armor.TraitShellEffectArmor;
88
import drzhark.mocreatures.compat.tinkers.traits.armor.TraitShellEffectPlayerArmor;
99
import drzhark.mocreatures.compat.tinkers.traits.armor.TraitShellFireArmor;
10+
import drzhark.mocreatures.compat.tinkers.traits.armor.TraitSpeedDemonArmor;
1011
import drzhark.mocreatures.compat.tinkers.traits.armor.TraitThresherArmor;
1112
import net.minecraft.init.MobEffects;
1213
import slimeknights.tconstruct.library.TinkerRegistry;
@@ -20,6 +21,7 @@ public class ConstructsArmoryIntegration {
2021
public static final AbstractArmorTrait FROST_SHELL_ARMOR = new TraitShellEffectArmor(MoCConstants.MOD_ID + "." + "frost_shell", 0x1B7A87, 0.0625F, MobEffects.RESISTANCE, MobEffects.SLOWNESS, 0);
2122
public static final AbstractArmorTrait UNDEAD_SHELL_ARMOR = new TraitShellEffectPlayerArmor(MoCConstants.MOD_ID + "." + "undead_shell", 0x92B859, 0.0625F, MobEffects.STRENGTH,
2223
MobEffects.WITHER, MobEffects.BLINDNESS);
24+
public static final AbstractArmorTrait SPEED_DEMON_ARMOR = new TraitSpeedDemonArmor();
2325
public static final AbstractArmorTrait THRESHER_ARMOR = new TraitThresherArmor();
2426

2527
// Materials are already registered in the tools class, we are just registering support for armor sets here
@@ -68,7 +70,7 @@ public static void preInit() {
6870
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.UNDEAD_CHITIN, ArmorTraits.spiny, ArmorMaterialType.CORE);
6971
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.UNDEAD_CHITIN, ArmorTraits.spiny, ArmorMaterialType.PLATES);
7072
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.UNDEAD_CHITIN, ArmorTraits.spiny, ArmorMaterialType.TRIM);
71-
73+
7274
TinkerRegistry.addMaterialStats(TinkersConstructIntegration.BIG_CAT_CLAW,
7375
new CoreMaterialStats(10.0F, 4.0F),
7476
new PlatesMaterialStats(0.9F, 2.0F, 1.0F),
@@ -91,7 +93,7 @@ public static void preInit() {
9193
new CoreMaterialStats(15.0F, 17.0F),
9294
new PlatesMaterialStats(0.95F, 8.5F, 3.0F),
9395
new TrimMaterialStats(4.0F));
94-
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.ANCIENT_SILVER, ArmorTraits.lightweight, ArmorMaterialType.CORE);
96+
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.ANCIENT_SILVER, SPEED_DEMON_ARMOR, ArmorMaterialType.CORE);
9597
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.ANCIENT_SILVER, ArmorTraits.heavy, ArmorMaterialType.CORE);
9698
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.ANCIENT_SILVER, ArmorTraits.heavy, ArmorMaterialType.PLATES);
9799
ArmorMaterials.addArmorTrait(TinkersConstructIntegration.ANCIENT_SILVER, ArmorTraits.heavy, ArmorMaterialType.TRIM);

src/main/java/drzhark/mocreatures/compat/tinkers/TinkersConstructIntegration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class TinkersConstructIntegration {
4646
public static final AbstractTrait FIRE_STING = new TraitStingFire(MoCConstants.MOD_ID + "." + "fire_sting", 0xC62B13, 1.5F);
4747
public static final AbstractTrait FROST_STING = new TraitStingEffect(MoCConstants.MOD_ID + "." + "frost_sting", 0x1B7A87, 1.5F, MobEffects.SLOWNESS, 0);
4848
public static final AbstractTrait SEA_PREDATOR = new TraitSeaPredator(0.4F);
49-
public static final AbstractTrait SPEED_DEMON = new TraitSpeedDemon(5.0F);
49+
public static final AbstractTrait SILVER_HOPLITE = new TraitSilverHoplite(5.0F);
5050
public static final AbstractTrait UNDEAD_STING = new TraitStingEffectPlayer(MoCConstants.MOD_ID + "." + "undead_sting", 0x92B859, 1.5F, MobEffects.WITHER, MobEffects.BLINDNESS);
5151

5252
public static final FluidMolten ANCIENT_SILVER_FLUID = new FluidMolten("ancient_silver", 0x9D9FA3, FluidMolten.ICON_MetalStill, FluidMolten.ICON_MetalFlowing);
@@ -136,7 +136,7 @@ public static void preInit() {
136136
new HandleMaterialStats(1.1F, 120),
137137
new ExtraMaterialStats(110),
138138
new BowMaterialStats(0.4F, 2.0F, 9.0F));
139-
ANCIENT_SILVER.addTrait(SPEED_DEMON, MaterialTypes.HEAD);
139+
ANCIENT_SILVER.addTrait(SILVER_HOPLITE, MaterialTypes.HEAD);
140140
ANCIENT_SILVER.addTrait(TinkerTraits.heavy, MaterialTypes.HEAD);
141141
ANCIENT_SILVER.addTrait(TinkerTraits.heavy);
142142
TinkerRegistry.integrate(new MaterialIntegration(ANCIENT_SILVER, ANCIENT_SILVER_FLUID, "AncientSilver")).toolforge().preInit();

src/main/java/drzhark/mocreatures/compat/tinkers/traits/TraitSpeedDemon.java renamed to src/main/java/drzhark/mocreatures/compat/tinkers/traits/TraitSilverHoplite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
import slimeknights.tconstruct.library.Util;
1212
import slimeknights.tconstruct.library.traits.AbstractTrait;
1313

14-
public class TraitSpeedDemon extends AbstractTrait {
14+
public class TraitSilverHoplite extends AbstractTrait {
1515
protected final float bonus;
1616

17-
public TraitSpeedDemon(float bonus) {
18-
super(MoCConstants.MOD_ID + "." + "speed_demon", 0x8E8F93);
17+
public TraitSilverHoplite(float bonus) {
18+
super(MoCConstants.MOD_ID + "." + "silver_hoplite", 0x8E8F93);
1919

2020
this.bonus = bonus;
2121
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package drzhark.mocreatures.compat.tinkers.traits.armor;
2+
3+
import c4.conarm.lib.traits.AbstractArmorTrait;
4+
import drzhark.mocreatures.MoCConstants;
5+
import net.minecraft.entity.player.EntityPlayer;
6+
import net.minecraft.init.MobEffects;
7+
import net.minecraft.potion.PotionEffect;
8+
import net.minecraft.world.World;
9+
10+
public class TraitSpeedDemonArmor extends AbstractArmorTrait {
11+
public TraitSpeedDemonArmor() {
12+
super(MoCConstants.MOD_ID + "." + "speed_demon", 0x8E8F93);
13+
}
14+
15+
@Override
16+
public void onAbilityTick(int level, World world, EntityPlayer player) {
17+
if (player.isSprinting()) {
18+
player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 2, level - 1, true, false));
19+
}
20+
}
21+
}

src/main/resources/assets/mocreatures/lang/en_us.lang

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ modifier.mocreatures.fire_sting.desc=§oElemental Scorpions!§r\nYour tool sets
459459
modifier.mocreatures.sea_predator.name=Sea Predator
460460
modifier.mocreatures.sea_predator.desc=§oThere's a shark in the pond!§r\nYour tool deals +40% damage to all aquatic creatures or while you're under rain or in water.
461461
modifier.mocreatures.sea_predator.extra=Vs Aquatic: +%s
462-
modifier.mocreatures.speed_demon.name=Speed Demon
463-
modifier.mocreatures.speed_demon.desc=§oSpeedrunning!§r\nBonus damage is dealt while running.
462+
modifier.mocreatures.silver_hoplite.name=Silver Hoplite
463+
modifier.mocreatures.silver_hoplite.desc=§oFOR THE EMPIRE!§r\nBonus damage is dealt while running.
464464
modifier.mocreatures.speed_demon.extra=Speed Demon Damage: +%d
465465
modifier.mocreatures.undead_sting.name=Sting of Undead
466466
modifier.mocreatures.undead_sting.desc=§oElemental Scorpions!§r\nYour tool withers enemies (or blinds players) on hit and deals increased damage.
@@ -474,6 +474,8 @@ modifier.mocreatures.fire_shell_armor.name=Shell of Fire
474474
modifier.mocreatures.fire_shell_armor.desc=§oDodge this!§r\nThere is a small chance for damage to be ignored entirely, you'll also temporarily gain Fire Resistance while your target is set on fire.
475475
modifier.mocreatures.frost_shell_armor.name=Shell of Frost
476476
modifier.mocreatures.frost_shell_armor.desc=§oDodge this!§r\nThere is a small chance for damage to be ignored entirely, you'll also temporarily gain Resistance while your target is slowed.
477+
modifier.mocreatures.speed_demon_armor.name=Speed Demon
478+
modifier.mocreatures.speed_demon_armor.desc=§oSpeedrunning!§r\nSpeed is applied to you when running. The level of this effect also increases while more armor pieces with this trait are worn.
477479
modifier.mocreatures.thresher_armor.name=Thresher
478480
modifier.mocreatures.thresher_armor.desc=§oHoly Mackerel!§r\nDamages attackers on contact based on durability and provides extra protection from all aquatic creatures.
479481
modifier.mocreatures.thresher_armor.extra.damage=Thresher Damage: +%s

0 commit comments

Comments
 (0)