Skip to content

Commit

Permalink
Resolve compile issues
Browse files Browse the repository at this point in the history
Resolves: #56
  • Loading branch information
lynxplay committed Nov 11, 2024
1 parent 41a61cf commit e3cb1d3
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 6 deletions.
11 changes: 11 additions & 0 deletions versions/24w45a/patches/net/minecraft/data/Main.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/data/Main.java
+++ b/net/minecraft/data/Main.java
@@ -63,7 +_,7 @@

public class Main {
@SuppressForbidden(
- a = "System.out needed before bootstrap"
+ reason = "System.out needed before bootstrap"
)
@DontObfuscate
public static void main(String[] args) throws IOException {
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/resources/HolderSetCodec.java
+++ b/net/minecraft/resources/HolderSetCodec.java
@@ -70,7 +_,7 @@
@@ -64,7 +_,7 @@

private static <E> DataResult<HolderSet<E>> lookupTag(HolderGetter<E> input, TagKey<E> tagKey) {
return input.get(tagKey)
Expand Down
11 changes: 11 additions & 0 deletions versions/24w45a/patches/net/minecraft/server/Bootstrap.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/server/Bootstrap.java
+++ b/net/minecraft/server/Bootstrap.java
@@ -31,7 +_,7 @@
import org.slf4j.Logger;

@SuppressForbidden(
- a = "System.out setup"
+ reason = "System.out setup"
)
public class Bootstrap {
public static final PrintStream STDOUT = System.out;
11 changes: 11 additions & 0 deletions versions/24w45a/patches/net/minecraft/server/Main.java.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -64,7 +_,7 @@
private static final Logger LOGGER = LogUtils.getLogger();

@SuppressForbidden(
- a = "System.out needed before bootstrap"
+ reason = "System.out needed before bootstrap"
)
@DontObfuscate
public static void main(String[] args) {
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -845,7 +_,7 @@
@@ -851,7 +_,7 @@
if (item.has(DataComponents.WRITABLE_BOOK_CONTENT)) {
ItemStack itemStack = item.transmuteCopy(Items.WRITTEN_BOOK);
itemStack.remove(DataComponents.WRITABLE_BOOK_CONTENT);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/util/ExtraCodecs.java
+++ b/net/minecraft/util/ExtraCodecs.java
@@ -224,7 +_,7 @@
@@ -226,7 +_,7 @@
P object1 = list1.get(1);
return factory.apply(object, object1);
}), object -> ImmutableList.of(minGetter.apply((I)object), maxGetter.apply((I)object)));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/util/datafix/DataFixers.java
+++ b/net/minecraft/util/datafix/DataFixers.java
@@ -1099,7 +_,7 @@
@@ -1103,7 +_,7 @@
Schema schema161 = builder.addSchema(3086, SAME_NAMESPACED);
builder.addFixer(
new EntityVariantFix(
Expand All @@ -9,7 +9,7 @@
map5.defaultReturnValue("minecraft:tabby");
map5.put(0, "minecraft:tabby");
map5.put(1, "minecraft:black");
@@ -1136,7 +_,7 @@
@@ -1140,7 +_,7 @@
Schema schema162 = builder.addSchema(3087, SAME_NAMESPACED);
builder.addFixer(
new EntityVariantFix(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/animal/Sheep.java
+++ b/net/minecraft/world/entity/animal/Sheep.java
@@ -56,7 +_,7 @@
@@ -52,7 +_,7 @@
public class Sheep extends Animal implements Shearable {
private static final int EAT_ANIMATION_TICKS = 40;
private static final EntityDataAccessor<Byte> DATA_WOOL_ID = SynchedEntityData.defineId(Sheep.class, EntityDataSerializers.BYTE);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java
+++ b/net/minecraft/world/level/storage/loot/functions/SetCustomModelDataFunction.java
@@ -22,7 +_,7 @@

public class SetCustomModelDataFunction extends LootItemConditionalFunction {
private static final Codec<NumberProvider> COLOR_PROVIDER_CODEC = Codec.withAlternative(
- NumberProviders.CODEC, ExtraCodecs.RGB_COLOR_CODEC, ConstantValue::new
+ NumberProviders.CODEC, ExtraCodecs.RGB_COLOR_CODEC, f -> new ConstantValue(f)
);
public static final MapCodec<SetCustomModelDataFunction> CODEC = RecordCodecBuilder.mapCodec(
instance -> commonFields(instance)

0 comments on commit e3cb1d3

Please sign in to comment.