-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 新增 EnderUtilities 的一些物品复制修复。 - 改进了 LibNine 的模型加载性能。 - 改进了 ResourceLocationCanonicalize 的性能(但加载期间使用更多内存)。 - 改进了 NBTTagCompound 的匹配性能。 - 新增注册表修改器(实验性)。
- Loading branch information
1 parent
d0088e0
commit b79d131
Showing
55 changed files
with
904 additions
and
126 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
43 changes: 43 additions & 0 deletions
43
src/main/java/github/kasuminova/stellarcore/client/integration/libnine/L9ModScanner.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,43 @@ | ||
package github.kasuminova.stellarcore.client.integration.libnine; | ||
|
||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import github.kasuminova.stellarcore.common.mod.Mods; | ||
import github.kasuminova.stellarcore.common.util.StellarLog; | ||
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; | ||
import net.minecraftforge.fml.common.Loader; | ||
import net.minecraftforge.fml.common.versioning.ArtifactVersion; | ||
|
||
import java.util.Set; | ||
|
||
public class L9ModScanner { | ||
|
||
private static final Set<String> VALID_MODS = new ObjectOpenHashSet<>(); | ||
|
||
public static boolean isValidMod(final String modId) { | ||
return VALID_MODS.contains(modId); | ||
} | ||
|
||
public static void scan() { | ||
if (!Mods.LIB_NINE.loaded()) { | ||
return; | ||
} | ||
if (!StellarCoreConfig.PERFORMANCE.vanilla.resourceExistStateCache) { | ||
return; | ||
} | ||
if (!StellarCoreConfig.PERFORMANCE.libNine.l9ModelsIsOfTypeCache) { | ||
return; | ||
} | ||
StellarLog.LOG.info("[StellarCore-L9ModScanner] L9Model filter is enabled."); | ||
|
||
VALID_MODS.clear(); | ||
VALID_MODS.add("libnine"); | ||
Loader.instance().getActiveModList().forEach(mod -> { | ||
if (mod.getRequirements().stream().map(ArtifactVersion::getLabel).anyMatch("libnine"::equalsIgnoreCase)) { | ||
VALID_MODS.add(mod.getModId()); | ||
} | ||
}); | ||
|
||
StellarLog.LOG.info("[StellarCore-L9ModScanner] Valid mods for LibNine mods: {}", VALID_MODS); | ||
} | ||
|
||
} |
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
8 changes: 4 additions & 4 deletions
8
src/main/java/github/kasuminova/stellarcore/client/texture/SpriteBufferedImageCache.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
6 changes: 3 additions & 3 deletions
6
src/main/java/github/kasuminova/stellarcore/common/CommonProxy.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,7 @@ public boolean loaded() { | |
} | ||
} | ||
}, | ||
LIB_NINE("libnine"), | ||
; | ||
|
||
protected final String modID; | ||
|
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
7 changes: 7 additions & 0 deletions
7
src/main/java/github/kasuminova/stellarcore/common/pool/DeferredCanonicalizable.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,7 @@ | ||
package github.kasuminova.stellarcore.common.pool; | ||
|
||
public interface DeferredCanonicalizable<T> { | ||
|
||
void canonicalizeAsync(); | ||
|
||
} |
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.