From 40e75b36f34ce60f4fba4be6faeac2096a88744a Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Wed, 19 Jul 2023 19:13:45 +0200 Subject: [PATCH] feat: add a bunch of patches --- .../patches/net/minecraft/Util.java.patch | 11 ++ .../minecraft/commands/Commands.java.patch | 11 ++ .../arguments/EntityArgument.java.patch | 15 +++ .../arguments/OperationArgument.java.patch | 11 ++ .../ResourceOrTagArgument.java.patch | 20 ++++ .../arguments/item/ItemInput.java.patch | 10 ++ .../ArgumentTypeInfos.java.patch | 26 +++++ .../SuggestionProviders.java.patch | 11 ++ .../minecraft/core/HolderLookup.java.patch | 11 ++ .../minecraft/core/RegistryAccess.java.patch | 40 +++++++ .../core/RegistrySetBuilder.java.patch | 22 ++++ .../core/RegistrySynchronization.java.patch | 20 ++++ .../registries/BuiltInRegistries.java.patch | 11 ++ .../data/info/RegistryDumpReport.java.patch | 11 ++ .../data/loot/BlockLootSubProvider.java.patch | 20 ++++ .../data/tags/TagsProvider.java.patch | 29 +++++ .../framework/GameTestRegistry.java.patch | 20 ++++ .../net/minecraft/nbt/TagParser.java.patch | 17 +++ .../network/ConnectionProtocol.java.patch | 71 ++++++++++++ .../network/FriendlyByteBuf.java.patch | 109 ++++++++++++++++++ .../network/chat/HoverEvent.java.patch | 11 ++ .../network/chat/LastSeenMessages.java.patch | 11 ++ .../network/protocol/BundlerInfo.java.patch | 11 ++ ...oundUpdateEnabledFeaturesPacket.java.patch | 11 ++ .../ClientboundUpdateRecipesPacket.java.patch | 10 ++ .../syncher/EntityDataSerializer.java.patch | 17 +++ .../syncher/SynchedEntityData.java.patch | 11 ++ .../resources/RegistryFileCodec.java.patch | 11 ++ .../resources/RegistryFixedCodec.java.patch | 11 ++ .../resources/RegistryOps.java.patch | 11 ++ .../server/MinecraftServer.java.patch | 11 ++ .../ServerAdvancementManager.java.patch | 11 ++ .../server/commands/EnchantCommand.java.patch | 17 +++ .../commands/ScoreboardCommand.java.patch | 11 ++ .../DedicatedServerProperties.java.patch | 11 ++ .../server/dedicated/Settings.java.patch | 11 ++ .../server/level/ChunkMap.java.patch | 45 ++++++++ .../level/ChunkTaskPriorityQueue.java.patch | 20 ++++ .../ChunkTaskPriorityQueueSorter.java.patch | 20 ++++ .../server/level/ServerChunkCache.java.patch | 11 ++ .../server/level/ServerLevel.java.patch | 11 ++ .../minecraft/server/level/Ticket.java.patch | 11 ++ .../server/level/TickingTracker.java.patch | 11 ++ .../packs/linkfs/LinkFSProvider.java.patch | 11 ++ .../net/minecraft/tags/TagLoader.java.patch | 11 ++ .../util/ClassInstanceMultiMap.java.patch | 11 ++ .../net/minecraft/util/ExtraCodecs.java.patch | 24 ++++ .../minecraft/util/SortedArraySet.java.patch | 11 ++ .../util/StringRepresentable.java.patch | 11 ++ .../util/datafix/DataFixTypes.java.patch | 11 ++ .../util/datafix/DataFixers.java.patch | 20 ++++ .../datafix/fixes/AddNewChoices.java.patch | 13 +++ .../datafix/fixes/BlockEntityIdFix.java.patch | 13 +++ .../fixes/BlockEntityRenameFix.java.patch | 13 +++ .../fixes/BlockEntityUUIDFix.java.patch | 11 ++ .../ChunkBedBlockEntityInjecterFix.java.patch | 11 ++ .../fixes/ChunkProtoTickListFix.java.patch | 11 ++ .../util/datafix/fixes/EntityIdFix.java.patch | 13 +++ .../EntityMinecartIdentifiersFix.java.patch | 13 +++ .../datafix/fixes/EntityRenameFix.java.patch | 13 +++ .../datafix/fixes/FurnaceRecipeFix.java.patch | 15 +++ .../ItemRemoveBlockEntityTagFix.java.patch | 11 ++ .../util/datafix/fixes/LeavesFix.java.patch | 11 ++ .../MobSpawnerEntityIdentifiersFix.java.patch | 11 ++ .../fixes/OptionsKeyLwjgl3Fix.java.patch | 22 ++++ .../fixes/OptionsKeyTranslationFix.java.patch | 18 +++ .../fixes/SimplestEntityRenameFix.java.patch | 13 +++ .../TrappedChestBlockEntityFix.java.patch | 11 ++ ...tingsDisallowOldCustomWorldsFix.java.patch | 11 ++ .../valueproviders/ConstantFloat.java.patch | 11 ++ .../valueproviders/ConstantInt.java.patch | 11 ++ .../net/minecraft/world/entity/Mob.java.patch | 11 ++ .../world/entity/SpawnPlacements.java.patch | 11 ++ .../world/entity/ai/Brain.java.patch | 28 +++++ .../entity/ai/behavior/AcquirePoi.java.patch | 20 ++++ .../AssignProfessionFromJobSite.java.patch | 11 ++ .../ai/behavior/BabyFollowAdult.java.patch | 11 ++ .../ai/behavior/BackUpIfTooClose.java.patch | 11 ++ .../BecomePassiveIfMemoryPresent.java.patch | 11 ++ .../behavior/CopyMemoryWithExpiry.java.patch | 11 ++ .../DismountOrSkipMounting.java.patch | 11 ++ .../ai/behavior/EraseMemoryIf.java.patch | 11 ++ .../ai/behavior/GoToClosestVillage.java.patch | 11 ++ .../ai/behavior/GoToTargetLocation.java.patch | 11 ++ .../ai/behavior/InsideBrownianWalk.java.patch | 11 ++ .../ai/behavior/InteractWith.java.patch | 20 ++++ .../ai/behavior/InteractWithDoor.java.patch | 20 ++++ .../ai/behavior/LocateHidingPlace.java.patch | 11 ++ .../entity/ai/behavior/MeleeAttack.java.patch | 11 ++ .../world/entity/ai/behavior/Mount.java.patch | 11 ++ .../behavior/MoveToSkySeeingSpot.java.patch | 11 ++ .../behavior/PlayTagWithOtherKids.java.patch | 11 ++ .../ai/behavior/PoiCompetitorScan.java.patch | 11 ++ .../ai/behavior/RandomStroll.java.patch | 11 ++ .../entity/ai/behavior/ReactToBell.java.patch | 11 ++ .../ai/behavior/ResetProfession.java.patch | 11 ++ .../entity/ai/behavior/RingBell.java.patch | 11 ++ .../SetClosestHomeAsWalkTarget.java.patch | 11 ++ .../behavior/SetEntityLookTarget.java.patch | 11 ++ .../SetEntityLookTargetSometimes.java.patch | 11 ++ .../ai/behavior/SetHiddenState.java.patch | 11 ++ .../ai/behavior/SetLookAndInteract.java.patch | 11 ++ .../behavior/SetWalkTargetAwayFrom.java.patch | 11 ++ ...mAttackTargetIfTargetOutOfReach.java.patch | 11 ++ .../SetWalkTargetFromBlockMemory.java.patch | 11 ++ .../SetWalkTargetFromLookTarget.java.patch | 11 ++ .../ai/behavior/SocializeAtBell.java.patch | 11 ++ .../ai/behavior/StartAttacking.java.patch | 11 ++ .../StartCelebratingIfTargetDead.java.patch | 11 ++ .../ai/behavior/StayCloseToTarget.java.patch | 11 ++ .../StopAttackingIfTargetInvalid.java.patch | 11 ++ .../StopBeingAngryIfTargetDead.java.patch | 11 ++ .../ai/behavior/StrollAroundPoi.java.patch | 11 ++ .../entity/ai/behavior/StrollToPoi.java.patch | 11 ++ .../ai/behavior/StrollToPoiList.java.patch | 11 ++ .../entity/ai/behavior/TryFindLand.java.patch | 11 ++ .../behavior/TryFindLandNearWater.java.patch | 11 ++ .../ai/behavior/TryFindWater.java.patch | 11 ++ .../TryLaySpawnOnWaterNearLand.java.patch | 11 ++ .../ai/behavior/ValidateNearbyPoi.java.patch | 11 ++ .../VillageBoundRandomStroll.java.patch | 11 ++ .../ai/behavior/VillagerCalmDown.java.patch | 11 ++ .../ai/behavior/YieldJobSite.java.patch | 11 ++ .../behavior/warden/SetRoarTarget.java.patch | 11 ++ .../warden/SetWardenLookTarget.java.patch | 11 ++ .../ai/behavior/warden/TryToSniff.java.patch | 11 ++ .../ai/gossip/GossipContainer.java.patch | 11 ++ .../world/entity/animal/Sheep.java.patch | 11 ++ .../entity/animal/allay/Allay.java.patch | 11 ++ .../entity/animal/axolotl/Axolotl.java.patch | 11 ++ .../animal/axolotl/AxolotlAi.java.patch | 11 ++ .../axolotl/ValidatePlayDead.java.patch | 11 ++ .../entity/animal/camel/Camel.java.patch | 11 ++ .../world/entity/animal/frog/Frog.java.patch | 11 ++ .../entity/animal/frog/Tadpole.java.patch | 11 ++ .../world/entity/animal/goat/Goat.java.patch | 11 ++ .../entity/animal/sniffer/Sniffer.java.patch | 11 ++ .../world/entity/monster/Slime.java.patch | 11 ++ .../world/entity/monster/Zoglin.java.patch | 11 ++ .../entity/monster/hoglin/Hoglin.java.patch | 11 ++ .../entity/monster/hoglin/HoglinAi.java.patch | 11 ++ .../entity/monster/piglin/Piglin.java.patch | 11 ++ .../entity/monster/piglin/PiglinAi.java.patch | 38 ++++++ .../monster/piglin/PiglinBrute.java.patch | 11 ++ .../RememberIfHoglinWasKilled.java.patch | 11 ++ .../piglin/StartAdmiringItemIfSeen.java.patch | 11 ++ .../piglin/StartHuntingHoglin.java.patch | 28 +++++ .../StopAdmiringIfItemTooFarAway.java.patch | 11 ++ ...iringIfTiredOfTryingToReachItem.java.patch | 11 ++ ...opHoldingItemIfNoLongerAdmiring.java.patch | 11 ++ .../entity/monster/warden/Warden.java.patch | 11 ++ .../entity/monster/warden/WardenAi.java.patch | 11 ++ .../world/entity/npc/Villager.java.patch | 11 ++ .../item/crafting/RecipeManager.java.patch | 11 ++ .../world/level/GameRules.java.patch | 13 +++ .../world/level/biome/Climate.java.patch | 11 ++ .../level/block/BaseEntityBlock.java.patch | 10 ++ .../world/level/chunk/LevelChunk.java.patch | 11 ++ .../level/chunk/PalettedContainer.java.patch | 11 ++ .../gameevent/PositionSourceType.java.patch | 10 ++ .../level/levelgen/SurfaceRules.java.patch | 105 +++++++++++++++++ .../heightproviders/ConstantHeight.java.patch | 11 ++ .../loot/GsonAdapterFactory.java.patch | 18 +++ .../storage/loot/LootDataType.java.patch | 17 +++ .../ticks/BlackholeTickAccess.java.patch | 15 +++ 165 files changed, 2411 insertions(+) create mode 100644 versions/1.20.1/patches/net/minecraft/Util.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/Commands.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/arguments/EntityArgument.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/arguments/OperationArgument.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/arguments/item/ItemInput.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/commands/synchronization/SuggestionProviders.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/core/HolderLookup.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/core/RegistryAccess.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/core/RegistrySetBuilder.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/core/RegistrySynchronization.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/core/registries/BuiltInRegistries.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/data/info/RegistryDumpReport.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/data/loot/BlockLootSubProvider.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/data/tags/TagsProvider.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/gametest/framework/GameTestRegistry.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/nbt/TagParser.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/ConnectionProtocol.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/FriendlyByteBuf.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/chat/HoverEvent.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/chat/LastSeenMessages.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/protocol/BundlerInfo.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateEnabledFeaturesPacket.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/syncher/EntityDataSerializer.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/network/syncher/SynchedEntityData.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/resources/RegistryFileCodec.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/resources/RegistryFixedCodec.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/resources/RegistryOps.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/MinecraftServer.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/ServerAdvancementManager.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/commands/EnchantCommand.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/commands/ScoreboardCommand.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/dedicated/Settings.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/ChunkMap.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/ServerChunkCache.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/ServerLevel.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/Ticket.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/level/TickingTracker.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/tags/TagLoader.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/ClassInstanceMultiMap.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/ExtraCodecs.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/SortedArraySet.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/StringRepresentable.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/DataFixTypes.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/DataFixers.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/FurnaceRecipeFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/LeavesFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantFloat.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantInt.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/Mob.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/SpawnPlacements.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/Brain.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/Mount.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RingBell.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/Sheep.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/allay/Allay.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/camel/Camel.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Frog.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Tadpole.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/goat/Goat.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/Slime.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/Zoglin.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/Piglin.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/Warden.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/WardenAi.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/entity/npc/Villager.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/item/crafting/RecipeManager.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/GameRules.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/biome/Climate.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/block/BaseEntityBlock.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/chunk/PalettedContainer.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/gameevent/PositionSourceType.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/levelgen/SurfaceRules.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/levelgen/heightproviders/ConstantHeight.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/level/storage/loot/LootDataType.java.patch create mode 100644 versions/1.20.1/patches/net/minecraft/world/ticks/BlackholeTickAccess.java.patch diff --git a/versions/1.20.1/patches/net/minecraft/Util.java.patch b/versions/1.20.1/patches/net/minecraft/Util.java.patch new file mode 100644 index 0000000..a778ac9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/Util.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/Util.java ++++ b/net/minecraft/Util.java +@@ -358,7 +358,7 @@ + } + + public static Strategy identityStrategy() { +- return Util.IdentityStrategy.INSTANCE; ++ return (Strategy) Util.IdentityStrategy.INSTANCE; + } + + public static CompletableFuture> sequence(List> futures) { diff --git a/versions/1.20.1/patches/net/minecraft/commands/Commands.java.patch b/versions/1.20.1/patches/net/minecraft/commands/Commands.java.patch new file mode 100644 index 0000000..58c6302 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/Commands.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/commands/Commands.java ++++ b/net/minecraft/commands/Commands.java +@@ -317,7 +317,7 @@ + ) { + for(CommandNode commandnode : tree.getChildren()) { + if (commandnode.canUse(source)) { +- ArgumentBuilder argumentbuilder = commandnode.createBuilder(); ++ ArgumentBuilder argumentbuilder = (ArgumentBuilder) commandnode.createBuilder(); + argumentbuilder.requires(sourcex -> true); + if (argumentbuilder.getCommand() != null) { + argumentbuilder.executes(context -> 0); diff --git a/versions/1.20.1/patches/net/minecraft/commands/arguments/EntityArgument.java.patch b/versions/1.20.1/patches/net/minecraft/commands/arguments/EntityArgument.java.patch new file mode 100644 index 0000000..d7fa0c9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/arguments/EntityArgument.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/commands/arguments/EntityArgument.java ++++ b/net/minecraft/commands/arguments/EntityArgument.java +@@ -117,9 +117,9 @@ + + @Override + public CompletableFuture listSuggestions(CommandContext context, SuggestionsBuilder builder) { +- StringReader stringreader = context.getSource(); +- if (stringreader instanceof SharedSuggestionProvider sharedsuggestionprovider) { +- stringreader = new StringReader(builder.getInput()); ++ S s = context.getSource(); ++ if (s instanceof SharedSuggestionProvider sharedsuggestionprovider) { ++ StringReader stringreader = new StringReader(builder.getInput()); + stringreader.setCursor(builder.getStart()); + EntitySelectorParser entityselectorparser = new EntitySelectorParser(stringreader, sharedsuggestionprovider.hasPermission(2)); + diff --git a/versions/1.20.1/patches/net/minecraft/commands/arguments/OperationArgument.java.patch b/versions/1.20.1/patches/net/minecraft/commands/arguments/OperationArgument.java.patch new file mode 100644 index 0000000..56b10c7 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/arguments/OperationArgument.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/commands/arguments/OperationArgument.java ++++ b/net/minecraft/commands/arguments/OperationArgument.java +@@ -57,7 +57,7 @@ + } + + private static OperationArgument.Operation getOperation(String operator) throws CommandSyntaxException { +- return (OperationArgument.Operation)(operator.equals("><") ? (a, b) -> { ++ return (operator.equals("><") ? (a, b) -> { + int i = a.getScore(); + a.setScore(b.getScore()); + b.setScore(i); diff --git a/versions/1.20.1/patches/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch b/versions/1.20.1/patches/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch new file mode 100644 index 0000000..b016691 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/commands/arguments/ResourceOrTagArgument.java ++++ b/net/minecraft/commands/arguments/ResourceOrTagArgument.java +@@ -150,7 +150,7 @@ + + @Override + public Optional> cast(ResourceKey> registryRef) { +- return this.value.key().isFor(registryRef) ? Optional.of(this) : Optional.empty(); ++ return this.value.key().isFor(registryRef) ? Optional.of((Result) this) : Optional.empty(); + } + + @Override +@@ -180,7 +180,7 @@ + + @Override + public Optional> cast(ResourceKey> registryRef) { +- return this.tag.key().isFor(registryRef) ? Optional.of(this) : Optional.empty(); ++ return this.tag.key().isFor(registryRef) ? Optional.of((Result) this) : Optional.empty(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/commands/arguments/item/ItemInput.java.patch b/versions/1.20.1/patches/net/minecraft/commands/arguments/item/ItemInput.java.patch new file mode 100644 index 0000000..684c1f0 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/arguments/item/ItemInput.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/commands/arguments/item/ItemInput.java ++++ b/net/minecraft/commands/arguments/item/ItemInput.java +@@ -57,6 +57,6 @@ + } + + private String getItemName() { +- return this.item.unwrapKey().map(ResourceKey::location).orElseGet(() -> "unknown[" + this.item + "]").toString(); ++ return this.item.unwrapKey().map(ResourceKey::location).orElseGet(() -> "unknown[" + this.item + "]").toString(); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch b/versions/1.20.1/patches/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch new file mode 100644 index 0000000..da2a1f0 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch @@ -0,0 +1,26 @@ +--- a/net/minecraft/commands/synchronization/ArgumentTypeInfos.java ++++ b/net/minecraft/commands/synchronization/ArgumentTypeInfos.java +@@ -114,10 +114,10 @@ + register(registry, "dimension", DimensionArgument.class, SingletonArgumentInfo.contextFree(DimensionArgument::dimension)); + register(registry, "gamemode", GameModeArgument.class, SingletonArgumentInfo.contextFree(GameModeArgument::gameMode)); + register(registry, "time", TimeArgument.class, new TimeArgument.Info()); +- register(registry, "resource_or_tag", fixClassType(ResourceOrTagArgument.class), new ResourceOrTagArgument.Info()); +- register(registry, "resource_or_tag_key", fixClassType(ResourceOrTagKeyArgument.class), new ResourceOrTagKeyArgument.Info()); +- register(registry, "resource", fixClassType(ResourceArgument.class), new ResourceArgument.Info()); +- register(registry, "resource_key", fixClassType(ResourceKeyArgument.class), new ResourceKeyArgument.Info()); ++ register(registry, "resource_or_tag", fixClassType(ResourceOrTagArgument.class), new ResourceOrTagArgument.Info<>()); ++ register(registry, "resource_or_tag_key", fixClassType(ResourceOrTagKeyArgument.class), new ResourceOrTagKeyArgument.Info<>()); ++ register(registry, "resource", fixClassType(ResourceArgument.class), new ResourceArgument.Info<>()); ++ register(registry, "resource_key", fixClassType(ResourceKeyArgument.class), new ResourceKeyArgument.Info<>()); + register(registry, "template_mirror", TemplateMirrorArgument.class, SingletonArgumentInfo.contextFree(TemplateMirrorArgument::templateMirror)); + register(registry, "template_rotation", TemplateRotationArgument.class, SingletonArgumentInfo.contextFree(TemplateRotationArgument::templateRotation)); + register(registry, "heightmap", HeightmapTypeArgument.class, SingletonArgumentInfo.contextFree(HeightmapTypeArgument::heightmap)); +@@ -142,7 +142,7 @@ + if (argumenttypeinfo == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Unrecognized argument type %s (%s)", argumentType, argumentType.getClass())); + } else { +- return argumenttypeinfo; ++ return (ArgumentTypeInfo) argumenttypeinfo; + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/commands/synchronization/SuggestionProviders.java.patch b/versions/1.20.1/patches/net/minecraft/commands/synchronization/SuggestionProviders.java.patch new file mode 100644 index 0000000..88ac450 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/commands/synchronization/SuggestionProviders.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/commands/synchronization/SuggestionProviders.java ++++ b/net/minecraft/commands/synchronization/SuggestionProviders.java +@@ -48,7 +48,7 @@ + throw new IllegalArgumentException("A command suggestion provider is already registered with the name " + id); + } else { + PROVIDERS_BY_NAME.put(id, provider); +- return new SuggestionProviders.Wrapper(id, provider); ++ return (SuggestionProvider) new Wrapper(id, provider); + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/core/HolderLookup.java.patch b/versions/1.20.1/patches/net/minecraft/core/HolderLookup.java.patch new file mode 100644 index 0000000..9980561 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/core/HolderLookup.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/core/HolderLookup.java ++++ b/net/minecraft/core/HolderLookup.java +@@ -87,7 +87,7 @@ + final Map>, HolderLookup.RegistryLookup> map = wrappers.collect( + Collectors.toUnmodifiableMap( + HolderLookup.RegistryLookup::key, +- (Function)(wrapper -> wrapper) ++ (wrapper -> wrapper) + ) + ); + return new HolderLookup.Provider() { diff --git a/versions/1.20.1/patches/net/minecraft/core/RegistryAccess.java.patch b/versions/1.20.1/patches/net/minecraft/core/RegistryAccess.java.patch new file mode 100644 index 0000000..19e923b --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/core/RegistryAccess.java.patch @@ -0,0 +1,40 @@ +--- a/net/minecraft/core/RegistryAccess.java ++++ b/net/minecraft/core/RegistryAccess.java +@@ -34,8 +34,8 @@ + return new RegistryAccess.Frozen() { + @Override + public Optional> registry(ResourceKey> key) { +- Registry> registry = registries; +- return registry.getOptional(key); ++ Registry> registry = (Registry>) registries; ++ return registry.getOptional((ResourceKey>) key); + } + + @Override +@@ -72,7 +72,7 @@ + + public ImmutableRegistryAccess(List> registries) { + this.registries = registries.stream() +- .collect(Collectors.toUnmodifiableMap(Registry::key, (Function)(registry -> registry))); ++ .collect(Collectors.toUnmodifiableMap(Registry::key, (registry -> registry))); + } + + public ImmutableRegistryAccess(Map>, ? extends Registry> registries) { +@@ -85,7 +85,7 @@ + + @Override + public Optional> registry(ResourceKey> key) { +- return Optional.ofNullable(this.registries.get(key)).map((Function, ? extends Registry>)(registry -> registry)); ++ return Optional.ofNullable(this.registries.get(key)).map((Function, ? extends Registry>)(registry -> (Registry) registry)); + } + + @Override +@@ -102,7 +102,7 @@ + } + + private static RegistryAccess.RegistryEntry fromUntyped(ResourceKey> key, Registry value) { +- return new RegistryAccess.RegistryEntry<>(key, value); ++ return new RegistryAccess.RegistryEntry<>((ResourceKey>) key, (Registry) value); + } + + private RegistryAccess.RegistryEntry freeze() { diff --git a/versions/1.20.1/patches/net/minecraft/core/RegistrySetBuilder.java.patch b/versions/1.20.1/patches/net/minecraft/core/RegistrySetBuilder.java.patch new file mode 100644 index 0000000..98a7620 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/core/RegistrySetBuilder.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/core/RegistrySetBuilder.java ++++ b/net/minecraft/core/RegistrySetBuilder.java +@@ -270,8 +270,8 @@ + ResourceKey resourcekey = entry.getKey(); + if (resourcekey.isFor(this.key)) { + RegistrySetBuilder.RegisteredValue registeredvalue = (RegistrySetBuilder.RegisteredValue)entry.getValue(); +- Holder.Reference reference = registries.lookup.holders.remove(resourcekey); +- map.put(resourcekey, new RegistrySetBuilder.ValueAndHolder<>(registeredvalue, Optional.ofNullable(reference))); ++ Holder.Reference reference = (Holder.Reference) registries.lookup.holders.remove(resourcekey); ++ map.put((ResourceKey) resourcekey, new RegistrySetBuilder.ValueAndHolder<>(registeredvalue, Optional.ofNullable(reference))); + iterator.remove(); + } + } +@@ -293,7 +293,7 @@ + } + + Holder.Reference getOrCreate(ResourceKey key) { +- return this.holders.computeIfAbsent(key, key2 -> Holder.Reference.createStandAlone(this.owner, key2)); ++ return (Holder.Reference) this.holders.computeIfAbsent((ResourceKey) key, key2 -> Holder.Reference.createStandAlone(this.owner, key2)); + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/core/RegistrySynchronization.java.patch b/versions/1.20.1/patches/net/minecraft/core/RegistrySynchronization.java.patch new file mode 100644 index 0000000..7780907 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/core/RegistrySynchronization.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/core/RegistrySynchronization.java ++++ b/net/minecraft/core/RegistrySynchronization.java +@@ -48,7 +48,7 @@ + + private static DataResult> getNetworkCodec(ResourceKey> registryRef) { + return (DataResult>)Optional.ofNullable(NETWORKABLE_REGISTRIES.get(registryRef)) +- .map(info -> info.networkCodec()) ++ .map(info -> (Codec) info.networkCodec()) + .map(DataResult::success) + .orElseGet(() -> DataResult.error(() -> "Unknown or not serializable registry: " + registryRef)); + } +@@ -67,7 +67,7 @@ + private static >, V extends Registry> Codec captureMap(UnboundedMapCodec networkCodec) { + return networkCodec.xmap( + RegistryAccess.ImmutableRegistryAccess::new, +- registryManager -> ownedNetworkableRegistries(registryManager).collect(ImmutableMap.toImmutableMap(entry -> entry.key(), entry -> entry.value())) ++ registryManager -> ownedNetworkableRegistries(registryManager).collect(ImmutableMap.toImmutableMap(entry -> (K) entry.key(), entry -> (V) entry.value())) + ); + } + diff --git a/versions/1.20.1/patches/net/minecraft/core/registries/BuiltInRegistries.java.patch b/versions/1.20.1/patches/net/minecraft/core/registries/BuiltInRegistries.java.patch new file mode 100644 index 0000000..0691b2e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/core/registries/BuiltInRegistries.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/core/registries/BuiltInRegistries.java ++++ b/net/minecraft/core/registries/BuiltInRegistries.java +@@ -284,7 +284,7 @@ + ) { + ResourceLocation resourcelocation = key.location(); + LOADERS.put(resourcelocation, () -> initializer.run(registry)); +- WRITABLE_REGISTRY.register(key, registry, lifecycle); ++ WRITABLE_REGISTRY.register((ResourceKey) key, registry, lifecycle); + return registry; + } + diff --git a/versions/1.20.1/patches/net/minecraft/data/info/RegistryDumpReport.java.patch b/versions/1.20.1/patches/net/minecraft/data/info/RegistryDumpReport.java.patch new file mode 100644 index 0000000..e131d18 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/data/info/RegistryDumpReport.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/data/info/RegistryDumpReport.java ++++ b/net/minecraft/data/info/RegistryDumpReport.java +@@ -34,7 +34,7 @@ + jsonobject.addProperty("default", resourcelocation.toString()); + } + +- int i = BuiltInRegistries.REGISTRY.getId(registry); ++ int i = ((Registry) BuiltInRegistries.REGISTRY).getId(registry); + jsonobject.addProperty("protocol_id", i); + JsonObject jsonobject1 = new JsonObject(); + registry.holders().forEach(entry -> { diff --git a/versions/1.20.1/patches/net/minecraft/data/loot/BlockLootSubProvider.java.patch b/versions/1.20.1/patches/net/minecraft/data/loot/BlockLootSubProvider.java.patch new file mode 100644 index 0000000..9975e58 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/data/loot/BlockLootSubProvider.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/data/loot/BlockLootSubProvider.java ++++ b/net/minecraft/data/loot/BlockLootSubProvider.java +@@ -357,7 +357,7 @@ + dropWithShears, + this.applyExplosionDecay( + dropWithShears, +- ((LootPoolSingletonContainer.Builder)LootItem.lootTableItem(Items.WHEAT_SEEDS).when(LootItemRandomChanceCondition.randomChance(0.125F))) ++ LootItem.lootTableItem(Items.WHEAT_SEEDS).when(LootItemRandomChanceCondition.randomChance(0.125F)) + .apply(ApplyBonusCount.addUniformBonusCount(Enchantments.BLOCK_FORTUNE, 2)) + ) + ); +@@ -408,7 +408,7 @@ + .add( + this.applyExplosionDecay( + drop, +- ((LootPoolSingletonContainer.Builder)((LootPoolSingletonContainer.Builder)LootItem.lootTableItem(drop).when(condition)) ++ ((LootItem.lootTableItem(drop).when(condition)) + .apply( + Direction.values(), + direction -> SetItemCountFunction.setCount(ConstantValue.exactly(1.0F), true) diff --git a/versions/1.20.1/patches/net/minecraft/data/tags/TagsProvider.java.patch b/versions/1.20.1/patches/net/minecraft/data/tags/TagsProvider.java.patch new file mode 100644 index 0000000..4a3c3a9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/data/tags/TagsProvider.java.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/data/tags/TagsProvider.java ++++ b/net/minecraft/data/tags/TagsProvider.java +@@ -62,6 +62,8 @@ + + @Override + public CompletableFuture run(CachedOutput writer) { ++ record CombinedData(HolderLookup.Provider contents, TagsProvider.TagLookup parent) { ++ } + return this.createContentsProvider() + .thenApply(registryLookupFuture -> { + this.contentsDone.complete(null); +@@ -106,8 +108,6 @@ + } + ); + +- record CombinedData(HolderLookup.Provider contents, TagsProvider.TagLookup parent) { +- } + + } + +@@ -176,7 +176,7 @@ + } + + default boolean contains(TagKey tag) { +- return this.apply((T)tag).isPresent(); ++ return this.apply(tag).isPresent(); + } + } + } diff --git a/versions/1.20.1/patches/net/minecraft/gametest/framework/GameTestRegistry.java.patch b/versions/1.20.1/patches/net/minecraft/gametest/framework/GameTestRegistry.java.patch new file mode 100644 index 0000000..9ae3a05 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/gametest/framework/GameTestRegistry.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/gametest/framework/GameTestRegistry.java ++++ b/net/minecraft/gametest/framework/GameTestRegistry.java +@@ -53,7 +53,7 @@ + T t = method.getAnnotation(clazz); + if (t != null) { + String s = batchIdFunction.apply(t); +- Consumer consumer = batchConsumerMap.putIfAbsent(s, turnMethodIntoConsumer(method)); ++ Consumer consumer = batchConsumerMap.putIfAbsent(s, (Consumer) turnMethodIntoConsumer(method)); + if (consumer != null) { + throw new RuntimeException("Hey, there should only be one " + clazz + " method per batch. Batch '" + s + "' has more than one!"); + } +@@ -126,7 +126,7 @@ + gametest.required(), + gametest.requiredSuccesses(), + gametest.attempts(), +- turnMethodIntoConsumer(method) ++ (Consumer) turnMethodIntoConsumer(method) + ); + } + diff --git a/versions/1.20.1/patches/net/minecraft/nbt/TagParser.java.patch b/versions/1.20.1/patches/net/minecraft/nbt/TagParser.java.patch new file mode 100644 index 0000000..6f6409d --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/nbt/TagParser.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/nbt/TagParser.java ++++ b/net/minecraft/nbt/TagParser.java +@@ -242,11 +242,11 @@ + } + + if (typeReader == ByteTag.TYPE) { +- list.add((T)((NumericTag)tag).getAsByte()); ++ list.add((T)(Byte)((NumericTag)tag).getAsByte()); + } else if (typeReader == LongTag.TYPE) { +- list.add((T)((NumericTag)tag).getAsLong()); ++ list.add((T)(Long)((NumericTag)tag).getAsLong()); + } else { +- list.add((T)((NumericTag)tag).getAsInt()); ++ list.add((T)(Integer)((NumericTag)tag).getAsInt()); + } + + if (!this.hasElementSeparator()) { diff --git a/versions/1.20.1/patches/net/minecraft/network/ConnectionProtocol.java.patch b/versions/1.20.1/patches/net/minecraft/network/ConnectionProtocol.java.patch new file mode 100644 index 0000000..d920ed9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/ConnectionProtocol.java.patch @@ -0,0 +1,71 @@ +--- a/net/minecraft/network/ConnectionProtocol.java ++++ b/net/minecraft/network/ConnectionProtocol.java +@@ -196,14 +196,14 @@ + + public enum ConnectionProtocol implements BundlerInfo.Provider { + HANDSHAKING( +- -1, protocol().addFlow(PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet().addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)) ++ -1, protocol().addFlow(PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet().addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)) + ), + PLAY( + 0, + protocol() + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .withBundlePacket(ClientboundBundlePacket.class, ClientboundBundlePacket::new) + .addPacket(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new) + .addPacket(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new) +@@ -318,7 +318,7 @@ + ) + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundAcceptTeleportationPacket.class, ServerboundAcceptTeleportationPacket::new) + .addPacket(ServerboundBlockEntityTagQuery.class, ServerboundBlockEntityTagQuery::new) + .addPacket(ServerboundChangeDifficultyPacket.class, ServerboundChangeDifficultyPacket::new) +@@ -377,13 +377,13 @@ + protocol() + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundStatusRequestPacket.class, ServerboundStatusRequestPacket::new) + .addPacket(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new) + ) + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ClientboundStatusResponsePacket.class, ClientboundStatusResponsePacket::new) + .addPacket(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new) + ) +@@ -393,7 +393,7 @@ + protocol() + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ClientboundLoginDisconnectPacket.class, ClientboundLoginDisconnectPacket::new) + .addPacket(ClientboundHelloPacket.class, ClientboundHelloPacket::new) + .addPacket(ClientboundGameProfilePacket.class, ClientboundGameProfilePacket::new) +@@ -402,7 +402,7 @@ + ) + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundHelloPacket.class, ServerboundHelloPacket::new) + .addPacket(ServerboundKeyPacket.class, ServerboundKeyPacket::new) + .addPacket(ServerboundCustomQueryPacket.class, ServerboundCustomQueryPacket::new) +@@ -541,7 +541,7 @@ + } + + public void listAllPackets(Consumer>> consumer) { +- this.classToId.keySet().stream().filter(type -> type != BundleDelimiterPacket.class).forEach(consumer); ++ this.classToId.keySet().stream().filter(type -> type != (Object) BundleDelimiterPacket.class).forEach(consumer); + this.extraClasses.forEach(consumer); + } + diff --git a/versions/1.20.1/patches/net/minecraft/network/FriendlyByteBuf.java.patch b/versions/1.20.1/patches/net/minecraft/network/FriendlyByteBuf.java.patch new file mode 100644 index 0000000..e3200d4 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/FriendlyByteBuf.java.patch @@ -0,0 +1,109 @@ +--- a/net/minecraft/network/FriendlyByteBuf.java ++++ b/net/minecraft/network/FriendlyByteBuf.java +@@ -158,7 +158,7 @@ + break; + case DIRECT: + this.writeVarInt(0); +- writer.accept((T)this, entry.value()); ++ writer.accept(this, entry.value()); + } + } + +@@ -171,7 +171,7 @@ + public Holder readById(IdMap> registryEntries, FriendlyByteBuf.Reader reader) { + int i = this.readVarInt(); + if (i == 0) { +- return Holder.direct(reader.apply((T)this)); ++ return Holder.direct(reader.apply(this)); + } else { + Holder holder = registryEntries.byId(i - 1); + if (holder == null) { +@@ -197,7 +197,7 @@ + C c = collectionFactory.apply(i); + + for(int j = 0; j < i; ++j) { +- c.add(reader.apply((T)this)); ++ c.add(reader.apply(this)); + } + + return c; +@@ -207,7 +207,7 @@ + this.writeVarInt(collection.size()); + + for(T t : collection) { +- writer.accept((T)this, t); ++ writer.accept(this, t); + } + } + +@@ -236,8 +236,8 @@ + M m = mapFactory.apply(i); + + for(int j = 0; j < i; ++j) { +- K k = keyReader.apply((K)this); +- V v = valueReader.apply((V)this); ++ K k = keyReader.apply(this); ++ V v = valueReader.apply(this); + m.put(k, v); + } + +@@ -251,8 +251,8 @@ + public void writeMap(Map map, FriendlyByteBuf.Writer keyWriter, FriendlyByteBuf.Writer valueWriter) { + this.writeVarInt(map.size()); + map.forEach((key, value) -> { +- keyWriter.accept((K)this, key); +- valueWriter.accept((V)this, value); ++ keyWriter.accept(this, key); ++ valueWriter.accept(this, value); + }); + } + +@@ -292,25 +292,25 @@ + public void writeOptional(Optional value, FriendlyByteBuf.Writer writer) { + if (value.isPresent()) { + this.writeBoolean(true); +- writer.accept((T)this, value.get()); ++ writer.accept(this, value.get()); + } else { + this.writeBoolean(false); + } + } + + public Optional readOptional(FriendlyByteBuf.Reader reader) { +- return this.readBoolean() ? Optional.of(reader.apply((T)this)) : Optional.empty(); ++ return this.readBoolean() ? Optional.of(reader.apply(this)) : Optional.empty(); + } + + @Nullable + public T readNullable(FriendlyByteBuf.Reader reader) { +- return this.readBoolean() ? reader.apply((T)this) : null; ++ return this.readBoolean() ? reader.apply(this) : null; + } + + public void writeNullable(@Nullable T value, FriendlyByteBuf.Writer writer) { + if (value != null) { + this.writeBoolean(true); +- writer.accept((T)this, value); ++ writer.accept(this, value); + } else { + this.writeBoolean(false); + } +@@ -319,15 +319,15 @@ + public void writeEither(Either either, FriendlyByteBuf.Writer leftWriter, FriendlyByteBuf.Writer rightWriter) { + either.ifLeft(object -> { + this.writeBoolean(true); +- leftWriter.accept((L)this, object); ++ leftWriter.accept(this, object); + }).ifRight(object -> { + this.writeBoolean(false); +- rightWriter.accept((R)this, object); ++ rightWriter.accept(this, object); + }); + } + + public Either readEither(FriendlyByteBuf.Reader leftReader, FriendlyByteBuf.Reader rightReader) { +- return this.readBoolean() ? Either.left(leftReader.apply((L)this)) : Either.right(rightReader.apply((R)this)); ++ return this.readBoolean() ? Either.left(leftReader.apply(this)) : Either.right(rightReader.apply(this)); + } + + public byte[] readByteArray() { diff --git a/versions/1.20.1/patches/net/minecraft/network/chat/HoverEvent.java.patch b/versions/1.20.1/patches/net/minecraft/network/chat/HoverEvent.java.patch new file mode 100644 index 0000000..5c91b3f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/chat/HoverEvent.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/chat/HoverEvent.java ++++ b/net/minecraft/network/chat/HoverEvent.java +@@ -105,7 +105,7 @@ + ); + private static final Map> LOOKUP = Stream.of(SHOW_TEXT, SHOW_ITEM, SHOW_ENTITY) + .collect( +- ImmutableMap.toImmutableMap(HoverEvent.Action::getName, (Function)(action -> action)) ++ ImmutableMap.toImmutableMap(HoverEvent.Action::getName, (action -> action)) + ); + private final String name; + private final boolean allowFromServer; diff --git a/versions/1.20.1/patches/net/minecraft/network/chat/LastSeenMessages.java.patch b/versions/1.20.1/patches/net/minecraft/network/chat/LastSeenMessages.java.patch new file mode 100644 index 0000000..c862b6f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/chat/LastSeenMessages.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/chat/LastSeenMessages.java ++++ b/net/minecraft/network/chat/LastSeenMessages.java +@@ -31,7 +31,7 @@ + public static final LastSeenMessages.Packed EMPTY = new LastSeenMessages.Packed(List.of()); + + public Packed(FriendlyByteBuf buf) { +- this(buf.readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 20), MessageSignature.Packed::read)); ++ this((List) buf.readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 20), MessageSignature.Packed::read)); + } + + public void write(FriendlyByteBuf buf) { diff --git a/versions/1.20.1/patches/net/minecraft/network/protocol/BundlerInfo.java.patch b/versions/1.20.1/patches/net/minecraft/network/protocol/BundlerInfo.java.patch new file mode 100644 index 0000000..32fbf40 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/protocol/BundlerInfo.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/protocol/BundlerInfo.java ++++ b/net/minecraft/network/protocol/BundlerInfo.java +@@ -54,7 +54,7 @@ + } else if (this.bundlePackets.size() >= 4096) { + throw new IllegalStateException("Too many packets in a bundle"); + } else { +- this.bundlePackets.add(packet); ++ this.bundlePackets.add((Packet) packet); + return null; + } + } diff --git a/versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateEnabledFeaturesPacket.java.patch b/versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateEnabledFeaturesPacket.java.patch new file mode 100644 index 0000000..0c8b864 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateEnabledFeaturesPacket.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/protocol/game/ClientboundUpdateEnabledFeaturesPacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundUpdateEnabledFeaturesPacket.java +@@ -8,7 +8,7 @@ + + public record ClientboundUpdateEnabledFeaturesPacket(Set features) implements Packet { + public ClientboundUpdateEnabledFeaturesPacket(FriendlyByteBuf buf) { +- this(buf.readCollection(HashSet::new, FriendlyByteBuf::readResourceLocation)); ++ this((Set) buf.readCollection(HashSet::new, FriendlyByteBuf::readResourceLocation)); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch b/versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch new file mode 100644 index 0000000..2fa5017 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java +@@ -46,6 +46,6 @@ + public static > void toNetwork(FriendlyByteBuf buf, T recipe) { + buf.writeResourceLocation(BuiltInRegistries.RECIPE_SERIALIZER.getKey(recipe.getSerializer())); + buf.writeResourceLocation(recipe.getId()); +- recipe.getSerializer().toNetwork(buf, recipe); ++ ((net.minecraft.world.item.crafting.RecipeSerializer) recipe.getSerializer()).toNetwork(buf, recipe); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/network/syncher/EntityDataSerializer.java.patch b/versions/1.20.1/patches/net/minecraft/network/syncher/EntityDataSerializer.java.patch new file mode 100644 index 0000000..06fd4ae --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/syncher/EntityDataSerializer.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/network/syncher/EntityDataSerializer.java ++++ b/net/minecraft/network/syncher/EntityDataSerializer.java +@@ -19,12 +19,12 @@ + return new EntityDataSerializer.ForValueType() { + @Override + public void write(FriendlyByteBuf buf, T value) { +- writer.accept((T)buf, value); ++ writer.accept(buf, value); + } + + @Override + public T read(FriendlyByteBuf buf) { +- return reader.apply((T)buf); ++ return reader.apply(buf); + } + }; + } diff --git a/versions/1.20.1/patches/net/minecraft/network/syncher/SynchedEntityData.java.patch b/versions/1.20.1/patches/net/minecraft/network/syncher/SynchedEntityData.java.patch new file mode 100644 index 0000000..52aa0e6 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/network/syncher/SynchedEntityData.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/syncher/SynchedEntityData.java ++++ b/net/minecraft/network/syncher/SynchedEntityData.java +@@ -212,7 +212,7 @@ + ) + ); + } else { +- to.setValue(from.value); ++ to.setValue((T) from.value); + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/resources/RegistryFileCodec.java.patch b/versions/1.20.1/patches/net/minecraft/resources/RegistryFileCodec.java.patch new file mode 100644 index 0000000..45ea9e6 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/resources/RegistryFileCodec.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/resources/RegistryFileCodec.java ++++ b/net/minecraft/resources/RegistryFileCodec.java +@@ -66,7 +66,7 @@ + return holdergetter.get(resourcekey) + .map(DataResult::success) + .orElseGet(() -> DataResult.error(() -> "Failed to get element " + resourcekey)) +- ., T>>map(reference -> Pair.of(reference, pair.getSecond())) ++ .map(reference -> Pair.of((Holder)reference, pair.getSecond())) + .setLifecycle(Lifecycle.stable()); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/resources/RegistryFixedCodec.java.patch b/versions/1.20.1/patches/net/minecraft/resources/RegistryFixedCodec.java.patch new file mode 100644 index 0000000..bd28518 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/resources/RegistryFixedCodec.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/resources/RegistryFixedCodec.java ++++ b/net/minecraft/resources/RegistryFixedCodec.java +@@ -56,7 +56,7 @@ + .get(ResourceKey.create(this.registryKey, resourcelocation)) + .map(DataResult::success) + .orElseGet(() -> DataResult.error(() -> "Failed to get element " + resourcelocation)) +- ., T>>map(reference -> Pair.of(reference, (T)pair.getSecond())) ++ .map(reference -> Pair.of((Holder) reference, (T)pair.getSecond())) + .setLifecycle(Lifecycle.stable()); + } + ); diff --git a/versions/1.20.1/patches/net/minecraft/resources/RegistryOps.java.patch b/versions/1.20.1/patches/net/minecraft/resources/RegistryOps.java.patch new file mode 100644 index 0000000..95d7fa8 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/resources/RegistryOps.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/resources/RegistryOps.java ++++ b/net/minecraft/resources/RegistryOps.java +@@ -23,7 +23,7 @@ + + @Override + public Optional> lookup(ResourceKey> registryRef) { +- return this.lookups.computeIfAbsent(registryRef, registryInfoGetter::lookup); ++ return (Optional>) this.lookups.computeIfAbsent(registryRef, registryInfoGetter::lookup); + } + }; + } diff --git a/versions/1.20.1/patches/net/minecraft/server/MinecraftServer.java.patch b/versions/1.20.1/patches/net/minecraft/server/MinecraftServer.java.patch new file mode 100644 index 0000000..0a2560a --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/MinecraftServer.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/MinecraftServer.java ++++ b/net/minecraft/server/MinecraftServer.java +@@ -779,7 +779,7 @@ + } + + @Override +- protected void doRunTask(TickTask tickTask) { ++ public void doRunTask(TickTask tickTask) { + this.getProfiler().incrementCounter("runTask"); + super.doRunTask(tickTask); + } diff --git a/versions/1.20.1/patches/net/minecraft/server/ServerAdvancementManager.java.patch b/versions/1.20.1/patches/net/minecraft/server/ServerAdvancementManager.java.patch new file mode 100644 index 0000000..8d6931b --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/ServerAdvancementManager.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/ServerAdvancementManager.java ++++ b/net/minecraft/server/ServerAdvancementManager.java +@@ -39,7 +39,7 @@ + try { + JsonObject jsonobject = GsonHelper.convertToJsonObject(json, "advancement"); + Advancement.Builder advancement$builder = Advancement.Builder.fromJson(jsonobject, new DeserializationContext(id, this.lootData)); +- map.put(id, advancement$builder); ++ mapx.put(id, advancement$builder); + } catch (Exception exception1) { + LOGGER.error("Parsing error loading custom advancement {}: {}", id, exception1.getMessage()); + } diff --git a/versions/1.20.1/patches/net/minecraft/server/commands/EnchantCommand.java.patch b/versions/1.20.1/patches/net/minecraft/server/commands/EnchantCommand.java.patch new file mode 100644 index 0000000..157627b --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/commands/EnchantCommand.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/server/commands/EnchantCommand.java ++++ b/net/minecraft/server/commands/EnchantCommand.java +@@ -100,12 +100,12 @@ + if (targets.size() == 1) { + source.sendSuccess( + () -> Component.translatable( +- "commands.enchant.success.single", enchantment.getFullname(level), targets.iterator().next().getDisplayName() ++ "commands.enchant.success.single", enchantmentx.getFullname(level), targets.iterator().next().getDisplayName() + ), + true + ); + } else { +- source.sendSuccess(() -> Component.translatable("commands.enchant.success.multiple", enchantment.getFullname(level), targets.size()), true); ++ source.sendSuccess(() -> Component.translatable("commands.enchant.success.multiple", enchantmentx.getFullname(level), targets.size()), true); + } + + return i; diff --git a/versions/1.20.1/patches/net/minecraft/server/commands/ScoreboardCommand.java.patch b/versions/1.20.1/patches/net/minecraft/server/commands/ScoreboardCommand.java.patch new file mode 100644 index 0000000..b93a491 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/commands/ScoreboardCommand.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/commands/ScoreboardCommand.java ++++ b/net/minecraft/server/commands/ScoreboardCommand.java +@@ -640,7 +640,7 @@ + } else { + scoreboard.addObjective(objective, criteria, displayName, criteria.getDefaultRenderType()); + Objective objectivex = scoreboard.getObjective(objective); +- source.sendSuccess(() -> Component.translatable("commands.scoreboard.objectives.add.success", objective.getFormattedDisplayName()), true); ++ source.sendSuccess(() -> Component.translatable("commands.scoreboard.objectives.add.success", objectivex.getFormattedDisplayName()), true); + return scoreboard.getObjectives().size(); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch b/versions/1.20.1/patches/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch new file mode 100644 index 0000000..cceecd3 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java ++++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java +@@ -185,7 +185,7 @@ + } + + private static FeatureFlagSet getFeatures(String featureFlags) { +- return FeatureFlags.REGISTRY.fromNames(COMMA_SPLITTER.splitToStream(featureFlags).mapMulti((id, consumer) -> { ++ return FeatureFlags.REGISTRY.fromNames(COMMA_SPLITTER.splitToStream(featureFlags).mapMulti((id, consumer) -> { + ResourceLocation resourcelocation = ResourceLocation.tryParse(id); + if (resourcelocation == null) { + LOGGER.warn("Invalid resource location {}, ignoring", id); diff --git a/versions/1.20.1/patches/net/minecraft/server/dedicated/Settings.java.patch b/versions/1.20.1/patches/net/minecraft/server/dedicated/Settings.java.patch new file mode 100644 index 0000000..39d01f6 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/dedicated/Settings.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/dedicated/Settings.java ++++ b/net/minecraft/server/dedicated/Settings.java +@@ -119,7 +119,7 @@ + String s = this.getStringRaw(key); + V v = MoreObjects.firstNonNull(s != null ? parser.apply(s) : null, fallback); + this.properties.put(key, stringifier.apply(v)); +- return new Settings.MutableValue<>(key, v, stringifier); ++ return new Settings.MutableValue<>(key, v, stringifier); + } + + protected V get(String key, Function parser, UnaryOperator parsedTransformer, Function stringifier, V fallback) { diff --git a/versions/1.20.1/patches/net/minecraft/server/level/ChunkMap.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/ChunkMap.java.patch new file mode 100644 index 0000000..76af196 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/ChunkMap.java.patch @@ -0,0 +1,45 @@ +--- a/net/minecraft/server/level/ChunkMap.java ++++ b/net/minecraft/server/level/ChunkMap.java +@@ -271,16 +271,16 @@ + ChunkStatus chunkstatus = chunkholder.getLastAvailableStatus(); + ChunkAccess chunkaccess = chunkholder.getLastAvailable(); + if (chunkstatus != null) { +- s = s + "St: §" + chunkstatus.getIndex() + chunkstatus + "§r\n"; ++ s = s + "St: §" + chunkstatus.getIndex() + chunkstatus + "§r\n"; + } + + if (chunkaccess != null) { +- s = s + "Ch: §" + chunkaccess.getStatus().getIndex() + chunkaccess.getStatus() + "§r\n"; ++ s = s + "Ch: §" + chunkaccess.getStatus().getIndex() + chunkaccess.getStatus() + "§r\n"; + } + + FullChunkStatus fullchunkstatus = chunkholder.getFullStatus(); +- s = s + "§" + fullchunkstatus.ordinal() + fullchunkstatus; +- return s + "§r"; ++ s = s + "§" + fullchunkstatus.ordinal() + fullchunkstatus; ++ return s + "§r"; + } + } + +@@ -507,9 +507,10 @@ + + int k = Math.max(0, this.unloadQueue.size() - 2000); + +- while((shouldKeepTicking.getAsBoolean() || k > 0) && (j = (long)this.unloadQueue.poll()) != null) { ++ Runnable runnable; ++ while((shouldKeepTicking.getAsBoolean() || k > 0) && (runnable = this.unloadQueue.poll()) != null) { + --k; +- j.run(); ++ runnable.run(); + } + + int l = 0; +@@ -594,7 +595,7 @@ + } + + return flag; +- })).thenApplyAsync(nbt -> { ++ })).>thenApplyAsync(nbt -> { + this.level.getProfiler().incrementCounter("chunkLoad"); + if (nbt.isPresent()) { + ChunkAccess chunkaccess = ChunkSerializer.read(this.level, this.poiManager, pos, nbt.get()); diff --git a/versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch new file mode 100644 index 0000000..56670f9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/server/level/ChunkTaskPriorityQueue.java ++++ b/net/minecraft/server/level/ChunkTaskPriorityQueue.java +@@ -17,7 +17,7 @@ + public class ChunkTaskPriorityQueue { + public static final int PRIORITY_LEVEL_COUNT = ChunkLevel.MAX_LEVEL + 2; + private final List>>> taskQueue = IntStream.range(0, PRIORITY_LEVEL_COUNT) +- .mapToObj(i -> new Long2ObjectLinkedOpenHashMap()) ++ .mapToObj(i -> new Long2ObjectLinkedOpenHashMap>>()) + .collect(Collectors.toList()); + private volatile int firstQueue = PRIORITY_LEVEL_COUNT; + private final String name; +@@ -94,7 +94,7 @@ + ++this.firstQueue; + } + +- return list.stream().map(optional -> optional.map(Either::left).orElseGet(() -> Either.right(this.acquire(j)))); ++ return list.stream().map(optional -> optional.>map(Either::left).orElseGet(() -> Either.right(this.acquire(j)))); + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch new file mode 100644 index 0000000..6a31109 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java ++++ b/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java +@@ -103,7 +103,7 @@ + public void onLevelChange(ChunkPos pos, IntSupplier levelGetter, int targetLevel, IntConsumer levelSetter) { + this.mailbox.tell(new StrictQueue.IntRunnable(0, () -> { + int ix = levelGetter.getAsInt(); +- this.queues.values().forEach(queue -> queue.resortChunkTasks(i, pos, targetLevel)); ++ this.queues.values().forEach(queue -> queue.resortChunkTasks(ix, pos, targetLevel)); + levelSetter.accept(targetLevel); + })); + } +@@ -156,7 +156,7 @@ + if (chunktaskpriorityqueue == null) { + throw (IllegalArgumentException)Util.pauseInIde(new IllegalArgumentException("No queue for: " + actor)); + } else { +- return chunktaskpriorityqueue; ++ return (ChunkTaskPriorityQueue, T>>) chunktaskpriorityqueue; + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/server/level/ServerChunkCache.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/ServerChunkCache.java.patch new file mode 100644 index 0000000..bfc4d4f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/ServerChunkCache.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/level/ServerChunkCache.java ++++ b/net/minecraft/server/level/ServerChunkCache.java +@@ -574,7 +574,7 @@ + super.doRunTask(task); + } + +- protected boolean pollTask() { ++ public boolean pollTask() { + if (ServerChunkCache.this.runDistanceManagerUpdates()) { + return true; + } else { diff --git a/versions/1.20.1/patches/net/minecraft/server/level/ServerLevel.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/ServerLevel.java.patch new file mode 100644 index 0000000..0bfe754 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/ServerLevel.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/level/ServerLevel.java ++++ b/net/minecraft/server/level/ServerLevel.java +@@ -1509,7 +1509,7 @@ + + return object2intopenhashmap.object2IntEntrySet() + .stream() +- .sorted(Comparator.comparing(Entry::getIntValue).reversed()) ++ .sorted(Comparator., Integer>comparing(Entry::getIntValue).reversed()) + .limit(5L) + .map(entry -> (String)entry.getKey() + ":" + entry.getIntValue()) + .collect(Collectors.joining(",")); diff --git a/versions/1.20.1/patches/net/minecraft/server/level/Ticket.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/Ticket.java.patch new file mode 100644 index 0000000..8f029fc --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/Ticket.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/level/Ticket.java ++++ b/net/minecraft/server/level/Ticket.java +@@ -21,7 +21,7 @@ + return i; + } else { + int j = Integer.compare(System.identityHashCode(this.type), System.identityHashCode(ticket.type)); +- return j != 0 ? j : this.type.getComparator().compare(this.key, ticket.key); ++ return j != 0 ? j : this.type.getComparator().compare(this.key, (T) ticket.key); + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/server/level/TickingTracker.java.patch b/versions/1.20.1/patches/net/minecraft/server/level/TickingTracker.java.patch new file mode 100644 index 0000000..fb304ea --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/level/TickingTracker.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/level/TickingTracker.java ++++ b/net/minecraft/server/level/TickingTracker.java +@@ -63,7 +63,7 @@ + for(Entry>> entry : this.tickets.long2ObjectEntrySet()) { + for(Ticket ticket : entry.getValue()) { + if (ticket.getType() == TicketType.PLAYER) { +- list.add(Pair.of(ticket, entry.getLongKey())); ++ list.add(Pair.of((Ticket) ticket, entry.getLongKey())); + } + } + } diff --git a/versions/1.20.1/patches/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch b/versions/1.20.1/patches/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch new file mode 100644 index 0000000..bb3de1f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/packs/linkfs/LinkFSProvider.java ++++ b/net/minecraft/server/packs/linkfs/LinkFSProvider.java +@@ -85,7 +85,7 @@ + } catch (IOException ioexception) { + throw new DirectoryIteratorException(ioexception); + } +- }).map(child -> child).iterator(); ++ }).map(child -> (Path) child).iterator(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/tags/TagLoader.java.patch b/versions/1.20.1/patches/net/minecraft/tags/TagLoader.java.patch new file mode 100644 index 0000000..efac671 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/tags/TagLoader.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/tags/TagLoader.java ++++ b/net/minecraft/tags/TagLoader.java +@@ -85,7 +85,7 @@ + @Nullable + @Override + public T element(ResourceLocation id) { +- return TagLoader.this.idToValue.apply(id).orElse((T)null); ++ return TagLoader.this.idToValue.apply(id).orElse(null); + } + + @Nullable diff --git a/versions/1.20.1/patches/net/minecraft/util/ClassInstanceMultiMap.java.patch b/versions/1.20.1/patches/net/minecraft/util/ClassInstanceMultiMap.java.patch new file mode 100644 index 0000000..d7a3c4a --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/ClassInstanceMultiMap.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/ClassInstanceMultiMap.java ++++ b/net/minecraft/util/ClassInstanceMultiMap.java +@@ -61,7 +61,7 @@ + } else { + List list = this.byClass + .computeIfAbsent(type, typeClass -> this.allInstances.stream().filter(typeClass::isInstance).collect(Collectors.toList())); +- return Collections.unmodifiableCollection(list); ++ return (Collection) Collections.unmodifiableCollection(list); + } + } + diff --git a/versions/1.20.1/patches/net/minecraft/util/ExtraCodecs.java.patch b/versions/1.20.1/patches/net/minecraft/util/ExtraCodecs.java.patch new file mode 100644 index 0000000..f302117 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/ExtraCodecs.java.patch @@ -0,0 +1,24 @@ +--- a/net/minecraft/util/ExtraCodecs.java ++++ b/net/minecraft/util/ExtraCodecs.java +@@ -215,7 +215,7 @@ + P p1 = listx.get(1); + return combineFunction.apply(p, p1); + }), pair -> ImmutableList.of(leftFunction.apply(pair), rightFunction.apply(pair))); +- Codec codec1 = RecordCodecBuilder.create( ++ Codec codec1 = RecordCodecBuilder.>create( + instance -> instance.group(codec.fieldOf(leftFieldName).forGetter(Pair::getFirst), codec.fieldOf(rightFieldName).forGetter(Pair::getSecond)) + .apply(instance, Pair::of) + ) +@@ -447,10 +447,10 @@ + string -> { + int ix = string.length(); + if (ix < minLength) { +- return DataResult.error(() -> "String \"" + string + "\" is too short: " + i + ", expected range [" + minLength + "-" + maxLength + "]"); ++ return DataResult.error(() -> "String \"" + string + "\" is too short: " + ix + ", expected range [" + minLength + "-" + maxLength + "]"); + } else { + return ix > maxLength +- ? DataResult.error(() -> "String \"" + string + "\" is too long: " + i + ", expected range [" + minLength + "-" + maxLength + "]") ++ ? DataResult.error(() -> "String \"" + string + "\" is too long: " + ix + ", expected range [" + minLength + "-" + maxLength + "]") + : DataResult.success(string); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/util/SortedArraySet.java.patch b/versions/1.20.1/patches/net/minecraft/util/SortedArraySet.java.patch new file mode 100644 index 0000000..690513c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/SortedArraySet.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/SortedArraySet.java ++++ b/net/minecraft/util/SortedArraySet.java +@@ -28,7 +28,7 @@ + } + + public static > SortedArraySet create(int initialCapacity) { +- return new SortedArraySet<>(initialCapacity, Comparator.naturalOrder()); ++ return new SortedArraySet(initialCapacity, Comparator.naturalOrder()); + } + + public static SortedArraySet create(Comparator comparator) { diff --git a/versions/1.20.1/patches/net/minecraft/util/StringRepresentable.java.patch b/versions/1.20.1/patches/net/minecraft/util/StringRepresentable.java.patch new file mode 100644 index 0000000..7ba6ea8 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/StringRepresentable.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/StringRepresentable.java ++++ b/net/minecraft/util/StringRepresentable.java +@@ -32,7 +32,7 @@ + .collect( + Collectors.toMap( + enum_ -> valueNameTransformer.apply(((StringRepresentable)enum_).getSerializedName()), +- (Function)(enum_ -> enum_) ++ (enum_ -> enum_) + ) + ); + return new StringRepresentable.EnumCodec<>(ae, id -> id == null ? null : map.get(id)); diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/DataFixTypes.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/DataFixTypes.java.patch new file mode 100644 index 0000000..e24894c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/DataFixTypes.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/DataFixTypes.java ++++ b/net/minecraft/util/datafix/DataFixTypes.java +@@ -43,7 +43,7 @@ + } + + public CompoundTag update(DataFixer dataFixer, CompoundTag nbt, int oldVersion, int newVersion) { +- return this.update(dataFixer, new Dynamic<>(NbtOps.INSTANCE, nbt), oldVersion, newVersion).getValue(); ++ return (CompoundTag) this.update(dataFixer, new Dynamic<>(NbtOps.INSTANCE, nbt), oldVersion, newVersion).getValue(); + } + + public CompoundTag updateToCurrentVersion(DataFixer dataFixer, CompoundTag nbt, int oldVersion) { diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/DataFixers.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/DataFixers.java.patch new file mode 100644 index 0000000..6a465f7 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/DataFixers.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/util/datafix/DataFixers.java ++++ b/net/minecraft/util/datafix/DataFixers.java +@@ -1003,7 +1003,7 @@ + Schema schema160 = builder.addSchema(3086, SAME_NAMESPACED); + builder.addFixer( + new EntityVariantFix( +- schema160, "Change cat variant type", References.ENTITY, "minecraft:cat", "CatType", Util.make(new Int2ObjectOpenHashMap(), catVariants -> { ++ schema160, "Change cat variant type", References.ENTITY, "minecraft:cat", "CatType", Util.make(new Int2ObjectOpenHashMap(), catVariants -> { + catVariants.defaultReturnValue("minecraft:tabby"); + catVariants.put(0, "minecraft:tabby"); + catVariants.put(1, "minecraft:black"); +@@ -1040,7 +1040,7 @@ + Schema schema161 = builder.addSchema(3087, SAME_NAMESPACED); + builder.addFixer( + new EntityVariantFix( +- schema161, "Change frog variant type", References.ENTITY, "minecraft:frog", "Variant", Util.make(new Int2ObjectOpenHashMap(), frogVariants -> { ++ schema161, "Change frog variant type", References.ENTITY, "minecraft:frog", "Variant", Util.make(new Int2ObjectOpenHashMap(), frogVariants -> { + frogVariants.put(0, "minecraft:temperate"); + frogVariants.put(1, "minecraft:warm"); + frogVariants.put(2, "minecraft:cold"); diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch new file mode 100644 index 0000000..e76f4bb --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/AddNewChoices.java ++++ b/net/minecraft/util/datafix/fixes/AddNewChoices.java +@@ -28,8 +28,8 @@ + if (inputChoiceType.getKeyType() != outputChoiceType.getKeyType()) { + throw new IllegalStateException("Could not inject: key type is not the same"); + } else { +- return this.fixTypeEverywhere(name, inputChoiceType, outputChoiceType, dynamicOps -> pair -> { +- if (!outputChoiceType.hasType(pair.getFirst())) { ++ return this.fixTypeEverywhere(name, inputChoiceType, (TaggedChoiceType) outputChoiceType, dynamicOps -> pair -> { ++ if (!((TaggedChoiceType) outputChoiceType).hasType(pair.getFirst())) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Unknown type %s in %s ", pair.getFirst(), this.type)); + } else { + return pair; diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch new file mode 100644 index 0000000..7b05c0a --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java ++++ b/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java +@@ -44,8 +44,8 @@ + public TypeRewriteRule makeRule() { + Type type = this.getInputSchema().getType(References.ITEM_STACK); + Type type1 = this.getOutputSchema().getType(References.ITEM_STACK); +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType) this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); + return TypeRewriteRule.seq( + this.convertUnchecked("item stack block entity name hook converter", type, type1), + this.fixTypeEverywhere( diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch new file mode 100644 index 0000000..0366be6 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java ++++ b/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java +@@ -18,8 +18,8 @@ + + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType) this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); + return this.fixTypeEverywhere(this.name, taggedchoicetype, taggedchoicetype1, ops -> pair -> pair.mapFirst(this.nameChangeLookup)); + } + diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch new file mode 100644 index 0000000..db807f9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java ++++ b/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java +@@ -21,7 +21,7 @@ + return dynamic.get("Owner") + .get() + .map(dynamicx -> replaceUUIDString(dynamicx, "Id", "Id").orElse(dynamicx)) +- .map(dynamic2 -> dynamic.remove("Owner").set("SkullOwner", dynamic2)) ++ .>map(dynamic2 -> dynamic.remove("Owner").set("SkullOwner", dynamic2)) + .result() + .orElse(dynamic); + } diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch new file mode 100644 index 0000000..fc4882e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java ++++ b/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java +@@ -44,7 +44,7 @@ + this.fixTypeEverywhere( + "InjectBedBlockEntityType", + this.getInputSchema().findChoiceType(References.BLOCK_ENTITY), +- this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY), ++ (com.mojang.datafixers.types.templates.TaggedChoice.TaggedChoiceType) this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY), + dynamicOps -> pair -> pair + ), + this.fixTypeEverywhereTyped( diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch new file mode 100644 index 0000000..00c23f3 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java ++++ b/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java +@@ -184,7 +184,7 @@ + int kx = l >>> 8 & 15; + String s = function.apply(supplier != null ? supplier.get().get(ix, jx, kx) : null); + return dynamic.createMap( +- ImmutableMap.builder() ++ ImmutableMap., Dynamic>builder() + .put(dynamic.createString("i"), dynamic.createString(s)) + .put(dynamic.createString("x"), dynamic.createInt(i * 16 + ix)) + .put(dynamic.createString("y"), dynamic.createInt(j * 16 + jx)) diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch new file mode 100644 index 0000000..20dea61 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/EntityIdFix.java ++++ b/net/minecraft/util/datafix/fixes/EntityIdFix.java +@@ -94,8 +94,8 @@ + + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType) this.getOutputSchema().findChoiceType(References.ENTITY); + Type type = this.getInputSchema().getType(References.ITEM_STACK); + Type type1 = this.getOutputSchema().getType(References.ITEM_STACK); + return TypeRewriteRule.seq( diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch new file mode 100644 index 0000000..73f8c84 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java ++++ b/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java +@@ -21,8 +21,8 @@ + + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType) this.getOutputSchema().findChoiceType(References.ENTITY); + return this.fixTypeEverywhere( + "EntityMinecartIdentifiersFix", + taggedchoicetype, diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch new file mode 100644 index 0000000..355bf18 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/EntityRenameFix.java ++++ b/net/minecraft/util/datafix/fixes/EntityRenameFix.java +@@ -20,8 +20,8 @@ + + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType) this.getOutputSchema().findChoiceType(References.ENTITY); + return this.fixTypeEverywhere( + this.name, + taggedchoicetype, diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/FurnaceRecipeFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/FurnaceRecipeFix.java.patch new file mode 100644 index 0000000..9458fa0 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/FurnaceRecipeFix.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/util/datafix/fixes/FurnaceRecipeFix.java ++++ b/net/minecraft/util/datafix/fixes/FurnaceRecipeFix.java +@@ -43,9 +43,9 @@ + "FurnaceRecipesFix", + type4, + type5, +- typed -> typed.updateTyped(opticfinder, type1, typedx -> this.updateFurnaceContents(type, type, typedx)) +- .updateTyped(opticfinder1, type2, typedx -> this.updateFurnaceContents(type, type, typedx)) +- .updateTyped(opticfinder2, type3, typedx -> this.updateFurnaceContents(type, type, typedx)) ++ typed -> typed.updateTyped(opticfinder, type1, typedx -> this.updateFurnaceContents(type, typex, typedx)) ++ .updateTyped(opticfinder1, type2, typedx -> this.updateFurnaceContents(type, typex, typedx)) ++ .updateTyped(opticfinder2, type3, typedx -> this.updateFurnaceContents(type, typex, typedx)) + ); + } + diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch new file mode 100644 index 0000000..8d49195 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java ++++ b/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java +@@ -43,7 +43,7 @@ + return typed; + } + +- return typed.set(opticfinder1, ((Pair)optional4.get()).getFirst()); ++ return typed.set(opticfinder1, optional4.get().getFirst()); + } + } + } diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/LeavesFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/LeavesFix.java.patch new file mode 100644 index 0000000..ea46f99 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/LeavesFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/LeavesFix.java ++++ b/net/minecraft/util/datafix/fixes/LeavesFix.java +@@ -357,7 +357,7 @@ + : typed.update(DSL.remainderFinder(), dynamic -> dynamic.set("BlockStates", dynamic.createLongList(Arrays.stream(this.storage.getRaw())))) + .set( + this.paletteFinder, +- this.palette.stream().map(dynamic -> Pair.of(References.BLOCK_STATE.typeName(), dynamic)).collect(Collectors.toList()) ++ this.palette.stream().>>map(dynamic -> Pair.of(References.BLOCK_STATE.typeName(), dynamic)).collect(Collectors.toList()) + ); + } + diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch new file mode 100644 index 0000000..d2751e6 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java ++++ b/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java +@@ -63,7 +63,7 @@ + Dynamic dynamic = typed.get(DSL.remainderFinder()); + dynamic = dynamic.set("id", dynamic.createString("MobSpawner")); + DataResult, ?>> dataresult = type.readTyped(this.fix(dynamic)); +- return !dataresult.result().isPresent() ? typed : ((Pair)dataresult.result().get()).getFirst(); ++ return !dataresult.result().isPresent() ? typed : dataresult.result().get().getFirst(); + }); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch new file mode 100644 index 0000000..2eb1679 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java ++++ b/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java +@@ -153,15 +153,15 @@ + s1 = "key.mouse." + (j + 1); + } + +- return Pair.of((Dynamic)entry.getKey(), ((Dynamic)entry.getValue()).createString(s1)); ++ return Pair.of(entry.getKey(), (entry.getValue()).createString(s1)); + } else { + String s = MAP.getOrDefault(i, "key.unknown"); +- return Pair.of((Dynamic)entry.getKey(), ((Dynamic)entry.getValue()).createString(s)); ++ return Pair.of(entry.getKey(), (entry.getValue()).createString(s)); + } + } else { +- return Pair.of((Dynamic)entry.getKey(), (Dynamic)entry.getValue()); ++ return Pair.of(entry.getKey(), entry.getValue()); + } +- }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse(dynamic)) ++ }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse((Dynamic) dynamic)) + ); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch new file mode 100644 index 0000000..82f0c3c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java ++++ b/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java +@@ -22,12 +22,12 @@ + if (((Dynamic)entry.getKey()).asString("").startsWith("key_")) { + String s = ((Dynamic)entry.getValue()).asString(""); + if (!s.startsWith("key.mouse") && !s.startsWith("scancode.")) { +- return Pair.of((Dynamic)entry.getKey(), dynamic.createString("key.keyboard." + s.substring("key.".length()))); ++ return Pair.of(entry.getKey(), dynamic.createString("key.keyboard." + s.substring("key.".length()))); + } + } + +- return Pair.of((Dynamic)entry.getKey(), (Dynamic)entry.getValue()); +- }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse(dynamic)) ++ return Pair.of(entry.getKey(), entry.getValue()); ++ }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse((Dynamic) dynamic)) + ); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch new file mode 100644 index 0000000..497b606 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java ++++ b/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java +@@ -21,8 +21,8 @@ + + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType) this.getOutputSchema().findChoiceType(References.ENTITY); + Type> type = DSL.named(References.ENTITY_NAME.typeName(), NamespacedSchema.namespacedString()); + if (!Objects.equals(this.getOutputSchema().getType(References.ENTITY_NAME), type)) { + throw new IllegalStateException("Entity name type is not what was expected."); diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch new file mode 100644 index 0000000..a90296c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java ++++ b/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java +@@ -79,7 +79,7 @@ + Dynamic dynamic = typedxx.get(DSL.remainderFinder()); + int k = dynamic.get("xPos").asInt(0); + int l = dynamic.get("zPos").asInt(0); +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType) this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); + return typedxx.updateTyped( + opticfinder, + typedxxx -> typedxxx.updateTyped( diff --git a/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch new file mode 100644 index 0000000..abd37cb --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java ++++ b/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java +@@ -19,7 +19,7 @@ + OpticFinder opticfinder = type.findField("dimensions"); + return this.fixTypeEverywhereTyped( + "WorldGenSettingsDisallowOldCustomWorldsFix_" + this.getOutputSchema().getVersionKey(), type, typed -> typed.updateTyped(opticfinder, typedx -> { +- typedx.write().map(dynamic -> dynamic.getMapValues().map((Function)(map -> { ++ typedx.write().map(dynamic -> dynamic.getMapValues().map((map -> { + map.forEach((dynamicx, dynamic2) -> { + if (dynamic2.get("type").asString().result().isEmpty()) { + throw new IllegalStateException("Unable load old custom worlds."); diff --git a/versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantFloat.java.patch b/versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantFloat.java.patch new file mode 100644 index 0000000..653519b --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantFloat.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/valueproviders/ConstantFloat.java ++++ b/net/minecraft/util/valueproviders/ConstantFloat.java +@@ -9,7 +9,7 @@ + public static final ConstantFloat ZERO = new ConstantFloat(0.0F); + public static final Codec CODEC = Codec.either( + Codec.FLOAT, +- RecordCodecBuilder.create( ++ RecordCodecBuilder.create( + instance -> instance.group(Codec.FLOAT.fieldOf("value").forGetter(provider -> provider.value)).apply(instance, ConstantFloat::new) + ) + ) diff --git a/versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantInt.java.patch b/versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantInt.java.patch new file mode 100644 index 0000000..1401372 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/util/valueproviders/ConstantInt.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/util/valueproviders/ConstantInt.java ++++ b/net/minecraft/util/valueproviders/ConstantInt.java +@@ -9,7 +9,7 @@ + public static final ConstantInt ZERO = new ConstantInt(0); + public static final Codec CODEC = Codec.either( + Codec.INT, +- RecordCodecBuilder.create( ++ RecordCodecBuilder.create( + instance -> instance.group(Codec.INT.fieldOf("value").forGetter(provider -> provider.value)).apply(instance, ConstantInt::new) + ) + ) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/Mob.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/Mob.java.patch new file mode 100644 index 0000000..6ce76ff --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/Mob.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/Mob.java ++++ b/net/minecraft/world/entity/Mob.java +@@ -1123,7 +1123,7 @@ + if (this.level() instanceof ServerLevel) { + SpawnEggItem spawneggitem = (SpawnEggItem)itemstack.getItem(); + Optional optional = spawneggitem.spawnOffspringFromSpawnEgg( +- player, this, this.getType(), (ServerLevel)this.level(), this.position(), itemstack ++ player, this, (EntityType) this.getType(), (ServerLevel)this.level(), this.position(), itemstack + ); + optional.ifPresent(entity -> this.onOffspringSpawnedFromEgg(player, entity)); + return optional.isPresent() ? InteractionResult.SUCCESS : InteractionResult.PASS; diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/SpawnPlacements.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/SpawnPlacements.java.patch new file mode 100644 index 0000000..4d55814 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/SpawnPlacements.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/SpawnPlacements.java ++++ b/net/minecraft/world/entity/SpawnPlacements.java +@@ -65,7 +65,7 @@ + EntityType type, ServerLevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random + ) { + SpawnPlacements.Data spawnplacements$data = DATA_BY_TYPE.get(type); +- return spawnplacements$data == null || spawnplacements$data.predicate.test(type, world, spawnReason, pos, random); ++ return spawnplacements$data == null || spawnplacements$data.predicate.test((EntityType) type, world, spawnReason, pos, random); + } + + static { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/Brain.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/Brain.java.patch new file mode 100644 index 0000000..d6996bd --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/Brain.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/world/entity/ai/Brain.java ++++ b/net/minecraft/world/entity/ai/Brain.java +@@ -194,14 +194,14 @@ + if (optional == null) { + throw new IllegalStateException("Unregistered memory fetched: " + type); + } else { +- return optional.map(ExpirableValue::getValue); ++ return (Optional) optional.map(ExpirableValue::getValue); + } + } + + @Nullable + public Optional getMemoryInternal(MemoryModuleType type) { + Optional> optional = this.memories.get(type); +- return optional == null ? null : optional.map(ExpirableValue::getValue); ++ return optional == null ? null : (Optional) optional.map(ExpirableValue::getValue); + } + + public long getTimeUntilExpiry(MemoryModuleType type) { +@@ -495,7 +495,7 @@ + private final Optional> value; + + static Brain.MemoryValue createUnchecked(MemoryModuleType type, Optional> data) { +- return new Brain.MemoryValue<>(type, data); ++ return new Brain.MemoryValue<>(type, (Optional>) data); + } + + MemoryValue(MemoryModuleType type, Optional> data) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch new file mode 100644 index 0000000..ff40cd3 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java ++++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +@@ -45,7 +45,7 @@ + MutableLong mutablelong = new MutableLong(0L); + Long2ObjectMap long2objectmap = new Long2ObjectOpenHashMap<>(); + OneShot oneshot = BehaviorBuilder.create( +- instance -> instance.group(instance.absent(potentialPoiPosModule)) ++ instance -> instance.group(instance.absent(potentialPoiPosModule)) + .apply( + instance, + queryResult -> (world, entity, time) -> { +@@ -101,7 +101,7 @@ + ); + return potentialPoiPosModule == poiPosModule + ? oneshot +- : BehaviorBuilder.create(context -> context.group(context.absent(poiPosModule)).apply(context, poiPos -> oneshot)); ++ : BehaviorBuilder.create(context -> context.group(context.absent(poiPosModule)).apply(context, poiPos -> oneshot)); + } + + @Nullable diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch new file mode 100644 index 0000000..43af786 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java ++++ b/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java +@@ -14,7 +14,7 @@ + public class AssignProfessionFromJobSite { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.POTENTIAL_JOB_SITE), context.registered(MemoryModuleType.JOB_SITE) + ) + .apply( diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch new file mode 100644 index 0000000..ab5a812 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java ++++ b/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java +@@ -16,7 +16,7 @@ + + public static OneShot create(UniformInt executionRange, Function speed) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.NEAREST_VISIBLE_ADULT), + context.registered(MemoryModuleType.LOOK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch new file mode 100644 index 0000000..e5bd384 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java ++++ b/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java +@@ -11,7 +11,7 @@ + public class BackUpIfTooClose { + public static OneShot create(int distance, float forwardMovement) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET), + context.present(MemoryModuleType.ATTACK_TARGET), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch new file mode 100644 index 0000000..2f06a8f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java ++++ b/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java +@@ -17,7 +17,7 @@ + context, + context.point( + () -> "[BecomePassive if " + requiredMemory + " present]", +- (Function3>)(attackTarget, pacified, requiredMemoryResult) -> (world, entity, time) -> { ++ (attackTarget, pacified, requiredMemoryResult) -> (world, entity, time) -> { + pacified.setWithExpiry(true, (long)duration); + attackTarget.erase(); + return true; diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch new file mode 100644 index 0000000..1d02612 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java ++++ b/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java +@@ -12,7 +12,7 @@ + Predicate runPredicate, MemoryModuleType sourceType, MemoryModuleType targetType, UniformInt expiry + ) { + return BehaviorBuilder.create( +- context -> context.group(context.present(sourceType), context.absent(targetType)) ++ context -> context.group(context.present(sourceType), context.absent(targetType)) + .apply(context, (source, target) -> (world, entity, time) -> { + if (!runPredicate.test(entity)) { + return false; diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch new file mode 100644 index 0000000..e01c7e5 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java ++++ b/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java +@@ -10,7 +10,7 @@ + public class DismountOrSkipMounting { + public static BehaviorControl create(int range, BiPredicate alternativeRideCondition) { + return BehaviorBuilder.create( +- context -> context.group(context.registered(MemoryModuleType.RIDE_TARGET)).apply(context, rideTarget -> (world, entity, time) -> { ++ context -> context.group(context.registered(MemoryModuleType.RIDE_TARGET)).apply(context, rideTarget -> (world, entity, time) -> { + Entity entityx = entity.getVehicle(); + Entity entity1 = context.tryGet(rideTarget).orElse(null); + if (entityx == null && entity1 == null) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch new file mode 100644 index 0000000..a9cf747 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java ++++ b/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java +@@ -9,7 +9,7 @@ + public class EraseMemoryIf { + public static BehaviorControl create(Predicate condition, MemoryModuleType memory) { + return BehaviorBuilder.create( +- context -> context.group(context.present(memory)).apply(context, queryResult -> (world, entity, time) -> { ++ context -> context.group(context.present(memory)).apply(context, queryResult -> (world, entity, time) -> { + if (condition.test(entity)) { + queryResult.erase(); + return true; diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch new file mode 100644 index 0000000..c73a821 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java ++++ b/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java +@@ -14,7 +14,7 @@ + public class GoToClosestVillage { + public static BehaviorControl create(float speed, int completionRange) { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)).apply(context, walkTarget -> (world, entity, time) -> { ++ context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)).apply(context, walkTarget -> (world, entity, time) -> { + if (world.isVillage(entity.blockPosition())) { + return false; + } else { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch new file mode 100644 index 0000000..35686ad --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java ++++ b/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java +@@ -19,7 +19,7 @@ + + public static OneShot create(MemoryModuleType posModule, int completionRange, float speed) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(posModule), + context.absent(MemoryModuleType.ATTACK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch new file mode 100644 index 0000000..53a7548 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java ++++ b/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java +@@ -13,7 +13,7 @@ + public class InsideBrownianWalk { + public static BehaviorControl create(float speed) { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)) ++ context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)) + .apply( + context, + walkTarget -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch new file mode 100644 index 0000000..ae711cd --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/ai/behavior/InteractWith.java ++++ b/net/minecraft/world/entity/ai/behavior/InteractWith.java +@@ -29,7 +29,7 @@ + int i = maxDistance * maxDistance; + Predicate predicate = entity -> type.equals(entity.getType()) && targetPredicate.test((T)entity); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(targetModule), + context.registered(MemoryModuleType.LOOK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET), +@@ -44,7 +44,7 @@ + target -> target.distanceToSqr(entity) <= (double)i && predicate.test(target) + ); + optional.ifPresent(target -> { +- targetValue.set(target); ++ targetValue.set((T) target); + lookTarget.set(new EntityTracker(target, true)); + walkTarget.set(new WalkTarget(new EntityTracker(target, false), speed, completionRange)); + }); diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch new file mode 100644 index 0000000..914687c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java ++++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java +@@ -34,7 +34,7 @@ + MutableObject mutableobject = new MutableObject<>(null); + MutableInt mutableint = new MutableInt(0); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.PATH), + context.registered(MemoryModuleType.DOORS_TO_CLOSE), + context.registered(MemoryModuleType.NEAREST_LIVING_ENTITIES) +@@ -154,7 +154,7 @@ + MemoryAccessor> queryResult, Optional> doors, ServerLevel world, BlockPos pos + ) { + GlobalPos globalpos = GlobalPos.of(world.dimension(), pos); +- return Optional.of(doors.map((Function, ? extends Set>)(doorSet -> { ++ return Optional.of(doors.map((doorSet -> { + doorSet.add(globalpos); + return doorSet; + })).orElseGet(() -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch new file mode 100644 index 0000000..9060bbe --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java ++++ b/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java +@@ -12,7 +12,7 @@ + public class LocateHidingPlace { + public static OneShot create(int maxDistance, float walkSpeed, int preferredDistance) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.HOME), + context.registered(MemoryModuleType.HIDING_PLACE), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch new file mode 100644 index 0000000..c044862 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/MeleeAttack.java ++++ b/net/minecraft/world/entity/ai/behavior/MeleeAttack.java +@@ -13,7 +13,7 @@ + public class MeleeAttack { + public static OneShot create(int cooldown) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.LOOK_TARGET), + context.present(MemoryModuleType.ATTACK_TARGET), + context.absent(MemoryModuleType.ATTACK_COOLING_DOWN), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/Mount.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/Mount.java.patch new file mode 100644 index 0000000..7db7dac --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/Mount.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/Mount.java ++++ b/net/minecraft/world/entity/ai/behavior/Mount.java +@@ -12,7 +12,7 @@ + + public static BehaviorControl create(float speed) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.LOOK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET), + context.present(MemoryModuleType.RIDE_TARGET) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch new file mode 100644 index 0000000..b292517 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java ++++ b/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java +@@ -16,7 +16,7 @@ + public class MoveToSkySeeingSpot { + public static OneShot create(float speed) { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)).apply(context, walkTarget -> (world, entity, time) -> { ++ context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)).apply(context, walkTarget -> (world, entity, time) -> { + if (world.canSeeSky(entity.blockPosition())) { + return false; + } else { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch new file mode 100644 index 0000000..f0a9604 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java ++++ b/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java +@@ -26,7 +26,7 @@ + + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.VISIBLE_VILLAGER_BABIES), + context.absent(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch new file mode 100644 index 0000000..6a7ff87 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java ++++ b/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java +@@ -15,7 +15,7 @@ + public class PoiCompetitorScan { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.JOB_SITE), context.present(MemoryModuleType.NEAREST_LIVING_ENTITIES) + ) + .apply( diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch new file mode 100644 index 0000000..6f2fdcf --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/RandomStroll.java ++++ b/net/minecraft/world/entity/ai/behavior/RandomStroll.java +@@ -42,7 +42,7 @@ + + private static OneShot strollFlyOrSwim(float speed, Function targetGetter, Predicate shouldRun) { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)).apply(context, walkTarget -> (world, entity, time) -> { ++ context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)).apply(context, walkTarget -> (world, entity, time) -> { + if (!shouldRun.test(entity)) { + return false; + } else { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch new file mode 100644 index 0000000..c79f84f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/ReactToBell.java ++++ b/net/minecraft/world/entity/ai/behavior/ReactToBell.java +@@ -10,7 +10,7 @@ + public class ReactToBell { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group(context.present(MemoryModuleType.HEARD_BELL_TIME)) ++ context -> context.group(context.present(MemoryModuleType.HEARD_BELL_TIME)) + .apply(context, heardBellTime -> (world, entity, time) -> { + Raid raid = world.getRaidAt(entity.blockPosition()); + if (raid == null) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch new file mode 100644 index 0000000..d664d1f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/ResetProfession.java ++++ b/net/minecraft/world/entity/ai/behavior/ResetProfession.java +@@ -10,7 +10,7 @@ + public class ResetProfession { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.JOB_SITE)) ++ context -> context.group(context.absent(MemoryModuleType.JOB_SITE)) + .apply( + context, + jobSite -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RingBell.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RingBell.java.patch new file mode 100644 index 0000000..9988c4e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/RingBell.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/RingBell.java ++++ b/net/minecraft/world/entity/ai/behavior/RingBell.java +@@ -16,7 +16,7 @@ + + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group(context.present(MemoryModuleType.MEETING_POINT)).apply(context, meetingPoint -> (world, entity, time) -> { ++ context -> context.group(context.present(MemoryModuleType.MEETING_POINT)).apply(context, meetingPoint -> (world, entity, time) -> { + if (world.random.nextFloat() <= 0.95F) { + return false; + } else { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch new file mode 100644 index 0000000..0d9e638 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java ++++ b/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java +@@ -32,7 +32,7 @@ + Long2LongMap long2longmap = new Long2LongOpenHashMap(); + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- instance -> instance.group(instance.absent(MemoryModuleType.WALK_TARGET), instance.absent(MemoryModuleType.HOME)) ++ instance -> instance.group(instance.absent(MemoryModuleType.WALK_TARGET), instance.absent(MemoryModuleType.HOME)) + .apply( + instance, + (walkTarget, home) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch new file mode 100644 index 0000000..e739751 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java ++++ b/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java +@@ -26,7 +26,7 @@ + public static OneShot create(Predicate predicate, float maxDistance) { + float f = maxDistance * maxDistance; + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.LOOK_TARGET), context.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) + ) + .apply( diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch new file mode 100644 index 0000000..63fa026 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java ++++ b/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java +@@ -25,7 +25,7 @@ + float f = maxDistance * maxDistance; + SetEntityLookTargetSometimes.Ticker setentitylooktargetsometimes$ticker = new SetEntityLookTargetSometimes.Ticker(interval); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.LOOK_TARGET), context.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) + ) + .apply( diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch new file mode 100644 index 0000000..4a54539 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetHiddenState.java ++++ b/net/minecraft/world/entity/ai/behavior/SetHiddenState.java +@@ -15,7 +15,7 @@ + int i = maxHiddenSeconds * 20; + MutableInt mutableint = new MutableInt(0); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.HIDING_PLACE), context.present(MemoryModuleType.HEARD_BELL_TIME) + ) + .apply(context, (hidingPlace, heardBellTime) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch new file mode 100644 index 0000000..1ff11fc --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java ++++ b/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java +@@ -12,7 +12,7 @@ + public static BehaviorControl create(EntityType type, int maxDistance) { + int i = maxDistance * maxDistance; + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.LOOK_TARGET), + context.absent(MemoryModuleType.INTERACTION_TARGET), + context.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch new file mode 100644 index 0000000..c2eff93 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java ++++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java +@@ -25,7 +25,7 @@ + MemoryModuleType posSource, float speed, int range, boolean requiresWalkTarget, Function posGetter + ) { + return BehaviorBuilder.create( +- context -> context.group(context.registered(MemoryModuleType.WALK_TARGET), context.present(posSource)) ++ context -> context.group(context.registered(MemoryModuleType.WALK_TARGET), context.present(posSource)) + .apply(context, (walkTarget, posSourcex) -> (world, entity, time) -> { + Optional optional = context.tryGet(walkTarget); + if (optional.isPresent() && !requiresWalkTarget) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch new file mode 100644 index 0000000..3e17167 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java ++++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java +@@ -19,7 +19,7 @@ + + public static BehaviorControl create(Function speed) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET), + context.present(MemoryModuleType.ATTACK_TARGET), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch new file mode 100644 index 0000000..bdd6cd5 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java ++++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java +@@ -14,7 +14,7 @@ + public class SetWalkTargetFromBlockMemory { + public static OneShot create(MemoryModuleType destination, float speed, int completionRange, int maxDistance, int maxRunTime) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE), + context.absent(MemoryModuleType.WALK_TARGET), + context.present(destination) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch new file mode 100644 index 0000000..9d910e0 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java ++++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java +@@ -15,7 +15,7 @@ + + public static OneShot create(Predicate predicate, Function speed, int completionRange) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.WALK_TARGET), context.present(MemoryModuleType.LOOK_TARGET) + ) + .apply(context, (walkTarget, lookTarget) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch new file mode 100644 index 0000000..6cfdb44 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java ++++ b/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java +@@ -14,7 +14,7 @@ + + public static OneShot create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET), + context.present(MemoryModuleType.MEETING_POINT), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch new file mode 100644 index 0000000..ddb8a94 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StartAttacking.java ++++ b/net/minecraft/world/entity/ai/behavior/StartAttacking.java +@@ -16,7 +16,7 @@ + + public static BehaviorControl create(Predicate startCondition, Function> targetGetter) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.ATTACK_TARGET), context.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) + ) + .apply(context, (attackTarget, cantReachWalkTargetSince) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch new file mode 100644 index 0000000..4841d13 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java ++++ b/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java +@@ -11,7 +11,7 @@ + public class StartCelebratingIfTargetDead { + public static BehaviorControl create(int celebrationDuration, BiPredicate predicate) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.ATTACK_TARGET), + context.registered(MemoryModuleType.ANGRY_AT), + context.absent(MemoryModuleType.CELEBRATE_LOCATION), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch new file mode 100644 index 0000000..a9afc31 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java ++++ b/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java +@@ -18,7 +18,7 @@ + float speed + ) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.LOOK_TARGET), context.registered(MemoryModuleType.WALK_TARGET) + ) + .apply(context, (lookTarget, walkTarget) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch new file mode 100644 index 0000000..1597302 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java ++++ b/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java +@@ -30,7 +30,7 @@ + Predicate alternativeCondition, BiConsumer forgetCallback, boolean shouldForgetIfTargetUnreachable + ) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.ATTACK_TARGET), context.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) + ) + .apply( diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch new file mode 100644 index 0000000..93b1afc --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java ++++ b/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java +@@ -11,7 +11,7 @@ + public class StopBeingAngryIfTargetDead { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group(context.present(MemoryModuleType.ANGRY_AT)) ++ context -> context.group(context.present(MemoryModuleType.ANGRY_AT)) + .apply( + context, + angryAt -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch new file mode 100644 index 0000000..a3a9a2e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java ++++ b/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java +@@ -19,7 +19,7 @@ + public static OneShot create(MemoryModuleType posModule, float walkSpeed, int maxDistance) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- context -> context.group(context.registered(MemoryModuleType.WALK_TARGET), context.present(posModule)) ++ context -> context.group(context.registered(MemoryModuleType.WALK_TARGET), context.present(posModule)) + .apply(context, (walkTarget, pos) -> (world, entity, time) -> { + GlobalPos globalpos = context.get(pos); + if (world.dimension() != globalpos.dimension() || !globalpos.pos().closerToCenterThan(entity.position(), (double)maxDistance)) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch new file mode 100644 index 0000000..b022844 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StrollToPoi.java ++++ b/net/minecraft/world/entity/ai/behavior/StrollToPoi.java +@@ -12,7 +12,7 @@ + public static BehaviorControl create(MemoryModuleType posModule, float walkSpeed, int completionRange, int maxDistance) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- context -> context.group(context.registered(MemoryModuleType.WALK_TARGET), context.present(posModule)) ++ context -> context.group(context.registered(MemoryModuleType.WALK_TARGET), context.present(posModule)) + .apply(context, (walkTarget, pos) -> (world, entity, time) -> { + GlobalPos globalpos = context.get(pos); + if (world.dimension() != globalpos.dimension() || !globalpos.pos().closerToCenterThan(entity.position(), (double)maxDistance)) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch new file mode 100644 index 0000000..019d65b --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java ++++ b/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java +@@ -19,7 +19,7 @@ + ) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.WALK_TARGET), context.present(secondaryPositions), context.present(primaryPosition) + ) + .apply( diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch new file mode 100644 index 0000000..87946f5 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/TryFindLand.java ++++ b/net/minecraft/world/entity/ai/behavior/TryFindLand.java +@@ -19,7 +19,7 @@ + public static BehaviorControl create(int range, float speed) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.ATTACK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch new file mode 100644 index 0000000..2bb5f24 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java ++++ b/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java +@@ -16,7 +16,7 @@ + public static BehaviorControl create(int range, float speed) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.ATTACK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch new file mode 100644 index 0000000..a80ac59 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/TryFindWater.java ++++ b/net/minecraft/world/entity/ai/behavior/TryFindWater.java +@@ -15,7 +15,7 @@ + public static BehaviorControl create(int range, float speed) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.ATTACK_TARGET), + context.absent(MemoryModuleType.WALK_TARGET), + context.registered(MemoryModuleType.LOOK_TARGET) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch new file mode 100644 index 0000000..d3532e3 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java ++++ b/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java +@@ -16,7 +16,7 @@ + public class TryLaySpawnOnWaterNearLand { + public static BehaviorControl create(Block frogSpawn) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.ATTACK_TARGET), + context.present(MemoryModuleType.WALK_TARGET), + context.present(MemoryModuleType.IS_PREGNANT) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch new file mode 100644 index 0000000..4409683 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java ++++ b/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java +@@ -20,7 +20,7 @@ + + public static BehaviorControl create(Predicate> poiTypePredicate, MemoryModuleType poiPosModule) { + return BehaviorBuilder.create( +- context -> context.group(context.present(poiPosModule)).apply(context, poiPos -> (world, entity, time) -> { ++ context -> context.group(context.present(poiPosModule)).apply(context, poiPos -> (world, entity, time) -> { + GlobalPos globalpos = context.get(poiPos); + BlockPos blockpos = globalpos.pos(); + if (world.dimension() == globalpos.dimension() && blockpos.closerToCenterThan(entity.position(), 16.0)) { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch new file mode 100644 index 0000000..6588cfa --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java ++++ b/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java +@@ -22,7 +22,7 @@ + + public static OneShot create(float walkSpeed, int horizontalRange, int verticalRange) { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)) ++ context -> context.group(context.absent(MemoryModuleType.WALK_TARGET)) + .apply( + context, + walkTarget -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch new file mode 100644 index 0000000..aa5ae8c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java ++++ b/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java +@@ -10,7 +10,7 @@ + + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.HURT_BY), + context.registered(MemoryModuleType.HURT_BY_ENTITY), + context.registered(MemoryModuleType.NEAREST_HOSTILE) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch new file mode 100644 index 0000000..118e1e8 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/YieldJobSite.java ++++ b/net/minecraft/world/entity/ai/behavior/YieldJobSite.java +@@ -19,7 +19,7 @@ + public class YieldJobSite { + public static BehaviorControl create(float speed) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.POTENTIAL_JOB_SITE), + context.absent(MemoryModuleType.JOB_SITE), + context.present(MemoryModuleType.NEAREST_LIVING_ENTITIES), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch new file mode 100644 index 0000000..e72bde8 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java ++++ b/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java +@@ -12,7 +12,7 @@ + public class SetRoarTarget { + public static BehaviorControl create(Function> targetFinder) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.absent(MemoryModuleType.ROAR_TARGET), + context.absent(MemoryModuleType.ATTACK_TARGET), + context.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch new file mode 100644 index 0000000..e7d488c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java ++++ b/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java +@@ -13,7 +13,7 @@ + public class SetWardenLookTarget { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.LOOK_TARGET), + context.registered(MemoryModuleType.DISTURBANCE_LOCATION), + context.registered(MemoryModuleType.ROAR_TARGET), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch new file mode 100644 index 0000000..5f82ea4 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java ++++ b/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java +@@ -15,7 +15,7 @@ + + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.registered(MemoryModuleType.IS_SNIFFING), + context.registered(MemoryModuleType.WALK_TARGET), + context.absent(MemoryModuleType.SNIFF_COOLDOWN), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch new file mode 100644 index 0000000..ea75a6d --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/gossip/GossipContainer.java ++++ b/net/minecraft/world/entity/ai/gossip/GossipContainer.java +@@ -155,7 +155,7 @@ + .decode(dynamic) + .resultOrPartial(error -> LOGGER.warn("Failed to deserialize gossips: {}", error)) + .stream() +- .flatMap(pair -> ((List)pair.getFirst()).stream()) ++ .flatMap(pair -> (pair.getFirst()).stream()) + .forEach(entry -> this.getOrCreate(entry.target).entries.put(entry.type, entry.value)); + } + diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/Sheep.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/Sheep.java.patch new file mode 100644 index 0000000..c8d36c0 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/Sheep.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/Sheep.java ++++ b/net/minecraft/world/entity/animal/Sheep.java +@@ -83,7 +83,7 @@ + map.put(DyeColor.RED, Blocks.RED_WOOL); + map.put(DyeColor.BLACK, Blocks.BLACK_WOOL); + }); +- private static final Map COLORARRAY_BY_COLOR = Maps.newEnumMap( ++ private static final Map COLORARRAY_BY_COLOR = Maps.newEnumMap( + Arrays.stream(DyeColor.values()).collect(Collectors.toMap(color -> color, Sheep::createSheepColor)) + ); + private int eatAnimationTick; diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/allay/Allay.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/allay/Allay.java.patch new file mode 100644 index 0000000..264ac1e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/allay/Allay.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/allay/Allay.java ++++ b/net/minecraft/world/entity/animal/allay/Allay.java +@@ -139,7 +139,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + public static AttributeSupplier.Builder createAttributes() { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch new file mode 100644 index 0000000..5b77134 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java ++++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java +@@ -484,7 +484,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch new file mode 100644 index 0000000..fcf0310 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java ++++ b/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java +@@ -72,7 +72,7 @@ + Activity.FIGHT, + 0, + ImmutableList.of( +- StopAttackingIfTargetInvalid.create(Axolotl::onStopAttacking), ++ StopAttackingIfTargetInvalid.create(Axolotl::onStopAttacking), + SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(AxolotlAi::getSpeedModifierChasing), + MeleeAttack.create(20), + EraseMemoryIf.create(BehaviorUtils::isBreeding, MemoryModuleType.ATTACK_TARGET) diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch new file mode 100644 index 0000000..b03a237 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java ++++ b/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java +@@ -9,7 +9,7 @@ + public class ValidatePlayDead { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.PLAY_DEAD_TICKS), context.registered(MemoryModuleType.HURT_BY_ENTITY) + ) + .apply(context, (playDeadTicks, hurtByEntity) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/camel/Camel.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/camel/Camel.java.patch new file mode 100644 index 0000000..437128d --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/camel/Camel.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/camel/Camel.java ++++ b/net/minecraft/world/entity/animal/camel/Camel.java +@@ -157,7 +157,7 @@ + @Override + protected void customServerAiStep() { + this.level().getProfiler().push("camelBrain"); +- Brain brain = this.getBrain(); ++ Brain brain = (Brain) this.getBrain(); + brain.tick((ServerLevel)this.level(), this); + this.level().getProfiler().pop(); + this.level().getProfiler().push("camelActivityUpdate"); diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Frog.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Frog.java.patch new file mode 100644 index 0000000..88bdf2a --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Frog.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/frog/Frog.java ++++ b/net/minecraft/world/entity/animal/frog/Frog.java +@@ -124,7 +124,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Tadpole.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Tadpole.java.patch new file mode 100644 index 0000000..10ab300 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/frog/Tadpole.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/frog/Tadpole.java ++++ b/net/minecraft/world/entity/animal/frog/Tadpole.java +@@ -80,7 +80,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/goat/Goat.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/goat/Goat.java.patch new file mode 100644 index 0000000..0f8ef72 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/goat/Goat.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/goat/Goat.java ++++ b/net/minecraft/world/entity/animal/goat/Goat.java +@@ -176,7 +176,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch new file mode 100644 index 0000000..3b21dfa --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java ++++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java +@@ -459,7 +459,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/Slime.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/Slime.java.patch new file mode 100644 index 0000000..6543124 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/Slime.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/Slime.java ++++ b/net/minecraft/world/entity/monster/Slime.java +@@ -182,7 +182,7 @@ + + @Override + public EntityType getType() { +- return super.getType(); ++ return (EntityType) super.getType(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/Zoglin.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/Zoglin.java.patch new file mode 100644 index 0000000..e9f992e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/Zoglin.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/Zoglin.java ++++ b/net/minecraft/world/entity/monster/Zoglin.java +@@ -223,7 +223,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + protected void updateActivity() { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch new file mode 100644 index 0000000..fe66268 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java ++++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java +@@ -150,7 +150,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch new file mode 100644 index 0000000..c0dbff4 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/hoglin/HoglinAi.java ++++ b/net/minecraft/world/entity/monster/hoglin/HoglinAi.java +@@ -111,7 +111,7 @@ + SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.3F, 15, false), + createIdleMovementBehaviors(), + SetEntityLookTargetSometimes.create(8.0F, UniformInt.of(30, 60)), +- EraseMemoryIf.create(HoglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) ++ EraseMemoryIf.create(HoglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) + ), + MemoryModuleType.AVOID_TARGET + ); diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/Piglin.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/Piglin.java.patch new file mode 100644 index 0000000..a1d6952 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/Piglin.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/Piglin.java ++++ b/net/minecraft/world/entity/monster/piglin/Piglin.java +@@ -259,7 +259,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch new file mode 100644 index 0000000..a64da88 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch @@ -0,0 +1,38 @@ +--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java ++++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java +@@ -169,7 +169,7 @@ + brain.addActivityAndRemoveMemoryWhenStopped( + Activity.FIGHT, + 10, +- ImmutableList.of( ++ ImmutableList.>of( + StopAttackingIfTargetInvalid.create(target -> !isNearestValidAttackTarget(piglin, target)), + BehaviorBuilder.triggerIf(PiglinAi::hasCrossbow, BackUpIfTooClose.create(5, 0.75F)), + SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(1.0F), +@@ -192,7 +192,7 @@ + StartAttacking.create(AbstractPiglin::isAdult, PiglinAi::findNearestValidAttackTarget), + BehaviorBuilder.triggerIf(piglin -> !piglin.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)), + BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)), +- new RunOne( ++ new RunOne<>( + ImmutableList.of( + Pair.of(SetEntityLookTarget.create(EntityType.PIGLIN, 8.0F), 1), + Pair.of(RandomStroll.stroll(0.6F, 2, 1), 1), +@@ -225,7 +225,7 @@ + SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.0F, 12, true), + createIdleLookBehaviors(), + createIdleMovementBehaviors(), +- EraseMemoryIf.create(PiglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) ++ EraseMemoryIf.create(PiglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) + ), + MemoryModuleType.AVOID_TARGET + ); +@@ -247,7 +247,7 @@ + .build() + ) + ), +- DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding) ++ DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding) + ), + MemoryModuleType.RIDE_TARGET + ); diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch new file mode 100644 index 0000000..e664222 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java ++++ b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java +@@ -98,7 +98,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch new file mode 100644 index 0000000..18461cc --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java ++++ b/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java +@@ -10,7 +10,7 @@ + public class RememberIfHoglinWasKilled { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.ATTACK_TARGET), context.registered(MemoryModuleType.HUNTED_RECENTLY) + ) + .apply(context, (attackTarget, huntedRecently) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch new file mode 100644 index 0000000..dba086f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java ++++ b/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java +@@ -10,7 +10,7 @@ + public class StartAdmiringItemIfSeen { + public static BehaviorControl create(int duration) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM), + context.absent(MemoryModuleType.ADMIRING_ITEM), + context.absent(MemoryModuleType.ADMIRING_DISABLED), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch new file mode 100644 index 0000000..0fcba16 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch @@ -0,0 +1,28 @@ +--- a/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java ++++ b/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java +@@ -10,7 +10,7 @@ + public class StartHuntingHoglin { + public static OneShot create() { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.NEAREST_VISIBLE_HUNTABLE_HOGLIN), + context.absent(MemoryModuleType.ANGRY_AT), + context.absent(MemoryModuleType.HUNTED_RECENTLY), +@@ -20,14 +20,14 @@ + context, + (nearestVisibleHuntableHoglin, angryAt, huntedRecently, nearestVisibleAdultPiglins) -> (world, entity, time) -> { + if (!entity.isBaby() +- && !context.tryGet(nearestVisibleAdultPiglins) ++ && !context.tryGet(nearestVisibleAdultPiglins) + .map(piglin -> piglin.stream().anyMatch(StartHuntingHoglin::hasHuntedRecently)) + .isPresent()) { + Hoglin hoglin = context.get(nearestVisibleHuntableHoglin); + PiglinAi.setAngerTarget(entity, hoglin); + PiglinAi.dontKillAnyMoreHoglinsForAWhile(entity); + PiglinAi.broadcastAngerTarget(entity, hoglin); +- context.tryGet(nearestVisibleAdultPiglins) ++ context.tryGet(nearestVisibleAdultPiglins) + .ifPresent(piglin -> piglin.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile)); + return true; + } else { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch new file mode 100644 index 0000000..3226d6f --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java ++++ b/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java +@@ -11,7 +11,7 @@ + public class StopAdmiringIfItemTooFarAway { + public static BehaviorControl create(int range) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.ADMIRING_ITEM), context.registered(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM) + ) + .apply(context, (admiringItem, nearestVisibleWantedItem) -> (world, entity, time) -> { diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch new file mode 100644 index 0000000..5b543fd --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java ++++ b/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java +@@ -10,7 +10,7 @@ + public class StopAdmiringIfTiredOfTryingToReachItem { + public static BehaviorControl create(int cooldown, int timeLimit) { + return BehaviorBuilder.create( +- context -> context.group( ++ context -> context.group( + context.present(MemoryModuleType.ADMIRING_ITEM), + context.present(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM), + context.registered(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM), diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch new file mode 100644 index 0000000..da7a670 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java ++++ b/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java +@@ -9,7 +9,7 @@ + public class StopHoldingItemIfNoLongerAdmiring { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- context -> context.group(context.absent(MemoryModuleType.ADMIRING_ITEM)).apply(context, admiringItem -> (world, entity, time) -> { ++ context -> context.group(context.absent(MemoryModuleType.ADMIRING_ITEM)).apply(context, admiringItem -> (world, entity, time) -> { + if (!entity.getOffhandItem().isEmpty() && !entity.getOffhandItem().is(Items.SHIELD)) { + PiglinAi.stopHoldingOffHandItem(entity, true); + return true; diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/Warden.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/Warden.java.patch new file mode 100644 index 0000000..5e3b1c6 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/Warden.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/warden/Warden.java ++++ b/net/minecraft/world/entity/monster/warden/Warden.java +@@ -370,7 +370,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/WardenAi.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/WardenAi.java.patch new file mode 100644 index 0000000..862e211 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/monster/warden/WardenAi.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/monster/warden/WardenAi.java ++++ b/net/minecraft/world/entity/monster/warden/WardenAi.java +@@ -83,7 +83,7 @@ + MemoryModuleType.SONIC_BOOM_SOUND_DELAY + ); + private static final BehaviorControl DIG_COOLDOWN_SETTER = BehaviorBuilder.create( +- context -> context.group(context.registered(MemoryModuleType.DIG_COOLDOWN)).apply(context, digCooldown -> (world, entity, time) -> { ++ context -> context.group(context.registered(MemoryModuleType.DIG_COOLDOWN)).apply(context, digCooldown -> (world, entity, time) -> { + if (context.tryGet(digCooldown).isPresent()) { + digCooldown.setWithExpiry(Unit.INSTANCE, 1200L); + } diff --git a/versions/1.20.1/patches/net/minecraft/world/entity/npc/Villager.java.patch b/versions/1.20.1/patches/net/minecraft/world/entity/npc/Villager.java.patch new file mode 100644 index 0000000..028cb61 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/entity/npc/Villager.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/npc/Villager.java ++++ b/net/minecraft/world/entity/npc/Villager.java +@@ -198,7 +198,7 @@ + + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain) super.getBrain(); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/item/crafting/RecipeManager.java.patch b/versions/1.20.1/patches/net/minecraft/world/item/crafting/RecipeManager.java.patch new file mode 100644 index 0000000..a176ae8 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/item/crafting/RecipeManager.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/item/crafting/RecipeManager.java ++++ b/net/minecraft/world/item/crafting/RecipeManager.java +@@ -107,7 +107,7 @@ + } + + private > Map byType(RecipeType type) { +- return this.recipes.getOrDefault(type, Collections.emptyMap()); ++ return (Map) this.recipes.getOrDefault(type, Collections.emptyMap()); + } + + public > NonNullList getRemainingItemsFor(RecipeType type, C inventory, Level world) { diff --git a/versions/1.20.1/patches/net/minecraft/world/level/GameRules.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/GameRules.java.patch new file mode 100644 index 0000000..7e9217c --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/GameRules.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/world/level/GameRules.java ++++ b/net/minecraft/world/level/GameRules.java +@@ -235,8 +235,8 @@ + } + + private static > void callVisitorCap(GameRules.GameRuleTypeVisitor consumer, GameRules.Key key, GameRules.Type type) { +- consumer.visit(key, type); +- type.callVisitor(consumer, key); ++ consumer.visit((Key) key, (Type) type); ++ ((Type) type).callVisitor(consumer, (Key) key); + } + + public void assignFrom(GameRules rules, @Nullable MinecraftServer server) { diff --git a/versions/1.20.1/patches/net/minecraft/world/level/biome/Climate.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/biome/Climate.java.patch new file mode 100644 index 0000000..d12ddf9 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/biome/Climate.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/biome/Climate.java ++++ b/net/minecraft/world/level/biome/Climate.java +@@ -267,7 +267,7 @@ + throw new IllegalStateException("Expecting parameter space to be 7, got " + i); + } else { + List> list = entries.stream() +- .map(entry -> new Climate.RTree.Leaf(entry.getFirst(), entry.getSecond())) ++ .map(entry -> new Climate.RTree.Leaf<>(entry.getFirst(), entry.getSecond())) + .collect(Collectors.toCollection(ArrayList::new)); + return new Climate.RTree<>(build(i, list)); + } diff --git a/versions/1.20.1/patches/net/minecraft/world/level/block/BaseEntityBlock.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/block/BaseEntityBlock.java.patch new file mode 100644 index 0000000..769f7b1 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/block/BaseEntityBlock.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/level/block/BaseEntityBlock.java ++++ b/net/minecraft/world/level/block/BaseEntityBlock.java +@@ -38,6 +38,6 @@ + protected static BlockEntityTicker createTickerHelper( + BlockEntityType givenType, BlockEntityType expectedType, BlockEntityTicker ticker + ) { +- return expectedType == givenType ? ticker : null; ++ return expectedType == givenType ? (BlockEntityTicker) ticker : null; + } + } diff --git a/versions/1.20.1/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch new file mode 100644 index 0000000..755e0ad --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/chunk/LevelChunk.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/chunk/LevelChunk.java ++++ b/net/minecraft/world/level/chunk/LevelChunk.java +@@ -617,7 +617,7 @@ + + private void updateBlockEntityTicker(T blockEntity) { + BlockState blockstate = blockEntity.getBlockState(); +- BlockEntityTicker blockentityticker = blockstate.getTicker(this.level, blockEntity.getType()); ++ BlockEntityTicker blockentityticker = (BlockEntityTicker) blockstate.getTicker(this.level, blockEntity.getType()); + if (blockentityticker == null) { + this.removeBlockEntityTicker(blockEntity.getBlockPos()); + } else { diff --git a/versions/1.20.1/patches/net/minecraft/world/level/chunk/PalettedContainer.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/chunk/PalettedContainer.java.patch new file mode 100644 index 0000000..f5f35db --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/chunk/PalettedContainer.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/chunk/PalettedContainer.java ++++ b/net/minecraft/world/level/chunk/PalettedContainer.java +@@ -56,7 +56,7 @@ + private static > Codec codec( + IdMap idList, Codec entryCodec, PalettedContainer.Strategy provider, T defaultValue, PalettedContainerRO.Unpacker reader + ) { +- return RecordCodecBuilder.create( ++ return RecordCodecBuilder.>create( + instance -> instance.group( + entryCodec.mapResult(ExtraCodecs.orElsePartial(defaultValue)) + .listOf() diff --git a/versions/1.20.1/patches/net/minecraft/world/level/gameevent/PositionSourceType.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/gameevent/PositionSourceType.java.patch new file mode 100644 index 0000000..b3f337e --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/gameevent/PositionSourceType.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/level/gameevent/PositionSourceType.java ++++ b/net/minecraft/world/level/gameevent/PositionSourceType.java +@@ -30,6 +30,6 @@ + + static void toNetwork(T positionSource, FriendlyByteBuf buf) { + buf.writeResourceLocation(BuiltInRegistries.POSITION_SOURCE_TYPE.getKey(positionSource.getType())); +- positionSource.getType().write(buf, positionSource); ++ ((PositionSourceType) positionSource.getType()).write(buf, positionSource); + } + } diff --git a/versions/1.20.1/patches/net/minecraft/world/level/levelgen/SurfaceRules.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/levelgen/SurfaceRules.java.patch new file mode 100644 index 0000000..b140c84 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/levelgen/SurfaceRules.java.patch @@ -0,0 +1,105 @@ +--- a/net/minecraft/world/level/levelgen/SurfaceRules.java ++++ b/net/minecraft/world/level/levelgen/SurfaceRules.java +@@ -177,10 +177,10 @@ + } + + @Override +- public SurfaceRules.Condition apply(SurfaceRules.Context context) { ++ public SurfaceRules.Condition apply(SurfaceRules.Context contextx) { + class BiomeCondition extends SurfaceRules.LazyYCondition { + BiomeCondition() { +- super(context); ++ super(contextx); + } + + @Override +@@ -518,12 +518,12 @@ + } + + @Override +- public SurfaceRules.Condition apply(SurfaceRules.Context context) { +- final NormalNoise normalnoise = context.randomState.getOrCreateNoise(this.noise); ++ public SurfaceRules.Condition apply(SurfaceRules.Context contextx) { ++ final NormalNoise normalnoise = contextx.randomState.getOrCreateNoise(this.noise); + + class NoiseThresholdCondition extends SurfaceRules.LazyXZCondition { + NoiseThresholdCondition() { +- super(context); ++ super(contextx); + } + + @Override +@@ -659,12 +659,12 @@ + } + + @Override +- public SurfaceRules.Condition apply(SurfaceRules.Context context) { ++ public SurfaceRules.Condition apply(SurfaceRules.Context contextx) { + final boolean flag = this.surfaceType == CaveSurface.CEILING; + + class StoneDepthCondition extends SurfaceRules.LazyYCondition { + StoneDepthCondition() { +- super(context); ++ super(contextx); + } + + @Override +@@ -752,25 +752,25 @@ + } + + @Override +- public SurfaceRules.Condition apply(SurfaceRules.Context context) { +- final int i = this.trueAtAndBelow().resolveY(context.context); +- final int j = this.falseAtAndAbove().resolveY(context.context); +- final PositionalRandomFactory positionalrandomfactory = context.randomState.getOrCreateRandomFactory(this.randomName()); ++ public SurfaceRules.Condition apply(SurfaceRules.Context contextx) { ++ final int iX = this.trueAtAndBelow().resolveY(contextx.context); ++ final int j = this.falseAtAndAbove().resolveY(contextx.context); ++ final PositionalRandomFactory positionalrandomfactory = contextx.randomState.getOrCreateRandomFactory(this.randomName()); + + class VerticalGradientCondition extends SurfaceRules.LazyYCondition { + VerticalGradientCondition() { +- super(context); ++ super(contextx); + } + + @Override + protected boolean compute() { + int i = this.context.blockY; +- if (i <= i) { ++ if (i <= iX) { + return true; + } else if (i >= j) { + return false; + } else { +- double d0 = Mth.map((double)i, (double)i, (double)j, 1.0, 0.0); ++ double d0 = Mth.map((double)i, (double)iX, (double)j, 1.0, 0.0); + RandomSource randomsource = positionalrandomfactory.at(this.context.blockX, i, this.context.blockZ); + return (double)randomsource.nextFloat() < d0; + } +@@ -799,10 +799,10 @@ + } + + @Override +- public SurfaceRules.Condition apply(SurfaceRules.Context context) { ++ public SurfaceRules.Condition apply(SurfaceRules.Context contextx) { + class WaterCondition extends SurfaceRules.LazyYCondition { + WaterCondition() { +- super(context); ++ super(contextx); + } + + @Override +@@ -837,10 +837,10 @@ + } + + @Override +- public SurfaceRules.Condition apply(SurfaceRules.Context context) { ++ public SurfaceRules.Condition apply(SurfaceRules.Context contextx) { + class YCondition extends SurfaceRules.LazyYCondition { + YCondition() { +- super(context); ++ super(contextx); + } + + @Override diff --git a/versions/1.20.1/patches/net/minecraft/world/level/levelgen/heightproviders/ConstantHeight.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/levelgen/heightproviders/ConstantHeight.java.patch new file mode 100644 index 0000000..633d618 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/levelgen/heightproviders/ConstantHeight.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/level/levelgen/heightproviders/ConstantHeight.java ++++ b/net/minecraft/world/level/levelgen/heightproviders/ConstantHeight.java +@@ -9,7 +9,7 @@ + + public class ConstantHeight extends HeightProvider { + public static final ConstantHeight ZERO = new ConstantHeight(VerticalAnchor.absolute(0)); +- public static final Codec CODEC = Codec.either( ++ public static final Codec CODEC = Codec.either( + VerticalAnchor.CODEC, + RecordCodecBuilder.create( + instance -> instance.group(VerticalAnchor.CODEC.fieldOf("value").forGetter(provider -> provider.value)).apply(instance, ConstantHeight::new) diff --git a/versions/1.20.1/patches/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java.patch new file mode 100644 index 0000000..dd49081 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java ++++ b/net/minecraft/world/level/storage/loot/GsonAdapterFactory.java +@@ -116,13 +116,13 @@ + public JsonElement serialize(E object, Type type, JsonSerializationContext context) { + T t = this.typeGetter.apply(object); + if (this.inlineType != null && this.inlineType.getFirst() == t) { +- return this.inlineType.getSecond().serialize(object, context); ++ return ((InlineSerializer) this.inlineType.getSecond()).serialize(object, context); + } else if (t == null) { + throw new JsonSyntaxException("Unknown type: " + object); + } else { + JsonObject jsonobject = new JsonObject(); + jsonobject.addProperty(this.typeKey, this.registry.getKey(t).toString()); +- t.getSerializer().serialize(jsonobject, object, context); ++ ((Serializer) t.getSerializer()).serialize(jsonobject, object, context); + return jsonobject; + } + } diff --git a/versions/1.20.1/patches/net/minecraft/world/level/storage/loot/LootDataType.java.patch b/versions/1.20.1/patches/net/minecraft/world/level/storage/loot/LootDataType.java.patch new file mode 100644 index 0000000..4179ed2 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/level/storage/loot/LootDataType.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/world/level/storage/loot/LootDataType.java ++++ b/net/minecraft/world/level/storage/loot/LootDataType.java +@@ -80,12 +80,12 @@ + private static BiFunction>> createSingleOrMultipleDeserialiser( + Class clazz, Function combiner + ) { +- Class oclass = clazz.arrayType(); ++ Class oclass = (Class) clazz.arrayType(); + return (gson, dataTypeId) -> (id, json) -> { + try { + if (json.isJsonArray()) { + T[] at = (T[])((Object[])gson.fromJson(json, oclass)); +- return Optional.of(combiner.apply((T)at)); ++ return Optional.of(combiner.apply(at)); + } else { + return Optional.of(gson.fromJson(json, clazz)); + } diff --git a/versions/1.20.1/patches/net/minecraft/world/ticks/BlackholeTickAccess.java.patch b/versions/1.20.1/patches/net/minecraft/world/ticks/BlackholeTickAccess.java.patch new file mode 100644 index 0000000..142e0c8 --- /dev/null +++ b/versions/1.20.1/patches/net/minecraft/world/ticks/BlackholeTickAccess.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/world/ticks/BlackholeTickAccess.java ++++ b/net/minecraft/world/ticks/BlackholeTickAccess.java +@@ -40,10 +40,10 @@ + }; + + public static TickContainerAccess emptyContainer() { +- return CONTAINER_BLACKHOLE; ++ return (TickContainerAccess) CONTAINER_BLACKHOLE; + } + + public static LevelTickAccess emptyLevelList() { +- return LEVEL_BLACKHOLE; ++ return (LevelTickAccess) LEVEL_BLACKHOLE; + } + }