Skip to content

Commit 4f8eb5f

Browse files
committed
fix
1 parent 6335d36 commit 4f8eb5f

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ group = mod_group_id
1010

1111
repositories {
1212
mavenLocal()
13+
maven { url = 'https://jitpack.io' }
1314
}
1415

1516
base {
@@ -104,6 +105,7 @@ dependencies {
104105
// compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
105106
// compileOnly "mezz.jei:jei-${mc_version}-forge-api:${jei_version}"
106107
// runtimeOnly "mezz.jei:jei-${mc_version}-forge:${jei_version}"
108+
//api("com.github.QiuYe-123:Mekanism:26.1-SNAPSHOT")
107109

108110
// Example mod dependency using a mod jar from ./libs with a flat dir repository
109111
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod_name=HotBaaaar
3434
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3535
mod_license=GNU GPL 3.0
3636
# The mod version. See https://semver.org/
37-
mod_version=26.1.2-0
37+
mod_version=26.1.2-1
3838
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3939
# This should match the base package used for the mod sources.
4040
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/cn/ussshenzhou/hotbaaaar/mixin/InventoryMixin.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public class InventoryMixin {
3535
@Final
3636
public NonNullList<ItemStack> items;
3737

38+
@Unique
39+
private static final StackWalker WALKER = StackWalker.getInstance();
40+
3841
@ModifyConstant(method = "isHotbarSlot", constant = @Constant(intValue = 9))
3942
private static int hotBaaaarAllSelectable(int constant) {
4043
return 36;
@@ -46,6 +49,9 @@ private static int hotBaaaarAllSelectable(int constant) {
4649
*/
4750
@Overwrite
4851
public static int getSelectionSize() {
52+
if (WALKER.walk(s -> s.anyMatch(f -> f.getClassName().startsWith("mekanism")))) {
53+
return 9;
54+
}
4955
if (FMLEnvironment.getDist() == Dist.CLIENT) {
5056
return 9 * HotBaaaarHelper.getHotBaaaarAmount(null);
5157
} else {

0 commit comments

Comments
 (0)