Skip to content

Commit

Permalink
Migrate [+Alt] to [+Shift]
Browse files Browse the repository at this point in the history
---

Alt keybindings are unusable in many cases on Unix.
Previous [+Shift] action is now a button in UI.

Signed-off-by: AterAnimAvis <AterAnimAvis@gmail.com>
  • Loading branch information
AterAnimAvis committed May 2, 2020
1 parent 1606fd5 commit 3153c88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ apply plugin: 'fabric-loom'

group = "com.unascribed"
archivesBaseName = "BlockRenderer"
version = "20w18a-1.0.1"
version = "20w18a-1.1.0"

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.VERSION_1_8

Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/unascribed/blockrenderer/BlockRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,12 @@ public static void onFrameStart() {
private static void renderStack(ItemStack stack) {
MinecraftClient client = MinecraftClient.getInstance();

if (Screen.hasAltDown()) {
if (Screen.hasShiftDown()) {
client.openScreen(new EnterSizeScreen(client.currentScreen, stack));
return;
}

int size = Screen.hasShiftDown() ? (int) client.getWindow().getScaleFactor() * 16 : 512;

ItemStackRenderer.renderItem(size, stack, false, false);
ItemStackRenderer.renderItem(512, stack, false, false);
}

private static boolean isKeyDown() {
Expand Down

0 comments on commit 3153c88

Please sign in to comment.