Skip to content

Commit

Permalink
Update to 24w13a.
Browse files Browse the repository at this point in the history
- Update to 24w13a
- PlacerTypes must now pass a MapCodec instead of Codec
  • Loading branch information
gniftygnome committed Mar 27, 2024
1 parent 3302bf1 commit 9a0df86
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.parallel=true
fabric.loom.multiProjectOptimisation=true

maven_group=com.terraformersmc.terraform-api
version=10.0.0-alpha.7
version=10.0.0-alpha.8

minecraft_version=24w11a
yarn_mappings=24w11a+build.2
minecraft_version=24w13a
yarn_mappings=24w13a+build.2
loader_version=0.15.7
fabric_version=0.96.10+1.20.5
fabric_version=0.96.13+1.20.5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.terraformersmc.terraform.tree.mixin;

import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import net.minecraft.world.gen.foliage.FoliagePlacer;
import net.minecraft.world.gen.foliage.FoliagePlacerType;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -10,7 +10,7 @@
public interface InvokerFoliagePlacerType {
@Invoker
@Deprecated
static <P extends FoliagePlacer> FoliagePlacerType<P> callRegister(String id, Codec<P> codec) {
static <P extends FoliagePlacer> FoliagePlacerType<P> callRegister(String id, MapCodec<P> codec) {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.terraformersmc.terraform.tree.mixin;

import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import net.minecraft.world.gen.trunk.TrunkPlacer;
import net.minecraft.world.gen.trunk.TrunkPlacerType;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -10,7 +10,7 @@
public interface InvokerTrunkPlacerType {
@Invoker
@Deprecated
static <P extends TrunkPlacer> TrunkPlacerType<P> callRegister(String id, Codec<P> codec) {
static <P extends TrunkPlacer> TrunkPlacerType<P> callRegister(String id, MapCodec<P> codec) {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.terraformersmc.terraform.tree.placer;

import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import com.terraformersmc.terraform.tree.mixin.InvokerFoliagePlacerType;
import com.terraformersmc.terraform.tree.mixin.InvokerTrunkPlacerType;

Expand All @@ -13,21 +13,21 @@
public class PlacerTypes {
// Deprecated annotation is just a warning for non-internal references
@SuppressWarnings("deprecation")
public static <P extends FoliagePlacer> FoliagePlacerType<P> registerFoliagePlacer(String id, Codec<P> codec) {
public static <P extends FoliagePlacer> FoliagePlacerType<P> registerFoliagePlacer(String id, MapCodec<P> codec) {
return InvokerFoliagePlacerType.callRegister(id, codec);
}

// Deprecated annotation is just a warning for non-internal references
@SuppressWarnings("deprecation")
public static <P extends TrunkPlacer> TrunkPlacerType<P> registerTrunkPlacer(String id, Codec<P> codec) {
public static <P extends TrunkPlacer> TrunkPlacerType<P> registerTrunkPlacer(String id, MapCodec<P> codec) {
return InvokerTrunkPlacerType.callRegister(id, codec);
}

public static <P extends FoliagePlacer> FoliagePlacerType<P> registerFoliagePlacer(Identifier id, Codec<P> codec) {
public static <P extends FoliagePlacer> FoliagePlacerType<P> registerFoliagePlacer(Identifier id, MapCodec<P> codec) {
return registerFoliagePlacer(id.toString(), codec);
}

public static <P extends TrunkPlacer> TrunkPlacerType<P> registerTrunkPlacer(Identifier id, Codec<P> codec) {
public static <P extends TrunkPlacer> TrunkPlacerType<P> registerTrunkPlacer(Identifier id, MapCodec<P> codec) {
return registerTrunkPlacer(id.toString(), codec);
}
}

0 comments on commit 9a0df86

Please sign in to comment.