Start migration

This commit is contained in:
Aleksey 2021-04-08 21:55:07 +03:00
parent 6630ce0cab
commit 47ed597358
491 changed files with 12045 additions and 11953 deletions

View file

@ -1,16 +1,17 @@
package ru.betterend.effects;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.core.Registry;
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,11 +1,11 @@
package ru.betterend.effects;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.item.Items;
import net.minecraft.world.entity.effect.StatusEffect;
import net.minecraft.world.entity.effect.StatusEffectInstance;
import net.minecraft.world.item.Items;
import net.minecraft.potion.Potion;
import net.minecraft.potion.Potions;
import net.minecraft.util.registry.Registry;
import net.minecraft.core.Registry;
import ru.betterend.BetterEnd;
import ru.betterend.mixin.common.BrewingAccessor;
import ru.betterend.registry.EndBlocks;
@ -14,15 +14,16 @@ 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 static Potion registerPotion(String name, StatusEffect effect, int duration) {
return registerPotion(name, new Potion(name, new StatusEffectInstance[]{ new StatusEffectInstance(effect, duration) }));
return registerPotion(name,
new Potion(name, new StatusEffectInstance[] { new StatusEffectInstance(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,14 +1,14 @@
package ru.betterend.effects;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.entity.effect.StatusEffect;
import net.minecraft.core.Registry;
import ru.betterend.BetterEnd;
import ru.betterend.effects.status.EndVeilEffect;
public class EndStatusEffects {
public final static StatusEffect END_VEIL = registerEffect("end_veil", new EndVeilEffect());
public static <E extends StatusEffect> StatusEffect registerEffect(String name, E effect) {
return Registry.register(Registry.STATUS_EFFECT, BetterEnd.makeID(name), effect);
}

View file

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

View file

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