-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite Vistas pano capture to use vanilla pano capture and revert il…
…l-advised change to main-menu detection. - Fix accidentally overriding in-game music on dedicated servers - Using vanilla (simpler) panoramic screenshot capture
- Loading branch information
1 parent
d5bf485
commit 6adf94c
Showing
5 changed files
with
47 additions
and
229 deletions.
There are no files selected for viewing
168 changes: 0 additions & 168 deletions
168
src/main/java/com/terraformersmc/vistas/mixin/GameRendererMixin.java
This file was deleted.
Oops, something went wrong.
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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/terraformersmc/vistas/mixin/ScreenshotRecorderMixin.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,25 @@ | ||
package com.terraformersmc.vistas.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import com.terraformersmc.vistas.resource.PanoramicScreenshots; | ||
import net.minecraft.client.util.ScreenshotRecorder; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
import java.io.File; | ||
|
||
@Mixin(ScreenshotRecorder.class) | ||
public class ScreenshotRecorderMixin { | ||
@WrapOperation(method = "saveScreenshotInner", | ||
at = @At(value = "NEW", target = "java/io/File", ordinal = 0) | ||
) | ||
@SuppressWarnings("unused") | ||
private static File vistas$panoramaPathOverride(File path, String file, Operation<File> original) { | ||
if (path.toString().contains(PanoramicScreenshots.PANORAMAS_PATH)) { | ||
return path; | ||
} | ||
|
||
return original.call(path, file); | ||
} | ||
} |
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