Skip to content

Commit

Permalink
Merge pull request #31 from Slimefun-Addon-Community/suggestion-issue…
Browse files Browse the repository at this point in the history
…s-25-and-27

Suggestion issues 25, 27 and 30
  • Loading branch information
RelativoBR committed Mar 4, 2023
2 parents 57272c4 + d1ff1ff commit 4d8b06b
Show file tree
Hide file tree
Showing 15 changed files with 348 additions and 156 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Supreme 2.0
# Supreme
Supreme is an addon for Slimefun which adds 100+ various new resources that will allow you to craft powerful new items, weapons, tools and armor. These can be made up from titanium, aurum, adamantium, thornium with some being magical, rare, epic, legendary or supreme! It also adds 12 new electric generators, 5 new capacitors and even more...

## Requirements
Expand All @@ -12,13 +12,9 @@ Slimefun Version: RC-32
[![Build Status](https://thebusybiscuit.github.io/builds/RelativoBR/Supreme/main/badge.svg)](https://thebusybiscuit.github.io/builds/RelativoBR/Supreme/main)


## Important information
This addon "Supreme 2.0" compatible with the old addon "SupremeExpansion" change in config `use-legacy-supremeexpansion-item-id` to `true`


## Bugs/Suggestions

Make a new issue, pull request, or contact me on discord @RelativoBR#9577
Make a new issue, pull request, or discord Slimefun-Addon-Community

<p>
<a href="https://discord.gg/slimefun">
Expand Down Expand Up @@ -152,4 +148,5 @@ Make a new issue, pull request, or contact me on discord @RelativoBR#9577
- **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
- **supreme-effects** - Indication Effects of the gear
- **power-section** - Customizable Capacity, Buffer and Energy of the capacitor and generator
96 changes: 72 additions & 24 deletions src/main/java/com/github/relativobr/supreme/Supreme.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.github.relativobr.supreme.setup.MainSetup;
import com.github.relativobr.supreme.util.CompatibilySupremeLegacyItem;
import com.github.relativobr.supreme.util.SupremeOptions;
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;
Expand All @@ -22,6 +23,7 @@ public class Supreme extends JavaPlugin implements SlimefunAddon {

private static Supreme instance;
private static SupremeOptions supremeOptions = null;
private static SupremePowerSection supremePowerSection = null;
private static SupremeLocalization localization = null;
private static List<CompatibilySupremeLegacyItem> legacyItem = null;

Expand All @@ -32,35 +34,81 @@ public static Supreme inst() {
public static SupremeOptions getSupremeOptions() {
if (supremeOptions == null) {
ConfigurationSection typeSection = inst().getConfig().getConfigurationSection("options");
if (typeSection != null) {
supremeOptions = SupremeOptions.builder().autoUpdate(typeSection.getBoolean("auto-update"))
.useLegacySupremeexpansionItemId(
typeSection.getBoolean("use-legacy-supremeexpansion-item-id", false))
.lang(typeSection.getString("lang", "en-US"))
.customTickerDelay(typeSection.getInt("custom-ticker-delay"))
.enableGenerators(typeSection.getBoolean("enable-generators", true))
.limitProductionGenerators(typeSection.getBoolean("limit-production-generators", false))
.enableQuarry(typeSection.getBoolean("enable-quarry", true))
.limitProductionQuarry(typeSection.getBoolean("limit-production-quarry", false))
.baseTimeVirtualGarden(typeSection.getInt("base-time-virtual-garden", 15))
.baseTimeVirtualAquarium(typeSection.getInt("base-time-virtual-aquarium", 15))
.baseTimeMobCollector(typeSection.getInt("base-time-mob-collector", 15))
.baseTimeTechGenerator(typeSection.getInt("base-time-tech-generator", 1800))
.maxAmountTechGenerator(typeSection.getInt("tech-generator-max-amount", 64))
.mobTechEnableBee(typeSection.getBoolean("mob-tech-enable-bee", true))
.mobTechEnableIronGolem(typeSection.getBoolean("mob-tech-enable-iron-golem", true))
.mobTechEnableZombie(typeSection.getBoolean("mob-tech-enable-zombie", true))
.enableWeapons(typeSection.getBoolean("enable-weapons", true))
.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();
if (typeSection == null) {
supremeOptions = SupremeOptions.defaultValue();
} else {
supremeOptions = SupremeOptions.builder()
.autoUpdate(typeSection.getBoolean("auto-update", true))
.useLegacySupremeexpansionItemId(
typeSection.getBoolean("use-legacy-supremeexpansion-item-id", false))
.lang(typeSection.getString("lang", "en-US"))
.customTickerDelay(typeSection.getInt("custom-ticker-delay", 2))
.enableGenerators(typeSection.getBoolean("enable-generators", true))
.limitProductionGenerators(typeSection.getBoolean("limit-production-generators", false))
.enableQuarry(typeSection.getBoolean("enable-quarry", true))
.limitProductionQuarry(typeSection.getBoolean("limit-production-quarry", false))
.baseTimeVirtualGarden(typeSection.getInt("base-time-virtual-garden", 15))
.baseTimeVirtualAquarium(typeSection.getInt("base-time-virtual-aquarium", 15))
.baseTimeMobCollector(typeSection.getInt("base-time-mob-collector", 15))
.baseTimeTechGenerator(typeSection.getInt("base-time-tech-generator", 1800))
.maxAmountTechGenerator(typeSection.getInt("tech-generator-max-amount", 64))
.mobTechEnableBee(typeSection.getBoolean("mob-tech-enable-bee", true))
.mobTechEnableIronGolem(typeSection.getBoolean("mob-tech-enable-iron-golem", true))
.mobTechEnableZombie(typeSection.getBoolean("mob-tech-enable-zombie", true))
.enableWeapons(typeSection.getBoolean("enable-weapons", true))
.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();
}
}
return supremeOptions;
}

public static SupremePowerSection getSupremePowerSection() {
if (supremePowerSection == null) {
ConfigurationSection typeSection = inst().getConfig().getConfigurationSection("power-section");
if (typeSection == null) {
supremePowerSection = SupremePowerSection.defaultValue();
} else {
supremePowerSection = SupremePowerSection.builder()
.capacitorAurumCapacity(typeSection.getInt("capacitor-aurum-capacity", 1000000))
.capacitorTitaniumCapacity(typeSection.getInt("capacitor-titanium-capacity", 4000000))
.capacitorAdamantiumCapacity(typeSection.getInt("capacitor-adamantium-capacity", 16000))
.capacitorThorniumCapacity(typeSection.getInt("capacitor-thornium-capacity", 1000000))
.capacitorSupremeCapacity(typeSection.getInt("capacitor-supreme-capacity", 16000000))
.generatorBasicIgnisEnergy(typeSection.getInt("generator-basic-ignis-energy", 2500))
.generatorBasicIgnisBuffer(typeSection.getInt("generator-basic-ignis-buffer", 5000))
.generatorBasicVentusEnergy(typeSection.getInt("generator-basic-ventus-energy", 2500))
.generatorBasicVentusBuffer(typeSection.getInt("generator-basic-ventus-buffer", 5000))
.generatorBasicAquaEnergy(typeSection.getInt("generator-basic-aqua-energy", 2500))
.generatorBasicAquaBuffer(typeSection.getInt("generator-basic-aqua-buffer", 5000))
.generatorBasicLuxEnergy(typeSection.getInt("generator-basic-lux-energy", 2500))
.generatorBasicLuxBuffer(typeSection.getInt("generator-basic-lux-buffer", 5000))
.generatorBasicLumiumEnergy(typeSection.getInt("generator-basic-lumium-energy", 5000))
.generatorBasicLumiumBuffer(typeSection.getInt("generator-basic-lumium-buffer", 10000))
.generatorIgnisEnergy(typeSection.getInt("generator-ignis-energy", 25000))
.generatorIgnisBuffer(typeSection.getInt("generator-ignis-buffer", 50000))
.generatorVentusEnergy(typeSection.getInt("generator-ventus-energy", 25000))
.generatorVentusBuffer(typeSection.getInt("generator-ventus-buffer", 50000))
.generatorAquaEnergy(typeSection.getInt("generator-aqua-energy", 25000))
.generatorAquaBuffer(typeSection.getInt("generator-aqua-buffer", 50000))
.generatorLuxEnergy(typeSection.getInt("generator-lux-energy", 25000))
.generatorLuxBuffer(typeSection.getInt("generator-lux-buffer", 50000))
.generatorLumiumEnergy(typeSection.getInt("generator-lumium-energy", 75000))
.generatorLumiumBuffer(typeSection.getInt("generator-lumium-buffer", 500000))
.generatorThorniumEnergy(typeSection.getInt("generator-thornium-energy", 1000000))
.generatorThorniumBuffer(typeSection.getInt("generator-thornium-buffer", 6000000))
.generatorSupremeEnergy(typeSection.getInt("generator-supreme-energy", 2000000))
.generatorSupremeBuffer(typeSection.getInt("generator-supreme-buffer", 12000000))
.build();
}
}
return supremePowerSection;
}

public static SupremeLocalization getLocalization() {
if (localization == null) {
localization = new SupremeLocalization(inst());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.github.relativobr.supreme.generators;

import com.github.relativobr.supreme.Supreme;
import com.github.relativobr.supreme.resource.SupremeComponents;
import com.github.relativobr.supreme.resource.core.SupremeCoreAlloy;
import com.github.relativobr.supreme.resource.magical.SupremeCetrus;
Expand All @@ -16,39 +17,33 @@
@UtilityClass
public class SupremeCapacitor {

public static final int AURUM_CAPACITY = 1000000;
public static final int TITANIUM_CAPACITY = 4000000;
public static final int ADAMANTIUM_CAPACITY = 16000000;
public static final int THORNIUM_CAPACITY = 100000000;
public static final int SUPREME_CAPACITY = 1600000000; // infinity

public static final SlimefunItemStack AURUM_CAPACITOR = new SupremeItemStack("SUPREME_AURUM_CAPACITOR",
"db2b1c052e84a4ad245a4d1ca5b10bd7f5249af0ca373f99174ce7990e597836", false,
LoreBuilder.machine(MachineTier.ADVANCED, MachineType.CAPACITOR), UtilEnergy.energyCapacity(AURUM_CAPACITY));
LoreBuilder.machine(MachineTier.ADVANCED, MachineType.CAPACITOR), UtilEnergy.energyCapacity(Supreme.getSupremePowerSection().getCapacitorAurumCapacity()));
public static final ItemStack[] MACHINE_AURUM_CAPACITOR = new ItemStack[]{SupremeComponents.AURUM_PLATE,
SlimefunItems.ENERGIZED_CAPACITOR, SupremeComponents.AURUM_PLATE, SupremeComponents.AURUM_PLATE,
SupremeCoreAlloy.RESOURCE_CORE_IRON, SupremeComponents.AURUM_PLATE, SupremeComponents.INDUCTOR_MACHINE,
SlimefunItems.ENERGIZED_CAPACITOR, SupremeComponents.INDUCTOR_MACHINE};

public static final SlimefunItemStack TITANIUM_CAPACITOR = new SupremeItemStack("SUPREME_TITANIUM_CAPACITOR",
"b30ad864b265ab178a03e27fc249a1e32941e007486febd0059e4e3b76c11958", false,
LoreBuilder.machine(MachineTier.ADVANCED, MachineType.CAPACITOR), UtilEnergy.energyCapacity(TITANIUM_CAPACITY));
LoreBuilder.machine(MachineTier.ADVANCED, MachineType.CAPACITOR), UtilEnergy.energyCapacity(Supreme.getSupremePowerSection().getCapacitorTitaniumCapacity()));
public static final ItemStack[] MACHINE_TITANIUM_CAPACITOR = new ItemStack[]{SupremeComponents.TITANIUM_PLATE,
AURUM_CAPACITOR, SupremeComponents.TITANIUM_PLATE, SupremeComponents.TITANIUM_PLATE,
SupremeCoreAlloy.RESOURCE_CORE_REDSTONE, SupremeComponents.TITANIUM_PLATE, SupremeComponents.STAINLESS_MACHINE,
AURUM_CAPACITOR, SupremeComponents.STAINLESS_MACHINE};

public static final SlimefunItemStack ADAMANTIUM_CAPACITOR = new SupremeItemStack("SUPREME_ADAMANTIUM_CAPACITOR",
"9ac52419b99025828c89fa825945e6948e45bb5a22e4425a59e9096e4c1ac38", false,
LoreBuilder.machine(MachineTier.ADVANCED, MachineType.CAPACITOR), UtilEnergy.energyCapacity(ADAMANTIUM_CAPACITY));
LoreBuilder.machine(MachineTier.ADVANCED, MachineType.CAPACITOR), UtilEnergy.energyCapacity(Supreme.getSupremePowerSection().getCapacitorAdamantiumCapacity()));
public static final ItemStack[] MACHINE_ADAMANTIUM_CAPACITOR = new ItemStack[]{SupremeComponents.ADAMANTIUM_PLATE,
TITANIUM_CAPACITOR, SupremeComponents.ADAMANTIUM_PLATE, SupremeComponents.ADAMANTIUM_PLATE,
SupremeCoreAlloy.RESOURCE_CORE_EMERALD, SupremeComponents.ADAMANTIUM_PLATE, SupremeComponents.CONVEYANCE_MACHINE,
TITANIUM_CAPACITOR, SupremeComponents.CONVEYANCE_MACHINE};

public static final SlimefunItemStack THORNIUM_CAPACITOR = new SupremeItemStack("SUPREME_THORNIUM_CAPACITOR",
"9aab01a5d9512e3175bf3af2edbfd59419dc5662605c42c91730e711254efcc4", false,
LoreBuilder.machine(MachineTier.END_GAME, MachineType.CAPACITOR), UtilEnergy.energyCapacity(THORNIUM_CAPACITY));
LoreBuilder.machine(MachineTier.END_GAME, MachineType.CAPACITOR), UtilEnergy.energyCapacity(Supreme.getSupremePowerSection().getCapacitorThorniumCapacity()));
public static final ItemStack[] MACHINE_THORNIUM_CAPACITOR = new ItemStack[]{SupremeComponents.THORNIUM_ENERGIZED,
ADAMANTIUM_CAPACITOR, SupremeComponents.THORNIUM_ENERGIZED, SupremeComponents.THORNIUM_ENERGIZED,
SupremeCetrus.CETRUS_LUMIUM, SupremeComponents.THORNIUM_ENERGIZED, SupremeComponents.CRYSTALLIZER_MACHINE,
Expand Down

0 comments on commit 4d8b06b

Please sign in to comment.