forked from IzzelAliz/Arclight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
41 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
...ava/io/izzel/arclight/neoforge/mixin/core/world/effect/PoisonMobEffectMixin_NeoForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
package io.izzel.arclight.neoforge.mixin.core.world.effect; | ||
|
||
import io.izzel.arclight.common.bridge.core.util.DamageSourceBridge; | ||
import io.izzel.arclight.common.bridge.core.util.DamageSourcesBridge; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.world.damagesource.DamageSource; | ||
import net.minecraft.world.damagesource.DamageSources; | ||
import net.minecraft.world.damagesource.DamageType; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
import org.spongepowered.asm.mixin.injection.ModifyArg; | ||
|
||
@Mixin(targets = "net.minecraft.world.effect.PoisonMobEffect") | ||
public class PoisonMobEffectMixin_NeoForge { | ||
|
||
@Redirect(method = "applyEffectTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/damagesource/DamageSources;source(Lnet/minecraft/resources/ResourceKey;)Lnet/minecraft/world/damagesource/DamageSource;")) | ||
private DamageSource arclight$redirectPoison(DamageSources instance, ResourceKey<DamageType> source) { | ||
return ((DamageSourceBridge) instance.source(source)).bridge$poison(); | ||
@ModifyArg(method = "applyEffectTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;hurt(Lnet/minecraft/world/damagesource/DamageSource;F)Z")) | ||
private DamageSource arclight$redirectPoison(DamageSource source) { | ||
return ((DamageSourceBridge) source).bridge$poison(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters