Skip to content

Commit

Permalink
Fixed issue with data driven gases wahoo
Browse files Browse the repository at this point in the history
  • Loading branch information
Juniper Primavera committed Oct 9, 2023
1 parent 9c53a91 commit ffe5d21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main/java/io/github/teampropulsive/Propulsive.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ public class Propulsive implements ModInitializer {
public static final RegistryKey<PlacedFeature> ALUMINUM_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, id("ore_aluminum"));
public static final RegistryKey<PlacedFeature> BAUXITE_CLUSTER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, id("ore_bauxite_cluster"));
public static final RegistryKey<PlacedFeature> PURE_BAUXITE_CLUSTER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, id("ore_pure_bauxite"));

public static final ScreenHandlerType<BlueprintTableScreenHandler> BLUEPRINT_TABLE_SCREEN = Registry.register(Registries.SCREEN_HANDLER, id("blueprint_table"),
new ExtendedScreenHandlerType<>(((syncId, inventory, buf) -> new BlueprintTableScreenHandler(syncId, buf))));

public static Dictionary<String, Gas> gasDictionary;

@Override
public void onInitialize() {

Expand Down Expand Up @@ -80,7 +81,7 @@ public void onInitialize() {
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(new GasReloadListener());
}

public static Dictionary<String, Gas> gasDictionary;

// Dimensions
public static RegistryKey<World> SPACE = RegistryKey.of(RegistryKeys.WORLD, new Identifier("propulsive:space"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void reload(ResourceManager manager) {
double density = densityJsonKey.getAsDouble();
JsonObject identifierJsonKey = object.getAsJsonObject("density");
String identifier = identifierJsonKey.getAsString();
Gas gas = new Gas(id(identifier), density);
Gas gas = new Gas(new Identifier(resource.getResourcePackName(), identifier), density);
gasDictionary.put(identifier, gas);
} catch (Exception e) {
Propulsive.LOGGER.error("Error occurred while loading gas " + id.toString(), e);
Expand Down

0 comments on commit ffe5d21

Please sign in to comment.