-
-
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
16 changed files
with
59 additions
and
54 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
elements/IronKatanaturuwoShoudeChituteiruJiannoteituku.mod.json
Large diffs are not rendered by default.
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
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
Large diffs are not rendered by default.
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
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
15 changes: 4 additions & 11 deletions
15
...main/java/minecraftarmorweapon/procedures/NannkasouNightVisionEffectExpiresProcedure.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,23 +1,16 @@ | ||
package minecraftarmorweapon.procedures; | ||
|
||
import net.minecraft.world.level.LevelAccessor; | ||
import net.minecraft.world.entity.LivingEntity; | ||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.effect.MobEffects; | ||
import net.minecraft.world.effect.MobEffectInstance; | ||
|
||
import minecraftarmorweapon.MinecraftArmorWeaponMod; | ||
|
||
public class NannkasouNightVisionEffectExpiresProcedure { | ||
public static void execute(LevelAccessor world, Entity entity) { | ||
public static void execute(Entity entity) { | ||
if (entity == null) | ||
return; | ||
if (entity instanceof LivingEntity _entity) | ||
_entity.removeEffect(MobEffects.NIGHT_VISION); | ||
MinecraftArmorWeaponMod.queueServerWork(2, () -> { | ||
if (entity instanceof LivingEntity _entity && !_entity.level.isClientSide()) | ||
_entity.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, (int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_tick"), | ||
(int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_lavel"), false, false)); | ||
}); | ||
if (entity instanceof LivingEntity _entity && !_entity.level.isClientSide()) | ||
_entity.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, (int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_tick"), | ||
(int) entity.getPersistentData().getDouble("minecraft_armor_weapon_sword_night_vision_lavel"))); | ||
} | ||
} |
Oops, something went wrong.