Skip to content

Commit

Permalink
fix: fix compatibility 1.20.3+ and remove ItemConverter #56
Browse files Browse the repository at this point in the history
Changes:
fix 1.20.3+ compatibility (SlimefunGuguProject/Supreme@32c404f)
remove ItemConverter
  • Loading branch information
RelativoBR authored Feb 21, 2024
2 parents f9e7005 + 5b9762e commit 3f9fc58
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 206 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-32</version>
<version>1aeb0e8</version>
<scope>provided</scope>
</dependency>

Expand All @@ -67,7 +67,7 @@
<version>5.3.19</version>
</dependency>

<!-- tradução -->
<!-- translation plugin -->
<dependency>
<groupId>net.guizhanss</groupId>
<artifactId>GuizhanLib</artifactId>
Expand All @@ -78,7 +78,7 @@
</dependencies>

<build>
<finalName>${project.name} - RC 1</finalName>
<finalName>${project.name}</finalName>
<defaultGoal>clean package</defaultGoal>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/github/relativobr/supreme/Supreme.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
184 changes: 0 additions & 184 deletions src/main/java/com/github/relativobr/supreme/machine/ItemConverter.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
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;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
Expand Down Expand Up @@ -120,7 +120,7 @@ private static Map<Enchantment, Integer> getEnchants(@Nonnull ConfigurationSecti

Map<Enchantment, Integer> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public class SupremeOptions {
boolean enableTools;
boolean enableArmor;
boolean enableTech;
boolean enableItemConverter;
boolean customBc;

public static SupremeOptions defaultValue() {
Expand All @@ -58,7 +57,6 @@ public static SupremeOptions defaultValue() {
.enableTools(true)
.enableArmor(true)
.enableTech(true)
.enableItemConverter(true)
.customBc(false)
.build();
}
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3f9fc58

Please sign in to comment.