Skip to content

Commit

Permalink
remove GT config init because it broke some packs and is useless
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Jun 17, 2024
1 parent b0f2f88 commit d618b9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/main/java/argent_matter/gcyr/GCyR.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import com.gregtechceu.gtceu.api.machine.MachineDefinition;
import com.gregtechceu.gtceu.api.recipe.GTRecipeType;
import com.gregtechceu.gtceu.api.recipe.RecipeCondition;
import com.gregtechceu.gtceu.config.ConfigHolder;
import com.lowdragmc.lowdraglib.gui.factory.UIFactory;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
Expand Down Expand Up @@ -52,7 +51,6 @@ public GCyR() {
}

public static void init() {
ConfigHolder.init(); // Forcefully init GT config because fabric doesn't allow dependents to load after dependencies
GCyRConfig.init();
GCyRNetworking.init();
UIFactory.register(EntityUIFactory.INSTANCE);
Expand All @@ -64,7 +62,6 @@ public static void init() {
GCyRBlocks.init();
GCyRItems.init();
GCyRMenus.init();
;

GCyRDatagen.init();

Expand Down Expand Up @@ -117,4 +114,4 @@ public void registerRecipeTypes(GTCEuAPI.RegisterEvent<ResourceLocation, GTRecip
public void registerMachines(GTCEuAPI.RegisterEvent<ResourceLocation, MachineDefinition> event) {
GCyRMachines.init();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import argent_matter.gcyr.api.registries.GCyRRegistries;
import argent_matter.gcyr.api.space.satellite.data.SatelliteData;
import argent_matter.gcyr.common.data.GCyRSatellites;
import argent_matter.gcyr.common.satellite.EmptySatellite;
import com.mojang.datafixers.Products;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import lombok.Getter;
Expand Down Expand Up @@ -86,11 +88,12 @@ public CompoundTag serializeNBT() {

public static Satellite deserializeNBT(CompoundTag nbt, Level level) {
SatelliteType<?> type = GCyRRegistries.SATELLITES.get(new ResourceLocation(nbt.getString("id")));
SatelliteType.SatelliteFactory<?> satellite = type.getFactory();

SatelliteData data = SatelliteData.deserializeNBT(nbt.getCompound("data"));

ResourceKey<Level> levelResourceKey = ResourceKey.create(Registries.DIMENSION, new ResourceLocation(nbt.getString("level")));
if (type == null) {
return new EmptySatellite(GCyRSatellites.EMPTY, data, levelResourceKey);
}
SatelliteType.SatelliteFactory<?> satellite = type.getFactory();

Satellite sat = satellite.create(type, data, levelResourceKey);
if (nbt.contains("extra")) sat.deserializeExtraData(nbt.get("extra"), level);
Expand Down

0 comments on commit d618b9f

Please sign in to comment.