Continue mapping migration

This commit is contained in:
Aleksey 2021-04-12 21:38:22 +03:00
parent 99ade39404
commit f03fd03bd0
499 changed files with 12567 additions and 12723 deletions

View file

@ -1,17 +1,16 @@
package ru.betterend.effects;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.core.Registry;
import net.minecraft.world.item.enchantment.Enchantment;
import ru.betterend.BetterEnd;
import ru.betterend.effects.enchantment.EndVeilEnchantment;
public class EndEnchantments {
public final static Enchantment END_VEIL = registerEnchantment("end_veil", new EndVeilEnchantment());
public static Enchantment registerEnchantment(String name, Enchantment enchantment) {
return Registry.register(Registry.ENCHANTMENT, BetterEnd.makeID(name), enchantment);
}
public static void register() {
}
public static void register() {}
}

View file

@ -1,29 +1,28 @@
package ru.betterend.effects;
import net.minecraft.core.Registry;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.item.Items;
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;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndItems;
public class EndPotions {
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 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 static Potion registerPotion(String name, MobEffect effect, int duration) {
return registerPotion(name,
new Potion(name, new MobEffectInstance(effect, duration)));
return registerPotion(name, new Potion(name, new MobEffectInstance[]{ new MobEffectInstance(effect, duration) }));
}
public static Potion registerPotion(String name, Potion potion) {
return Registry.register(Registry.POTION, BetterEnd.makeID(name), potion);
}
public static void register() {
BrewingAccessor.callRegisterPotionRecipe(Potions.AWKWARD, EndItems.ENDER_DUST, END_VEIL);
BrewingAccessor.callRegisterPotionRecipe(END_VEIL, Items.REDSTONE, LONG_END_VEIL);

View file

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

View file

@ -1,17 +1,17 @@
package ru.betterend.effects.enchantment;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentTarget;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
public class EndVeilEnchantment extends Enchantment {
public EndVeilEnchantment() {
super(Enchantment.Rarity.VERY_RARE, EnchantmentTarget.ARMOR_HEAD, new EquipmentSlot[] { EquipmentSlot.HEAD });
super(Enchantment.Rarity.VERY_RARE, EnchantmentCategory.ARMOR_HEAD, new EquipmentSlot[] { EquipmentSlot.HEAD });
}
@Override
public boolean isAvailableForRandomSelection() {
public boolean isDiscoverable() {
return false;
}
}

View file

@ -1,16 +1,16 @@
package ru.betterend.effects.status;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectType;
import net.minecraft.world.effect.MobEffectCategory;
public class EndVeilEffect extends MobEffect {
public EndVeilEffect() {
super(MobEffectType.BENEFICIAL, 0x0D554A);
super(MobEffectCategory.BENEFICIAL, 0x0D554A);
}
@Override
public boolean canApplyUpdateEffect(int duration, int amplifier) {
public boolean isDurationEffectTick(int duration, int amplifier) {
return false;
}
}