file dir edit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package net.arcmods.ryantlg.statusEffects.effectClasses;
|
||||
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
||||
public class highStatusEffect extends StatusEffect{
|
||||
public highStatusEffect() {
|
||||
super(
|
||||
StatusEffectCategory.BENEFICIAL,
|
||||
0x3dad51
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyUpdateEffect(int duration, int amplifier) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
|
||||
if (entity instanceof PlayerEntity) {
|
||||
((PlayerEntity) entity).addExperience(0 << amplifier);
|
||||
((PlayerEntity) entity).getFallSounds();
|
||||
((PlayerEntity) entity).disableShield(true);
|
||||
((PlayerEntity) entity).dismountVehicle();
|
||||
((PlayerEntity) entity).damage(DamageSource.FALL, (float) 0.01);
|
||||
((PlayerEntity) entity).heal(3 << amplifier);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package net.arcmods.ryantlg.statusEffects;
|
||||
|
||||
import net.arcmods.ryantlg.gamermod;
|
||||
import net.arcmods.ryantlg.statusEffects.effectClasses.highStatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class statusEffects {
|
||||
|
||||
public static final StatusEffect HIGH = new highStatusEffect();
|
||||
|
||||
public static void register() {
|
||||
Registry.register(Registry.STATUS_EFFECT, new Identifier("gamermod", "high"), HIGH);
|
||||
|
||||
gamermod.LOGGER.info("statusEffects Loaded");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user