1.19.4 (#4)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
1. Update gradle.properties with the latest values from https://fabricmc.net/develop/
|
||||
2. Run `./gradlew build` and fix any errors caused by API changes if any (see https://fabricmc.net/blog/)
|
||||
3. Run `./gradlew runServer`
|
||||
4. Check the results in `run/minecraft-data`
|
||||
+4
-4
@@ -2,13 +2,13 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=1.19.3+build.5
|
||||
loader_version=0.14.12
|
||||
minecraft_version=1.19.4
|
||||
yarn_mappings=1.19.4+build.1
|
||||
loader_version=0.14.17
|
||||
# Mod Properties
|
||||
mod_version=1.0-SNAPSHOT
|
||||
maven_group=dev.u9g
|
||||
archives_base_name=minecraft-data-generator-server
|
||||
# Dependencies
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_version=0.70.0+1.19.3
|
||||
fabric_version=0.76.0+1.19.4
|
||||
|
||||
@@ -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