Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AnOpenSauceDev committed Nov 11, 2023
1 parent d8a0e27 commit af9fc99
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .run/Methane-mod [runClient].run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Methane-mod [runClient]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runClient" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ loader_version=0.14.24
fabric_version=0.90.4+1.20.2

# Mod Properties
mod_version=3.0.0-BETA
mod_version=3.0.0
maven_group=com.modrinth
archives_base_name=methane

Empty file modified gradlew
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion src/main/java/com/modrinth/methane/MethaneSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class MethaneSettings implements ConfigData {
@Comment("Render the status messages on the HUD instead of chat?")
public boolean hudrender = false;


@Comment("Use the old Methane lighting 'engine', has a smaller performance boost, but can fix compatibility with some mods and a few bugs.")
public boolean useOldLightingEngine = false;

@ConfigEntry.Gui.CollapsibleObject
public FogSettings fogSettings = new FogSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import com.modrinth.methane.Methane;
import net.minecraft.client.MinecraftClient;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkSectionPos;
import net.minecraft.world.HeightLimitView;
import net.minecraft.world.chunk.light.ChunkLightProvider;
import net.minecraft.world.chunk.light.LightingProvider;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
Expand All @@ -25,6 +23,8 @@ public abstract class LightingProviderMixin {

@Shadow @Final private @Nullable ChunkLightProvider<?, ?> blockLightProvider;

@Shadow @Final private @Nullable ChunkLightProvider<?, ?> skyLightProvider;

void FixBrokenLights(){
this.doLightUpdates();
}
Expand All @@ -40,11 +40,10 @@ boolean isNotInSinglePlayer(){ // we lose out on a lot of performance, but savin
*/
@Inject(method = "doLightUpdates",at =@At("HEAD"),cancellable = true)
public void doLightUpdates(CallbackInfoReturnable<Integer> cir) {
if(Methane.ModActive) cir.cancel();
if(Methane.ModActive && !Methane.settings.useOldLightingEngine) cir.cancel();
}





}
1 change: 1 addition & 0 deletions src/main/resources/assets/methane/lang/en_au.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"methane.active": "Methane activated!",
"methane.offline": "Methane disabled!",
"key.methane.toggle": "Toggle Methane",
"text.autoconfig.methane.option.useOldLightingEngine": "Use Legacy lighting engine?",
"category.methane.keys": "Methane Keybinds",
"text.autoconfig.methane.option.fogSettings.disableAirFog": "Disable Air Fog",
"text.autoconfig.methane.option.fogSettings.disableWaterFog": "Disable Underwater Fog",
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/methane/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"methane.offline": "Methane disabled!",
"key.methane.toggle": "Toggle Methane",
"category.methane.keys": "Methane Keybinds",
"text.autoconfig.methane.option.useOldLightingEngine": "Use Legacy lighting engine?",
"text.autoconfig.methane.option.fogSettings.disableAirFog": "Disable Air Fog",
"text.autoconfig.methane.option.fogSettings.disableWaterFog": "Disable Underwater Fog",
"text.autoconfig.methane.option.fogSettings.disableLavaFog": "Disable Lava Fog",
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/methane/lang/lol_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
"text.autoconfig.methane.option.destructiveSettings.DestroySky": "DESTROY THE MOON!!121!!",
"text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "DESTROY Weather EVEN MORE!!!@##41?2!@! WOW!",
"text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "remove yarn from teh game ;(",
"text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "remove backgroundz"
"text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "remove backgroundz",
"text.autoconfig.methane.option.useOldLightingEngine": "can haz old Methane?"
}

0 comments on commit af9fc99

Please sign in to comment.