-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add controller support with midnightcontrols. Also adds config opt…
…ion to enable/disable smallinv. Includes patch to midnightcontrols to ignore slots that are disabled
- Loading branch information
1 parent
f5c8c07
commit 6c38dfd
Showing
17 changed files
with
139 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/net/kyrptonaught/lemclienthelper/SmallInv/SmallInvConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.kyrptonaught.lemclienthelper.SmallInv; | ||
|
||
import net.kyrptonaught.kyrptconfig.config.AbstractConfigFile; | ||
|
||
public class SmallInvConfig implements AbstractConfigFile { | ||
|
||
public boolean enabled = true; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/net/kyrptonaught/lemclienthelper/mixin/SmallInv/MidnightControlsMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package net.kyrptonaught.lemclienthelper.mixin.SmallInv; | ||
|
||
import eu.midnightdust.midnightcontrols.client.controller.InputHandlers; | ||
import net.minecraft.screen.slot.Slot; | ||
import org.aperlambda.lambdacommon.utils.Pair; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Pseudo | ||
@Mixin(InputHandlers.class) | ||
public class MidnightControlsMixin { | ||
|
||
@Inject(method = "lambda$handleInventorySlotPad$5", at = @At(value = "HEAD"), cancellable = true) | ||
private static void skipDisabledSlots(int guiLeft, int guiTop, double mouseX, double mouseY, Slot mouseSlot, int direction, Pair<Slot, Double> entry, CallbackInfoReturnable<Boolean> cir) { | ||
if (!entry.key.isEnabled()) cir.setReturnValue(false); | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
src/main/java/net/kyrptonaught/lemclienthelper/mixin/SmallInv/ScreenHandlerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.