Continue migration

This commit is contained in:
Aleksey 2021-04-12 16:34:13 +03:00
parent 47ed597358
commit 33dbfbe633
263 changed files with 1450 additions and 1486 deletions

View file

@ -1,10 +1,10 @@
package ru.betterend.effects;
import net.minecraft.world.entity.effect.StatusEffect;
import net.minecraft.world.entity.effect.StatusEffectInstance;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.item.Items;
import net.minecraft.potion.Potion;
import net.minecraft.potion.Potions;
import net.minecraft.world.item.alchemy.Potion;
import net.minecraft.world.item.alchemy.Potions;
import net.minecraft.core.Registry;
import ru.betterend.BetterEnd;
import ru.betterend.mixin.common.BrewingAccessor;
@ -12,12 +12,12 @@ import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndItems;
public class EndPotions {
public final static Potion END_VEIL = registerPotion("end_veil", EndStatusEffects.END_VEIL, 3600);
public final static Potion LONG_END_VEIL = registerPotion("long_end_veil", EndStatusEffects.END_VEIL, 9600);
public final static Potion END_VEIL = registerPotion("end_veil", EndMobEffects.END_VEIL, 3600);
public final static Potion LONG_END_VEIL = registerPotion("long_end_veil", EndMobEffects.END_VEIL, 9600);
public static Potion registerPotion(String name, StatusEffect effect, int duration) {
public static Potion registerPotion(String name, MobEffect effect, int duration) {
return registerPotion(name,
new Potion(name, new StatusEffectInstance[] { new StatusEffectInstance(effect, duration) }));
new Potion(name, new MobEffectInstance(effect, duration)));
}
public static Potion registerPotion(String name, Potion potion) {

View file

@ -1,15 +1,15 @@
package ru.betterend.effects;
import net.minecraft.world.entity.effect.StatusEffect;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.core.Registry;
import ru.betterend.BetterEnd;
import ru.betterend.effects.status.EndVeilEffect;
public class EndStatusEffects {
public class EndMobEffects {
public final static StatusEffect END_VEIL = registerEffect("end_veil", new EndVeilEffect());
public final static MobEffect END_VEIL = registerEffect("end_veil", new EndVeilEffect());
public static <E extends StatusEffect> StatusEffect registerEffect(String name, E effect) {
public static <E extends MobEffect> MobEffect registerEffect(String name, E effect) {
return Registry.register(Registry.STATUS_EFFECT, BetterEnd.makeID(name), effect);
}
}

View file

@ -1,12 +1,12 @@
package ru.betterend.effects.status;
import net.minecraft.world.entity.effect.StatusEffect;
import net.minecraft.world.entity.effect.StatusEffectType;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectType;
public class EndVeilEffect extends StatusEffect {
public class EndVeilEffect extends MobEffect {
public EndVeilEffect() {
super(StatusEffectType.BENEFICIAL, 0x0D554A);
super(MobEffectType.BENEFICIAL, 0x0D554A);
}
@Override