-
Notifications
You must be signed in to change notification settings - Fork 4
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
nvb-uy
committed
Aug 29, 2023
1 parent
9662934
commit 554bc9c
Showing
6 changed files
with
34 additions
and
25 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/main/java/elocindev/shield_overhaul/mixin/LivingEntityMixin.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package elocindev.shield_overhaul.mixin; | ||
|
||
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; | ||
|
||
import elocindev.shield_overhaul.registry.EffectRegistry; | ||
import net.minecraft.entity.LivingEntity; | ||
|
||
@Mixin(LivingEntity.class) | ||
public class LivingEntityMixin { | ||
|
||
@Inject(method = "isImmobile", at = @At(value = "HEAD"), cancellable = true) | ||
private void isStunned(CallbackInfoReturnable<Boolean> cir) { | ||
LivingEntity entity = (LivingEntity)(Object)this; | ||
if(entity.hasStatusEffect(EffectRegistry.STUN_EFFECT)) { | ||
cir.setReturnValue(true);; | ||
} | ||
} | ||
} |
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
23 changes: 0 additions & 23 deletions
23
src/main/java/elocindev/shield_overhaul/mixin/ServerPlayerMixin.java
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"effect.shield_overhaul.stun":"Stun", | ||
"effect.shield_overhaul.stun.description":"Target is unable to move, use items or attack.", | ||
"effect.shield_overhaul.stun_immunity":"Stun Immunity", | ||
"effect.shield_overhaul.stun_immunity.description":"Target is immune to getting stunned." | ||
} |
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