-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
49 additions
and
12 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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/yurisuika/raised/mixin/mods/CreateMixin.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,33 @@ | ||
package com.yurisuika.raised.mixin.mods; | ||
|
||
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.TrainHUD; | ||
import com.simibubi.create.content.curiosities.toolbox.ToolboxHandlerClient; | ||
import com.yurisuika.raised.Raised; | ||
import net.minecraft.client.util.Window; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
public class CreateMixin { | ||
|
||
@Mixin(ToolboxHandlerClient.class) | ||
public static class TrainHUDMixin { | ||
|
||
@Redirect(method = "renderOverlay", at = @At(value = "INVOKE", target = "net/minecraft/client/util/Window.getScaledHeight()I")) | ||
private static int modifyScaledHeight(Window instance) { | ||
return instance.getScaledHeight() - Raised.getDistance(); | ||
} | ||
|
||
} | ||
|
||
@Mixin(TrainHUD.class) | ||
public static class ToolboxHandlerClientMixin { | ||
|
||
@Redirect(method = "renderOverlay", at = @At(value = "INVOKE", target = "net/minecraft/client/util/Window.getScaledHeight()I")) | ||
private static int modifyScaledHeight(Window instance) { | ||
return instance.getScaledHeight() - Raised.getDistance(); | ||
} | ||
|
||
} | ||
|
||
} |
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