Skip to content

Commit

Permalink
Start 1.21 update
Browse files Browse the repository at this point in the history
Signed-off-by: Minecraftschurli <[email protected]>
  • Loading branch information
Minecraftschurli committed Aug 3, 2024
1 parent 2148c9a commit 21d34f7
Show file tree
Hide file tree
Showing 37 changed files with 515 additions and 510 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ license.name=MIT
license.url=https://opensource.org/licenses/MIT
license.file=LICENSE

neogradle.subsystems.parchment.minecraftVersion=1.20.6
neogradle.subsystems.parchment.mappingsVersion=2024.06.16
neogradle.subsystems.parchment.minecraftVersion=1.21
neogradle.subsystems.parchment.mappingsVersion=2024.07.28

mc_version=1.20.6
neo_version=20.6.119
mc_version=1.21
neo_version=21.0.148
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected final <S> Holder.Reference<S> holder(ResourceKey<? extends Registry<S>
* @return The {@link Holder} for the given {@link ResourceKey}.
*/
protected final <S> Holder.Reference<S> holder(ResourceKey<? extends Registry<S>> registryKey, String name) {
return holder(registryKey, new ResourceLocation(namespace, name));
return holder(registryKey, ResourceLocation.fromNamespaceAndPath(namespace, name));
}

/**
Expand Down Expand Up @@ -118,7 +118,7 @@ protected final Holder.Reference<T> ownHolder(ResourceLocation id) {
* @return The {@link Holder} for the given {@link ResourceLocation}.
*/
protected final Holder.Reference<T> ownHolder(String name) {
return ownHolder(new ResourceLocation(namespace, name));
return ownHolder(ResourceLocation.fromNamespaceAndPath(namespace, name));
}

/**
Expand All @@ -140,7 +140,7 @@ protected final <S> HolderGetter<S> getLookup(ResourceKey<? extends Registry<S>>
* @param value The value.
*/
protected final void add(String name, T value) {
add(new ResourceLocation(namespace, name), value);
add(ResourceLocation.fromNamespaceAndPath(namespace, name), value);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class AbstractRecipeProvider<T extends AbstractRecipeBuilder<?>>
* @param output The data generator to use.
*/
protected AbstractRecipeProvider(ResourceLocation recipeType, String namespace, PackOutput output, CompletableFuture<HolderLookup.Provider> registries) {
super(namespace, "recipes/" + (recipeType.getNamespace().equals(namespace) ? "" : "compat/" + recipeType.getNamespace() + "/") + recipeType.getPath(), PackOutput.Target.DATA_PACK, output, registries);
super(namespace, "recipe/" + (recipeType.getNamespace().equals(namespace) ? "" : "compat/" + recipeType.getNamespace() + "/") + recipeType.getPath(), PackOutput.Target.DATA_PACK, output, registries);
this.recipeType = recipeType;
this.name = makeName(recipeType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.github.minecraftschurlimods.easydatagenlib.mods.*;
import com.github.minecraftschurlimods.easydatagenlib.util.PotentiallyAbsentIngredient;
import com.github.minecraftschurlimods.easydatagenlib.util.botanypots.DisplayState;
import com.github.minecraftschurlimods.easydatagenlib.util.farmersdelight.ToolActionIngredient;
import com.github.minecraftschurlimods.easydatagenlib.util.farmersdelight.ItemAbilityIngredient;
import com.github.minecraftschurlimods.easydatagenlib.util.immersiveengineering.ClocheRenderType;
import com.github.minecraftschurlimods.easydatagenlib.util.mekanism.Chemical;
import com.github.minecraftschurlimods.easydatagenlib.util.mekanism.Pigment;
Expand All @@ -23,8 +23,8 @@
import net.minecraft.world.level.block.TallFlowerBlock;
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
import net.minecraft.world.level.material.Fluid;
import net.neoforged.neoforge.common.ItemAbilities;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.common.ToolActions;
import net.neoforged.neoforge.common.conditions.NotCondition;
import net.neoforged.neoforge.common.conditions.TagEmptyCondition;
import net.neoforged.neoforge.data.event.GatherDataEvent;
Expand Down Expand Up @@ -224,29 +224,29 @@ protected <T extends AbstractDataProvider<?>> T addCommon(T provider) {
//endregion

//region HELPER
protected static final ResourceLocation AIR = new ResourceLocation("minecraft", "air");
protected static final ResourceLocation ALCHEMY_CATALYST = new ResourceLocation("botania", "alchemy_catalyst");
protected static final ResourceLocation BIO_FUEL = new ResourceLocation("mekanism", "bio_fuel");
protected static final ResourceLocation CHEST = new ResourceLocation("minecraft", "chest");
protected static final ResourceLocation CONJURATION_CATALYST = new ResourceLocation("botania", "conjuration_catalyst");
protected static final ResourceLocation EXPERIENCE_NUGGET = new ResourceLocation("create", "experience_nugget");
protected static final ResourceLocation GRAVEL = new ResourceLocation("minecraft", "gravel");
protected static final ResourceLocation RICH_SLAG = new ResourceLocation("thermal", "rich_slag");
protected static final ResourceLocation MEKANISM_SAWDUST = new ResourceLocation("mekanism", "sawdust");
protected static final ResourceLocation SHROOMLIGHT = new ResourceLocation("minecraft", "shroomlight");
protected static final ResourceLocation STICK = new ResourceLocation("minecraft", "stick");
protected static final ResourceLocation THERMAL_SAWDUST = new ResourceLocation("thermal", "sawdust");
protected static final ResourceLocation TREE_BARK = new ResourceLocation("farmersdelight", "tree_bark");
protected static final Ingredient AXE_DIG = ToolActionIngredient.of(ToolActions.AXE_DIG);
protected static final Ingredient AXE_STRIP = ToolActionIngredient.of(ToolActions.AXE_STRIP);
protected static final ResourceLocation AIR = ResourceLocation.withDefaultNamespace("air");
protected static final ResourceLocation ALCHEMY_CATALYST = ResourceLocation.fromNamespaceAndPath("botania", "alchemy_catalyst");
protected static final ResourceLocation BIO_FUEL = ResourceLocation.fromNamespaceAndPath("mekanism", "bio_fuel");
protected static final ResourceLocation CHEST = ResourceLocation.withDefaultNamespace("chest");
protected static final ResourceLocation CONJURATION_CATALYST = ResourceLocation.fromNamespaceAndPath("botania", "conjuration_catalyst");
protected static final ResourceLocation EXPERIENCE_NUGGET = ResourceLocation.fromNamespaceAndPath("create", "experience_nugget");
protected static final ResourceLocation GRAVEL = ResourceLocation.withDefaultNamespace("gravel");
protected static final ResourceLocation RICH_SLAG = ResourceLocation.fromNamespaceAndPath("thermal", "rich_slag");
protected static final ResourceLocation MEKANISM_SAWDUST = ResourceLocation.fromNamespaceAndPath("mekanism", "sawdust");
protected static final ResourceLocation SHROOMLIGHT = ResourceLocation.withDefaultNamespace("shroomlight");
protected static final ResourceLocation STICK = ResourceLocation.withDefaultNamespace("stick");
protected static final ResourceLocation THERMAL_SAWDUST = ResourceLocation.fromNamespaceAndPath("thermal", "sawdust");
protected static final ResourceLocation TREE_BARK = ResourceLocation.fromNamespaceAndPath("farmersdelight", "tree_bark");
protected static final Ingredient AXE_DIG = ItemAbilityIngredient.of(ItemAbilities.AXE_DIG);
protected static final Ingredient AXE_STRIP = ItemAbilityIngredient.of(ItemAbilities.AXE_STRIP);
protected static final Ingredient COBBLESTONE = Ingredient.of(Tags.Items.COBBLESTONES_NORMAL);
protected static final Ingredient COBBLESTONE_DEEPSLATE = Ingredient.of(Tags.Items.COBBLESTONES_DEEPSLATE);
protected static final Ingredient KNIVES = Ingredient.of(TagKey.create(Registries.ITEM, new ResourceLocation("forge", "tools/knives")));
protected static final Ingredient KNIVES = Ingredient.of(TagKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath("forge", "tools/knives")));
protected static final Ingredient MUSHROOM_SOIL = Ingredient.of(Items.MYCELIUM, Items.PODZOL);
protected static final Ingredient PRESS_PACKING_3x3_DIE = PotentiallyAbsentIngredient.of(new ResourceLocation("thermal", "press_packing_3x3_die"));
protected static final Ingredient PRESS_UNPACKING_DIE = PotentiallyAbsentIngredient.of(new ResourceLocation("thermal", "press_unpacking_die"));
protected static final Ingredient SLAG = Ingredient.of(TagKey.create(Registries.ITEM, new ResourceLocation("forge", "slag")));
protected static final Ingredient WOOD_DUST = Ingredient.of(TagKey.create(Registries.ITEM, new ResourceLocation("forge", "dusts/wood")));
protected static final Ingredient PRESS_PACKING_3x3_DIE = PotentiallyAbsentIngredient.of(ResourceLocation.fromNamespaceAndPath("thermal", "press_packing_3x3_die"));
protected static final Ingredient PRESS_UNPACKING_DIE = PotentiallyAbsentIngredient.of(ResourceLocation.fromNamespaceAndPath("thermal", "press_unpacking_die"));
protected static final Ingredient SLAG = Ingredient.of(TagKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath("forge", "slag")));
protected static final Ingredient WOOD_DUST = Ingredient.of(TagKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath("forge", "dusts/wood")));

/**
* Shortcut to get a block's registry name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

public abstract class ArsNouveauDataProvider<T extends AbstractRecipeBuilder<?>> extends AbstractRecipeProvider<T> {
protected ArsNouveauDataProvider(String folder, String namespace, PackOutput output, CompletableFuture<HolderLookup.Provider> registries) {
super(new ResourceLocation("ars_nouveau", folder), namespace, output, registries);
super(ResourceLocation.fromNamespaceAndPath("ars_nouveau", folder), namespace, output, registries);
}

public static class Crushing extends ArsNouveauDataProvider<Crushing.Builder> {
Expand All @@ -31,7 +31,7 @@ public Crushing(String namespace, PackOutput output, CompletableFuture<HolderLoo
* @param input The input item to use.
*/
public Builder builder(String id, Ingredient input) {
return new Builder(this, new ResourceLocation(namespace, id), input);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), input);
}

public static class Builder extends AbstractRecipeBuilder<Builder> {
Expand Down Expand Up @@ -164,15 +164,15 @@ public Glyph(String namespace, PackOutput output, CompletableFuture<HolderLookup
* @param count The output count to use.
*/
public Builder builder(String id, ResourceLocation item, int count) {
return new Builder(this, new ResourceLocation(namespace, id), item, count);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), item, count);
}

/**
* @param id The recipe id to use.
* @param item The id of the output item to use.
*/
public Builder builder(String id, ResourceLocation item) {
return new Builder(this, new ResourceLocation(namespace, id), item);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), item);
}

/**
Expand All @@ -181,15 +181,15 @@ public Builder builder(String id, ResourceLocation item) {
* @param count The output count to use.
*/
public Builder builder(String id, Item item, int count) {
return new Builder(this, new ResourceLocation(namespace, id), item, count);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), item, count);
}

/**
* @param id The recipe id to use.
* @param item The output item to use.
*/
public Builder builder(String id, Item item) {
return new Builder(this, new ResourceLocation(namespace, id), item);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), item);
}

public static class Builder extends AbstractRecipeBuilder<Builder> {
Expand Down Expand Up @@ -259,7 +259,7 @@ public Imbueing(String namespace, PackOutput output, CompletableFuture<HolderLoo
* @param mana The amount of mana to use.
*/
public Builder builder(String id, Ingredient input, ResourceLocation output, int count, int mana) {
return new Builder(this, new ResourceLocation(namespace, id), input, output, count, mana);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), input, output, count, mana);
}

/**
Expand All @@ -269,7 +269,7 @@ public Builder builder(String id, Ingredient input, ResourceLocation output, int
* @param mana The amount of mana to use.
*/
public Builder builder(String id, Ingredient input, ResourceLocation output, int mana) {
return new Builder(this, new ResourceLocation(namespace, id), input, output, mana);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), input, output, mana);
}

/**
Expand All @@ -280,7 +280,7 @@ public Builder builder(String id, Ingredient input, ResourceLocation output, int
* @param mana The amount of mana to use.
*/
public Builder builder(String id, Ingredient input, Item output, int count, int mana) {
return new Builder(this, new ResourceLocation(namespace, id), input, output, count, mana);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), input, output, count, mana);
}

/**
Expand All @@ -290,7 +290,7 @@ public Builder builder(String id, Ingredient input, Item output, int count, int
* @param mana The amount of mana to use.
*/
public Builder builder(String id, Ingredient input, Item output, int mana) {
return new Builder(this, new ResourceLocation(namespace, id), input, output, mana);
return new Builder(this, ResourceLocation.fromNamespaceAndPath(namespace, id), input, output, mana);
}

public static class Builder extends AbstractRecipeBuilder<Builder> {
Expand Down
Loading

0 comments on commit 21d34f7

Please sign in to comment.