Skip to content

Commit

Permalink
移除glowenchant
Browse files Browse the repository at this point in the history
  • Loading branch information
shixinzia committed Mar 25, 2024
1 parent 4f03e6b commit 9b0559a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 107 deletions.
80 changes: 0 additions & 80 deletions src/main/java/dev/j3fftw/litexpansion/GlowEnchant.java

This file was deleted.

11 changes: 1 addition & 10 deletions src/main/java/dev/j3fftw/litexpansion/Items.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import dev.j3fftw.litexpansion.machine.Recycler;
import dev.j3fftw.litexpansion.machine.RubberSynthesizer;
import dev.j3fftw.litexpansion.machine.generators.AdvancedSolarPanel;
import dev.j3fftw.litexpansion.utils.Constants;
import dev.j3fftw.litexpansion.weapons.NanoBlade;
import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
Expand Down Expand Up @@ -555,7 +554,6 @@ public final class Items {
"&7转换机"
);

private static final Enchantment glowEnchant = Enchantment.getByKey(Constants.GLOW_ENCHANT);

static {
ADVANCED_SOLAR_HELMET.addEnchantment(Enchantment.DURABILITY, 1);
Expand All @@ -564,14 +562,7 @@ public final class Items {
ADVANCEDLX_SOLAR_HELMET.addUnsafeEnchantment(Enchantment.DURABILITY, 4);
HYBRID_SOLAR_HELMET.addUnsafeEnchantment(Enchantment.DURABILITY, 5);
ULTIMATE_SOLAR_HELMET.addUnsafeEnchantment(Enchantment.DURABILITY, 6);
ADVANCED_CIRCUIT.addEnchantment(glowEnchant, 1);
GLASS_CUTTER.addEnchantment(glowEnchant, 1);

DIAMOND_DRILL.addEnchantment(glowEnchant, 1);
LAPOTRON_CRYSTAL.addEnchantment(glowEnchant, 1);
ADVANCEDLX_SOLAR_HELMET.addEnchantment(glowEnchant, 1);
HYBRID_SOLAR_HELMET.addEnchantment(glowEnchant, 1);
ULTIMATE_SOLAR_HELMET.addEnchantment(glowEnchant, 1);

}

private Items() {}
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/dev/j3fftw/litexpansion/LiteXpansion.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public void onEnable() {
GuizhanUpdater.start(this, getFile(), "SlimefunGuguProject", "LiteXpansion", "master");
}

registerEnchantments();

if (getConfig().getBoolean("options.nerf-other-addons", true)) {
getServer().getScheduler().runTask(this, this::nerfCrap);
Expand All @@ -72,22 +71,6 @@ public void onDisable() {
setInstance(null);
}

private void registerEnchantments() {
if (!Enchantment.isAcceptingRegistrations()) {
Reflections.setStaticField(Enchantment.class, "acceptingNew", true);
}

Enchantment glowEnchantment = new GlowEnchant(Constants.GLOW_ENCHANT, new String[] {
"ADVANCED_CIRCUIT", "NANO_BLADE", "GLASS_CUTTER", "LAPOTRON_CRYSTAL",
"ADVANCEDLX_SOLAR_HELMET", "HYBRID_SOLAR_HELMET", "ULTIMATE_SOLAR_HELMET",
"DIAMOND_DRILL"
});

// Prevent double-registration errors
if (Enchantment.getByKey(glowEnchantment.getKey()) == null) {
Enchantment.registerEnchantment(glowEnchantment);
}
}

private void nerfCrap() {
getLogger().log(Level.WARNING, "###########################################");
Expand Down

0 comments on commit 9b0559a

Please sign in to comment.