Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to 1.20.1 #84

Draft
wants to merge 1 commit into
base: 2.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {

plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "io.github.juuxel.loom-quiltflower" version "1.7.1" apply false
}

Expand Down Expand Up @@ -62,6 +62,21 @@ allprojects {
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = "cph101Releases"
url = "https://maven.cph101.com/snapshots/"
credentials(PasswordCredentials)
}
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release.set(17)
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {

modCompileOnlyApi("mezz.jei:jei-${rootProject.minecraft_version}-common-api:${rootProject.jei_version}")

implementation(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-common:${rootProject.mixinextras_version}"))
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${rootProject.mixinextras_version}"))
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static StateAnimationController createState(AnimationState[] states, MolangRunti
* @return A new state animation controller
*/
static StateAnimationController createState(AnimationState[] states, Entity entity) {
boolean client = entity.getLevel().isClientSide();
boolean client = entity.level().isClientSide();
MolangRuntime.Builder builder = MolangRuntime.runtime();
AnimationRuntime.addEntity(builder, entity, client);
return createState(states, builder.create(), client);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gg.moonflower.pollen.api.crafting.v1;

import gg.moonflower.pollen.core.crafting.PollenBrewingRecipeImpl;
import net.minecraft.core.RegistryAccess;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.Container;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -35,7 +36,7 @@ default boolean matches(Container container, Level level) {
}

@Override
default ItemStack assemble(Container container) {
default ItemStack assemble(Container container, RegistryAccess registryAccess) {
return ItemStack.EMPTY;
}

Expand All @@ -45,7 +46,7 @@ default boolean canCraftInDimensions(int w, int h) {
}

@Override
default ItemStack getResultItem() {
default ItemStack getResultItem(RegistryAccess registryAccess) {
return ItemStack.EMPTY;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import gg.moonflower.pollen.core.crafting.PollenBrewingRecipeImpl;
import gg.moonflower.pollen.core.crafting.PollenShapelessGrindstoneRecipeImpl;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.Recipe;
Expand All @@ -26,9 +27,9 @@
public final class PollenRecipeTypes {

@ApiStatus.Internal
public static final DeferredRegister<RecipeSerializer<?>> RECIPE_SERIALIZERS = DeferredRegister.create(Pollen.MOD_ID, Registry.RECIPE_SERIALIZER_REGISTRY);
public static final DeferredRegister<RecipeSerializer<?>> RECIPE_SERIALIZERS = DeferredRegister.create(Pollen.MOD_ID, Registries.RECIPE_SERIALIZER);
@ApiStatus.Internal
public static final DeferredRegister<RecipeType<?>> RECIPES = DeferredRegister.create(Pollen.MOD_ID, Registry.RECIPE_TYPE_REGISTRY);
public static final DeferredRegister<RecipeType<?>> RECIPES = DeferredRegister.create(Pollen.MOD_ID, Registries.RECIPE_TYPE);

public static final Supplier<RecipeType<PollenBrewingRecipe>> BREWING_TYPE = register("brewing");
public static final Supplier<RecipeSerializer<PollenBrewingRecipe>> BREWING = RECIPE_SERIALIZERS.register("brewing", () -> createSerializer(PollenBrewingRecipeImpl::fromJson, PollenBrewingRecipeImpl::fromNetwork, PollenBrewingRecipeImpl::toNetwork));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import gg.moonflower.pollen.impl.event.registry.RegisterAtlasSpriteEventImpl;
import net.minecraft.client.renderer.texture.TextureAtlas;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.packs.resources.ResourceManager;

import java.util.function.BiConsumer;
import java.util.function.Consumer;

/**
Expand Down Expand Up @@ -32,5 +34,5 @@ static Event<RegisterAtlasSpriteEvent> event(ResourceLocation atlasId) {
* @param atlas The atlas to register into
* @param registry The registry to add sprites into the texture
*/
void registerSprites(TextureAtlas atlas, Consumer<ResourceLocation> registry);
void registerSprites(TextureAtlas atlas, BiConsumer<ResourceLocation, ResourceManager> registry);
}

This file was deleted.

Loading