Skip to content

Commit

Permalink
Add PlusTiC katana damage cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
jchung01 committed Dec 22, 2023
1 parent f50f67e commit 413f0e4
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ dependencies {
compileOnly 'curse.maven:mrtjpcore-229002:2735197'
compileOnly 'curse.maven:netherchest-268888:2655413'
compileOnly 'curse.maven:netherrocks-226140:2628297'
compileOnly 'curse.maven:plustic-376903:4703532'
compileOnly 'curse.maven:projectredbase-228702:2745545'
compileOnly 'curse.maven:projectredworld-229049:2745551'
compileOnly 'curse.maven:quark-243121:2924091'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public class UniversalTweaks
+ "after:netherchest;"
+ "after:netherrocks;"
+ "after:nuclearcraft;"
+ "after:plustic;"
+ "after:projectred-exploration;"
+ "after:quark;"
+ "after:roost;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,14 @@ public static class ToolCustomizationCategory
})
public float utTConToolRapierDamageCutoff = 13.0f;

@Config.Name("PlusTiC: Katana Attack Damage Cutoff")
@Config.Comment
({
"Sets the attack damage cutoff at which diminishing returns start for the PlusTiC katana",
"Default value: 22.0"
})
public float utTConToolKatanaDamageCutoff = 22.0f;

@Config.Name("Attack Damage Decay Rate")
@Config.Comment
({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public List<String> getMixinConfigs()
"mixins.mods.storagedrawers.client.json",
"mixins.mods.tconstruct.json",
"mixins.mods.tconstruct.toolcustomization.json",
"mixins.mods.tconstruct.toolcustomization.plustic.json",
"mixins.mods.tconstruct.oredictcache.json",
"mixins.mods.techreborn.json",
"mixins.mods.thaumcraft.dupes.json",
Expand Down Expand Up @@ -192,6 +193,8 @@ public boolean shouldMixinConfigQueue(String mixinConfig)
return Loader.isModLoaded("tconstruct");
case "mixins.mods.tconstruct.toolcustomization.json":
return Loader.isModLoaded("tconstruct") && UTConfigMods.TINKERS_CONSTRUCT.utTConToolCustomizationToggle;
case "mixins.mods.tconstruct.toolcustomization.plustic.json":
return Loader.isModLoaded("tconstruct") && Loader.isModLoaded("plustic") && UTConfigMods.TINKERS_CONSTRUCT.utTConToolCustomizationToggle;
case "mixins.mods.tconstruct.oredictcache.json":
return Loader.isModLoaded("tconstruct") && UTConfigMods.TINKERS_CONSTRUCT.utTConOreDictCacheToggle;
case "mixins.mods.tinyprogressions.dupes.json":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import slimeknights.tconstruct.tools.melee.item.Cleaver;

// Courtesy of jchung01
@Mixin(value = Cleaver.class, remap = false)
public class UTCleaverMixin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import slimeknights.tconstruct.tools.melee.item.LongSword;

// Courtesy of jchung01
@Mixin(value = LongSword.class, remap = false)
public class UTLongswordMixin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import slimeknights.tconstruct.tools.melee.item.Rapier;

// Courtesy of jchung01
@Mixin(value = Rapier.class, remap = false)
public class UTRapierMixin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import slimeknights.tconstruct.library.tools.ToolCore;

// Courtesy of jchung01
@Mixin(value = ToolCore.class, remap = false)
public class UTToolCoreMixin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import slimeknights.tconstruct.library.utils.ToolHelper;

// Courtesy of jchung01
@Mixin(value = ToolHelper.class, remap = false)
public class UTToolHelperMixin
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package mod.acgaming.universaltweaks.mods.tconstruct.toolcustomization.plustic.mixin;

import landmaster.plustic.tools.ToolKatana;
import mod.acgaming.universaltweaks.config.UTConfigMods;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

// Courtesy of jchung01
@Mixin(value = ToolKatana.class, remap = false)
public class UTToolKatanaMixin
{
@Inject(method = "damageCutoff", at = @At(value = "RETURN"), cancellable = true)
private void utModifyDamageCutoff(CallbackInfoReturnable<Float> cir)
{
cir.setReturnValue(UTConfigMods.TINKERS_CONSTRUCT.TOOL_CUSTOMIZATION.utTConToolKatanaDamageCutoff);
}
}
1 change: 1 addition & 0 deletions src/main/resources/assets/universaltweaks/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ cfg.universaltweaks.modintegration.tc.foci.focusmediums=Focus Mediums
cfg.universaltweaks.modintegration.tc.foci=Thaumcraft: Foci
cfg.universaltweaks.modintegration.tc=Thaumcraft
cfg.universaltweaks.modintegration.tcon=Tinkers' Construct
cfg.universaltweaks.modintegration.tcon.toolcustomization=Tool Customization
cfg.universaltweaks.modintegration.te=Thermal Expansion
cfg.universaltweaks.modintegration.thaumicwonders=Thaumic Wonders
cfg.universaltweaks.modintegration.thefarlanders=The Farlanders
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"package": "mod.acgaming.universaltweaks.mods.tconstruct.toolcustomization.plustic.mixin",
"refmap": "universaltweaks.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"mixins": ["UTToolKatanaMixin"]
}

0 comments on commit 413f0e4

Please sign in to comment.