Tags
Creators
Details
2.3.0+26.1.2-neoforge
Compatibility
Changes
JsMacrosCE 2.3.0 for neoforge on Minecraft 26.1.2. Source: https://github.com/JsMacrosCE/JsMacros
Highlights
- Scripts can read item component defaults and per-stack changes separately. Typed getters expose durability, bundle contents, potion effects, and more without looking up component IDs.
- Smithing scripts can read each input by name, and
getOutput()returns the result shown in the smithing table. - Inventory helpers now report actual slot positions and expose all four cells of the player's crafting grid.
- Blast Furnaces and Smokers use the existing furnace helper. Crafter and mount slot maps reflect their actual menus.
- Magma Cubes match
EntityHelpers.Slimeagain on Minecraft 26.2 and 26.3.
Added
Item stacks
stack.getComponents()reads the stack's effective components, including defaults inherited from the item.getMaxDamage()andgetDamage()return numbers when present andnullwhen absent.getCustomData()reads arbitrary NBT attached to the stack.getBundleContents()reads the bundle's items, fullness, and selection.getContainerContents()preserves slot positions in stored inventories such as shulker boxes.getPotionContents()reads the base potion, effects, and color on potions and tipped arrows.getFood(),getConsumable(), andgetUseRemainder()read a stack's nutrition, consumption settings and effects, and item leftover after use.getWrittenBookContents()reads a signed book's metadata and formatted pages.getWritableBookContents()reads a book and quill's plain-text pages.getStoredEnchantments()reads enchantments stored in an enchanted book.getFireworks()andgetFireworkExplosion()read rocket flight duration and the shapes, colors, trails, and twinkle of explosions.getTool(),getAttributeModifiers(), andgetUseCooldown()expose mining rules, attribute modifiers, and the configured cooldown.getEquippable()reads the equipment slot, worn appearance, and equip rules.getArmorTrim(),getDyedColor(), andgetCustomModelData()expose the stack's appearance settings.getLodestoneTracker()reads a compass's saved target position, dimension, and tracking flag.getMapId()reads a filled map's numeric ID.- On Minecraft 26.3 and later,
getCookingFuel()andgetBrewingFuel()read furnace and brewing fuel settings, including values supplied by data-pack number providers. - Use
getIds(),has(id), andget(id)for component lookup by ID. UsegetChanges()to read saved additions, overrides, and removals separately.
Inventories
Inventories.SmithinghasgetTemplate(),getBase(), andgetAddition()for the three smithing inputs.Inventory.getScreenPos()returns the top-left corner of the inventory panel in GUI-scaled coordinates.
Changed
SmithingInventory.getOutput()now returns the result in slot 3. It previously returned the addition input in slot 2.Inventory.getSlotPos(slot)now returns the selected slot's top-left corner in GUI-scaled coordinates. It previously returned the panel origin regardless of the slot.PlayerInventory.getInput()now returns the 2×2 crafting grid as[column][row]. Its width and height are both 2, and its crafting slot count is 4.getInput(x, y)throwsIndexOutOfBoundsExceptionfor coordinates outside the grid.- Mobs without a more specific helper now match
EntityHelpers.Mob, so scripts can read their aggressive and no-AI flags. ItemStackHelper.getNBT()is deprecated and omitted from the generated reference and typings. Existing scripts can still call it at runtime for the same encoded component changes.
Fixed
Player.openInventory()and theOpenContainerevent now return anInventories.Furnacewrapper for Blast Furnaces and Smokers, giving scripts access to the same fuel, progress, and recipe-book methods as a regular furnace.- The Crafter slot map now keeps
mainandhotbaraligned with the player inventory. UsegetSlots("input")for the 3×3 grid andgetSlots("preview")for the recipe preview, which cannot be taken. - Horse inventory checks and slot maps now follow the menu's enabled saddle and armor slots. On Minecraft 1.21.11 and later, the generic Nautilus inventory also maps those slots when enabled.
- On Minecraft 26.2 and 26.3, Magma Cubes once again expose
getSize()andisSmall()throughEntityHelpers.Slime.
Upgrading
Update scripts that relied on the previous return values:
| If the script used… | Use… |
|---|---|
Smithing getOutput() to read the addition input |
getAddition() |
getSlotPos(slot) to read the inventory panel origin |
getScreenPos() |
Smithing's getLeftInput() and getRightInput() still work but are deprecated and planned for removal in 3.0.0. Replace them with getTemplate() and getBase(), respectively. Scripts that worked around the Crafter's shifted player-slot indices can now use getSlots("main") and getSlots("hotbar") directly.
Replace stack.getNBT() with stack.getComponents().getChanges() to read the saved changes. The new method returns an empty compound when there are no changes, and null if a change cannot be encoded. If a script used null to mean “unchanged,” check whether getKeys() is empty on the returned compound.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:2m9WfquA:6SdXVGsS"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:2m9WfquA:6SdXVGsS"
}

