1.19.4 (#4)
This commit is contained in:
@@ -157,12 +157,13 @@ public class BiomesDataGenerator implements IDataGenerator {
|
||||
String dimension = guessBiomeDimensionFromCategory(biome, name);
|
||||
biomeDesc.addProperty("category", guessCategoryBasedOnName(name, dimension));
|
||||
biomeDesc.addProperty("temperature", biome.getTemperature());
|
||||
biomeDesc.addProperty("precipitation", biome.getPrecipitation().getName());
|
||||
//biomeDesc.addProperty("precipitation", biome.getPrecipitation().getName());// - removed in 1.19.4
|
||||
biomeDesc.addProperty("has_precipitation", biome.hasPrecipitation());
|
||||
//biomeDesc.addProperty("depth", biome.getDepth()); - Doesn't exist anymore in minecraft source
|
||||
biomeDesc.addProperty("dimension", dimension);
|
||||
biomeDesc.addProperty("displayName", DGU.translateText(localizationKey));
|
||||
biomeDesc.addProperty("color", getBiomeColorFor(registryKey.getPath()));
|
||||
biomeDesc.addProperty("rainfall", biome.getDownfall());
|
||||
//biomeDesc.addProperty("rainfall", biome.getDownfall());// - removed in 1.19.4
|
||||
|
||||
return biomeDesc;
|
||||
}
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class EnchantmentsDataGenerator implements IDataGenerator {
|
||||
}
|
||||
enchantmentDesc.add("exclude", excludes);
|
||||
|
||||
enchantmentDesc.addProperty("category", getEnchantmentTargetName(enchantment.type));
|
||||
enchantmentDesc.addProperty("category", getEnchantmentTargetName(enchantment.target));
|
||||
enchantmentDesc.addProperty("weight", enchantment.getRarity().getWeight());
|
||||
enchantmentDesc.addProperty("tradeable", enchantment.isAvailableForEnchantedBookOffer());
|
||||
enchantmentDesc.addProperty("discoverable", enchantment.isAvailableForRandomSelection());
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.recipe.ShapedRecipe;
|
||||
import net.minecraft.recipe.ShapelessRecipe;
|
||||
import net.minecraft.registry.DynamicRegistryManager;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -27,6 +28,7 @@ public class RecipeDataGenerator implements IDataGenerator {
|
||||
|
||||
@Override
|
||||
public JsonElement generateDataJson() {
|
||||
DynamicRegistryManager registryManager = DGU.getWorld().getRegistryManager();
|
||||
JsonObject finalObj = new JsonObject();
|
||||
Multimap<Integer, JsonObject> recipes = ArrayListMultimap.create();
|
||||
for (Recipe<?> recipe : Objects.requireNonNull(DGU.getWorld()).getRecipeManager().values()) {
|
||||
@@ -67,11 +69,11 @@ public class RecipeDataGenerator implements IDataGenerator {
|
||||
finalRecipe.add("inShape", inShape);
|
||||
|
||||
var resultObject = new JsonObject();
|
||||
resultObject.addProperty("id", getRawIdFor(sr.getOutput().getItem()));
|
||||
resultObject.addProperty("count", sr.getOutput().getCount());
|
||||
resultObject.addProperty("id", getRawIdFor(sr.getOutput(registryManager).getItem()));
|
||||
resultObject.addProperty("count", sr.getOutput(registryManager).getCount());
|
||||
finalRecipe.add("result", resultObject);
|
||||
|
||||
String id = ((Integer) getRawIdFor(sr.getOutput().getItem())).toString();
|
||||
String id = ((Integer) getRawIdFor(sr.getOutput(registryManager).getItem())).toString();
|
||||
|
||||
if (!finalObj.has(id)) {
|
||||
finalObj.add(id, new JsonArray());
|
||||
@@ -111,10 +113,10 @@ public class RecipeDataGenerator implements IDataGenerator {
|
||||
var rootRecipeObject = new JsonObject();
|
||||
rootRecipeObject.add("ingredients", ingredients);
|
||||
var resultObject = new JsonObject();
|
||||
resultObject.addProperty("id", getRawIdFor(sl.getOutput().getItem()));
|
||||
resultObject.addProperty("count", sl.getOutput().getCount());
|
||||
resultObject.addProperty("id", getRawIdFor(sl.getOutput(registryManager).getItem()));
|
||||
resultObject.addProperty("count", sl.getOutput(registryManager).getCount());
|
||||
rootRecipeObject.add("result", resultObject);
|
||||
recipes.put(getRawIdFor(sl.getOutput().getItem()), rootRecipeObject);
|
||||
recipes.put(getRawIdFor(sl.getOutput(registryManager).getItem()), rootRecipeObject);
|
||||
}
|
||||
}
|
||||
recipes.forEach((a, b) -> {
|
||||
|
||||
Reference in New Issue
Block a user