Skip to content

Commit 2103f02

Browse files
committed
fix(crash): removed unused variable remnants
1 parent b28830d commit 2103f02

2 files changed

Lines changed: 6 additions & 20 deletions

File tree

src/main/java/com/researchcube/research/ResearchDefinition.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public ResearchDefinition(ResourceLocation id, ResearchTier tier, int duration,
4949
Prerequisite prerequisites, List<ItemCost> itemCosts,
5050
List<WeightedRecipe> weightedRecipePool,
5151
@Nullable String name, @Nullable String description,
52-
@Nullable String flavorText, @Nullable String category,
52+
@Nullable String category,
5353
@Nullable FluidCost fluidCost,
5454
Optional<ItemStack> ideaChip) {
5555
this.id = id;
@@ -61,7 +61,6 @@ public ResearchDefinition(ResourceLocation id, ResearchTier tier, int duration,
6161
this.recipePool = this.weightedRecipePool.stream().map(WeightedRecipe::id).toList();
6262
this.name = name;
6363
this.description = description;
64-
this.flavorText = flavorText;
6564
this.category = category;
6665
this.fluidCost = fluidCost;
6766
this.ideaChip = ideaChip != null ? ideaChip : Optional.empty();
@@ -74,10 +73,10 @@ public ResearchDefinition(ResourceLocation id, ResearchTier tier, int duration,
7473
Prerequisite prerequisites, List<ItemCost> itemCosts,
7574
List<WeightedRecipe> weightedRecipePool,
7675
@Nullable String name, @Nullable String description,
77-
@Nullable String flavorText, @Nullable String category,
76+
@Nullable String category,
7877
@Nullable FluidCost fluidCost) {
7978
this(id, tier, duration, prerequisites, itemCosts, weightedRecipePool,
80-
name, description, flavorText, category, fluidCost, Optional.empty());
79+
name, description, category, fluidCost, Optional.empty());
8180
}
8281

8382
/**
@@ -87,9 +86,9 @@ public ResearchDefinition(ResourceLocation id, ResearchTier tier, int duration,
8786
Prerequisite prerequisites, List<ItemCost> itemCosts,
8887
List<WeightedRecipe> weightedRecipePool,
8988
@Nullable String name, @Nullable String description,
90-
@Nullable String flavorText, @Nullable String category) {
89+
@Nullable String category) {
9190
this(id, tier, duration, prerequisites, itemCosts, weightedRecipePool,
92-
name, description, flavorText, category, null);
91+
name, description, category, null);
9392
}
9493

9594
/**
@@ -189,14 +188,6 @@ public String getDescription() {
189188
return description;
190189
}
191190

192-
/**
193-
* Optional story/lore flavor text for the detail pane.
194-
*/
195-
@Nullable
196-
public String getFlavorText() {
197-
return flavorText;
198-
}
199-
200191
/**
201192
* Optional category for grouping in the UI (e.g., "circuits", "energy").
202193
*/

src/main/java/com/researchcube/research/ResearchManager.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private ResearchDefinition parseDefinition(ResourceLocation id, JsonObject json)
115115
}
116116

117117
return new ResearchDefinition(id, tier, duration, prerequisites, itemCosts, weightedRecipePool,
118-
parseName(json), parseDescription(json), parseFlavorText(json), parseCategory(json),
118+
parseName(json), parseDescription(json), parseCategory(json),
119119
parseFluidCost(json), parseIdeaChip(json));
120120
}
121121

@@ -129,11 +129,6 @@ private String parseDescription(JsonObject json) {
129129
return json.has("description") ? json.get("description").getAsString() : null;
130130
}
131131

132-
@Nullable
133-
private String parseFlavorText(JsonObject json) {
134-
return json.has("flavor_text") ? json.get("flavor_text").getAsString() : null;
135-
}
136-
137132
@Nullable
138133
private String parseCategory(JsonObject json) {
139134
return json.has("category") ? json.get("category").getAsString() : null;

0 commit comments

Comments
 (0)