Added the frayed enchantment, and the ModEnchants class.
This commit is contained in:
parent
0caf589c0b
commit
5fa0b0decc
4 changed files with 50 additions and 2 deletions
|
@ -5,6 +5,9 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentTarget;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import me.shedaniel.autoconfig.AutoConfig;
|
||||
|
@ -15,6 +18,8 @@ import org.dimdev.dimdoors.block.door.DimensionalDoorBlockRegistrar;
|
|||
import org.dimdev.dimdoors.block.door.data.condition.Condition;
|
||||
import org.dimdev.dimdoors.block.entity.ModBlockEntityTypes;
|
||||
import org.dimdev.dimdoors.command.ModCommands;
|
||||
import org.dimdev.dimdoors.enchantment.FrayedEnchantment;
|
||||
import org.dimdev.dimdoors.enchantment.ModEnchants;
|
||||
import org.dimdev.dimdoors.entity.ModEntityTypes;
|
||||
import org.dimdev.dimdoors.criteria.ModCriteria;
|
||||
import org.dimdev.dimdoors.entity.stat.ModStats;
|
||||
|
@ -129,7 +134,7 @@ public class DimensionalDoorsInitializer implements ModInitializer {
|
|||
ModSoundEvents.init();
|
||||
ModParticleTypes.init();
|
||||
ModCriteria.init();
|
||||
|
||||
ModEnchants.init();
|
||||
dimensionalDoorItemRegistrar = new DimensionalDoorItemRegistrar(Registry.ITEM);
|
||||
dimensionalDoorBlockRegistrar = new DimensionalDoorBlockRegistrar(Registry.BLOCK, dimensionalDoorItemRegistrar);
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package org.dimdev.dimdoors.enchantment;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentTarget;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
|
||||
public class FrayedEnchantment extends Enchantment {
|
||||
public FrayedEnchantment(Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) {
|
||||
super(weight, type, slotTypes);
|
||||
}
|
||||
@Override
|
||||
public int getMinPower(int level) {
|
||||
return 10000;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.dimdev.dimdoors.enchantment;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentTarget;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import org.dimdev.matrix.Registrar;
|
||||
import org.dimdev.matrix.RegistryEntry;
|
||||
|
||||
public class ModEnchants {
|
||||
public static Enchantment FRAYED_ENCHAMENT;
|
||||
public static void init() {
|
||||
FRAYED_ENCHAMENT = Registry.register(
|
||||
Registry.ENCHANTMENT,
|
||||
new Identifier("dimdoors", "frayed"),
|
||||
new FrayedEnchantment(Enchantment.Rarity.VERY_RARE, EnchantmentTarget.BREAKABLE, new EquipmentSlot[] {EquipmentSlot.MAINHAND, EquipmentSlot.CHEST, EquipmentSlot.FEET, EquipmentSlot.HEAD, EquipmentSlot.LEGS})
|
||||
);
|
||||
}
|
||||
}
|
|
@ -410,5 +410,7 @@
|
|||
"resourcePackActivationType.alwaysEnabled": "Always Enabled",
|
||||
|
||||
"dimdoors.mode.enable": "Enable",
|
||||
"dimdoors.mode.disable": "Disable"
|
||||
"dimdoors.mode.disable": "Disable",
|
||||
|
||||
"enchantment.dimdoors.frayed" : "Frayed"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue