mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Dropped support for 1.16.5
This commit is contained in:
parent
72b334d5f7
commit
dc9db7faad
@ -1,6 +0,0 @@
|
||||
group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT'
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package com.willfp.ecoenchants.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.support.vanilla.VanillaEnchantmentMetadata;
|
||||
import com.willfp.ecoenchants.enchantments.support.vanilla.VanillaEnchantments;
|
||||
import com.willfp.ecoenchants.proxy.proxies.EcoCraftEnchantmentManagerProxy;
|
||||
import com.willfp.ecoenchants.proxy.v1_16_R3.enchants.EcoCraftEnchantment;
|
||||
import net.minecraft.server.v1_16_R3.Enchantment;
|
||||
import net.minecraft.server.v1_16_R3.IRegistry;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.util.CraftNamespacedKey;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public final class EcoCraftEnchantmentManager implements EcoCraftEnchantmentManagerProxy {
|
||||
@Override
|
||||
public void registerNewCraftEnchantments() {
|
||||
Map<org.bukkit.enchantments.Enchantment, VanillaEnchantmentMetadata> metadataMap = VanillaEnchantments.getMetadataMap();
|
||||
|
||||
for (Enchantment enchantment : IRegistry.ENCHANTMENT) {
|
||||
NamespacedKey key = CraftNamespacedKey.fromMinecraft(IRegistry.ENCHANTMENT.getKey(enchantment));
|
||||
VanillaEnchantmentMetadata metadata = metadataMap.get(org.bukkit.enchantments.Enchantment.getByKey(key));
|
||||
new EcoCraftEnchantment(enchantment, metadata).register();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.willfp.ecoenchants.proxy.v1_16_R3;
|
||||
|
||||
import com.willfp.ecoenchants.proxy.proxies.OpenInventoryProxy;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class OpenInventory implements OpenInventoryProxy {
|
||||
@Override
|
||||
public Object getOpenInventory(@NotNull final Player player) {
|
||||
return ((CraftPlayer) player).getHandle().activeContainer;
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.willfp.ecoenchants.proxy.v1_16_R3.enchants;
|
||||
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.support.vanilla.VanillaEnchantmentMetadata;
|
||||
import com.willfp.ecoenchants.enchantments.util.EnchantmentUtils;
|
||||
import net.minecraft.server.v1_16_R3.Enchantment;
|
||||
import org.bukkit.craftbukkit.v1_16_R3.enchantments.CraftEnchantment;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class EcoCraftEnchantment extends CraftEnchantment {
|
||||
private final VanillaEnchantmentMetadata metadata;
|
||||
|
||||
public EcoCraftEnchantment(@NotNull final Enchantment target,
|
||||
@NotNull final VanillaEnchantmentMetadata metadata) {
|
||||
super(target);
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return metadata.maxLevel() == null ? this.getHandle().getMaxLevel() : metadata.maxLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) {
|
||||
if (other instanceof EcoEnchant) {
|
||||
return other.conflictsWith(this);
|
||||
}
|
||||
|
||||
return metadata.conflicts() == null ? super.conflictsWith(other) : metadata.conflicts().contains(other.getKey());
|
||||
}
|
||||
|
||||
public void register() {
|
||||
EnchantmentUtils.register(this);
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.artifact;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Artifact;
|
||||
import org.bukkit.Particle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -8,8 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class CopperArtifact extends Artifact {
|
||||
public CopperArtifact() {
|
||||
super(
|
||||
"copper_artifact",
|
||||
Prerequisite.HAS_1_17
|
||||
"copper_artifact"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.artifact;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Artifact;
|
||||
import org.bukkit.Particle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -8,8 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class GlowArtifact extends Artifact {
|
||||
public GlowArtifact() {
|
||||
super(
|
||||
"glow_artifact",
|
||||
Prerequisite.HAS_1_17
|
||||
"glow_artifact"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.artifact;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Artifact;
|
||||
import org.bukkit.Particle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -8,8 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class SparkArtifact extends Artifact {
|
||||
public SparkArtifact() {
|
||||
super(
|
||||
"spark_artifact",
|
||||
Prerequisite.HAS_1_17
|
||||
"spark_artifact"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.artifact;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Artifact;
|
||||
import org.bukkit.Particle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -8,8 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class SporeArtifact extends Artifact {
|
||||
public SporeArtifact() {
|
||||
super(
|
||||
"spore_artifact",
|
||||
Prerequisite.HAS_1_17
|
||||
"spore_artifact"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.artifact;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.itemtypes.Artifact;
|
||||
import org.bukkit.Particle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -8,8 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class WaxArtifact extends Artifact {
|
||||
public WaxArtifact() {
|
||||
super(
|
||||
"wax_artifact",
|
||||
Prerequisite.HAS_1_17
|
||||
"wax_artifact"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.eco.core.drops.DropQueue;
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.eco.core.tuples.Pair;
|
||||
@ -52,9 +51,7 @@ public class InfernalTouch extends EcoEnchant {
|
||||
RECIPES.put(furnaceRecipe.getInput().getType(), new Pair<>(furnaceRecipe.getResult().getType(), xp));
|
||||
}
|
||||
|
||||
if (Prerequisite.HAS_1_17.isMet()) {
|
||||
FORTUNE_MATERIALS.add(Material.COPPER_INGOT);
|
||||
}
|
||||
FORTUNE_MATERIALS.add(Material.COPPER_INGOT);
|
||||
}
|
||||
|
||||
public InfernalTouch() {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.Material;
|
||||
@ -32,12 +31,11 @@ public class Replenish extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Prerequisite.HAS_1_17.isMet()) {
|
||||
if (block.getType() == Material.GLOW_BERRIES) {
|
||||
return;
|
||||
}
|
||||
if (block.getType() == Material.GLOW_BERRIES) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (data.getAge() != data.getMaximumAge()) {
|
||||
event.setDropItems(false);
|
||||
event.setExpToDrop(0);
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: EcoEnchants
|
||||
version: ${projectVersion}
|
||||
main: com.willfp.ecoenchants.EcoEnchantsPlugin
|
||||
api-version: 1.16
|
||||
api-version: 1.17
|
||||
authors: [ Auxilor ]
|
||||
website: willfp.com
|
||||
load: STARTUP
|
||||
|
@ -2,5 +2,5 @@ group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT'
|
||||
compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
|
||||
}
|
@ -5,7 +5,7 @@ subprojects {
|
||||
dependencies {
|
||||
compileOnly project(":eco-core:core-plugin")
|
||||
compileOnly project(":eco-core:core-proxy")
|
||||
compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT'
|
||||
compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
|
||||
compileOnly 'com.willfp:libreforge:3.3.0'
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ rootProject.name = 'EcoEnchants'
|
||||
// Core
|
||||
include ':eco-core'
|
||||
include ':eco-core:core-nms'
|
||||
include ':eco-core:core-nms:v1_16_R3'
|
||||
include ':eco-core:core-nms:v1_17_R1'
|
||||
include ':eco-core:core-nms:v1_18_R1'
|
||||
include ':eco-core:core-proxy'
|
||||
|
Loading…
Reference in New Issue
Block a user