-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated Addon Upstream - DynaTech: da1fb30 - FluffyMachines: 612aaa9 - SFCalc: 2e010b3 - SlimefunTranslation: e6da231 * Changes - Fix bug on categories command on SlimeCustomizer addon - Fix populateMenu method on SCCommand from SlimeCustomizer addon - Fixed typo from "reloadPlugin" to "reloadAddon" method in MainCommand - Integrate new addon naming system on MainCommand
- Loading branch information
Showing
10 changed files
with
426 additions
and
244 deletions.
There are no files selected for viewing
Submodule SlimefunTranslation
updated
from 88a9fb to e6da23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
From cf07e5d13abd582e6ab5fc5db217714684384656 Mon Sep 17 00:00:00 2001 | ||
From d28943a2e16a3d3f6c2262598e752ea24a859f5e Mon Sep 17 00:00:00 2001 | ||
From: ARVIN3108 <[email protected]> | ||
Date: Mon, 4 Mar 2024 14:13:26 +0700 | ||
Date: Mon, 15 Apr 2024 06:55:12 +0700 | ||
Subject: [PATCH] DynaTech | ||
|
||
--- | ||
|
@@ -40,6 +40,7 @@ Subject: [PATCH] DynaTech | |
.../growthchambers/GrowthChamberNether.java | 89 +-- | ||
.../GrowthChamberNetherMK2.java | 70 +- | ||
.../growthchambers/GrowthChamberOcean.java | 89 +-- | ||
.../growthchambers/GrowthChamberOcean.java~ | 143 ++++ | ||
.../growthchambers/GrowthChamberOceanMK2.java | 73 +- | ||
.../electric/machines/MineralizedApiary.java | 147 ++-- | ||
.../items/electric/machines/Orechid.java | 71 +- | ||
|
@@ -69,12 +70,12 @@ Subject: [PATCH] DynaTech | |
.../listeners/PicnicBasketListener.java | 80 +- | ||
.../dynatech/setup/DynaTechItemsSetup.java | 743 +++++++++--------- | ||
.../addons}/dynatech/tasks/ItemBandTask.java | 134 ++-- | ||
.../me/profelements/dynatech/DynaTech.java | 147 ---- | ||
.../me/profelements/dynatech/DynaTech.java | 145 ---- | ||
.../dynatech/items/misc/WitherGolem.java | 33 - | ||
.../addons-config/DynaTech/config.yml | 1 + | ||
src/main/resources/config.yml | 3 - | ||
src/main/resources/plugin.yml | 24 - | ||
70 files changed, 2610 insertions(+), 3286 deletions(-) | ||
71 files changed, 2753 insertions(+), 3284 deletions(-) | ||
create mode 100644 src/main/java/id/universenetwork/sfa_loader/addons/dynatech/DynaTech.java | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/DynaTechItems.java (91%) | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/attributes/LiquidStorage.java (77%) | ||
|
@@ -110,6 +111,7 @@ Subject: [PATCH] DynaTech | |
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/items/electric/growthchambers/GrowthChamberNether.java (61%) | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/items/electric/growthchambers/GrowthChamberNetherMK2.java (63%) | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/items/electric/growthchambers/GrowthChamberOcean.java (80%) | ||
create mode 100644 src/main/java/id/universenetwork/sfa_loader/addons/dynatech/items/electric/growthchambers/GrowthChamberOcean.java~ | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/items/electric/growthchambers/GrowthChamberOceanMK2.java (82%) | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/items/electric/machines/MineralizedApiary.java (53%) | ||
rename src/main/java/{me/profelements => id/universenetwork/sfa_loader/addons}/dynatech/items/electric/machines/Orechid.java (77%) | ||
|
@@ -5359,6 +5361,155 @@ index 83e87a6..4a22bfe 100644 | |
- | ||
- | ||
} | ||
diff --git a/src/main/java/id/universenetwork/sfa_loader/addons/dynatech/items/electric/growthchambers/GrowthChamberOcean.java~ b/src/main/java/id/universenetwork/sfa_loader/addons/dynatech/items/electric/growthchambers/GrowthChamberOcean.java~ | ||
new file mode 100644 | ||
index 0000000..4a22bfe | ||
--- /dev/null | ||
+++ b/src/main/java/id/universenetwork/sfa_loader/addons/dynatech/items/electric/growthchambers/GrowthChamberOcean.java~ | ||
@@ -0,0 +1,143 @@ | ||
+package id.universenetwork.sfa_loader.addons.dynatech.items.electric.growthchambers; | ||
+ | ||
+import id.universenetwork.sfa_loader.addons.dynatech.items.abstracts.AbstractElectricMachine; | ||
+import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; | ||
+import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; | ||
+import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; | ||
+import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; | ||
+import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; | ||
+import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; | ||
+import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction; | ||
+import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; | ||
+import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; | ||
+import org.bukkit.Material; | ||
+import org.bukkit.entity.Player; | ||
+import org.bukkit.event.inventory.InventoryClickEvent; | ||
+import org.bukkit.inventory.ItemStack; | ||
+ | ||
+import java.util.ArrayList; | ||
+import java.util.List; | ||
+ | ||
+public class GrowthChamberOcean extends AbstractElectricMachine { | ||
+ private static final int[] INPUT_SLOTS = new int[]{19, 20}; | ||
+ private static final int[] OUTPUT_SLOTS = new int[]{24, 25}; | ||
+ | ||
+ private static final int[] INPUT_BORDER_SLOTS = new int[]{9, 10, 11, 12, 18, 21, 27, 28, 29, 30}; | ||
+ private static final int[] OUTPUT_BORDER_SLOTS = new int[]{14, 15, 16, 17, 23, 26, 32, 33, 34, 35}; | ||
+ private static final int[] BACKGROUND_SLOTS = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 13, 31, 36, 37, 38, 39, 40, 41, 42, 43, 44}; | ||
+ | ||
+ private static final ItemStack PROGRESS_ITEM = new ItemStack(Material.CONDUIT); | ||
+ | ||
+ public GrowthChamberOcean(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe) { | ||
+ super(itemGroup, item, recipeType, recipe); | ||
+ } | ||
+ | ||
+ @Override | ||
+ public void postRegister() { | ||
+ registerDefaultRecipes(); | ||
+ } | ||
+ | ||
+ protected void registerDefaultRecipes() { | ||
+ | ||
+ registerRecipe(9, new ItemStack(Material.LILY_PAD), new ItemStack(Material.LILY_PAD, 3)); | ||
+ registerRecipe(9, new ItemStack(Material.SEA_PICKLE), new ItemStack(Material.SEA_PICKLE, 3)); | ||
+ registerRecipe(12, new ItemStack(Material.SEAGRASS), new ItemStack(Material.SEAGRASS, 4)); | ||
+ registerRecipe(9, new ItemStack(Material.KELP), new ItemStack(Material.KELP, 3)); | ||
+ // Coral blocks | ||
+ // Brings dead coral blocks back to life! | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_TUBE_CORAL_BLOCK), new ItemStack(Material.TUBE_CORAL_BLOCK, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_BRAIN_CORAL_BLOCK), new ItemStack(Material.BRAIN_CORAL_BLOCK, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_BUBBLE_CORAL_BLOCK), new ItemStack(Material.BUBBLE_CORAL_BLOCK, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_FIRE_CORAL_BLOCK), new ItemStack(Material.FIRE_CORAL_BLOCK, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_HORN_CORAL_BLOCK), new ItemStack(Material.HORN_CORAL_BLOCK, 1)); | ||
+ // Block duplication | ||
+ registerRecipe(12, new ItemStack(Material.TUBE_CORAL_BLOCK), new ItemStack(Material.TUBE_CORAL_BLOCK, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.BRAIN_CORAL_BLOCK), new ItemStack(Material.BRAIN_CORAL_BLOCK, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.BUBBLE_CORAL_BLOCK), new ItemStack(Material.BUBBLE_CORAL_BLOCK, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.FIRE_CORAL_BLOCK), new ItemStack(Material.FIRE_CORAL_BLOCK, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.HORN_CORAL_BLOCK), new ItemStack(Material.HORN_CORAL_BLOCK, 2)); | ||
+ | ||
+ // Coral | ||
+ // Revive for coral | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_TUBE_CORAL), new ItemStack(Material.TUBE_CORAL, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_BRAIN_CORAL), new ItemStack(Material.BRAIN_CORAL, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_BUBBLE_CORAL), new ItemStack(Material.BUBBLE_CORAL, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_FIRE_CORAL), new ItemStack(Material.FIRE_CORAL, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_HORN_CORAL), new ItemStack(Material.HORN_CORAL, 1)); | ||
+ // Coral duplication | ||
+ registerRecipe(12, new ItemStack(Material.TUBE_CORAL), new ItemStack(Material.TUBE_CORAL, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.BRAIN_CORAL), new ItemStack(Material.BRAIN_CORAL, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.BUBBLE_CORAL), new ItemStack(Material.BUBBLE_CORAL, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.FIRE_CORAL), new ItemStack(Material.FIRE_CORAL, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.HORN_CORAL), new ItemStack(Material.HORN_CORAL, 2)); | ||
+ | ||
+ // Coral fans | ||
+ // Medical attention for the fans | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_TUBE_CORAL_FAN), new ItemStack(Material.TUBE_CORAL_FAN, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_BRAIN_CORAL_FAN), new ItemStack(Material.BRAIN_CORAL_FAN, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_BUBBLE_CORAL_FAN), new ItemStack(Material.BUBBLE_CORAL_FAN, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_FIRE_CORAL_FAN), new ItemStack(Material.FIRE_CORAL_FAN, 1)); | ||
+ registerRecipe(9, new ItemStack(Material.DEAD_HORN_CORAL_FAN), new ItemStack(Material.HORN_CORAL_FAN, 1)); | ||
+ // Fan duplication | ||
+ registerRecipe(12, new ItemStack(Material.TUBE_CORAL_FAN), new ItemStack(Material.TUBE_CORAL_FAN, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.BRAIN_CORAL_FAN), new ItemStack(Material.BRAIN_CORAL_FAN, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.BUBBLE_CORAL_FAN), new ItemStack(Material.BUBBLE_CORAL_FAN, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.FIRE_CORAL_FAN), new ItemStack(Material.FIRE_CORAL_FAN, 2)); | ||
+ registerRecipe(12, new ItemStack(Material.HORN_CORAL_FAN), new ItemStack(Material.HORN_CORAL_FAN, 2)); | ||
+ | ||
+ } | ||
+ | ||
+ | ||
+ @Override | ||
+ public List<ItemStack> getDisplayRecipes() { | ||
+ List<ItemStack> display = new ArrayList<>(); | ||
+ for (MachineRecipe recipe : recipes) { | ||
+ display.add(recipe.getInput()[0]); | ||
+ if (recipe.getOutput().length > 1) display.add(recipe.getOutput()[1]); | ||
+ else display.add(recipe.getOutput()[0]); | ||
+ } | ||
+ return display; | ||
+ } | ||
+ | ||
+ @Override | ||
+ protected void setupMenu(BlockMenuPreset preset) { | ||
+ for (int slot : BACKGROUND_SLOTS) | ||
+ preset.addItem(slot, ChestMenuUtils.getBackground(), ChestMenuUtils.getEmptyClickHandler()); | ||
+ | ||
+ for (int slot : INPUT_BORDER_SLOTS) | ||
+ preset.addItem(slot, ChestMenuUtils.getInputSlotTexture(), ChestMenuUtils.getEmptyClickHandler()); | ||
+ | ||
+ for (int slot : OUTPUT_BORDER_SLOTS) | ||
+ preset.addItem(slot, ChestMenuUtils.getOutputSlotTexture(), ChestMenuUtils.getEmptyClickHandler()); | ||
+ | ||
+ preset.addItem(getProgressSlot(), new CustomItemStack(Material.BLACK_STAINED_GLASS_PANE, " "), ChestMenuUtils.getEmptyClickHandler()); | ||
+ | ||
+ for (int slot : getOutputSlots()) | ||
+ preset.addMenuClickHandler(slot, new ChestMenu.AdvancedMenuClickHandler() { | ||
+ @Override | ||
+ public boolean onClick(InventoryClickEvent e, Player p, int slot, ItemStack cursor, ClickAction action) { | ||
+ return cursor.getType().isAir(); | ||
+ } | ||
+ | ||
+ @Override | ||
+ public boolean onClick(Player p, int slot, ItemStack item, ClickAction action) { | ||
+ return false; | ||
+ } | ||
+ }); | ||
+ } | ||
+ | ||
+ @Override | ||
+ protected int[] getInputSlots() { | ||
+ return INPUT_SLOTS; | ||
+ } | ||
+ | ||
+ @Override | ||
+ protected int[] getOutputSlots() { | ||
+ return OUTPUT_SLOTS; | ||
+ } | ||
+ | ||
+ @Override | ||
+ public ItemStack getProgressBar() { | ||
+ return PROGRESS_ITEM; | ||
+ } | ||
+} | ||
diff --git a/src/main/java/me/profelements/dynatech/items/electric/growthchambers/GrowthChamberOceanMK2.java b/src/main/java/id/universenetwork/sfa_loader/addons/dynatech/items/electric/growthchambers/GrowthChamberOceanMK2.java | ||
similarity index 82% | ||
rename from src/main/java/me/profelements/dynatech/items/electric/growthchambers/GrowthChamberOceanMK2.java | ||
|
@@ -9917,10 +10068,10 @@ index db69aee..a420e84 100644 | |
+} | ||
diff --git a/src/main/java/me/profelements/dynatech/DynaTech.java b/src/main/java/me/profelements/dynatech/DynaTech.java | ||
deleted file mode 100644 | ||
index 5465a9f..0000000 | ||
index 2106eec..0000000 | ||
--- a/src/main/java/me/profelements/dynatech/DynaTech.java | ||
+++ /dev/null | ||
@@ -1,147 +0,0 @@ | ||
@@ -1,145 +0,0 @@ | ||
-package me.profelements.dynatech; | ||
- | ||
-import io.github.bakedlibs.dough.updater.BlobBuildUpdater; | ||
|
@@ -9987,25 +10138,23 @@ index 5465a9f..0000000 | |
- | ||
- } | ||
- | ||
- | ||
- try { | ||
- Class.forName("io.github.thebusybiscuit.exoticgarden.items.CustomFood"); | ||
- new ExoticGardenIntegrationListener(this); | ||
- } catch (ClassNotFoundException ex) { | ||
- } | ||
- | ||
- | ||
- //Tasks | ||
- // Tasks | ||
- getServer().getScheduler().runTaskTimerAsynchronously(DynaTech.getInstance(), new ItemBandTask(), 0L, 5 * 20L); | ||
- getServer().getScheduler().runTaskTimer(DynaTech.getInstance(), () -> this.tickInterval++, 0, TICK_TIME); | ||
- | ||
- if (getConfig().getBoolean("options.auto-update", true) && getDescription().getVersion().startsWith("DEV - ")) { | ||
- if (getConfig().getBoolean("options.auto-update", true) && getDescription().getVersion().startsWith("Main")) { | ||
- new BlobBuildUpdater(this, getFile(), "DynaTech", "Main").start(); | ||
- } | ||
- | ||
- if (!Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_19)) { | ||
- getLogger().warning("DynaTech only support 1.19+, disabling."); | ||
- getServer().getPluginManager().disablePlugin(this); | ||
- getLogger().warning("DynaTech only support 1.19+, disabling."); | ||
- getServer().getPluginManager().disablePlugin(this); | ||
- } | ||
- } | ||
- | ||
|
Oops, something went wrong.