Skip to content

Commit

Permalink
remove reflection from kudatech and access public field directly (GTN…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexdoru authored Sep 13, 2024
1 parent fc5c272 commit 82793ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 211 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ dependencies {
// https://www.curseforge.com/minecraft/mc-mods/advancedsolarpanels
compileOnlyApi rfg.deobf('curse.maven:advsolar-362768:2885953')
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.25-GTNH:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:BloodMagic:1.6.5:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:BloodMagic:1.6.6:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:BetterLoadingScreen:1.7.0-GTNH:dev") { transitive = false }
compileOnly rfg.deobf("curse.maven:biomes-o-plenty-220318:2499612")
Expand Down
205 changes: 0 additions & 205 deletions src/main/java/kubatech/api/helpers/ReflectionHelper.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import kubatech.Tags;
import kubatech.api.helpers.ReflectionHelper;
import kubatech.api.implementations.KubaTechGTMultiBlockBase;
import kubatech.api.tileentity.CustomTileEntityPacketHandler;
import kubatech.api.utils.ModUtils;
Expand Down Expand Up @@ -433,8 +432,7 @@ public void onRitualPerform(RitualRunEvent event) {
if (this.mMaxProgresstime == 0) return;
if (event.mrs.equals(masterStoneRitual) && event.ritualKey.equals(WellOfSufferingRitualName)) {
Rituals ritual = Rituals.ritualMap.get(WellOfSufferingRitualName);
if (ritual != null && ritual.effect instanceof RitualEffectWellOfSuffering) {
RitualEffectWellOfSuffering effect = (RitualEffectWellOfSuffering) ritual.effect;
if (ritual != null && ritual.effect instanceof RitualEffectWellOfSuffering effect) {
event.setCanceled(true); // we will handle that
String owner = event.mrs.getOwner();
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
Expand Down Expand Up @@ -463,12 +461,12 @@ public void onRitualPerform(RitualRunEvent event) {
* (effect.canDrainReagent(
event.mrs,
ReagentRegistry.offensaReagent,
ReflectionHelper.getField(effect, "offensaDrain", 3),
RitualEffectWellOfSuffering.offensaDrain,
true) ? 2 : 1)
* (effect.canDrainReagent(
event.mrs,
ReagentRegistry.tenebraeReagent,
ReflectionHelper.getField(effect, "tennebraeDrain", 5),
RitualEffectWellOfSuffering.tennebraeDrain,
true) ? 2 : 1),
true);

Expand Down

0 comments on commit 82793ac

Please sign in to comment.