Skip to content

Commit

Permalink
Added the ME Import Export bus
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroksl committed Jan 10, 2025
1 parent ee5ae2d commit 4e7f7f8
Show file tree
Hide file tree
Showing 25 changed files with 480 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21.1 2024-11-04T02:02:08.7664527 Language
4f31a9937280c90098f9339e53be7c7a50080aec assets/advanced_ae/lang/en_us.json
// 1.21.1 2025-01-09T23:32:54.3395719 Language
d8bb9a481806f65ecb6ce44314910d4e7ff780eb assets/advanced_ae/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2025-01-01T18:36:48.3227721 Recipes
// 1.21.1 2025-01-09T22:40:32.7837891 Recipes
2cc379f3eeb84b4d9eeb014db2854841c785f472 data/advanced_ae/advancement/recipes/misc/advpartenc.json
828b1236efbaa89691afb2969beabb8ba02286c5 data/advanced_ae/advancement/recipes/misc/advpatpro2.json
183306c693387e207e828284e1b68df9f2472ce4 data/advanced_ae/advancement/recipes/misc/advpatpropart.json
Expand All @@ -12,6 +12,7 @@
cbeac061335514038278213fe2d2808770a9c70d data/advanced_ae/advancement/recipes/misc/flight_card.json
d7ce17fdd3a979b80c2336360df0656c386a64cb data/advanced_ae/advancement/recipes/misc/flight_drift_card.json
32f77e1a4e8a78933fe7e026ab072d9db4f3ef86 data/advanced_ae/advancement/recipes/misc/hp_buffer_card.json
5c9699003633e9e02a3591654e4aaec96503a86b data/advanced_ae/advancement/recipes/misc/import_export_bus.json
094e6815779f1c104fbf6d33856ec78b8e00ce1f data/advanced_ae/advancement/recipes/misc/jump_height_card.json
261c6982fc5f0d439120e223437e6ad54b0980e0 data/advanced_ae/advancement/recipes/misc/largeappupgrade.json
9d796f27ce53a128f90fd7bd4792958c4a920b51 data/advanced_ae/advancement/recipes/misc/lava_immunity_card.json
Expand Down Expand Up @@ -89,6 +90,7 @@ ae0a82a8cdb61065098b90ec37bd9d6ec38996a8 data/advanced_ae/recipe/eaequantumunit.
185d7ef3b2bb6d1de241fe96aa67db6a466c4ae8 data/advanced_ae/recipe/fluixcrystalfromdust.json
0dbc6125ab90ff0f8cf56e06abda958e47d30681 data/advanced_ae/recipe/fluixcrystals.json
64182b02288c01dfdbb66a2fee5ba31c70e65443 data/advanced_ae/recipe/hp_buffer_card.json
12948b53681a116100085408a69c49ac862278a8 data/advanced_ae/recipe/import_export_bus.json
86156fb7648c2fd29c09901049d93bbfc6c6725b data/advanced_ae/recipe/jump_height_card.json
95082831618d16d2b33e0b3d1f91cb14fcdf381d data/advanced_ae/recipe/largeappupgrade.json
ed946a4c79b9d94fd8009edbfc022f907b0b52b5 data/advanced_ae/recipe/lava_immunity_card.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2024-11-03T21:53:31.8265319 Block States / Models
// 1.21.1 2025-01-09T22:40:32.7867923 Block States / Models
95a299ecaf1f57e89c3507297d4be2fc99a2749c assets/advanced_ae/blockstates/adv_pattern_provider.json
fef5598f6fe49cc3150d9233ce01bc5a7136fcf9 assets/advanced_ae/blockstates/data_entangler.json
9f77870684c7b9108903c29765927a81ea7d4cfd assets/advanced_ae/blockstates/quantum_accelerator.json
Expand Down Expand Up @@ -50,6 +50,7 @@ e35a61f186f90f6dd0480f8de0e005464ac09ccf assets/advanced_ae/models/block/small_a
18bc3382d92249c7a25ec5a0f3d2b13d29bbbf1b assets/advanced_ae/models/item/flight_card.json
f35c490f4bbe7a90e37e79eb1c5e4a483f0dc173 assets/advanced_ae/models/item/flight_drift_card.json
4b807cc954db0ab98470a3a9916958c24145ae07 assets/advanced_ae/models/item/hp_buffer_card.json
ee4ba8be893b32cc3e2111d6d4d4d0459424bf95 assets/advanced_ae/models/item/import_export_bus_part.json
80a84c314c1c8a52aee00e41de53d76aa6426017 assets/advanced_ae/models/item/jump_height_card.json
4baa96609f9c01bfe753d9314ed45d1f129c7cc3 assets/advanced_ae/models/item/lava_immunity_card.json
cc11a19eaad2f958156a078c5584029b442ecbb7 assets/advanced_ae/models/item/luck_card.json
Expand Down Expand Up @@ -95,5 +96,6 @@ bb7474d30fbe3abc133ca72263ceb2b52b582167 assets/advanced_ae/models/item/throughp
0290e8691b2f37c73875043ccc90bce56b0a31b9 assets/advanced_ae/models/item/walk_speed_card.json
bff85a3e62c8e237eb7ea9df55f40d89765b4988 assets/advanced_ae/models/item/water_breathing_card.json
bc562a06060cc38c38d195c0f1bbc6dbc29aed97 assets/advanced_ae/models/part/adv_pattern_provider_part.json
6209b845229ce1d1ca9afb308004d3ada5e232d4 assets/advanced_ae/models/part/import_export_bus_part.json
b2db4877af0be594a4a1851ef4d5e28b28a9e46d assets/advanced_ae/models/part/small_adv_pattern_provider_part.json
c5876573d553e04010c9d84c69a2247261b4db74 assets/advanced_ae/models/part/stock_export_bus_part.json
6 changes: 4 additions & 2 deletions src/generated/resources/assets/advanced_ae/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"fluid_type.advanced_ae.quantum_infusion_type": "Quantum Infusion",
"gui.advanced_ae.AdvPatternEncoder": "Advanced Pattern Encoder",
"gui.advanced_ae.AdvPatternProvider": "ME Adv. Pattern Provider",
"gui.advanced_ae.ImportExportBus": "ME Import Export Bus",
"gui.advanced_ae.ItemNotCraftable": "No patterns available for Pick-Crafting the current target.",
"gui.advanced_ae.MagnetRangeSlider": "Pickup Range",
"gui.advanced_ae.ModName": "Advanced AE",
Expand All @@ -41,7 +42,7 @@
"gui.advanced_ae.SetAmount": "Set Stock Amount",
"gui.advanced_ae.SetAmountButtonHint": "Middle click to set the amount to keep in stock",
"gui.advanced_ae.SlowThroughputMonitorValue": "%s%s/m",
"gui.advanced_ae.StockExportBus": "Stock Export Bus",
"gui.advanced_ae.StockExportBus": "ME Stock Export Bus",
"gui.advanced_ae.ThroughputMonitorValue": "%s%s/s",
"gui.advanced_ae.UpgradeNotEnabledMessage": "%s is not enabled.",
"gui.advanced_ae.UpgradeNotInstalledMessage": "%s is not installed.",
Expand Down Expand Up @@ -119,6 +120,7 @@
"item.advanced_ae.flight_card": "Flight Card",
"item.advanced_ae.flight_drift_card": "Flight Drift Card",
"item.advanced_ae.hp_buffer_card": "HP Buffer Card",
"item.advanced_ae.import_export_bus_part": "ME Import Export Bus",
"item.advanced_ae.jump_height_card": "Jump Height Card",
"item.advanced_ae.lava_immunity_card": "Lava Immunity Card",
"item.advanced_ae.luck_card": "Luck Card",
Expand Down Expand Up @@ -146,7 +148,7 @@
"item.advanced_ae.small_adv_pattern_provider_part": "Advanced Pattern Provider",
"item.advanced_ae.sprint_speed_card": "Sprint Speed Card",
"item.advanced_ae.step_assist_card": "Step Assist Card",
"item.advanced_ae.stock_export_bus_part": "Stock Export Bus",
"item.advanced_ae.stock_export_bus_part": "ME Stock Export Bus",
"item.advanced_ae.strength_card": "Strength Card",
"item.advanced_ae.swim_speed_card": "Swim Speed Card",
"item.advanced_ae.throughput_monitor": "ME Throughput Monitor",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "ae2:item/export_bus",
"textures": {
"back": "advanced_ae:part/import_export_bus_back",
"front": "advanced_ae:part/import_export_bus",
"sides": "advanced_ae:part/import_export_bus_sides"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parent": "ae2:part/export_bus_base",
"textures": {
"back": "advanced_ae:part/import_export_bus_back",
"front": "advanced_ae:part/import_export_bus",
"particle": "advanced_ae:part/import_export_bus_back",
"sides": "advanced_ae:part/import_export_bus_sides",
"sidesStatus": "ae2:part/monitor_sides_status"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"hasItem": {
"conditions": {
"items": [
{
"items": "ae2:export_bus"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "advanced_ae:import_export_bus"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"hasItem"
]
],
"rewards": {
"recipes": [
"advanced_ae:import_export_bus"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"E": {
"item": "ae2:export_bus"
},
"I": {
"item": "ae2:export_bus"
},
"L": {
"item": "ae2:logic_processor"
}
},
"pattern": [
" ",
"ILE",
" "
],
"result": {
"count": 1,
"id": "advanced_ae:import_export_bus_part"
}
}
4 changes: 4 additions & 0 deletions src/main/java/net/pedroksl/advanced_ae/AdvancedAE.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ private static void initUpgrades(FMLCommonSetupEvent event) {
Upgrades.add(AEItems.CAPACITY_CARD, AAEItems.STOCK_EXPORT_BUS, 5);
Upgrades.add(AEItems.REDSTONE_CARD, AAEItems.STOCK_EXPORT_BUS, 1);
Upgrades.add(AEItems.CRAFTING_CARD, AAEItems.STOCK_EXPORT_BUS, 1);
Upgrades.add(AEItems.SPEED_CARD, AAEItems.IMPORT_EXPORT_BUS, 4);
Upgrades.add(AEItems.CAPACITY_CARD, AAEItems.IMPORT_EXPORT_BUS, 5);
Upgrades.add(AEItems.REDSTONE_CARD, AAEItems.IMPORT_EXPORT_BUS, 1);
Upgrades.add(AEItems.CRAFTING_CARD, AAEItems.IMPORT_EXPORT_BUS, 1);

if (Addons.APPFLUX.isLoaded()) {
AppliedFluxPlugin.init();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/pedroksl/advanced_ae/client/AAEClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ private static void initScreens(RegisterMenuScreensEvent event) {

InitScreens.register(
event, AAEMenus.STOCK_EXPORT_BUS.get(), StockExportBusScreen::new, "/screens/stock_export_bus.json");
InitScreens.register(
event, AAEMenus.IMPORT_EXPORT_BUS.get(), ImportExportBusScreen::new, "/screens/import_export_bus.json");

InitScreens.register(
event, AAEMenus.OUTPUT_DIRECTION.get(), OutputDirectionScreen::new, "/screens/output_direction.json");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package net.pedroksl.advanced_ae.client.gui;

import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Inventory;
import net.pedroksl.advanced_ae.gui.ImportExportBusMenu;

import appeng.api.config.RedstoneMode;
import appeng.api.config.SchedulingMode;
import appeng.api.config.Settings;
import appeng.api.config.YesNo;
import appeng.client.gui.implementations.UpgradeableScreen;
import appeng.client.gui.style.ScreenStyle;
import appeng.client.gui.widgets.ServerSettingToggleButton;
import appeng.client.gui.widgets.SettingToggleButton;
import appeng.core.definitions.AEItems;

public class ImportExportBusScreen extends UpgradeableScreen<ImportExportBusMenu> {

private final SettingToggleButton<RedstoneMode> redstoneMode;
private final SettingToggleButton<YesNo> craftMode;
private final SettingToggleButton<SchedulingMode> schedulingMode;

public ImportExportBusScreen(
ImportExportBusMenu menu, Inventory playerInventory, Component title, ScreenStyle style) {
super(menu, playerInventory, title, style);

this.redstoneMode = new ServerSettingToggleButton<>(Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE);
this.addToLeftToolbar(this.redstoneMode);

if ((menu.getHost()).getConfigManager().hasSetting(Settings.CRAFT_ONLY)) {
this.craftMode = new ServerSettingToggleButton<>(Settings.CRAFT_ONLY, YesNo.NO);
this.addToLeftToolbar(this.craftMode);
} else {
this.craftMode = null;
}

if ((menu.getHost()).getConfigManager().hasSetting(Settings.SCHEDULING_MODE)) {
this.schedulingMode = new ServerSettingToggleButton<>(Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT);
this.addToLeftToolbar(this.schedulingMode);
} else {
this.schedulingMode = null;
}
}

@Override
protected void updateBeforeRender() {
super.updateBeforeRender();

this.redstoneMode.set((this.menu).getRedStoneMode());
this.redstoneMode.setVisibility(this.menu.hasUpgrade(AEItems.REDSTONE_CARD));

if (this.craftMode != null) {
this.craftMode.set(this.menu.getCraftingMode());
this.craftMode.setVisibility(this.menu.hasUpgrade(AEItems.CRAFTING_CARD));
}

if (this.schedulingMode != null) {
this.schedulingMode.set(this.menu.getSchedulingMode());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
import net.pedroksl.advanced_ae.common.items.armors.*;
import net.pedroksl.advanced_ae.common.items.upgrades.QuantumUpgradeBaseItem;
import net.pedroksl.advanced_ae.common.items.upgrades.UpgradeType;
import net.pedroksl.advanced_ae.common.parts.AdvPatternProviderPart;
import net.pedroksl.advanced_ae.common.parts.SmallAdvPatternProviderPart;
import net.pedroksl.advanced_ae.common.parts.StockExportBusPart;
import net.pedroksl.advanced_ae.common.parts.ThroughputMonitorPart;
import net.pedroksl.advanced_ae.common.parts.*;
import net.pedroksl.advanced_ae.common.patterns.AdvProcessingPattern;

import appeng.api.crafting.PatternDetailsHelper;
Expand Down Expand Up @@ -61,7 +58,9 @@ public static List<ItemDefinition<?>> getQuantumCards() {
SmallAdvPatternProviderPart.class,
SmallAdvPatternProviderPart::new);
public static final ItemDefinition<PartItem<StockExportBusPart>> STOCK_EXPORT_BUS =
part("Stock Export Bus", "stock_export_bus_part", StockExportBusPart.class, StockExportBusPart::new);
part("ME Stock Export Bus", "stock_export_bus_part", StockExportBusPart.class, StockExportBusPart::new);
public static final ItemDefinition<PartItem<ImportExportBusPart>> IMPORT_EXPORT_BUS =
part("ME Import Export Bus", "import_export_bus_part", ImportExportBusPart.class, ImportExportBusPart::new);
public static final ItemDefinition<PartItem<ThroughputMonitorPart>> THROUGHPUT_MONITOR = part(
"ME Throughput Monitor", "throughput_monitor", ThroughputMonitorPart.class, ThroughputMonitorPart::new);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.pedroksl.advanced_ae.common.inventory.AdvPatternEncoderHost;
import net.pedroksl.advanced_ae.common.inventory.QuantumArmorMenuHost;
import net.pedroksl.advanced_ae.common.logic.AdvPatternProviderLogicHost;
import net.pedroksl.advanced_ae.common.parts.ImportExportBusPart;
import net.pedroksl.advanced_ae.common.parts.StockExportBusPart;
import net.pedroksl.advanced_ae.gui.*;
import net.pedroksl.advanced_ae.gui.advpatternprovider.AdvPatternProviderMenu;
Expand Down Expand Up @@ -43,6 +44,8 @@ public class AAEMenus {

public static final Supplier<MenuType<StockExportBusMenu>> STOCK_EXPORT_BUS =
create("stock_export_bus", StockExportBusMenu::new, StockExportBusPart.class);
public static final Supplier<MenuType<ImportExportBusMenu>> IMPORT_EXPORT_BUS =
create("import_export_bus", ImportExportBusMenu::new, ImportExportBusPart.class);

public static final Supplier<MenuType<OutputDirectionMenu>> OUTPUT_DIRECTION =
create("output_direction", OutputDirectionMenu::new, IDirectionalOutputHost.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public enum AAEText implements LocalizationEnum {
AdvPatternEncoder("Advanced Pattern Encoder", Type.GUI),
ReactionChamber("Reaction Chamber", Type.GUI),
QuantumCrafter("Quantum Crafter", Type.GUI),
StockExportBus("Stock Export Bus", Type.GUI),
StockExportBus("ME Stock Export Bus", Type.GUI),
ImportExportBus("ME Import Export Bus", Type.GUI),
EmiReactionChamber("Reaction Chamber", Type.EMI_CATEGORY),
AnyButton("Target the face adjacent to the adv. pattern provider", Type.TOOLTIP),
NorthButton("Target the NORTH face of the machine.", Type.TOOLTIP),
Expand Down
Loading

0 comments on commit 4e7f7f8

Please sign in to comment.