Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<version>UNOFFICIAL</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -51,10 +51,19 @@
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.3.0</version>
<configuration>
<relocations>
<relocation>
Expand All @@ -80,13 +89,13 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<version>1.18.30</version>
</dependency>

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

Expand All @@ -100,15 +109,21 @@
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-27</version>
<version>experimental-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>1.8</version>
<version>3.1.0</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion src/main/java/io/github/seggan/liquid/Items.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private Items() {}

public static final ItemGroup CATEGORY = new ItemGroup(
new NamespacedKey(Liquid.getInstance(), "liquids"),
new CustomItemStack(Material.LAVA_BUCKET, "&6Liquids")
CustomItemStack.create(Material.LAVA_BUCKET, "&6Liquids")
);

public static final SlimefunItemStack MELTER = new SlimefunItemStack(
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/io/github/seggan/liquid/Liquid.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,43 +74,43 @@ public void onEnable() {
}

new Melter(Items.CATEGORY, Items.MELTER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{
SlimefunItems.HEATING_COIL, SlimefunItems.HEATING_COIL, SlimefunItems.HEATING_COIL,
SlimefunItems.HEATING_COIL, SlimefunItems.ELECTRIFIED_CRUCIBLE_3, SlimefunItems.HEATING_COIL,
SlimefunItems.HEATING_COIL, SlimefunItems.HEATING_COIL, SlimefunItems.HEATING_COIL
SlimefunItems.HEATING_COIL.item(), SlimefunItems.HEATING_COIL.item(), SlimefunItems.HEATING_COIL.item(),
SlimefunItems.HEATING_COIL.item(), SlimefunItems.ELECTRIFIED_CRUCIBLE_3.item(), SlimefunItems.HEATING_COIL.item(),
SlimefunItems.HEATING_COIL.item(), SlimefunItems.HEATING_COIL.item(), SlimefunItems.HEATING_COIL.item()
}).register(this);

new Solidifier(Items.CATEGORY, Items.SOLIDIFIER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{
SlimefunItems.COOLING_UNIT, SlimefunItems.COOLING_UNIT, SlimefunItems.COOLING_UNIT,
SlimefunItems.COOLING_UNIT, SlimefunItems.FREEZER_2, SlimefunItems.COOLING_UNIT,
SlimefunItems.COOLING_UNIT, SlimefunItems.COOLING_UNIT, SlimefunItems.COOLING_UNIT
SlimefunItems.COOLING_UNIT.item(), SlimefunItems.COOLING_UNIT.item(), SlimefunItems.COOLING_UNIT.item(),
SlimefunItems.COOLING_UNIT.item(), SlimefunItems.FREEZER_2.item(), SlimefunItems.COOLING_UNIT.item(),
SlimefunItems.COOLING_UNIT.item(), SlimefunItems.COOLING_UNIT.item(), SlimefunItems.COOLING_UNIT.item()
}).register(this);

new SpraySolidifier(Items.CATEGORY, Items.SPRAY_SOLIDIFIER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{
SlimefunItems.HEATING_COIL, Items.SOLIDIFIER, SlimefunItems.HEATING_COIL,
new ItemStack(Material.IRON_NUGGET), SlimefunItems.COOLING_UNIT, new ItemStack(Material.IRON_NUGGET),
SlimefunItems.REINFORCED_PLATE, SlimefunItems.REINFORCED_PLATE, SlimefunItems.REINFORCED_PLATE
SlimefunItems.HEATING_COIL.item(), Items.SOLIDIFIER.item(), SlimefunItems.HEATING_COIL.item(),
new ItemStack(Material.IRON_NUGGET), SlimefunItems.COOLING_UNIT.item(), new ItemStack(Material.IRON_NUGGET),
SlimefunItems.REINFORCED_PLATE.item(), SlimefunItems.REINFORCED_PLATE.item(), SlimefunItems.REINFORCED_PLATE.item()
}).register(this);

new Mixer(Items.CATEGORY, Items.MIXER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{
SlimefunItems.CARBONADO, SlimefunItems.HEATING_COIL, SlimefunItems.CARBONADO,
SlimefunItems.HEATING_COIL, Items.MELTER, SlimefunItems.HEATING_COIL,
SlimefunItems.CARBONADO, SlimefunItems.HEATING_COIL, SlimefunItems.CARBONADO
SlimefunItems.CARBONADO.item(), SlimefunItems.HEATING_COIL.item(), SlimefunItems.CARBONADO.item(),
SlimefunItems.HEATING_COIL.item(), Items.MELTER.item(), SlimefunItems.HEATING_COIL.item(),
SlimefunItems.CARBONADO.item(), SlimefunItems.HEATING_COIL.item(), SlimefunItems.CARBONADO.item()
}).register(this);

new Centrifuge(Items.CATEGORY, Items.CENTRIFUGE, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{
SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack(Material.BOWL), SlimefunItems.REINFORCED_ALLOY_INGOT,
new ItemStack(Material.BOWL), SlimefunItems.ELECTRIC_DUST_WASHER_3, new ItemStack(Material.BOWL),
SlimefunItems.REINFORCED_ALLOY_INGOT, new ItemStack(Material.BOWL), SlimefunItems.REINFORCED_ALLOY_INGOT
SlimefunItems.REINFORCED_ALLOY_INGOT.item(), new ItemStack(Material.BOWL), SlimefunItems.REINFORCED_ALLOY_INGOT.item(),
new ItemStack(Material.BOWL), SlimefunItems.ELECTRIC_DUST_WASHER_3.item(), new ItemStack(Material.BOWL),
SlimefunItems.REINFORCED_ALLOY_INGOT.item(), new ItemStack(Material.BOWL), SlimefunItems.REINFORCED_ALLOY_INGOT.item()
}).register(this);

new Crystallizer(Items.CATEGORY, Items.CRYSTALLIZER, RecipeType.ENHANCED_CRAFTING_TABLE, new ItemStack[]{
SlimefunItems.COOLING_UNIT, new ItemStack(Material.BOWL), SlimefunItems.COOLING_UNIT,
new ItemStack(Material.BOWL), Items.SOLIDIFIER, new ItemStack(Material.BOWL),
SlimefunItems.COOLING_UNIT, new ItemStack(Material.BOWL), SlimefunItems.COOLING_UNIT
SlimefunItems.COOLING_UNIT.item(), new ItemStack(Material.BOWL), SlimefunItems.COOLING_UNIT.item(),
new ItemStack(Material.BOWL), Items.SOLIDIFIER.item(), new ItemStack(Material.BOWL),
SlimefunItems.COOLING_UNIT.item(), new ItemStack(Material.BOWL), SlimefunItems.COOLING_UNIT.item()
}).register(this);

new SlimefunItem(Items.CATEGORY, Items.SLAG, Solidifier.RECIPE_TYPE, new ItemStack[]{
LiquidMetal.getLiquids().get(Items.SLAG), null, null,
LiquidMetal.getLiquids().get(Items.SLAG.item()).item(), null, null,
null, null, null,
null, null, null,
}).register(this);
Expand All @@ -126,7 +126,7 @@ SlimefunItems.COOLING_UNIT, new ItemStack(Material.BOWL), SlimefunItems.COOLING_
metal.register(this);
}

RecipeType.GRIND_STONE.register(new ItemStack[]{Items.SLAG}, SlimefunItems.SIFTED_ORE);
RecipeType.GRIND_STONE.register(new ItemStack[]{Items.SLAG.item()}, SlimefunItems.SIFTED_ORE.item());

MixerCategory.INSTANCE.register(this);
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/io/github/seggan/liquid/Util.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.seggan.liquid;

import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.libraries.dough.items.ItemUtils;
import io.github.thebusybiscuit.slimefun4.utils.ChatUtils;
import org.bukkit.inventory.ItemStack;
Expand All @@ -10,8 +10,9 @@ public final class Util {
private Util() {}

public static String getID(ItemStack stack) {
if (stack instanceof SlimefunItemStack) {
return ((SlimefunItemStack) stack).getItemId();
SlimefunItem sfItem = SlimefunItem.getByItem(stack);
if (sfItem != null) {
return sfItem.getId();
} else {
return ChatUtils.removeColorCodes(ItemUtils.getItemName(stack))
.toUpperCase().replace(" ", "_");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class MixerCategory extends FlexItemGroup {

public MixerCategory() {
super(new NamespacedKey(Liquid.getInstance(), "Mixer_recipes_category"),
new CustomItemStack(Items.MIXER.getType(), "&6Mixer Recipes"));
CustomItemStack.create(Items.MIXER.item(), "&6Mixer Recipes"));
}

@Override
Expand All @@ -53,9 +53,8 @@ public void open(Player player, PlayerProfile playerProfile, SlimefunGuideMode m

menu.setEmptySlotsClickable(false);

menu.addItem(1, new CustomItemStack(ChestMenuUtils.getBackButton(player, "",
ChatColor.GRAY + Slimefun.getLocalization().getMessage(player, "guide.back.guide")))
);
menu.addItem(1, ChestMenuUtils.getBackButton(player, "",
ChatColor.GRAY + Slimefun.getLocalization().getMessage(player, "guide.back.guide")));

menu.addMenuClickHandler(1, (pl, slot, item, action) -> {
Slimefun.getRegistry().getSlimefunGuide(mode).openMainMenu(playerProfile, 1);
Expand Down Expand Up @@ -85,9 +84,8 @@ private void displayItem(PlayerProfile p, MachineRecipe r) {
menu.addItem(i, ChestMenuUtils.getBackground(), ChestMenuUtils.getEmptyClickHandler());
}

menu.addItem(1, new CustomItemStack(ChestMenuUtils.getBackButton(player, "",
ChatColor.GRAY + Slimefun.getLocalization().getMessage(player, "guide.back.guide")))
);
menu.addItem(1, ChestMenuUtils.getBackButton(player, "",
ChatColor.GRAY + Slimefun.getLocalization().getMessage(player, "guide.back.guide")));
menu.addMenuClickHandler(1, (pl, s, is, action) -> {
open(player, p, SlimefunGuideMode.SURVIVAL_MODE);
return false;
Expand Down
Loading
Loading