Code style changes, entities fixes

This commit is contained in:
paulevsGitch 2021-07-08 00:21:47 +03:00
parent 9d604b2d25
commit 44962e18b6
377 changed files with 5038 additions and 4914 deletions

View file

@ -7,10 +7,11 @@ 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

@ -14,15 +14,15 @@ 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, MobEffect effect, int duration) {
return registerPotion(name, new Potion(name, 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() {
PotionBrewingAccessor.callAddMix(Potions.AWKWARD, EndItems.ENDER_DUST, END_VEIL);
PotionBrewingAccessor.callAddMix(END_VEIL, Items.REDSTONE, LONG_END_VEIL);

View file

@ -7,9 +7,9 @@ import net.minecraft.world.item.enchantment.EnchantmentCategory;
public class EndVeilEnchantment extends Enchantment {
public EndVeilEnchantment() {
super(Enchantment.Rarity.VERY_RARE, EnchantmentCategory.ARMOR_HEAD, new EquipmentSlot[] { EquipmentSlot.HEAD });
super(Enchantment.Rarity.VERY_RARE, EnchantmentCategory.ARMOR_HEAD, new EquipmentSlot[]{EquipmentSlot.HEAD});
}
@Override
public boolean isDiscoverable() {
return false;

View file

@ -8,7 +8,7 @@ public class EndVeilEffect extends MobEffect {
public EndVeilEffect() {
super(MobEffectCategory.BENEFICIAL, 0x0D554A);
}
@Override
public boolean isDurationEffectTick(int duration, int amplifier) {
return false;