Skip to content

Commit

Permalink
expanded feature: add assets and recipes for the two new items
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothrazar committed Nov 30, 2024
1 parent 9fa04b9 commit f37b485
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, Block
@Override
public void appendHoverText(ItemStack stack, BlockGetter playerIn, List<Component> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ContainerNetworkCraftingTable>());
registry.addRecipeHandler(SsnRegistry.Menus.CRAFTING_REMOTE.get(), new EmiTransferHandler<ContainerNetworkCraftingRemote>());
registry.addRecipeHandler(SsnRegistry.Menus.INVENTORY_EXPANDED.get(), new EmiTransferHandler<ContainerNetworkInventoryExpanded>());
registry.addRecipeHandler(SsnRegistry.Menus.REQUEST_EXPANDED.get(), new EmiTransferHandler<ContainerNetworkInventoryExpanded>());
registry.addRecipeHandler(SsnRegistry.Menus.EXPANDED_REMOTE.get(), new EmiTransferHandler<ContainerNetworkExpandedRemote>());
// registry.addGenericDragDropHandler(new EmiGhostIngredientHandler());
registry.addGenericStackProvider((scr, x, y) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public static class Menus {
public static final RegistryObject<MenuType<ContainerNetworkInventory>> 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<MenuType<ContainerNetworkInventoryExpanded>> INVENTORY_EXPANDED = CONTAINERS.register("inventory_expanded", () -> IForgeMenuType.create((windowId, inv, data) -> {
public static final RegistryObject<MenuType<ContainerNetworkInventoryExpanded>> 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<MenuType<ContainerNetworkRemote>> INVENTORY_REMOTE = CONTAINERS.register("inventory_remote", () -> IForgeMenuType.create((windowId, inv, data) -> {
Expand Down
15 changes: 13 additions & 2 deletions src/main/resources/assets/storagenetwork/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "storagenetwork:block/request_expanded"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "pool1",
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "storagenetwork:request_expanded"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" i ",
"imi",
" i "
],
"key": {
"i": {
"item": "storagenetwork:import_filter_kabel"
},
"m": {
"item": "storagenetwork:request_expanded"
}
},
"result": {
"item": "storagenetwork:expanded_remote"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"csc",
"eme",
"cpc"
],
"key": {
"e": {
"item": "minecraft:ender_eye"
},
"c": {
"tag": "forge:storage_blocks/copper"
},
"m": {
"item": "storagenetwork:operation_upgrade"
},
"s": {
"item": "storagenetwork:stack_upgrade"
},
"p": {
"item": "storagenetwork:speed_upgrade"
}
},
"result": {
"item": "storagenetwork:request_expanded"
}
}
3 changes: 2 additions & 1 deletion update.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/simple-storage-network",
"promos": {
"1.20.1-latest": "1.11.3"
"1.20.1-latest": "1.12.0"
},
"1.20.1": {
"1.10.0":"Ported to 1.20.1, depends on flib-0.0.7+ . Fixed patchouli book. Port to new non-deprecated curios datapack tags. Includes pull requests merged into the 1.18 and 1.19 branches : Merge pull request #492 from IIpragmaII/trunk/1.18 @IIpragmaII @VasurTrekkson Improved performance for export node. fix priority german translation @lightlike . Fixed recipes not showing when pressing the JEI recipe key @Demerso. Create uk_ua.json @SKZGx "
Expand All @@ -12,5 +12,6 @@

,"1.11.2":"Ported the Cable Facades feature (from Minecraft 1.12.2), so that you can shift-left-click with a block on a cable to hide it with a facade. Disable this feature or ignore certain blocks with the config file"
,"1.11.3":"Fixed item tooltips not rendering in Storage Remote. Fixed visual rendering and text errors inside of import/export cables using the 'operation upgrade'"
,"1.12.0":"Added new blocks to support large monitors and large GUI Scale resolutions, the Expanded Request Table and the Expanded Remote"
}
}

0 comments on commit f37b485

Please sign in to comment.