Skip to content

Commit

Permalink
support 1.19.1 and tweak config defaults and anvil mixin priority
Browse files Browse the repository at this point in the history
I will write a proper mixin plugin later
  • Loading branch information
Andrew6rant committed Aug 5, 2022
1 parent 9a75f0a commit 37f249b
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
version-type: release
github-tag: 3.0.1-1.19.x
loaders: |
fabric
quilt
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.19
yarn_mappings=1.19+build.4
minecraft_version=1.19.1
yarn_mappings=1.19.1+build.6
loader_version=0.14.8

# Mod Properties
mod_version = 3.0.1-1.19.x
mod_version = 3.0.2-1.19.x
maven_group = io.github.Andrew6rant
archives_base_name = stacker

# Dependencies
fabric_version=0.56.1+1.19
fabric_version=0.58.5+1.19.1
modmenu_version=4.0.0
cloth_config_version=7.0.72
stacc_version=1.3.4
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ public class StackerConfig implements ConfigData {

@ConfigEntry.Gui.Tooltip
public List<String> itemOverride = Arrays.asList(
"minecraft:bundle:1",
"#stacker:not_stackable:1",
"minecraft:totem_of_undying:16",
"#c:potions:16",
"#inmis:backpacks:1",
"#techreborn:not_stackable:1"
"#c:potions:16"
);
// #techreborn:not_stackable and #inmis:backpacks are kept for backwards compatibility with older configs
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(AnvilScreenHandler.class)
@Mixin(value = AnvilScreenHandler.class, priority = 999) // default priority is 1000, so this applies a bit after other mod's AnvilScreenHandler mixins
public class AnvilScreenHandlerMixin {
// Credit to ZoeyTheEgoist for this mixin
// Credit to ZoeyTheEgoist for the original code behind this mixin
@Redirect(method = "onTakeOutput", at = @At(value = "INVOKE", target = "Lnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V", ordinal = 3))
private void setDecrementSlot1StackCount(Inventory inventory, int slot, ItemStack stack) {
ItemStack newStack = inventory.getStack(1);
Expand Down
40 changes: 40 additions & 0 deletions src/main/resources/data/stacker/tags/items/not_stackable.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"replace": false,
"values": [
{"id": "minecraft:bundle", "required": false},
{"id": "techreborn:quantum_helmet", "required": false},
{"id": "techreborn:quantum_chestplate", "required": false},
{"id": "techreborn:quantum_leggings", "required": false},
{"id": "techreborn:quantum_boots", "required": false},
{"id": "techreborn:red_cell_battery", "required": false},
{"id": "techreborn:lithium_ion_battery", "required": false},
{"id": "techreborn:lithium_ion_batpack", "required": false},
{"id": "techreborn:energy_crystal", "required": false},
{"id": "techreborn:lapotron_crystal", "required": false},
{"id": "techreborn:lapotronic_orb", "required": false},
{"id": "techreborn:lapotronic_orbpack", "required": false},
{"id": "techreborn:basic_drill", "required": false},
{"id": "techreborn:basic_chainsaw", "required": false},
{"id": "techreborn:basic_jackhammer", "required": false},
{"id": "techreborn:electric_treetap", "required": false},
{"id": "techreborn:advanced_drill", "required": false},
{"id": "techreborn:advanced_chainsaw", "required": false},
{"id": "techreborn:advanced_jackhammer", "required": false},
{"id": "techreborn:rock_cutter", "required": false},
{"id": "techreborn:industrial_drill", "required": false},
{"id": "techreborn:industrial_chainsaw", "required": false},
{"id": "techreborn:industrial_jackhammer", "required": false},
{"id": "techreborn:nanosaber", "required": false},
{"id": "techreborn:omni_tool", "required": false},
{"id": "techreborn:cloaking_device", "required": false},
{"id": "inmis:ender_pouch", "required": false},
{"id": "inmis:baby_backpack", "required": false},
{"id": "inmis:frayed_backpack", "required": false},
{"id": "inmis:plated_backpack", "required": false},
{"id": "inmis:gilded_backpack", "required": false},
{"id": "inmis:bejeweled_backpack", "required": false},
{"id": "inmis:blazing_backpack", "required": false},
{"id": "inmis:withered_backpack", "required": false},
{"id": "inmis:endless_backpack", "required": false}
]
}
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "stacker",
"version": "3.0.1-1.19.x",
"version": "${version}",

"name": "Stacker",
"description": "Change the stack size of all items!",
Expand Down Expand Up @@ -34,7 +34,7 @@
"fabricloader": ">=0.14.6",
"fabric": "*",
"minecraft": [
"1.19"
"1.19.x"
],
"java": ">=17",
"cloth-config2": ">=7.0.72"
Expand Down

0 comments on commit 37f249b

Please sign in to comment.