repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

intra-demispace tp discounts

+42
+1
project/hexic/build.gradle.kts
··· 235 235 depends("trinkets", "^3.7.2") 236 236 depends("phlib", ">=0.1.2 <0.2.0") 237 237 conflicts("valkyrienskies", "*") // need to figure out how to create dimensions without causing a crash 238 + breaks("java", ">=26") 238 239 239 240 entrypoint("org.eu.net.pool.hexic.main\$package::init") 240 241 entrypoint("org.eu.net.pool.hexic.client\$package::init", Environment.Client)
+2
project/hexic/src/main/resources/hexic.mixins.json
··· 21 21 "LivingEntityMixin", 22 22 "MediafiedItemManagerIndexMixin", 23 23 "OpDimTeleport$SpellMixin", 24 + "OpDimTeleportMixin", 24 25 "OpEdifySaplingMixin", 25 26 "OpEdifySaplingMixin$Spell", 26 27 "OpObservePropertyMixin", ··· 30 31 "PacketByteBufMixin", 31 32 "PlayerInventoryMixin", 32 33 "SimpleRegistryMixin", 34 + "SpellAction$ResultAccessor", 33 35 "StaffCastEnvMixin", 34 36 "WorldMixin" 35 37 ],
+27
project/hexic/src/main/scala/org/eu/net/pool/hexic/mixin/OpDimTeleportMixin.java
··· 1 + package org.eu.net.pool.hexic.mixin; 2 + 3 + import at.petrak.hexcasting.api.casting.castables.SpellAction; 4 + import at.petrak.hexcasting.api.misc.MediaConstants; 5 + import com.llamalad7.mixinextras.injector.ModifyReturnValue; 6 + import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; 7 + import com.llamalad7.mixinextras.sugar.Local; 8 + import net.beholderface.oneironaut.casting.patterns.spells.great.OpDimTeleport; 9 + import net.minecraft.server.world.ServerWorld; 10 + import net.minecraft.util.Identifier; 11 + import org.spongepowered.asm.mixin.Mixin; 12 + import org.spongepowered.asm.mixin.injection.At; 13 + import org.spongepowered.asm.mixin.injection.ModifyArg; 14 + 15 + @Mixin(OpDimTeleport.class) 16 + public class OpDimTeleportMixin { 17 + @ModifyReturnValue(at = @At("RETURN"), method = "execute") 18 + SpellAction.Result modifyCost(SpellAction.Result result, @Local(name = "origin") ServerWorld origin, @Local(name = "destination") ServerWorld destination) { 19 + Identifier sourceID = origin.getRegistryKey().getValue(); 20 + boolean fromDemiplane = sourceID.getNamespace().equals("hexic") && sourceID.getPath().startsWith("fresh-"); 21 + Identifier targetID = destination.getRegistryKey().getValue(); 22 + boolean toDemiplane = targetID.getNamespace().equals("hexic") && targetID.getPath().startsWith("fresh-"); 23 + if (fromDemiplane && toDemiplane) ((SpellAction$ResultAccessor) (Object) result).setCost(0); 24 + else if (fromDemiplane || toDemiplane) ((SpellAction$ResultAccessor) (Object) result).setCost(5 * MediaConstants.SHARD_UNIT); 25 + return result; 26 + } 27 + }
+12
project/hexic/src/main/scala/org/eu/net/pool/hexic/mixin/SpellAction$ResultAccessor.java
··· 1 + package org.eu.net.pool.hexic.mixin; 2 + 3 + import at.petrak.hexcasting.api.casting.castables.SpellAction; 4 + import org.spongepowered.asm.mixin.Mixin; 5 + import org.spongepowered.asm.mixin.Mutable; 6 + import org.spongepowered.asm.mixin.Shadow; 7 + import org.spongepowered.asm.mixin.gen.Accessor; 8 + 9 + @Mixin(SpellAction.Result.class) 10 + public interface SpellAction$ResultAccessor { 11 + @Accessor @Mutable void setCost(long cost); 12 + }