From f37b485047408b0c0bc82b00512dd9ea1e8b8376 Mon Sep 17 00:00:00 2001 From: lothrazar Date: Sat, 30 Nov 2024 11:25:37 -0800 Subject: [PATCH] expanded feature: add assets and recipes for the two new items --- gradle.properties | 2 +- .../storagenetwork/StorageNetworkMod.java | 2 +- .../block/exchange/BlockExchange.java | 2 +- .../ContainerNetworkInventoryExpanded.java | 2 +- .../inventory/ScreenNetworkInventory.java | 1 - .../block/request/ScreenNetworkTable.java | 1 - .../block/request/TileRequest.java | 6 ---- .../storagenetwork/emi/EMIPlugin.java | 2 +- .../storagenetwork/gui/NetworkWidget.java | 3 +- .../storagenetwork/registry/SsnRegistry.java | 2 +- .../assets/storagenetwork/lang/en_us.json | 15 ++++++++-- .../models/item/request_expanded.json | 3 ++ .../textures/block/request_expanded.png | Bin 0 -> 552 bytes .../textures/item/expanded_remote.png | Bin 0 -> 561 bytes .../loot_tables/blocks/request_expanded.json | 20 +++++++++++++ .../recipes/expanded_remote.json | 19 ++++++++++++ .../recipes/request_expanded.json | 28 ++++++++++++++++++ update.json | 3 +- 18 files changed, 92 insertions(+), 19 deletions(-) create mode 100644 src/main/resources/assets/storagenetwork/models/item/request_expanded.json create mode 100644 src/main/resources/assets/storagenetwork/textures/block/request_expanded.png create mode 100644 src/main/resources/assets/storagenetwork/textures/item/expanded_remote.png create mode 100644 src/main/resources/data/storagenetwork/loot_tables/blocks/request_expanded.json create mode 100644 src/main/resources/data/storagenetwork/recipes/expanded_remote.json create mode 100644 src/main/resources/data/storagenetwork/recipes/request_expanded.json diff --git a/gradle.properties b/gradle.properties index bb3e3aec..d1370fd0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ org.gradle.daemon=false mod_id=storagenetwork curse_id=268495 -mod_version=1.11.3 +mod_version=1.12.0 mc_version=1.20.1 diff --git a/src/main/java/com/lothrazar/storagenetwork/StorageNetworkMod.java b/src/main/java/com/lothrazar/storagenetwork/StorageNetworkMod.java index 56808ed9..5b10b3f5 100644 --- a/src/main/java/com/lothrazar/storagenetwork/StorageNetworkMod.java +++ b/src/main/java/com/lothrazar/storagenetwork/StorageNetworkMod.java @@ -65,7 +65,7 @@ private void setupClient(final FMLClientSetupEvent event) { MenuScreens.register(SsnRegistry.Menus.CRAFTING_REMOTE.get(), ScreenNetworkCraftingRemote::new); MenuScreens.register(SsnRegistry.Menus.INVENTORY.get(), ScreenNetworkInventory::new); MenuScreens.register(SsnRegistry.Menus.COLLECTOR.get(), ScreenCollectionFilter::new); - MenuScreens.register(SsnRegistry.Menus.INVENTORY_EXPANDED.get(), ScreenNetworkInventoryExpanded::new); + MenuScreens.register(SsnRegistry.Menus.REQUEST_EXPANDED.get(), ScreenNetworkInventoryExpanded::new); MenuScreens.register(SsnRegistry.Menus.EXPANDED_REMOTE.get(), ScreenNetworkExpandedRemote::new); } diff --git a/src/main/java/com/lothrazar/storagenetwork/block/exchange/BlockExchange.java b/src/main/java/com/lothrazar/storagenetwork/block/exchange/BlockExchange.java index 290e4b2c..fa7f6697 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/exchange/BlockExchange.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/exchange/BlockExchange.java @@ -32,7 +32,7 @@ public BlockEntityTicker getTicker(Level world, Block @Override public void appendHoverText(ItemStack stack, BlockGetter playerIn, List tooltip, TooltipFlag advanced) { super.appendHoverText(stack, playerIn, tooltip, advanced); - tooltip.add(Component.translatable("[WARNING: laggy on large networks] ").withStyle(ChatFormatting.DARK_GRAY)); + tooltip.add(Component.translatable("[WARNING: only use on small Storage Networks. A large AE2 network interfaced with a large Storage Network will cause lag] ").withStyle(ChatFormatting.DARK_GRAY)); } @Override diff --git a/src/main/java/com/lothrazar/storagenetwork/block/expand/ContainerNetworkInventoryExpanded.java b/src/main/java/com/lothrazar/storagenetwork/block/expand/ContainerNetworkInventoryExpanded.java index 75411375..feceefaf 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/expand/ContainerNetworkInventoryExpanded.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/expand/ContainerNetworkInventoryExpanded.java @@ -18,7 +18,7 @@ public class ContainerNetworkInventoryExpanded extends ContainerNetwork { private final ContainerLevelAccess access; public ContainerNetworkInventoryExpanded(int windowId, Level world, BlockPos pos, Inventory playerInv, Player player) { - this(SsnRegistry.Menus.INVENTORY_EXPANDED.get(), windowId, world, pos, playerInv, player); + this(SsnRegistry.Menus.REQUEST_EXPANDED.get(), windowId, world, pos, playerInv, player); } public ContainerNetworkInventoryExpanded(MenuType menuType, int windowId, Level world, BlockPos pos, Inventory playerInv, Player player) { diff --git a/src/main/java/com/lothrazar/storagenetwork/block/inventory/ScreenNetworkInventory.java b/src/main/java/com/lothrazar/storagenetwork/block/inventory/ScreenNetworkInventory.java index f45a83f0..5d811ed3 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/inventory/ScreenNetworkInventory.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/inventory/ScreenNetworkInventory.java @@ -51,7 +51,6 @@ public void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mouseY) network.applySearchTextToSlots(); network.renderItemSlots(ms, mouseX, mouseY, font); } - // all the IGUINETWORK implementations @Override diff --git a/src/main/java/com/lothrazar/storagenetwork/block/request/ScreenNetworkTable.java b/src/main/java/com/lothrazar/storagenetwork/block/request/ScreenNetworkTable.java index 8d90ddd5..59c48fa4 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/request/ScreenNetworkTable.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/request/ScreenNetworkTable.java @@ -54,7 +54,6 @@ public void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mouseY) network.applySearchTextToSlots(); network.renderItemSlots(ms, mouseX, mouseY, font); } - // all the IGUINETWORK implementations @Override diff --git a/src/main/java/com/lothrazar/storagenetwork/block/request/TileRequest.java b/src/main/java/com/lothrazar/storagenetwork/block/request/TileRequest.java index 5f8e374d..17f47237 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/request/TileRequest.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/request/TileRequest.java @@ -1,23 +1,17 @@ package com.lothrazar.storagenetwork.block.request; -import java.util.HashMap; -import java.util.Map; import com.lothrazar.storagenetwork.StorageNetworkMod; import com.lothrazar.storagenetwork.api.EnumSortType; import com.lothrazar.storagenetwork.api.ITileNetworkSync; import com.lothrazar.storagenetwork.block.TileConnectable; import com.lothrazar.storagenetwork.registry.SsnRegistry; -import com.lothrazar.storagenetwork.util.UtilInventory; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.ListTag; -import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; public class TileRequest extends TileConnectable implements MenuProvider, ITileNetworkSync { diff --git a/src/main/java/com/lothrazar/storagenetwork/emi/EMIPlugin.java b/src/main/java/com/lothrazar/storagenetwork/emi/EMIPlugin.java index 7d3c2211..a7764aff 100644 --- a/src/main/java/com/lothrazar/storagenetwork/emi/EMIPlugin.java +++ b/src/main/java/com/lothrazar/storagenetwork/emi/EMIPlugin.java @@ -28,7 +28,7 @@ public void register(EmiRegistry registry) { registry.addWorkstation(VanillaEmiRecipeCategories.CRAFTING, EmiStack.of(SsnRegistry.Blocks.REQUEST.get())); registry.addRecipeHandler(SsnRegistry.Menus.REQUEST.get(), new EmiTransferHandler()); registry.addRecipeHandler(SsnRegistry.Menus.CRAFTING_REMOTE.get(), new EmiTransferHandler()); - registry.addRecipeHandler(SsnRegistry.Menus.INVENTORY_EXPANDED.get(), new EmiTransferHandler()); + registry.addRecipeHandler(SsnRegistry.Menus.REQUEST_EXPANDED.get(), new EmiTransferHandler()); registry.addRecipeHandler(SsnRegistry.Menus.EXPANDED_REMOTE.get(), new EmiTransferHandler()); // registry.addGenericDragDropHandler(new EmiGhostIngredientHandler()); registry.addGenericStackProvider((scr, x, y) -> { diff --git a/src/main/java/com/lothrazar/storagenetwork/gui/NetworkWidget.java b/src/main/java/com/lothrazar/storagenetwork/gui/NetworkWidget.java index f00677a9..8d28f271 100644 --- a/src/main/java/com/lothrazar/storagenetwork/gui/NetworkWidget.java +++ b/src/main/java/com/lothrazar/storagenetwork/gui/NetworkWidget.java @@ -475,8 +475,7 @@ public void render() { sortBtn.setTextureId(TextureEnum.SORT_NAME); break; } - if (this.clearGridBtn != null) { - } + if (this.clearGridBtn != null) {} focusBtn.setTextureId(gui.getAutoFocus() ? TextureEnum.RED : TextureEnum.GREY); directionBtn.setTextureId(gui.getDownwards() ? TextureEnum.SORT_DOWN : TextureEnum.SORT_UP); if (jeiBtn != null && ModList.get().isLoaded("jei")) { diff --git a/src/main/java/com/lothrazar/storagenetwork/registry/SsnRegistry.java b/src/main/java/com/lothrazar/storagenetwork/registry/SsnRegistry.java index b856080c..425920a6 100644 --- a/src/main/java/com/lothrazar/storagenetwork/registry/SsnRegistry.java +++ b/src/main/java/com/lothrazar/storagenetwork/registry/SsnRegistry.java @@ -144,7 +144,7 @@ public static class Menus { public static final RegistryObject> INVENTORY = CONTAINERS.register("inventory", () -> IForgeMenuType.create((windowId, inv, data) -> { return new ContainerNetworkInventory(windowId, inv.player.level(), data.readBlockPos(), inv, inv.player); })); - public static final RegistryObject> INVENTORY_EXPANDED = CONTAINERS.register("inventory_expanded", () -> IForgeMenuType.create((windowId, inv, data) -> { + public static final RegistryObject> REQUEST_EXPANDED = CONTAINERS.register("request_expanded", () -> IForgeMenuType.create((windowId, inv, data) -> { return new ContainerNetworkInventoryExpanded(windowId, inv.player.level(), data.readBlockPos(), inv, inv.player); })); public static final RegistryObject> INVENTORY_REMOTE = CONTAINERS.register("inventory_remote", () -> IForgeMenuType.create((windowId, inv, data) -> { diff --git a/src/main/resources/assets/storagenetwork/lang/en_us.json b/src/main/resources/assets/storagenetwork/lang/en_us.json index 70c00d7a..6f7557a7 100644 --- a/src/main/resources/assets/storagenetwork/lang/en_us.json +++ b/src/main/resources/assets/storagenetwork/lang/en_us.json @@ -45,16 +45,27 @@ "block.storagenetwork.request.guide": "Views the network inventory with full access to scroll, withdraw, and deposit items. Custom crafting grid that pulls ingredients from the network. See the $(l:crafting_remote)Remote version here$(/l) ", "block.storagenetwork.request.tooltip": "Used to overview and request items from the network with a crafting grid", + "block.storagenetwork.request_expanded": "Expanded Request Table", + "block.storagenetwork.request_expanded.guide": "If this is unuseable for you set your GUI SCALE to a lower number. May only work with large scale monitor resolutions. Views the network inventory with full access to scroll, withdraw, and deposit items. Custom crafting grid that pulls ingredients from the network. See the $(l:crafting_remote)Remote version here$(/l) ", + "block.storagenetwork.request_expanded.tooltip": "Only for use with extremely large gui scale resolutions", + + + "item.storagenetwork.expanded_remote": "Expanded Remote", + "item.storagenetwork.expanded_remote.tooltip": "Only for use with extremely large gui scale resolutions", + "item.storagenetwork.expanded_remote.guide": "If this is unuseable for you set your GUI SCALE to a lower number. May only work with large scale monitor resolutions. Full remote network access, not limited by range or dimension. Similar to the $(l:inventory)Storage Inventory$(/l). Open this also using the Key Binding", + + + "block.storagenetwork.inventory": "Storage Inventory", "block.storagenetwork.inventory.guide": "Views the network inventory with full access to scroll, withdraw, and deposit items. See the $(l:inventory_remote)Remote version here$(/l) ", "block.storagenetwork.inventory.tooltip": "Inventory access without a crafting grid", "block.storagenetwork.exchange": "Network Exchange Interface", - "block.storagenetwork.exchange.guide": "This exposes the network and acts as a controller for other automation systems or storage solutions. For example, a normal Hopper placed pointing at an Exchange Interface on a network, and it will insert the items into valid network slots as normal, similar to the $(l:import_kabel)Import Cable$(/l). A Hopper below will export arbitrary items. Try this with other storage mods! ", + "block.storagenetwork.exchange.guide": "This exposes the network as an inventory interface. For example, the AE2 mod has a ME Storage Bus that will connect to this, so the entire simple storage network can be accessed through your AE2 system. A Hopper below will export arbitrary items. Try this with other storage mods! ", "block.storagenetwork.exchange.tooltip": "Endpoint of the network for inventory connections", "block.storagenetwork.collector": "Network Collection Interface", - "block.storagenetwork.collector.guide": "This exposes the network and acts as an insert-only controller for other automation systems or storage solutions. For example, a normal Hopper placed pointing at an Exchange Interface on a network, and it will insert the items into valid network slots as normal, similar to the $(l:import_kabel)Import Cable$(/l). Does not allow any item extraction. Try this with other storage mods! ", + "block.storagenetwork.collector.guide": "This exposes the network and acts as an insert-only controller for other automation systems or storage solutions. For example, a normal Hopper will insert items similar to the $(l:import_kabel)Import Cable$(/l). Does not allow any item extraction. Try this with other storage mods! ", "block.storagenetwork.collector.tooltip": "Items inserted enter the network", "item.storagenetwork.speed_upgrade": "Speed Upgrade", diff --git a/src/main/resources/assets/storagenetwork/models/item/request_expanded.json b/src/main/resources/assets/storagenetwork/models/item/request_expanded.json new file mode 100644 index 00000000..fceb87bf --- /dev/null +++ b/src/main/resources/assets/storagenetwork/models/item/request_expanded.json @@ -0,0 +1,3 @@ +{ + "parent": "storagenetwork:block/request_expanded" +} \ No newline at end of file diff --git a/src/main/resources/assets/storagenetwork/textures/block/request_expanded.png b/src/main/resources/assets/storagenetwork/textures/block/request_expanded.png new file mode 100644 index 0000000000000000000000000000000000000000..7c8aef95d369103e74dd960138be086b292a7817 GIT binary patch literal 552 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}-0G|-o&X&3f-L2j24ZR&r{ar0xZ4K>BHKqnyYnCrGHPkXS&|bP=mbtO+ zrAwD|b#?nXn=Q5cdpa5?^|qTDYBwaW?QE?#Gtf3O)G{;BYG2W@A80IRfk$L90|Vay z5N6D}*2xJJ6f1F!C<)F_D=AMbN@WO0%*-p%^K%VRFx4~s-u!(sP{o$i2+uT6Pb~%x zAcvJfijkFp5yB! z(I{3j03{}{Gq3>F85kKGFfM?Y39^rM0mPh1KsE?40ZnBBs|>QV0J5OE3=IrGvL`G= zwggsafGP|s!eSfkMX{C$_i6nm!p0P7!L)Xq%(*I6Q6AnAD1 z;j-83zbQ7i_*O`Uyx1ARdiE;k&B)B@lZ(1VwEuGJ-h9&g+A(zFA?BuFo_AmTE^Pt1 N&C}J-Wt~$(696DYnp^+? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/storagenetwork/textures/item/expanded_remote.png b/src/main/resources/assets/storagenetwork/textures/item/expanded_remote.png new file mode 100644 index 0000000000000000000000000000000000000000..c758a0b17aa47be0e2d2f9c8981dfd5695a1b525 GIT binary patch literal 561 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sEXgD|57Yp@DXP^`o?q9iy!t)x7$D3u`~F*C13&(AeP!Bo%i zd-M0nKowh3BRtbQJ+&A(fE-o^DMnTXMj*=zh^3)ykXtkunZe>rK(-+x69XTRjsoJ$ zb{4RB29ON`%gPuTUN9qQ6e}5k5);@NSb*vbjEoH!7eLGe*~hv7V$LKW8w8kurZRz5 z23cAFSx{Yu1_mJ6s?HrMsT+f{fy^hKE{-7<{%3=%`I-%QO!x9OO+9m_B;lFB7lW84 zMzJa$3x@KIx`FCO9aCDi)^ga+`C