Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Initial 1.15.2 support, a lot wont work
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Feb 13, 2020
1 parent df03dc2 commit add6885
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 55 deletions.
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

minecraft_version=1.14.4
yarn_mappings=1.14.4+build.15
loader_version=0.7.0+build.171
minecraft_version=1.15.2
yarn_mappings=1.15.2+build.14
loader_version=0.7.8+build.184

fabric_version=0.4.2+build.246-1.14
fabric_version=0.4.32+build.292-1.15
fabric_asm_version=b97939c03a
zt_zip_version=1.13
slf4j_version=1.7.29
zt_zip_version=1.14
slf4j_version=1.7.30

mod_version = 0.7.1
mod_version = 1.0.0-beta1
maven_group = me.modmuss50
archives_base_name = optifabric
39 changes: 0 additions & 39 deletions src/main/java/me/modmuss50/optifabric/mixin/MixinChunkCacheOF.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.TitleScreen;
import net.minecraft.text.Text;
import net.minecraft.util.SystemUtil;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
Expand Down Expand Up @@ -38,7 +38,7 @@ private void init(CallbackInfo info) {
@Inject(method = "render", at = @At("RETURN"))
private void render(int int_1, int int_2, float float_1, CallbackInfo info) {
if (!OptifabricError.hasError()) {
float fadeTime = this.doBackgroundFade ? (float) (SystemUtil.getMeasuringTimeMs() - this.backgroundFadeStart) / 1000.0F : 1.0F;
float fadeTime = this.doBackgroundFade ? (float) (Util.getMeasuringTimeMs() - this.backgroundFadeStart) / 1000.0F : 1.0F;
float fadeColor = this.doBackgroundFade ? MathHelper.clamp(fadeTime - 1.0F, 0.0F, 1.0F) : 1.0F;

int int_6 = MathHelper.ceil(fadeColor * 255.0F) << 24;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/modmuss50/optifabric/mod/Optifabric.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import net.minecraft.client.gui.screen.ConfirmScreen;
import net.minecraft.text.LiteralText;
import net.minecraft.util.Formatting;
import net.minecraft.util.SystemUtil;
import net.minecraft.util.Util;

public class Optifabric implements ModInitializer {

public static void checkForErrors() {
if (OptifabricError.hasError()) {
ConfirmScreen confirmScreen = new ConfirmScreen(t -> {
if (t) {
SystemUtil.getOperatingSystem().open(OptifabricError.getErrorURL());
Util.getOperatingSystem().open(OptifabricError.getErrorURL());
} else {
MinecraftClient.getInstance().scheduleStop();
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/me/modmuss50/optifabric/mod/OptifineSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,10 @@ IMappingProvider createMappings(String from, String to) {
File fullMappings = extractMappings();
return (out) -> {
RemapUtils.getTinyRemapper(fullMappings, from, to).load(out);
out.acceptField(new IMappingProvider.Member("cyf", "CLOUDS", "Lcxt;"),
//TODO use the mappings API here to stop neededing to change this each version
out.acceptField(new IMappingProvider.Member("dbq", "CLOUDS", "Ldbe;"),
"CLOUDS_OF");
out.acceptField(new IMappingProvider.Member("dng", "renderDistance", "I"),
out.acceptField(new IMappingProvider.Member("dqr", "renderDistance", "I"),
"renderDistance_OF");
};
} catch (Exception e) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
]
},
"custom": {
"fabric-renderer-indigo:force_compatibility" : true,
"fabric-renderer-api-v1:contains_renderer" : true,
"mm:early_risers": [
"me.modmuss50.optifabric.mod.OptifabricSetup"
]
},
"depends": {
"fabricloader": ">=0.4.0"
"fabricloader": ">=0.7.8",
"minecraft": ">=1.15.2"
}
}
1 change: 0 additions & 1 deletion src/main/resources/optifabric.indigofix.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"package": "me.modmuss50.optifabric.mixin",
"compatibilityLevel": "JAVA_8",
"mixins": [
"MixinChunkCacheOF"
],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit add6885

Please sign in to comment.