Skip to content

Commit

Permalink
Add Garden_Of_Glass as a new skytype (#25)
Browse files Browse the repository at this point in the history
* Add new skytype for GardenOfGlass

* Update zh_CN.lang

* Update en_US.lang

* Fix typo

* Fix code-style

* Fix NPE
  • Loading branch information
zhehedream authored Jun 18, 2024
1 parent 2bfbfaa commit 23caf59
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public enum SkyType {

VANILLA(null, null),
BARNADA_C("galaxyspace.BarnardsSystem.planets.barnardaC.dimension.sky.SkyProviderBarnardaC",
"galaxyspace.BarnardsSystem.planets.barnardaC.dimension.sky.CloudProviderBarnardaC"),;
"galaxyspace.BarnardsSystem.planets.barnardaC.dimension.sky.CloudProviderBarnardaC"),
GARDEN_OF_GLASS("vazkii.botania.client.render.world.SkyblockSkyRenderer", null),;

public final String skyProvider, cloudProvider;
private Boolean isLoaded = null;
Expand All @@ -58,8 +59,10 @@ public boolean isLoaded() {
}
if (isLoaded == null) {
try {
Class<?> skyClass = Class.forName(skyProvider);
Class<?> cloudClass = Class.forName(cloudProvider);
Class<?> skyClass;
if (skyProvider != null) skyClass = Class.forName(skyProvider);
Class<?> cloudClass;
if (cloudProvider != null) cloudClass = Class.forName(cloudProvider);
isLoaded = Boolean.TRUE;
} catch (ClassNotFoundException e) {
isLoaded = Boolean.FALSE;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/personalspace/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ gui.personalWorld.notAllowed=Not allowed by the server's configuration

gui.personalWorld.skyType.VANILLA=Vanilla sky
gui.personalWorld.skyType.BARNADA_C=Barnada C sky
gui.personalWorld.skyType.GARDEN_OF_GLASS=Garden of Glass sky

commands.pspace.usage=/pspace (give-portal player DIM [X] [Y] [Z])|(tpx player DIM [X Y Z])|(ls)|(where player)|(allow-worldgen-change DIM)
commands.pspace.badDimension=The specified dimension doesn't exist
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/personalspace/lang/zh_CN.lang
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ gui.personalWorld.notAllowed=服务器配置不允许

gui.personalWorld.skyType.VANILLA=原版天空
gui.personalWorld.skyType.BARNADA_C=巴纳德C天空
gui.personalWorld.skyType.GARDEN_OF_GLASS=水晶花园天空

commands.pspace.usage=/pspace (give-portal <玩家> <维度> [X] [Y] [Z])|(tpx <玩家> <维度> [X Y Z])|(ls)|(where <玩家>)|(allow-worldgen-change <维度>)
commands.pspace.badDimension=指定维度不存在
commands.pspace.where=玩家 %s 位于维度 %d
commands.pspace.tpx=将玩家 %s 传送到 %d: %d, %d, %d
commands.pspace.allow-worldgen-change=玩家 %s 已解锁维度 %d 的世界生成设置
commands.pspace.allow-worldgen-change=玩家 %s 已解锁维度 %d 的世界生成设置

0 comments on commit 23caf59

Please sign in to comment.