-
-
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.
Resolves: #43
- Loading branch information
Showing
15 changed files
with
55 additions
and
33 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
2 changes: 1 addition & 1 deletion
2
versions/24w33a/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/24w33a/patches/net/minecraft/server/MinecraftServer.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/24w33a/patches/net/minecraft/server/level/ServerChunkCache.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/24w33a/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
versions/24w33a/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
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/24w33a/patches/net/minecraft/world/entity/Entity.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
8 changes: 4 additions & 4 deletions
8
versions/24w33a/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- a/net/minecraft/world/entity/SpawnPlacements.java | ||
+++ b/net/minecraft/world/entity/SpawnPlacements.java | ||
@@ -73,7 +_,7 @@ | ||
EntityType<T> entityType, ServerLevelAccessor serverLevel, MobSpawnType spawnType, BlockPos pos, RandomSource random | ||
@@ -74,7 +_,7 @@ | ||
EntityType<T> entityType, ServerLevelAccessor serverLevelAccessor, EntitySpawnReason entitySpawnReason, BlockPos blockPos, RandomSource randomSource | ||
) { | ||
SpawnPlacements.Data data = DATA_BY_TYPE.get(entityType); | ||
- return data == null || data.predicate.test(entityType, serverLevel, spawnType, pos, random); | ||
+ return data == null || data.predicate.test((EntityType) entityType, serverLevel, spawnType, pos, random); | ||
- return data == null || data.predicate.test(entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource); | ||
+ return data == null || data.predicate.test((EntityType) entityType, serverLevelAccessor, entitySpawnReason, blockPos, randomSource); | ||
} | ||
|
||
static { |
10 changes: 5 additions & 5 deletions
10
versions/24w33a/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,11 @@ | ||
--- a/net/minecraft/world/entity/animal/Sheep.java | ||
+++ b/net/minecraft/world/entity/animal/Sheep.java | ||
@@ -80,7 +_,7 @@ | ||
map.put(DyeColor.RED, Blocks.RED_WOOL); | ||
map.put(DyeColor.BLACK, Blocks.BLACK_WOOL); | ||
}); | ||
@@ -58,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); | ||
- private static final Map<DyeColor, Integer> COLOR_BY_DYE = Maps.newEnumMap( | ||
+ private static final Map<DyeColor, Integer> COLOR_BY_DYE = Maps.<DyeColor, Integer>newEnumMap( | ||
Arrays.stream(DyeColor.values()).collect(Collectors.toMap(color -> (DyeColor)color, Sheep::createSheepColor)) | ||
Arrays.stream(DyeColor.values()).collect(Collectors.toMap(dyeColor -> (DyeColor)dyeColor, Sheep::createSheepColor)) | ||
); | ||
private int eatAnimationTick; |
11 changes: 11 additions & 0 deletions
11
versions/24w33a/patches/net/minecraft/world/item/HoneycombItem.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/item/HoneycombItem.java | ||
+++ b/net/minecraft/world/item/HoneycombItem.java | ||
@@ -71,7 +_,7 @@ | ||
Level level = context.getLevel(); | ||
BlockPos clickedPos = context.getClickedPos(); | ||
BlockState blockState = level.getBlockState(clickedPos); | ||
- return getWaxed(blockState).map(blockState1 -> { | ||
+ return getWaxed(blockState).<InteractionResult>map(blockState1 -> { | ||
Player player = context.getPlayer(); | ||
ItemStack itemInHand = context.getItemInHand(); | ||
if (player instanceof ServerPlayer serverPlayer) { |
11 changes: 11 additions & 0 deletions
11
versions/24w33a/patches/net/minecraft/world/item/crafting/Ingredient.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/item/crafting/Ingredient.java | ||
+++ b/net/minecraft/world/item/crafting/Ingredient.java | ||
@@ -28,7 +_,7 @@ | ||
public static final StreamCodec<RegistryFriendlyByteBuf, Optional<Ingredient>> OPTIONAL_CONTENTS_STREAM_CODEC = ByteBufCodecs.holderSet(Registries.ITEM) | ||
.map( | ||
holderSet -> holderSet.size() == 0 ? Optional.empty() : Optional.of(new Ingredient((HolderSet<Item>)holderSet)), | ||
- optional -> optional.<HolderSet.Direct<Item>>map(ingredient -> ingredient.values).orElse(HolderSet.direct()) | ||
+ optional -> optional.map(ingredient -> ingredient.values).orElse(HolderSet.direct()) | ||
); | ||
public static final Codec<HolderSet<Item>> NON_AIR_HOLDER_SET_CODEC = HolderSetCodec.create(Registries.ITEM, ItemStack.ITEM_NON_AIR_CODEC, false); | ||
public static final Codec<Ingredient> CODEC = ExtraCodecs.nonEmptyHolderSet(NON_AIR_HOLDER_SET_CODEC) |
2 changes: 1 addition & 1 deletion
2
versions/24w33a/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
16 changes: 8 additions & 8 deletions
16
versions/24w33a/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- a/net/minecraft/world/level/GameRules.java | ||
+++ b/net/minecraft/world/level/GameRules.java | ||
@@ -250,8 +_,8 @@ | ||
} | ||
@@ -278,8 +_,8 @@ | ||
|
||
private static <T extends GameRules.Value<T>> void callVisitorCap(GameRules.GameRuleTypeVisitor visitor, GameRules.Key<?> key, GameRules.Type<?> type) { | ||
- visitor.visit(key, type); | ||
- type.callVisitor(visitor, key); | ||
+ visitor.visit((GameRules.Key<T>) key, (GameRules.Type<T>) type); | ||
+ ((GameRules.Type<T>) type).callVisitor(visitor, (GameRules.Key<T>) key); | ||
private <T extends GameRules.Value<T>> void callVisitorCap(GameRules.GameRuleTypeVisitor key, GameRules.Key<?> type, GameRules.Type<?> type1) { | ||
if (type1.requiredFeatures.isSubsetOf(this.enabledFeatures)) { | ||
- key.visit(type, type1); | ||
- type1.callVisitor(key, type); | ||
+ key.visit((GameRules.Key<T>) type, (GameRules.Type<T>) type1); | ||
+ ((GameRules.Type<T>) type1).callVisitor(key, (GameRules.Key<T>) type); | ||
} | ||
} | ||
|
||
public void assignFrom(GameRules rules, @Nullable MinecraftServer server) { |