-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
144 additions
and
19 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
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
19 changes: 19 additions & 0 deletions
19
src/main/java/mod/acgaming/universaltweaks/tweaks/world/voidfog/UTVoidFog.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,19 @@ | ||
package mod.acgaming.universaltweaks.tweaks.world.voidfog; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
import mod.acgaming.universaltweaks.config.UTConfigTweaks; | ||
import net.minecraft.world.DimensionType; | ||
import net.minecraftforge.common.DimensionManager; | ||
|
||
public abstract class UTVoidFog | ||
{ | ||
public static boolean isEnabledForDimension(int dimension) | ||
{ | ||
List<String> dimensionList = Arrays.asList(UTConfigTweaks.WORLD.VOID_FOG.utVoidFogDimensionList); | ||
DimensionType dimensionType = DimensionManager.getProviderType(dimension); | ||
String dimensionName = dimensionType == null ? null : dimensionType.getName(); | ||
boolean isWhitelist = UTConfigTweaks.WORLD.VOID_FOG.utVoidFogDimensionListMode == UTConfigTweaks.EnumLists.WHITELIST; | ||
return isWhitelist == (dimensionList.contains(dimensionName) || dimensionList.contains(String.valueOf(dimension))); | ||
} | ||
} |
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
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