file dir edit

This commit is contained in:
RyanTLG
2022-03-17 18:59:32 +02:00
parent 8a0f393cc0
commit 3b84706602
59 changed files with 152 additions and 143 deletions

View File

@@ -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);
}
}
}

View File

@@ -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");
}
}