From deed8d37de8606ed6773580bbef371a55034802d Mon Sep 17 00:00:00 2001
From: RelativoBR <36118424+RelativoBR@users.noreply.github.com>
Date: Tue, 20 Feb 2024 18:17:08 -0300
Subject: [PATCH 1/6] fix: fix 1.20.3+ compatibility Update pom.xml
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7f6b014..14e980b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,7 +36,7 @@
org.spigotmc
spigot-api
- 1.19-R0.1-SNAPSHOT
+ 1.20.4-R0.1-SNAPSHOT
provided
@@ -71,14 +71,14 @@
net.guizhanss
GuizhanLib
- 0.9.0
+ 1.7.0
compile
- ${project.name} - RC 1
+ ${project.name}
clean package
${basedir}/src/main/java
From 2d810e929b7fad4bf99b6e3aa6ef1cdf104dffbd Mon Sep 17 00:00:00 2001
From: RelativoBR <36118424+RelativoBR@users.noreply.github.com>
Date: Tue, 20 Feb 2024 18:18:13 -0300
Subject: [PATCH 2/6] fix: fix 1.20.3+ compatibility Update
EnchantsAndEffectsUtil.java
---
.../relativobr/supreme/util/EnchantsAndEffectsUtil.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java b/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java
index 1336774..031f7a7 100644
--- a/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java
+++ b/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java
@@ -3,6 +3,7 @@
import com.github.relativobr.supreme.Supreme;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import org.bukkit.ChatColor;
+import org.bukkit.NamespacedKey;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentWrapper;
@@ -11,6 +12,7 @@
import org.bukkit.potion.PotionEffectType;
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import java.util.*;
import java.util.logging.Level;
@@ -120,7 +122,7 @@ private static Map getEnchants(@Nonnull ConfigurationSecti
Map enchants = new HashMap<>();
for (String path : section.getKeys(false)) {
- Enchantment e = new EnchantmentWrapper(path);
+ Enchantment e = Enchantment.getByKey(NamespacedKey.minecraft(path));
if (e != null) {
int level = section.getInt(path);
if (level > 0 && level <= 100) {
From 49ccf315f50a47330db9f6b8c77a7ae8753e28c9 Mon Sep 17 00:00:00 2001
From: RelativoBR
Date: Tue, 20 Feb 2024 20:32:15 -0300
Subject: [PATCH 3/6] fix: fix dependency translation plugin and remove
ItemConverter
---
README.md | 1 -
pom.xml | 9 +-
.../github/relativobr/supreme/Supreme.java | 9 -
.../supreme/SupremeLocalization.java | 2 +-
.../supreme/machine/ItemConverter.java | 184 ------------------
.../supreme/setup/SetupMachines.java | 10 +-
.../supreme/util/SupremeOptions.java | 2 -
src/main/resources/config.yml | 1 -
8 files changed, 6 insertions(+), 212 deletions(-)
delete mode 100644 src/main/java/com/github/relativobr/supreme/machine/ItemConverter.java
diff --git a/README.md b/README.md
index a6b684d..5293496 100644
--- a/README.md
+++ b/README.md
@@ -147,7 +147,6 @@ Make a new issue, pull request, or discord Slimefun-Addon-Community
- **enable-tools** - Indication whether to enable the tools (default: true)
- **enable-armor** - Indication whether to enable the armor (default: true)
- **enable-tech** - Indication whether to enable new machine and resource to clonnig item (default: true)
-- **enable-item-converter-machine** - Converter Item by ID, restore values of name and meta item converting to a new item (maintaining current enchantments and durability) (default: true)
- **supreme-enchant** - Indication Enchantment of the gear and tools
- **supreme-effects** - Indication Effects of the gear
- **power-section** - Customizable Capacity, Buffer and Energy of the capacitor and generator
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 14e980b..26d5a9a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,12 +67,11 @@
5.3.19
-
+
- net.guizhanss
- GuizhanLib
- 1.7.0
- compile
+ net.guizhanss
+ GuizhanLibPlugin
+ 1.7.0
diff --git a/src/main/java/com/github/relativobr/supreme/Supreme.java b/src/main/java/com/github/relativobr/supreme/Supreme.java
index e1ae8c7..e374c61 100644
--- a/src/main/java/com/github/relativobr/supreme/Supreme.java
+++ b/src/main/java/com/github/relativobr/supreme/Supreme.java
@@ -60,7 +60,6 @@ public static SupremeOptions getSupremeOptions() {
.enableTools(typeSection.getBoolean("enable-tools", true))
.enableArmor(typeSection.getBoolean("enable-armor", true))
.enableTech(typeSection.getBoolean("enable-tech", true))
- .enableItemConverter(typeSection.getBoolean("enable-item-converter-machine", true))
.customBc(typeSection.getBoolean("custom-bc", false))
.build();
}
@@ -161,14 +160,6 @@ && getDescription().getVersion()
Supreme.inst().log(Level.INFO, "Loaded language Supreme: " + getSupremeOptions().getLang());
getLocalization();
- // check Compatibily Legacy (SupremeExpansion)
- if (getSupremeOptions().isUseLegacySupremeexpansionItemId()) {
- Supreme.inst().log(Level.INFO, "Legacy SupremeExpansion IDs: enable");
- getLegacyItem();
- } else {
- Supreme.inst().log(Level.INFO, "Legacy SupremeExpansion IDs: disable");
- }
-
MainSetup.setup(this);
}
diff --git a/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java b/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java
index c3798bd..abeee4c 100644
--- a/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java
+++ b/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java
@@ -5,7 +5,7 @@
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import net.guizhanss.guizhanlib.localization.Localization;
-import net.guizhanss.guizhanlib.utils.ChatUtil;
+import net.guizhanss.guizhanlib.minecraft.utils.ChatUtil;
import net.guizhanss.guizhanlib.utils.StringUtil;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
diff --git a/src/main/java/com/github/relativobr/supreme/machine/ItemConverter.java b/src/main/java/com/github/relativobr/supreme/machine/ItemConverter.java
deleted file mode 100644
index 118d00d..0000000
--- a/src/main/java/com/github/relativobr/supreme/machine/ItemConverter.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package com.github.relativobr.supreme.machine;
-
-import static com.github.relativobr.supreme.util.CompatibilySupremeLegacy.getNewIdSupremeLegacy;
-import static com.github.relativobr.supreme.util.CompatibilySupremeLegacy.getOldIdSupremeLegacy;
-
-import com.github.relativobr.supreme.generic.machine.SimpleItemContainerMachine;
-import com.github.relativobr.supreme.util.SupremeItemStack;
-import com.github.relativobr.supreme.util.UtilEnergy;
-import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup;
-import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
-import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
-import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType;
-import io.github.thebusybiscuit.slimefun4.core.attributes.MachineTier;
-import io.github.thebusybiscuit.slimefun4.core.attributes.MachineType;
-import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
-import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
-import io.github.thebusybiscuit.slimefun4.utils.LoreBuilder;
-import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import javax.annotation.Nonnull;
-import me.mrCookieSlime.Slimefun.api.BlockStorage;
-import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
-import org.bukkit.Material;
-import org.bukkit.block.Block;
-import org.bukkit.inventory.ItemStack;
-import org.bukkit.inventory.meta.Damageable;
-import org.bukkit.inventory.meta.ItemMeta;
-import org.bukkit.inventory.meta.Repairable;
-
-public class ItemConverter extends SimpleItemContainerMachine {
-
- public static final SlimefunItemStack ITEM_CONVERTER_MACHINE = new SupremeItemStack("SUPREME_ITEM_CONVERTER_MACHINE",
- Material.CARTOGRAPHY_TABLE, "&bItem Converter", "", "&fOriginal Converter Item by ID,",
- "&frestore values of name and meta item", "&fconverting to a new item",
- LoreBuilder.machine(MachineTier.ADVANCED, MachineType.MACHINE), LoreBuilder.speed(1000),
- UtilEnergy.energyPowerPerSecond(0), "", "&3Supreme Machine");
- public static final ItemStack[] RECIPE_ITEM_CONVERTER_MACHINE = new ItemStack[]{new ItemStack(Material.REDSTONE),
- new ItemStack(Material.REDSTONE), new ItemStack(Material.REDSTONE), new ItemStack(Material.PAPER),
- new ItemStack(Material.CARTOGRAPHY_TABLE), new ItemStack(Material.PAPER), new ItemStack(Material.REDSTONE_BLOCK),
- new ItemStack(Material.REDSTONE_BLOCK), new ItemStack(Material.REDSTONE_BLOCK)};
-
- public ItemConverter(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) {
- super(category, item, recipeType, recipe);
- }
-
- @Nonnull
- public List getDisplayRecipes() {
- return new ArrayList<>();
- }
-
- @Override
- protected void tick(Block b) {
- BlockMenu inv = BlockStorage.getInventory(b);
- int[] outputSlots = this.getOutputSlots();
- int[] inputSlots = this.getInputSlots();
- for (int inputSlot : inputSlots) {
- ItemStack inputStack = inv.getItemInSlot(inputSlot);
- if (inputStack != null) {
-
- //is SlimefunItem
- if (inputStack.hasItemMeta() && inputStack.getItemMeta() != null) {
- final ItemMeta inputItemMeta = inputStack.getItemMeta();
- Optional id = Slimefun.getItemDataService().getItemData(inputItemMeta);
- if (id.isPresent()) {
- if (checkSlimefunConverter(inv, outputSlots, inputSlot, inputStack, inputItemMeta, id.get())) {
- break;
- }
- if (checkSlimefunConverter(inv, outputSlots, inputSlot, inputStack, inputItemMeta,
- getNewIdSupremeLegacy(id.get()))) {
- break;
- }
- if (checkSlimefunConverter(inv, outputSlots, inputSlot, inputStack, inputItemMeta,
- getOldIdSupremeLegacy(id.get()))) {
- break;
- }
- }
- }
-
- //check inputStack
- SlimefunItem slimefunItem = SlimefunItem.getByItem(inputStack);
- ItemStack item;
- if (slimefunItem != null) {
- item = slimefunItem.getItem().clone();
- processOutputItem(inv, outputSlots, inputSlot, new SlimefunItemStack(slimefunItem.getId(), item),
- inputStack.getAmount(), inputStack.getItemMeta());
- } else {
- item = inputStack.clone();
- processOutputItem(inv, outputSlots, inputSlot, item, inputStack.getAmount(), inputStack.getItemMeta());
- }
- break;
- }
- }
- }
-
- private boolean checkSlimefunConverter(BlockMenu inv, int[] outputSlots, int inputSlot, ItemStack inputStack,
- ItemMeta inputItemMeta, String itemId) {
- SlimefunItem slimefunItem = SlimefunItem.getById(itemId);
- if (slimefunItem != null) {
- ItemStack item = slimefunItem.getItem().clone();
- processOutputItem(inv, outputSlots, inputSlot, new SlimefunItemStack(itemId, item), inputStack.getAmount(),
- inputItemMeta);
- return true;
- }
- return false;
- }
-
- private void processOutputItem(BlockMenu inv, int[] outputSlots, int inputSlot, ItemStack itemStack, int amount,
- ItemMeta inputItemMeta) {
-
- for (int outputSlot : outputSlots) {
- ItemStack outputStack = inv.getItemInSlot(outputSlot);
- if (outputStack == null) {
- pushOutputItem(inv, inputSlot, amount, getItemWithEnchantAndRepairable(itemStack, inputItemMeta), outputSlot);
- break;
- } else {
- if (SlimefunUtils.isItemSimilar(itemStack, outputStack, false, false)) {
- final int outputAmount = outputStack.getAmount();
- if (outputAmount < outputStack.getMaxStackSize()) {
- final int maxAmount = outputStack.getMaxStackSize() - outputAmount;
- final int newAmount = Math.min(maxAmount, amount);
- pushOutputItem(inv, inputSlot, newAmount, getItemWithEnchantAndRepairable(itemStack, inputItemMeta),
- outputSlot);
- break;
- }
- }
- }
- }
- }
-
- private ItemStack getItemWithEnchantAndRepairable(ItemStack itemStack, ItemMeta inputItemMeta) {
- itemStack = itemStack.clone();
- if (inputItemMeta != null) {
- // remove enchant
- removeEnchant(itemStack);
-
- // add if it has enchants
- if (inputItemMeta.hasEnchants()) {
- itemStack.addUnsafeEnchantments(inputItemMeta.getEnchants());
- }
-
- ItemMeta itemMeta = itemStack.getItemMeta();
- if (itemMeta != null) {
-
- // replace repairCost
- ((Repairable) itemMeta).setRepairCost(((Repairable) inputItemMeta).getRepairCost());
-
- // replace durability
- Damageable durability = (Damageable) inputItemMeta;
- ((Damageable) itemMeta).setDamage(durability.getDamage());
-
- // save
- itemStack.setItemMeta(itemMeta);
- }
- }
- return itemStack;
- }
-
- private void removeEnchant(ItemStack itemStack) {
- if (!itemStack.getEnchantments().isEmpty()) {
- itemStack.getEnchantments().forEach((enchantment, integer) -> itemStack.removeEnchantment(enchantment));
- }
- }
-
- private void pushOutputItem(BlockMenu inv, int inputSlot, int amount, ItemStack itemStack, int outputSlot) {
- ItemStack inputItem = inv.getItemInSlot(inputSlot);
-
- if(checkIgnoreItem(inputItem)){
- inv.consumeItem(inputSlot, inputItem.getAmount());
- inv.pushItem(inputItem, outputSlot);
-
- } else if (inputItem != null && inputItem.getAmount() >= amount) {
- inv.consumeItem(inputSlot, amount);
- itemStack.setAmount(amount);
- inv.pushItem(itemStack, outputSlot);
- }
- }
-
- private boolean checkIgnoreItem(ItemStack inputItem) {
- return SlimefunItems.REPAIRED_SPAWNER.isSimilar(inputItem)
- || SlimefunItems.BROKEN_SPAWNER.isSimilar(inputItem);
- }
-}
diff --git a/src/main/java/com/github/relativobr/supreme/setup/SetupMachines.java b/src/main/java/com/github/relativobr/supreme/setup/SetupMachines.java
index 491d6ee..485cd66 100644
--- a/src/main/java/com/github/relativobr/supreme/setup/SetupMachines.java
+++ b/src/main/java/com/github/relativobr/supreme/setup/SetupMachines.java
@@ -8,7 +8,6 @@
import com.github.relativobr.supreme.machine.ForgeIngot;
import com.github.relativobr.supreme.machine.ForgeMagical;
import com.github.relativobr.supreme.machine.Foundry;
-import com.github.relativobr.supreme.machine.ItemConverter;
import com.github.relativobr.supreme.machine.MagicAltar;
import com.github.relativobr.supreme.machine.MobCollector;
import com.github.relativobr.supreme.machine.VirtualAquarium;
@@ -218,14 +217,7 @@ public static void setup(Supreme sup) {
SetupTechMachines.setup(sup);
- if (supremeOptions.isEnableItemConverter()) {
- new ItemConverter(ItemGroups.MACHINES_CATEGORY, ItemConverter.ITEM_CONVERTER_MACHINE,
- RecipeType.ENHANCED_CRAFTING_TABLE, ItemConverter.RECIPE_ITEM_CONVERTER_MACHINE).setMachineIdentifier(
- ItemConverter.ITEM_CONVERTER_MACHINE.getItemId()).setCapacity(1).setEnergyConsumption(1)
- .setProcessingSpeed(1000).register(sup);
- }
-
- CheckInventory.setup(sup);
+ CheckInventory.setup(sup);
}
}
diff --git a/src/main/java/com/github/relativobr/supreme/util/SupremeOptions.java b/src/main/java/com/github/relativobr/supreme/util/SupremeOptions.java
index c2945ab..2dc55e2 100644
--- a/src/main/java/com/github/relativobr/supreme/util/SupremeOptions.java
+++ b/src/main/java/com/github/relativobr/supreme/util/SupremeOptions.java
@@ -32,7 +32,6 @@ public class SupremeOptions {
boolean enableTools;
boolean enableArmor;
boolean enableTech;
- boolean enableItemConverter;
boolean customBc;
public static SupremeOptions defaultValue() {
@@ -58,7 +57,6 @@ public static SupremeOptions defaultValue() {
.enableTools(true)
.enableArmor(true)
.enableTech(true)
- .enableItemConverter(true)
.customBc(false)
.build();
}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 5ca97e8..b23e44d 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -1,7 +1,6 @@
options:
auto-update: true
use-legacy-supremeexpansion-item-id: false
- enable-item-converter-machine: true
lang: en-US
custom-ticker-delay: 2
enable-generators: true
From 14f450e2263f33bf18106bf4800acf71f35bbf24 Mon Sep 17 00:00:00 2001
From: RelativoBR
Date: Tue, 20 Feb 2024 22:39:37 -0300
Subject: [PATCH 4/6] feat: add Upload to Blob Builds
---
.github/workflows/maven.yml | 28 +++++++++++++------
pom.xml | 2 +-
.../github/relativobr/supreme/Supreme.java | 4 +--
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index d30d037..6a132b2 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -1,8 +1,9 @@
name: Java CI
on:
- release:
- types: [created]
+ push:
+ branches:
+ - main
jobs:
build:
@@ -10,10 +11,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2.3.3
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1.4.3
- with:
- java-version: 1.8
- - name: Build with Maven
- run: mvn package --file pom.xml
+ - uses: actions/checkout@v1
+ - name: Set up JDK 16
+ uses: actions/setup-java@v1
+ with:
+ java-version: 16
+
+ - name: Build with Maven
+ run: mvn package
+
+ - name: Upload to Blob Builds
+ uses: WalshyDev/blob-builds/gh-action@main
+ with:
+ project: Supreme
+ apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }}
+ file: ./target/Supreme.jar
+ releaseNotes: ${{ github.event.head_commit.message }}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 26d5a9a..fc28206 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,7 +43,7 @@
com.github.Slimefun
Slimefun4
- RC-32
+ 1aeb0e8
provided
diff --git a/src/main/java/com/github/relativobr/supreme/Supreme.java b/src/main/java/com/github/relativobr/supreme/Supreme.java
index e374c61..f3633ec 100644
--- a/src/main/java/com/github/relativobr/supreme/Supreme.java
+++ b/src/main/java/com/github/relativobr/supreme/Supreme.java
@@ -12,7 +12,7 @@
import com.github.relativobr.supreme.util.SupremePowerSection;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.libraries.dough.config.Config;
-import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
@@ -151,7 +151,7 @@ public void onEnable() {
&& getDescription().getVersion()
.startsWith("DEV - ")) {
Supreme.inst().log(Level.INFO, "Auto Update: enable");
- new GitHubBuildsUpdater(this, getFile(), "RelativoBR/Supreme/main").start();
+ new BlobBuildUpdater(this, getFile(), "Supreme", "Dev").start();
} else {
Supreme.inst().log(Level.INFO, "Auto Update: disable");
}
From 24287ba63bcb59c293f5483d6b74e0bece96a60c Mon Sep 17 00:00:00 2001
From: RelativoBR
Date: Wed, 21 Feb 2024 08:33:58 -0300
Subject: [PATCH 5/6] fix: revert partial change (Blob Builds and guizhanlib)
---
.github/workflows/maven.yml | 28 ++++++-------------
pom.xml | 9 +++---
.../github/relativobr/supreme/Supreme.java | 8 ++++++
.../supreme/SupremeLocalization.java | 2 +-
4 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 6a132b2..d30d037 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -1,9 +1,8 @@
name: Java CI
on:
- push:
- branches:
- - main
+ release:
+ types: [created]
jobs:
build:
@@ -11,19 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
- - name: Set up JDK 16
- uses: actions/setup-java@v1
- with:
- java-version: 16
-
- - name: Build with Maven
- run: mvn package
-
- - name: Upload to Blob Builds
- uses: WalshyDev/blob-builds/gh-action@main
- with:
- project: Supreme
- apiToken: ${{ secrets.BLOB_BUILDS_API_TOKEN }}
- file: ./target/Supreme.jar
- releaseNotes: ${{ github.event.head_commit.message }}
\ No newline at end of file
+ - uses: actions/checkout@v2.3.3
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1.4.3
+ with:
+ java-version: 1.8
+ - name: Build with Maven
+ run: mvn package --file pom.xml
diff --git a/pom.xml b/pom.xml
index fc28206..1049834 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,11 +67,12 @@
5.3.19
-
+
- net.guizhanss
- GuizhanLibPlugin
- 1.7.0
+ net.guizhanss
+ GuizhanLib
+ 0.9.0
+ compile
diff --git a/src/main/java/com/github/relativobr/supreme/Supreme.java b/src/main/java/com/github/relativobr/supreme/Supreme.java
index f3633ec..9c5b4ad 100644
--- a/src/main/java/com/github/relativobr/supreme/Supreme.java
+++ b/src/main/java/com/github/relativobr/supreme/Supreme.java
@@ -160,6 +160,14 @@ && getDescription().getVersion()
Supreme.inst().log(Level.INFO, "Loaded language Supreme: " + getSupremeOptions().getLang());
getLocalization();
+ // check Compatibily Legacy (SupremeExpansion)
+ if (getSupremeOptions().isUseLegacySupremeexpansionItemId()) {
+ Supreme.inst().log(Level.INFO, "Legacy SupremeExpansion IDs: enable");
+ getLegacyItem();
+ } else {
+ Supreme.inst().log(Level.INFO, "Legacy SupremeExpansion IDs: disable");
+ }
+
MainSetup.setup(this);
}
diff --git a/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java b/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java
index abeee4c..c3798bd 100644
--- a/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java
+++ b/src/main/java/com/github/relativobr/supreme/SupremeLocalization.java
@@ -5,7 +5,7 @@
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import net.guizhanss.guizhanlib.localization.Localization;
-import net.guizhanss.guizhanlib.minecraft.utils.ChatUtil;
+import net.guizhanss.guizhanlib.utils.ChatUtil;
import net.guizhanss.guizhanlib.utils.StringUtil;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
From 5b9762ee1f4ccaf4cdd964cce903c71ff6ce6628 Mon Sep 17 00:00:00 2001
From: RelativoBR
Date: Wed, 21 Feb 2024 08:43:30 -0300
Subject: [PATCH 6/6] feat: revert partial change (BlobBuildUpdater)
---
README.md | 4 ++--
src/main/java/com/github/relativobr/supreme/Supreme.java | 4 ++--
.../relativobr/supreme/util/EnchantsAndEffectsUtil.java | 2 --
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 5293496..aa5fd6c 100644
--- a/README.md
+++ b/README.md
@@ -3,9 +3,9 @@ Supreme is an addon for Slimefun which adds 100+ various new resources that will
## Requirements
-Minecraft Version: 1.17 ~ 1.19.2
+Minecraft Version: 1.17 ~ 1.12.4
-Slimefun Version: RC-32
+Slimefun Version: 1aeb0e8
### [Download](https://thebusybiscuit.github.io/builds/RelativoBR/Supreme/main/)
diff --git a/src/main/java/com/github/relativobr/supreme/Supreme.java b/src/main/java/com/github/relativobr/supreme/Supreme.java
index 9c5b4ad..bd91101 100644
--- a/src/main/java/com/github/relativobr/supreme/Supreme.java
+++ b/src/main/java/com/github/relativobr/supreme/Supreme.java
@@ -12,7 +12,7 @@
import com.github.relativobr.supreme.util.SupremePowerSection;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import io.github.thebusybiscuit.slimefun4.libraries.dough.config.Config;
-import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.BlobBuildUpdater;
+import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
@@ -151,7 +151,7 @@ public void onEnable() {
&& getDescription().getVersion()
.startsWith("DEV - ")) {
Supreme.inst().log(Level.INFO, "Auto Update: enable");
- new BlobBuildUpdater(this, getFile(), "Supreme", "Dev").start();
+ new GitHubBuildsUpdater(this, getFile(), "RelativoBR/Supreme/main").start();
} else {
Supreme.inst().log(Level.INFO, "Auto Update: disable");
}
diff --git a/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java b/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java
index 031f7a7..8c2ff65 100644
--- a/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java
+++ b/src/main/java/com/github/relativobr/supreme/util/EnchantsAndEffectsUtil.java
@@ -6,13 +6,11 @@
import org.bukkit.NamespacedKey;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.enchantments.Enchantment;
-import org.bukkit.enchantments.EnchantmentWrapper;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import java.util.*;
import java.util.logging.Level;