Skip to content

Commit

Permalink
Actually fixed polymer compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ProjectET committed Jan 7, 2022
1 parent 56f789f commit 741dd0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ minecraft_version = 1.18.1
loader_version = 0.12.2

# Mod properties
mod_version = 1.0.8
mod_version = 1.0.9
maven_group = io.github.projectet.buildinggadgets-fabric
archives_base_name = structure-tools

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import dev.onyxstudios.cca.api.v3.level.LevelComponentInitializer;
import dev.onyxstudios.cca.api.v3.world.WorldComponentFactoryRegistry;
import dev.onyxstudios.cca.api.v3.world.WorldComponentInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.server.level.ServerLevel;

Expand All @@ -36,7 +38,7 @@ public void registerWorldComponentFactories(WorldComponentFactoryRegistry regist
if (world instanceof ServerLevel) {
return new SaveTemplateProvider();
}
else if (world instanceof ClientLevel){
else if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT && world instanceof ClientLevel){
return BuildingGadgetsClient.CACHE_TEMPLATE_PROVIDER;
}
else return new NoWorldCompat();
Expand Down

0 comments on commit 741dd0b

Please sign in to comment.