-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix patches for 24w14potato, closes #29
- Loading branch information
1 parent
fbd9780
commit c81fcda
Showing
20 changed files
with
73 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
versions/24w14potato/patches/net/minecraft/advancements/critereon/PlayerPredicate.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
--- a/net/minecraft/advancements/critereon/PlayerPredicate.java | ||
+++ b/net/minecraft/advancements/critereon/PlayerPredicate.java | ||
@@ -236,11 +_,11 @@ | ||
private static <T> MapCodec<PlayerPredicate.StatMatcher<T>> createTypedCodec(StatType<T> statType) { | ||
return RecordCodecBuilder.mapCodec( | ||
@@ -239,11 +_,11 @@ | ||
private static <T> Codec<PlayerPredicate.StatMatcher<T>> createTypedCodec(StatType<T> type) { | ||
return RecordCodecBuilder.create( | ||
instance -> instance.group( | ||
- (App<Mu<? extends PlayerPredicate.StatMatcher<?>>, Holder<T>>)statType.getRegistry() | ||
+ statType.getRegistry() | ||
- (App<Mu<? extends PlayerPredicate.StatMatcher<?>>, Holder<T>>)type.getRegistry() | ||
+ type.getRegistry() | ||
.holderByNameCodec() | ||
.fieldOf("stat") | ||
.forGetter(PlayerPredicate.StatMatcher::value), | ||
- (App<Mu<? extends PlayerPredicate.StatMatcher<?>>, MinMaxBounds.Ints>)MinMaxBounds.Ints.CODEC | ||
+ MinMaxBounds.Ints.CODEC | ||
.optionalFieldOf("value", MinMaxBounds.Ints.ANY) | ||
- (App<Mu<? extends PlayerPredicate.StatMatcher<?>>, MinMaxBounds.Ints>)ExtraCodecs.strictOptionalField( | ||
+ ExtraCodecs.strictOptionalField( | ||
MinMaxBounds.Ints.CODEC, "value", MinMaxBounds.Ints.ANY | ||
) | ||
.forGetter(PlayerPredicate.StatMatcher::range) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
versions/24w14potato/patches/net/minecraft/core/component/DataComponentPatch.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- a/net/minecraft/core/component/DataComponentPatch.java | ||
+++ b/net/minecraft/core/component/DataComponentPatch.java | ||
@@ -19,7 +_,7 @@ | ||
@@ -18,7 +_,7 @@ | ||
|
||
public final class DataComponentPatch { | ||
public static final DataComponentPatch EMPTY = new DataComponentPatch(Reference2ObjectMaps.emptyMap()); | ||
- public static final Codec<DataComponentPatch> CODEC = Codec.dispatchedMap(DataComponentPatch.PatchKey.CODEC, DataComponentPatch.PatchKey::valueCodec) | ||
+ public static final Codec<DataComponentPatch> CODEC = Codec.<PatchKey, Object>dispatchedMap(DataComponentPatch.PatchKey.CODEC, DataComponentPatch.PatchKey::valueCodec) | ||
- public static final Codec<DataComponentPatch> CODEC = ExtraCodecs.unboundedDispatchMap( | ||
+ public static final Codec<DataComponentPatch> CODEC = ExtraCodecs.<PatchKey, Object>unboundedDispatchMap( | ||
DataComponentPatch.PatchKey.CODEC, DataComponentPatch.PatchKey::valueCodec | ||
) | ||
.xmap(map -> { | ||
if (map.isEmpty()) { | ||
return EMPTY; |
11 changes: 11 additions & 0 deletions
11
versions/24w14potato/patches/net/minecraft/core/component/DataComponentPredicate.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/net/minecraft/core/component/DataComponentPredicate.java | ||
+++ b/net/minecraft/core/component/DataComponentPredicate.java | ||
@@ -13,7 +_,7 @@ | ||
import net.minecraft.util.ExtraCodecs; | ||
|
||
public final class DataComponentPredicate implements Predicate<DataComponentMap> { | ||
- public static final Codec<DataComponentPredicate> CODEC = ExtraCodecs.unboundedDispatchMap(DataComponentType.CODEC, DataComponentType::codecOrThrow) | ||
+ public static final Codec<DataComponentPredicate> CODEC = ExtraCodecs.<DataComponentType<?>, Object>unboundedDispatchMap(DataComponentType.CODEC, DataComponentType::codecOrThrow) | ||
.xmap( | ||
map -> new DataComponentPredicate(map.entrySet().stream().map(TypedDataComponent::fromEntryUnchecked).collect(Collectors.toList())), | ||
dataComponentPredicate -> dataComponentPredicate.expectedComponents |
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/core/component/DataComponentType.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/core/registries/BuiltInRegistries.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/network/codec/StreamCodec.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/server/level/ServerLevel.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../24w14potato/patches/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/util/ExtraCodecs.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...w14potato/patches/net/minecraft/util/datafix/fixes/BlockPosFormatAndRenamesFix.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- a/net/minecraft/util/datafix/fixes/BlockPosFormatAndRenamesFix.java | ||
+++ b/net/minecraft/util/datafix/fixes/BlockPosFormatAndRenamesFix.java | ||
@@ -36,11 +_,11 @@ | ||
|
||
private <T> Dynamic<T> fixMapSavedData(Dynamic<T> dynamic) { | ||
return dynamic.update("frames", dynamic1 -> dynamic1.createList(dynamic1.asStream().map(dynamic2 -> { | ||
- dynamic2 = ExtraDataFixUtils.renameAndFixField((Dynamic<?>)dynamic2, "Pos", "pos", ExtraDataFixUtils::fixBlockPos); | ||
+ dynamic2 = ExtraDataFixUtils.renameAndFixField(dynamic2, "Pos", "pos", ExtraDataFixUtils::fixBlockPos); | ||
dynamic2 = ExtraDataFixUtils.renameField(dynamic2, "Rotation", "rotation"); | ||
return ExtraDataFixUtils.renameField(dynamic2, "EntityId", "entity_id"); | ||
}))).update("banners", dynamic1 -> dynamic1.createList(dynamic1.asStream().map(dynamic2 -> { | ||
- dynamic2 = ExtraDataFixUtils.renameField((Dynamic<?>)dynamic2, "Pos", "pos"); | ||
+ dynamic2 = ExtraDataFixUtils.renameField(dynamic2, "Pos", "pos"); | ||
dynamic2 = ExtraDataFixUtils.renameField(dynamic2, "Color", "color"); | ||
return ExtraDataFixUtils.renameField(dynamic2, "Name", "name"); | ||
}))); |
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/world/entity/Mob.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/world/entity/SpawnPlacements.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
versions/24w14potato/patches/net/minecraft/world/entity/animal/Sheep.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
--- a/net/minecraft/world/entity/animal/Sheep.java | ||
+++ b/net/minecraft/world/entity/animal/Sheep.java | ||
@@ -81,7 +_,7 @@ | ||
@@ -84,10 +_,10 @@ | ||
map.put(DyeColor.RED, Blocks.RED_WOOL); | ||
map.put(DyeColor.BLACK, Blocks.BLACK_WOOL); | ||
}); | ||
- private static final Map<DyeColor, float[]> COLORARRAY_BY_COLOR = Maps.newEnumMap( | ||
+ private static final Map<DyeColor, float[]> COLORARRAY_BY_COLOR = Maps.<DyeColor, float[]>newEnumMap( | ||
Arrays.stream(DyeColor.values()).collect(Collectors.toMap(color -> (DyeColor)color, Sheep::createSheepColor)) | ||
); | ||
- private static final Map<DyeColor, float[]> COLORARRAY_BY_POTATO = Maps.newEnumMap( | ||
+ private static final Map<DyeColor, float[]> COLORARRAY_BY_POTATO = Maps.<DyeColor, float[]>newEnumMap( | ||
Arrays.stream(DyeColor.values()).collect(Collectors.toMap(dyeColor -> (DyeColor)dyeColor, Sheep::createSheepColorPotato)) | ||
); | ||
private int eatAnimationTick; |
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/world/item/crafting/RecipeManager.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
versions/24w14potato/patches/net/minecraft/world/level/GameRules.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ions/24w14potato/patches/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/net/minecraft/world/level/block/PointedDripstoneBlock.java | ||
+++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java | ||
@@ -583,7 +_,7 @@ | ||
@Nullable | ||
public static BlockPos findStalactiteTipAboveCauldron(Block block, Level level, BlockPos blockPos) { | ||
if (block instanceof PointedDripstoneBlock pointedDripstoneBlock) { | ||
- BiPredicate biPredicate = (blockPos1, blockState) -> canDripThrough(level, blockPos1, blockState); | ||
+ BiPredicate<BlockPos, BlockState> biPredicate = (blockPos1, blockState) -> canDripThrough(level, blockPos1, blockState); | ||
return findBlockVertical(level, blockPos, Direction.UP.getAxisDirection(), biPredicate, pointedDripstoneBlock::canDrip, 11).orElse(null); | ||
} else { | ||
return null; |
2 changes: 1 addition & 1 deletion
2
...ecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters