forked from FlashyReese/sodium-extra-fabric
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Embeddium Hack * Since there is no API for cloud rendering, we will temporarily hack the embeddium. * remove version lock * add version lock * Update hack * Clean --------- Co-authored-by: dima_dencep <[email protected]>
- Loading branch information
1 parent
6289b93
commit a26e4c6
Showing
12 changed files
with
252 additions
and
135 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
23 changes: 23 additions & 0 deletions
23
src/main/java/me/flashyreese/mods/sodiumextra/client/ExtraRenderSectionDistanceFilter.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,23 @@ | ||
package me.flashyreese.mods.sodiumextra.client; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import org.embeddedt.embeddium.api.render.chunk.RenderSectionDistanceFilter; | ||
|
||
public class ExtraRenderSectionDistanceFilter implements RenderSectionDistanceFilter { | ||
public static ExtraRenderSectionDistanceFilter INSTANCE = new ExtraRenderSectionDistanceFilter(); | ||
|
||
private ExtraRenderSectionDistanceFilter() { | ||
|
||
} | ||
|
||
@Override | ||
public boolean isWithinDistance(float xDistance, float yDistance, float zDistance, float maxDistance) { | ||
int fogDistance = SodiumExtraClientMod.options().renderSettings.multiDimensionFogControl ? | ||
SodiumExtraClientMod.options().renderSettings.dimensionFogDistanceMap.getOrDefault(MinecraftClient.getInstance().world.getDimension().effects(), 0) : | ||
SodiumExtraClientMod.options().renderSettings.fogDistance; | ||
if (fogDistance == 33) | ||
return ((xDistance * xDistance) + (zDistance * zDistance)) < (maxDistance * maxDistance); | ||
else | ||
return RenderSectionDistanceFilter.DEFAULT.isWithinDistance(xDistance, yDistance, zDistance, maxDistance); | ||
} | ||
} |
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
Oops, something went wrong.