A lightweight Minecraft Forge mod that:
The implementation deliberately relies on vanilla inventory/NBT handling. It adds no custom item, block, capability, packet, or persistent data format.
A separate JAR is published for each supported Minecraft version. Use the JAR that matches your Minecraft version; they are not interchangeable.
| Minecraft | Forge | Java | JAR |
|---|---|---|---|
| 1.18.2 | 40.3.12 | 17 | craftable_infinite_shulker_box-mc1.18.2-<version>.jar |
| 1.19.2 | 43.5.2 | 17 | craftable_infinite_shulker_box-mc1.19.2-<version>.jar |
| 1.19.4 | 45.4.3 | 17 | craftable_infinite_shulker_box-mc1.19.4-<version>.jar |
| 1.20.1 | 47.4.23 | 17 | craftable_infinite_shulker_box-mc1.20.1-<version>.jar |
| 1.21.1 | 52.1.16 | 21 | craftable_infinite_shulker_box-mc1.21.1-<version>.jar |
Each JAR accepts any Forge release in its major version line (for example Forge 47 for 1.20.1), and its mods.toml restricts it to its own Minecraft version so the wrong JAR fails fast with a clear message instead of misbehaving.
Install the JAR in the mods directory on both the client and server. Installing it on both sides is recommended because GUI validation occurs on both sides and automation is server-side.
Fill every slot of a crafting table with one minecraft:chest (nine chests total) to craft one minecraft:shulker_box. The recipe unlocks when a player obtains a chest.
Build every supported version at once:
./gradlew build
Collect all JARs into a single directory (build/libs):
./gradlew collectJars
Build only one version:
./gradlew :versions:1.20.1:build
Each version's JAR is written to versions/<mc_version>/build/libs/.
IDE run configurations are generated per version, for example ./gradlew :versions:1.20.1:genIntellijRuns or :versions:1.20.1:genEclipseRuns.
ForgeGradle forks external JVMs (Access Transformer, renamer, decompiler) that do not inherit org.gradle.jvmargs. On a machine with little RAM those forks can die with OutOfMemoryError, which leaves a truncated JAR in the ForgeGradle cache and produces a confusing "Could not find net.minecraftforge:forge:..." error on the next run. Give the forked JVMs their own heap:
JAVA_TOOL_OPTIONS=-Xmx1600m ./gradlew build
If a build already failed this way, delete the affected cache entry (~/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/<version>_mapped_*) before retrying.
common/ Java sources + Mixin config shared by every version
gradle/forge-mod.gradle the ForgeGradle build logic shared by every version
versions/<mc_version>/ per-version gradle.properties + data-pack resources
The Java code is shared: both Mixin targets (ShulkerBoxSlot.mayPlace and ShulkerBoxBlockEntity.canPlaceItemThroughFace) have identical signatures in all supported Minecraft versions, so only build settings and data-pack resources differ.
ShulkerBoxSlotMixin permits vanilla shulker-box items in the shulker GUI.ShulkerBoxBlockEntityMixin permits them through sided inventory insertion.These are the version-specific details the per-version resources handle:
data/<namespace>/recipe/ and advancement/ while older versions use recipes/ and advancements/."result": {"id": ..., "count": ...}; earlier versions use "result": {"item": ..., "count": ...}.category and show_notification only exist from 1.19.4 on, so the 1.18.2 and 1.19.2 recipes omit them. The only valid crafting categories are building, redstone, equipment and misc."items": "minecraft:chest"); earlier versions take a list.JAVA_21 compatibility level, so 1.21.1 uses the Mixin 0.8.7 that Forge 52 bundles.Repeat for each version you intend to ship:
本Modに特定のオープンソースライセンス(MIT等)は設定しておりません。