Skip to content

Commit

Permalink
Tinkers' Construct rebalance
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Jan 8, 2025
1 parent 8ae23d9 commit 4af76ed
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 34 deletions.
20 changes: 10 additions & 10 deletions src/main/java/twilightforest/compat/TConstruct.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void preInit() {
new BowMaterialStats(0.7f, 1.5f, 7f),
new ArrowShaftMaterialStats(1.25f, 15)
);
TinkerRegistry.integrate(new MaterialIntegration(TConstruct.ironwood, null, "Ironwood")).preInit();
TinkerRegistry.integrate(new MaterialIntegration(TConstruct.ironwood, null, "Ironwood")).toolforge().preInit();

TinkerRegistry.addMaterialStats(TConstruct.steeleaf,
new HeadMaterialStats(180, 7f, 6f, HarvestLevels.OBSIDIAN),
Expand All @@ -59,7 +59,7 @@ static void preInit() {
new ArrowShaftMaterialStats(0.6f, 10),
new FletchingMaterialStats(1f, 0.8f)
);
TinkerRegistry.integrate(new MaterialIntegration(TConstruct.steeleaf, null, "Steeleaf")).preInit();
TinkerRegistry.integrate(new MaterialIntegration(TConstruct.steeleaf, null, "Steeleaf")).toolforge().preInit();

TinkerRegistry.addMaterialStats(TConstruct.fierymetal,
new HeadMaterialStats(720, 7.2f, 6.6f, HarvestLevels.COBALT),
Expand All @@ -68,7 +68,7 @@ static void preInit() {
new BowMaterialStats(1f, 0.9f, 4f),
new ArrowShaftMaterialStats(0.8f, 0)
);
TinkerRegistry.integrate(new MaterialIntegration(TConstruct.fierymetal, RegisterBlockEvent.moltenFiery, "Fiery")).preInit();
TinkerRegistry.integrate(new MaterialIntegration(TConstruct.fierymetal, RegisterBlockEvent.moltenFiery, "Fiery")).toolforge().preInit();

TinkerRegistry.addMaterialStats(TConstruct.knightmetal,
new HeadMaterialStats(900, 7f, 6f, HarvestLevels.COBALT),
Expand Down Expand Up @@ -100,23 +100,23 @@ static void preInit() {
static void init() {
TConstruct.nagascale.addItem(TFItems.naga_scale, 1, Material.VALUE_Ingot);
TConstruct.nagascale
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TConstruct.precipitate, MaterialTypes.HEAD)
.addTrait(TConstruct.precipitate)
.setCraftable(true).setCastable(false)
.setRepresentativeItem(TFItems.naga_scale);

TConstruct.ironwood.addCommonItems("Ironwood");
TConstruct.ironwood
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TinkerTraits.stiff, MaterialTypes.HEAD)
.addTrait(TinkerTraits.ecological)
.setCraftable(true).setCastable(false)
.setRepresentativeItem(TFItems.ironwood_ingot);

TConstruct.steeleaf.addCommonItems("Steeleaf");
TConstruct.steeleaf
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TConstruct.synergy, MaterialTypes.HEAD)
.addTrait(TConstruct.synergy)
.setCraftable(true).setCastable(false)
Expand All @@ -125,7 +125,7 @@ static void init() {
TConstruct.fierymetal.addCommonItems("Fiery");
TConstruct.fierymetal
.addTrait(TinkerTraits.superheat)
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TinkerTraits.autosmelt, MaterialTypes.HEAD)
//.addTrait(TinkerTraits.superheat, MaterialTypes.HEAD)
.addTrait(TinkerTraits.flammable, MaterialTypes.HEAD)
Expand All @@ -136,15 +136,15 @@ static void init() {
TConstruct.knightmetal.addItem(TFItems.armor_shard, 1, Material.VALUE_Nugget);
TConstruct.knightmetal.addItem(TFItems.block_and_chain, 1, (Material.VALUE_Ingot * 7) + Material.VALUE_Block);
TConstruct.knightmetal
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TConstruct.stalwart, MaterialTypes.HEAD)
.addTrait(TConstruct.stalwart)
.setCraftable(false).setCastable(true)
.setRepresentativeItem(TFItems.knightmetal_ingot);

TConstruct.ravenFeather.addItem(TFItems.raven_feather, 1, Material.VALUE_Ingot);
TConstruct.ravenFeather
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TConstruct.veiled, MaterialTypes.HEAD)
.addTrait(TConstruct.veiled)
.setCraftable(true).setCastable(false)
Expand All @@ -153,7 +153,7 @@ static void init() {
TConstruct.regal.addCommonItems("Regal");
TConstruct.regal.addItem(TFItems.regal_shard, 1, Material.VALUE_Nugget);
TConstruct.regal
.addTrait(TConstruct.twilit, MaterialTypes.HEAD)
.addTrait(TConstruct.twilit)
.addTrait(TinkerTraits.shocking, MaterialTypes.HEAD)
.addTrait(TinkerTraits.shocking)
.setCraftable(false).setCastable(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public TraitStalwart() {

@Override
public void onHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean isCritical) {
if (isCritical || random.nextInt(10) == 0)
player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 200));
if (isCritical || random.nextInt(5) == 0)
player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 200, 1));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, b
if (i != itemSlot) {
ItemStack stack = playerInv.get(i);
if (stack.getItem() == TFItems.steeleaf_ingot) {
healPower += stack.getCount();
healPower += 1;
} else if (stack.getItem() == TFItems.block_storage && stack.getMetadata() == CompressedVariant.STEELLEAF.ordinal()) {
healPower += stack.getCount() * 9;
healPower += 2;
} else if (TFItemStackUtils.hasToolMaterial(stack, TFItems.TOOL_STEELEAF)) {
healPower += 1;
}
Expand Down
35 changes: 20 additions & 15 deletions src/main/java/twilightforest/compat/tcon/trait/TraitTwilit.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,49 @@
import java.util.List;

public class TraitTwilit extends AbstractProjectileTrait {

private static final float bonus = 2.0f;

public TraitTwilit() {
super("twilit", TextFormatting.GOLD);
}

@Override
public void miningSpeed(ItemStack tool, PlayerEvent.BreakSpeed event) {
if (TFWorld.isTwilightForest(event.getEntity().world))
event.setNewSpeed(event.getNewSpeed() + bonus);
if (TFWorld.isTwilightForest(event.getEntity().world)) {
event.setNewSpeed(event.getNewSpeed() + 2.0F);
} else {
event.setNewSpeed(event.getNewSpeed() + 1.0F);
}
}

@Override
public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
if (TFWorld.isTwilightForest(target.world))
return super.damage(tool, player, target, damage, newDamage, isCritical);
return super.damage(tool, player, target, damage, newDamage + 2.0F, isCritical);
else
return super.damage(tool, player, target, damage, newDamage + bonus, isCritical);
return super.damage(tool, player, target, damage, newDamage + 1.0F, isCritical);
}

@Override
public void onLaunch(EntityProjectileBase projectileBase, World world, @Nullable EntityLivingBase shooter) {
if (!TFWorld.isTwilightForest(projectileBase.world)) return;
if (TFWorld.isTwilightForest(projectileBase.world)) {
projectileBase.motionX += (projectileBase.motionX * 2.0F * 0.1f);
projectileBase.motionY += (projectileBase.motionY * 2.0F * 0.1f);
projectileBase.motionZ += (projectileBase.motionZ * 2.0F * 0.1f);
} else {

projectileBase.motionX += (projectileBase.motionX * bonus * 0.1f);
projectileBase.motionY += (projectileBase.motionY * bonus * 0.1f);
projectileBase.motionZ += (projectileBase.motionZ * bonus * 0.1f);
projectileBase.motionX += (projectileBase.motionX * 1.0F * 0.1f);
projectileBase.motionY += (projectileBase.motionY * 1.0F * 0.1f);
projectileBase.motionZ += (projectileBase.motionZ * 1.0F * 0.1f);
}
}

@Override
public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) {
String speed = String.format(LOC_Extra + ".speed", getModifierIdentifier());
String damage = String.format(LOC_Extra + ".damage", getModifierIdentifier());
String inside = String.format(LOC_Extra + ".inside", getModifierIdentifier());
String outside = String.format(LOC_Extra + ".outside", getModifierIdentifier());

return ImmutableList.of(
Util.translateFormatted(speed , Util.df.format(bonus)),
Util.translateFormatted(damage, Util.df.format(bonus))
Util.translateFormatted(inside, Util.df.format(1.0F)),
Util.translateFormatted(outside, Util.df.format(2.0F))
);
}
}
10 changes: 5 additions & 5 deletions src/main/resources/assets/twilightforest/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -859,15 +859,15 @@ material.raven_feather.name=Raven Feather
material.regal.name=Regal

modifier.twilit.name=Twilit
modifier.twilit.desc=§oThe Twilight Forest's illuminating blessing.§r\nSpeedier in the Twilight Forest.\nMore damage outside the Twilight Forest.
modifier.twilit.extra.speed=Mining Speed in Twilight Forest: +%s
modifier.twilit.extra.damage=Damage outside the Twilight Forest: +%s
modifier.twilit.desc=§oThe Twilight Forest's illuminating blessing.§r\nStronger inside the Twilight Forest.\Weaker outside the Twilight Forest.
modifier.twilit.extra.inside=Mining Speed and Damage inside the Twilight Forest: +%s
modifier.twilit.extra.outside=Mining Speed and Damage outside the Twilight Forest: +%s
modifier.precipitate.name=Precipitate
modifier.precipitate.desc=§oThe last standing escape plan.§r\nThe less health you have, the speedier it is!
modifier.synergy.name=Synergy
modifier.synergy.desc=§oLook ma, no moss!§r\nWill repair itself if you have Steeleaves in your hotbar.
modifier.synergy.desc=§oLook ma, no moss!§r\nWill repair itself if you have any Steeleaf related item in your hotbar. It is quicker with a Steeleaf block.
modifier.stalwart.name=Stalwart
modifier.stalwart.desc=§oThe Brave and Bold.§r\nHitting an entity can make you feel emboldened.
modifier.stalwart.desc=§oThe Brave and Bold.§r\nHitting an entity can make you feel emboldened and grant you Resistance.
modifier.veiled.name=Veiled
modifier.veiled.desc=§oLike a Specter!§r\nProjectile will be invisible.

Expand Down

0 comments on commit 4af76ed

Please sign in to comment.