Skip to content

Commit

Permalink
Fix & update 1.17
Browse files Browse the repository at this point in the history
- Update to 1.17
  • Loading branch information
LudoCrypt committed Jun 16, 2021
1 parent 91c7f72 commit 96bc8b0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/check_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
matrix:
# Use these Java versions
java: [
16
1.8,
11,
15,
16
]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
}

apply from: 'https://raw.githubusercontent.com/shedaniel/GradleScripts/2.0/ferry.gradle'
apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.1/ferry.gradle'

dependencies {
minecraft "com.mojang:minecraft:$project.minecraft_version"
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ org.gradle.jvmargs=-Xmx1G
maven_group=com.terraformersmc
archive_name=vistas

minecraft_version=1.17-rc1
yarn_mappings=1.17-rc1+build.1
loader_version=0.11.3
fabric_version=0.34.8+1.17
modmenu_version=2.0.0-beta.7
minecraft_version=1.17
yarn_mappings=1.17+build.11
loader_version=0.11.6
fabric_version=0.35.2+1.17
modmenu_version=2.0.2
clothconfig_version=5.0.34

# Project Metadata
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public abstract class SplashTextResourceSupplierMixin {

@Shadow
@Final
private Session field_18934;
private Session session;

@Unique
private ArrayList<String> storedSplashList = new ArrayList<String>();
Expand Down Expand Up @@ -100,7 +100,7 @@ private void VISTAS_addOtherSplash(ResourceManager resourceManager, Profiler pro
Vistas.LOGGER.warn("\"" + thisPanorama.getSplashTexts().toString() + "\" calls \"" + splash + "\" which leads to no registered Panorama!");
}
} else {
newSplashTexts.add(splash.replace("$P$Splash", field_18934.getUsername().toUpperCase(Locale.ROOT)).replace("$p$Splash", field_18934.getUsername()));
newSplashTexts.add(splash.replace("$P$Splash", session.getUsername().toUpperCase(Locale.ROOT)).replace("$p$Splash", session.getUsername()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Group;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand Down Expand Up @@ -52,8 +53,9 @@ private void VISTAS_updateScreen(CallbackInfo ci) {
}
}

@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderTexture(ILnet/minecraft/util/Identifier;)V", ordinal = 0), index = 1)
private Identifier VISTAS_modifyOverlay(Identifier defaultOverlay) {
@Group(name = "vistas$modifyOverlay", min = 1, max = 1)
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderTexture(ILnet/minecraft/util/Identifier;)V", ordinal = 0, remap = false), index = 1)
private Identifier VISTAS_modifyOverlayDev(Identifier defaultOverlay) {
if (Panoramas.getCurrent() != null) {
Identifier overlayId = new Identifier(Panoramas.getCurrent().getBackgroundId().toString() + "_overlay.png");
if (this.client.getResourceManager().containsResource(overlayId)) {
Expand All @@ -63,6 +65,12 @@ private Identifier VISTAS_modifyOverlay(Identifier defaultOverlay) {
return defaultOverlay;
}

@Group(name = "vistas$modifyOverlay", min = 1, max = 1)
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;setShaderTexture(ILnet/minecraft/class_2960;)V", ordinal = 0, remap = false), index = 1)
private Identifier VISTAS_modifyOverlayProd(Identifier defaultOverlay) {
return VISTAS_modifyOverlayDev(defaultOverlay);
}

@Inject(method = "render", at = @At("HEAD"))
private void VISTAS_modifySplashOnRender(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
if (PanoramasInternals.shouldRedoSplash) {
Expand Down

0 comments on commit 96bc8b0

Please sign in to comment.