Skip to content

Commit

Permalink
pull changes from 1.19.x branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew6rant committed Aug 5, 2022
1 parent 3c073a7 commit e84e25b
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 18 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: stacker-3.0.1-1.18.2
loaders: |
fabric
quilt
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.14.5

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

Expand Down
16 changes: 3 additions & 13 deletions src/main/java/io/github/Andrew6rant/stacker/StackerConfig.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
package io.github.Andrew6rant.stacker;

import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import me.shedaniel.autoconfig.annotation.ConfigEntry;
import me.shedaniel.autoconfig.serializer.JanksonConfigSerializer;
import me.shedaniel.clothconfig2.api.ConfigBuilder;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.item.Items;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.registry.Registry;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Config(name = "stacker")
public class StackerConfig implements ConfigData {
Expand All @@ -32,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}
]
}
2 changes: 1 addition & 1 deletion 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.18.2",
"version": "${version}",

"name": "Stacker",
"description": "Change the stack size of all items!",
Expand Down

0 comments on commit e84e25b

Please sign in to comment.