From 66887e3367a65c3e59f669a4033b04e027997862 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 30 Jun 2025 05:17:33 +0800 Subject: [PATCH] Update Leaf 1.21.6 (#385) * Init 1.21.6 * Finish API patches * Apply purpur patches & all paper server patches * Apply some * Apply all * Updated Upstream (Paper/Purpur) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@6aafe29e 1.21.6 dev PaperMC/Paper@ae7c74ec tweak mob goal keys, generate missing api PaperMC/Paper@9ea1460b Revert "fix sponge-absorb deleting chest content (#12647)" Purpur Changes: PurpurMC/Purpur@eb0ba67d Updated Upstream (Paper) PurpurMC/Purpur@7c6502dc Updated Upstream (Paper) PurpurMC/Purpur@aa289e2c Updated Upstream (Paper) PurpurMC/Purpur@b1d412fb Updated Upstream (Paper) PurpurMC/Purpur@293e28a0 use empty registryaccess where context is not needed, closes #1676 PurpurMC/Purpur@452bb319 port PaperMC/Paper#12654, closes #1665 PurpurMC/Purpur@849bc79c register test subcommands used for debugging, closes #1675 * Fix build & diff * Update vanilla attribute size * [ci/skip] Forget to remove this * Updated Upstream (Paper/Purpur) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@a24f9b20 1.21.6 dev PaperMC/Paper@457a0a69 Bump version string and protocol version to 1.21.6 release PaperMC/Paper@245b5473 Update base to 1.21.6 PaperMC/Paper@b28d77b3 Update Moonrise to 1.21.6 PaperMC/Paper@8318dcb7 Update DataConverter to 1.21.6-rc1 Purpur Changes: PurpurMC/Purpur@b228e316 Updated Upstream (Paper) PurpurMC/Purpur@d6562a57 make happy ghast takes-damage-from-water and always-drop-exp options work PurpurMC/Purpur@08d989b6 inline import PurpurMC/Purpur@61d7f559 Updated Upstream (Paper) PurpurMC/Purpur@469a4de5 Merge branch 'ver/1.21.5' into ver/1.21.6 * Updated Upstream (Paper) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@d2b1158e Set correct world access on BSL snapshots * Updated Upstream (Paper) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@023e6c29 Ensure waypoints are per world PaperMC/Paper@40d5d31c Fix recursively converting JSON Text Components * Update spigot mapping to remap reobf mapping to mojamp for plugins * Updated Upstream (Paper/Purpur) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@1fcc4162 Implement FeatureHooks#isChunkSent for Moonrise chunk system PaperMC/Paper@e4d7178a Implement WaypointTransmitter#isChunkVisible PaperMC/Paper@8980ead7 Directly walk text component after converting from JSON PaperMC/Paper@5613ed6d Provide env environment variable and copy spigots sys prop for overriding default repository PaperMC/Paper@62b7f86d Avoid and discourage use of Maven Central as a CDN (#12689) PaperMC/Paper@f5534cb7 [ci/skip] Run generators (#12691) PaperMC/Paper@4781d28b Re-add Log4j Javadocs (#12693) PaperMC/Paper@74fbcce5 Check type of Material in get/set stats (#12607) PaperMC/Paper@4b3f967e Improve Fix MC-44654 (#12703) PaperMC/Paper@a7dd2635 Enable spigot obfuscation support (#12695) PaperMC/Paper@6a51c44e Cleanup Primed TNT Fix (#12704) PaperMC/Paper@839c6a18 Fix #11169 (#12706) PaperMC/Paper@c77d5f99 Fix MC-297591 PaperMC/Paper@219f86ee Implement chunk unload delay config option PaperMC/Paper@e4eb69b8 Do not allow ticket level decreases to be processed asynchronously PaperMC/Paper@71b0c768 Adds support for vanilla negative explosions (#12705) PaperMC/Paper@3750927a [ci/skip] Fix PermissionManager#clearPermissions() docs bad wording (#12657) PaperMC/Paper@d61a51e8 Add ItemType#getBurnDuration() (#12604) PaperMC/Paper@29fc8532 Allow empty paths in namespaced keys (#12687) PaperMC/Paper@4419afb9 fix: Safely handle nanosecond overflow in ClickCallback (#12686) PaperMC/Paper@56528821 Add `isProxyEnabled` method to ServerConfiguration (#12664) PaperMC/Paper@c0dda0ea Add `isForceDefaultGameMode` method (#12673) PaperMC/Paper@e714de63 Fix excess slot updates PaperMC/Paper@6d0821d2 [ci/skip] Fix docs for Spawner class and cleanup (#12710) PaperMC/Paper@cceffe3d Release ItemType and BlockType (#12708) PaperMC/Paper@186e9e33 Relocate CommandMap#registerServerAliases() call to after lifecycle events have been run (#12601) PaperMC/Paper@5edcf6dd Cleanup/command dispatching (#12713) Purpur Changes: PurpurMC/Purpur@baa196f5 Updated Upstream (Paper) PurpurMC/Purpur@fdd1e980 Updated Upstream (Paper) PurpurMC/Purpur@439f15db Updated Upstream (Paper) PurpurMC/Purpur@46a28b93 [ci/skip] update version in README PurpurMC/Purpur@162bd288 Updated Upstream (Paper) PurpurMC/Purpur@afcdf9bb Updated Upstream (Paper) * fix random tick order Signed-off-by: hayanesuru * update optimize random tick * fix mob spawning over limit * optimize mob spawning * fix FastBitRadixSort memory leak * optimize brain collections * [ci/skip] update comments * Revert "fix FastBitRadixSort memory leak" This reverts commit bdea68352587e1c53c911ee833d124f5a5c632f1. * optimize brain collections * fix async mob spawning data race * [ci/skip] cleanup * remove hash lookup in optimize random tick * Updated Upstream (Paper/Purpur) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@803baf0b Support hidden entities in Waypoints (#12715) PaperMC/Paper@1814d8b4 build: publish to fill (#12717) PaperMC/Paper@e454fef4 Add support for private constructors in plugin main classes (#12652) PaperMC/Paper@d0e808f4 Move player to correct position in vehicle move packet handler PaperMC/Paper@46b4b0b8 Improve keepalive ping system PaperMC/Paper@38c1ddb5 Add and use FeatureHooks.getAllEntities PaperMC/Paper@2f083acb Ensure player entity schedulers are ticked when they are dead PaperMC/Paper@7c90c7c4 Optimise EntityScheduler ticking PaperMC/Paper@aa6ee44a Re-add global region scheduler tick erroneously removed in last commit PaperMC/Paper@d7510efc Fix #12722 (#12726) PaperMC/Paper@0caf75f8 Fix #12721 (#12725) PaperMC/Paper@bee28792 Adventure 4.23.0 (#12690) PaperMC/Paper@692e93a9 Fix MC-299110 PaperMC/Paper@ea10fa4a Don't mutate the position of Items for MC-4 Fix (#12702) PaperMC/Paper@aa6cd74c Remove unnecesary item check for ServerboundPlayerActionPacket RELEASE_USE_ITEM (#12668) PaperMC/Paper@c9e89f49 Expose arrow velocity in EntityShootBowEvent for mobs (#12688) PaperMC/Paper@7ec3174a Jump out of experimental phase PaperMC/Paper@4e1a2555 Update try catch for command handling PaperMC/Paper@e382e687 Fix 0 yield on explosion events PaperMC/Paper@35b2c6ec Use dropped item for stats info (#12747) PaperMC/Paper@bd79e20c [ci/skip] PluginManager#getPlugin and PluginManager#isPluginEnabled are case-insensitive (#12723) Purpur Changes: PurpurMC/Purpur@4a5974cf Updated Upstream (Paper) PurpurMC/Purpur@3893bba0 this is important... PurpurMC/Purpur@47e758fb Updated Upstream (Paper) * Update PWT patch * cleanup * fix playermobcaps command * fix Didn't fill chunk buffer in async chunk sending * cleanup * fix HurtByTargetGoal npe * optimize collectSpawningChunks (#382) * optimize collectSpawningChunks * add bit set * cleanup * cleanup * cleanup * cleanup * Updated Upstream (Paper/Purpur) Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@57c202e0 Allow adventure nbt codec to parse all tags Purpur Changes: PurpurMC/Purpur@a4776d7b Updated Upstream (Paper) PurpurMC/Purpur@dfd8a7ad Fix phantom going at high speed when ridden (#1680) * Fix diff --------- Signed-off-by: hayanesuru Co-authored-by: hayanesuru --- .../{build-1215.yml => build-1216.yml} | 26 +- .github/workflows/build-pr.yml | 8 +- .github/workflows/publish-api.yml | 2 +- README.md | 6 +- build.gradle.kts | 1 - gradle.properties | 6 +- leaf-api/build.gradle.kts.patch | 8 +- .../features/0002-Gale-configuration.patch | 4 +- ...-support.patch => 0003-SIMD-support.patch} | 0 ...004-Vectorized-map-color-conversion.patch} | 4 +- ...005-Do-not-log-plugin-library-loads.patch} | 8 +- ...> 0006-Player-canSee-by-entity-UUID.patch} | 0 ...h => 0007-Specific-interval-TPS-API.patch} | 8 +- ....patch => 0008-5-second-TPS-average.patch} | 8 +- ...PI.patch => 0009-Last-tick-time-API.patch} | 8 +- ...try.patch => 0010-Pufferfish-Sentry.patch} | 2 +- ...es.patch => 0011-Purpur-API-Changes.patch} | 69 +- ...imings.patch => 0012-Remove-Timings.patch} | 2 +- ...patch => 0013-KeYi-Player-Skull-API.patch} | 0 ...atch => 0014-Slice-Smooth-Teleports.patch} | 0 ...-Use-warning-instead-of-direct-throw.patch | 36 + ...nfigurable-LibraryLoader-maven-repos.patch | 38 +- .../features/0017-Leaves-Replay-Mod-API.patch | 8 +- .../0018-Async-structure-locate-api.patch | 4 +- ...discourage-use-of-Maven-Central-as-a.patch | 2 + ...p-EntityScheduler-s-executeTick-chec.patch | 3 + .../0275-Paper-Fix-excess-slot-updates.patch | 2 + .../0279-Paper-Improve-Fix-MC-44654.patch | 2 + .../0280-Paper-Cleanup-Primed-TNT-Fix.patch | 2 + ...illager-ominus-banner-pickup-mechani.patch | 2 + .../0015-Optimize-entity-coordinate-key.patch | 2 + ...p-EntityScheduler-s-executeTick-chec.patch | 3 + ...-Optimise-CraftWorld-getLoadedChunks.patch | 2 + ...ftWorld-getForceLoadedChunks-to-avoi.patch | 2 + ...ck-type-of-Material-in-get-set-stats.patch | 2 + ...check-inside-blocks-and-traverse-blo.patch | 2 +- ...0-Cache-potential-behaviors-in-Brain.patch | 2 + ...e-ActivationList-on-runningBehaviors.patch | 2 + leaf-server/build.gradle.kts.patch | 36 +- .../features/0002-Gale-configuration.patch | 14 +- .../features/0003-Leaf-config.patch | 8 +- .../0005-Remove-vanilla-profiler.patch | 361 +- ...0009-Reduce-projectile-chunk-loading.patch | 10 +- .../features/0010-Predict-Halloween.patch | 4 +- .../0011-Move-random-tick-random.patch | 6 +- ...timize-random-calls-in-chunk-ticking.patch | 16 +- ...duce-enderman-teleport-chunk-lookups.patch | 4 +- .../0016-Cache-on-climbable-check.patch | 8 +- ...er-checking-for-useless-move-packets.patch | 4 +- ...0019-Block-goal-does-not-load-chunks.patch | 4 +- ...020-Remove-lambda-from-ticking-guard.patch | 6 +- .../0022-Make-book-writing-configurable.patch | 4 +- .../features/0023-Reduce-in-wall-checks.patch | 6 +- ...6-Make-saving-fireworks-configurable.patch | 4 +- .../0027-Reduce-hopper-item-checks.patch | 14 +- ...029-Variable-entity-wake-up-duration.patch | 4 +- ...hat-commands-before-player-has-joine.patch | 22 +- .../0031-Do-not-log-invalid-statistics.patch | 39 +- ...32-Do-not-log-empty-message-warnings.patch | 4 +- ...0033-Do-not-log-ignored-advancements.patch | 4 +- ...0035-Do-not-log-unrecognized-recipes.patch | 4 +- .../0037-Do-not-log-Not-Secure-marker.patch | 4 +- ...ent-resetting-despawn-counter-config.patch | 4 +- ...logging-login-locations-configurable.patch | 31 +- .../0046-Reduce-array-allocations.patch | 129 +- .../0047-Optimize-sun-burn-tick.patch | 8 +- ...-rules-map-with-optimized-collection.patch | 4 +- ...ttributes-with-optimized-collections.patch | 4 +- ...ck-frozen-ticks-before-landing-block.patch | 6 +- .../0060-Faster-chunk-serialization.patch | 8 +- ...Skip-entity-move-if-movement-is-zero.patch | 8 +- ...mes-on-entities-with-fire-resistance.patch | 4 +- ...block-destruction-packet-allocations.patch | 8 +- ...1-Spread-out-sending-all-player-info.patch | 36 +- ...-player-list-for-sending-player-info.patch | 4 +- ...ndSendEvent-if-there-are-no-listener.patch | 12 +- ...074-Send-multiple-keep-alive-packets.patch | 81 +- ...chunks-to-activate-climbing-entities.patch | 10 +- ...nimations-as-the-entity-being-critte.patch | 14 +- ...yer-in-world-if-kicked-before-being-.patch | 24 +- .../features/0083-5-second-TPS-average.patch | 6 +- .../0084-Measure-last-tick-time.patch | 8 +- ...ncrease-time-statistics-in-intervals.patch | 6 +- ...heck-has-physics-before-same-vehicle.patch | 4 +- ...gible-planar-movement-multiplication.patch | 4 +- .../0088-Optimize-matching-item-checks.patch | 4 +- .../0091-Reduce-RandomSource-instances.patch | 18 +- ...mStack-lookups-for-reduced-visibilit.patch | 4 +- ...095-Pufferfish-Optimize-mob-spawning.patch | 24 +- ...fferfish-Dynamic-Activation-of-Brain.patch | 70 +- ...tle-goal-selector-during-inactive-ti.patch | 4 +- ...0098-Purpur-Server-Minecraft-Changes.patch | 2157 +- ...99-Fix-Pufferfish-and-Purpur-patches.patch | 62 +- ...-Purpur-Configurable-server-mod-name.patch | 4 +- ...Remove-UseItemOnPacket-Too-Far-check.patch | 4 +- ...ove-change-non-editable-sign-warning.patch | 4 +- ...on-for-spigot-item-merging-mechanism.patch | 4 +- .../0110-Slice-Smooth-Teleports.patch | 12 +- .../features/0112-Leaves-Protocol-Core.patch | 38 +- .../features/0113-Leaves-Jade-Protocol.patch | 44 +- .../0114-Leaves-Xaero-Map-Protocol.patch | 4 +- .../0115-Leaves-Syncmatica-Protocol.patch | 4 +- .../features/0116-Leaves-Replay-Mod-API.patch | 105 +- .../0117-Petal-Async-Pathfinding.patch | 40 +- ...educe-work-done-by-game-event-system.patch | 12 +- .../features/0119-Reduce-canSee-work.patch | 4 +- .../features/0120-Fix-sprint-glitch.patch | 4 +- ...able-movement-speed-of-more-entities.patch | 42 +- ...g-of-futures-for-chunk-structure-gen.patch | 6 +- ...ve-items-finding-hopper-nearby-check.patch | 4 +- ...me-missing-Pufferfish-configurations.patch | 48 +- ...missing-purpur-configuration-options.patch | 72 +- ...p-distanceToSqr-call-in-ServerEntity.patch | 6 +- ...SparklyPaper-Optimize-canSee-checks.patch} | 2 +- ...w-throttling-hopper-checks-if-the-t.patch} | 2 +- ...g-and-snowball-can-knockback-player.patch} | 0 ...getProfiler-to-inactive-in-PathNavi.patch} | 0 ...eating-stats-json-bases-on-player-n.patch} | 6 +- ...h => 0133-Improve-Purpur-AFK-system.patch} | 32 +- ...34-Virtual-thread-for-chat-executor.patch} | 4 +- ...rtual-thread-for-user-authenticator.patch} | 0 ...onfigurable-chat-message-signatures.patch} | 24 +- ... => 0137-Cache-player-profileResult.patch} | 0 ...ed.patch => 0138-Matter-Secure-Seed.patch} | 22 +- ... => 0139-Matter-Secure-Seed-command.patch} | 14 +- ...tch => 0140-Faster-random-generator.patch} | 14 +- ...> 0141-Don-t-save-primed-tnt-entity.patch} | 4 +- ...142-Don-t-save-falling-block-entity.patch} | 4 +- ...143-Configurable-connection-message.patch} | 34 +- ...onfigurable-unknown-command-message.patch} | 20 +- ...-in-BlockBehaviour-cache-blockstate.patch} | 0 ...am-in-entity-visible-effects-filter.patch} | 4 +- ...-double-iteration-in-enough-deep-sl.patch} | 0 ...ove-stream-in-trial-spawner-ticking.patch} | 10 +- ...atch => 0149-Remove-stream-in-Brain.patch} | 0 ...0150-Remove-stream-in-BehaviorUtils.patch} | 0 ... 0151-Remove-stream-in-YieldJobSite.patch} | 0 ... 0152-Remove-stream-in-PlayerSensor.patch} | 0 ...> 0153-Remove-stream-in-GolemSensor.patch} | 0 ... 0154-Remove-stream-in-GateBehavior.patch} | 0 ... 0155-Remove-stream-in-matchingSlot.patch} | 0 ...entity-mountedOrDismounted-changes-.patch} | 2 +- ...tive-effects-map-with-optimized-col.patch} | 8 +- ...erion-map-with-optimized-collection.patch} | 2 +- ...lace-brain-with-optimized-collection.patch | 246 + ...=> 0160-Reduce-worldgen-allocations.patch} | 0 ...brain-maps-with-optimized-collection.patch | 36 - ...e-for-kickPermission-instead-of-usi.patch} | 6 +- ...t-place-player-if-the-server-is-full.patch | 34 + ...t-place-player-if-the-server-is-full.patch | 34 - ...MC-65198.patch => 0163-Fix-MC-65198.patch} | 0 ...-200418.patch => 0164-Fix-MC-200418.patch} | 8 +- ...-119417.patch => 0165-Fix-MC-119417.patch} | 4 +- ...-223153.patch => 0166-Fix-MC-223153.patch} | 4 +- ...onfigurable-player-knockback-zombie.patch} | 6 +- ...during-inactive-ticks-for-non-aware.patch} | 8 +- ...zombie-reinforcements-loading-chunk.patch} | 4 +- ...aperPR-Fix-some-beacon-event-issues.patch} | 26 +- ...71-Dont-send-useless-entity-packets.patch} | 6 +- ...patch => 0172-Multithreaded-Tracker.patch} | 91 +- ...0173-Nitori-Async-playerdata-saving.patch} | 51 +- ...e-nearby-alive-players-for-spawning.patch} | 12 +- ...> 0175-Cache-blockstate-cache-array.patch} | 0 ....patch => 0176-Asynchronous-locator.patch} | 47 +- ...tities-in-NearestLivingEntitySensor.patch} | 0 ...uce-memory-footprint-of-CompoundTag.patch} | 0 ... 0179-Optimize-Entity-distanceToSqr.patch} | 6 +- ...e-snapshots-for-TileEntity-getOwner.patch} | 4 +- ... => 0181-Cache-tile-entity-position.patch} | 10 +- ...patch => 0182-TT20-Lag-compensation.patch} | 4 +- ...tch => 0183-C2ME-Reduce-Allocations.patch} | 0 ...cessary-calculations-if-player-is-n.patch} | 8 +- ...til.patch => 0185-Lithium-fast-util.patch} | 2 +- ...186-Lithium-cached-iterate-outwards.patch} | 0 ...read-safe-ban-list-date-format-pars.patch} | 0 ...> 0188-C2ME-Optimize-world-gen-math.patch} | 0 ...k-key.patch => 0189-Cache-chunk-key.patch} | 27 +- ...0190-Cache-random-tick-block-status.patch} | 0 ...1-Cache-part-of-canHoldFluid-result.patch} | 0 ... => 0192-Configurable-tripwire-dupe.patch} | 0 ...7075-Block-Entities-Unload-Lag-Spik.patch} | 6 +- ...Rearrange-the-attackable-conditions.patch} | 0 ...-dirty-stats-copy-when-requesting-p.patch} | 6 +- ...t-dirty-flag-when-loading-maps-from.patch} | 2 +- ...hecking-nearby-players-for-spawning.patch} | 2 +- ...> 0198-Cache-supporting-block-check.patch} | 6 +- ...ue-clear-on-LevelTicks-cleanupAfter.patch} | 0 ... => 0200-Remove-stream-in-villagers.patch} | 4 +- ... 0201-Optimize-baby-villager-sensor.patch} | 0 ...tivity-maps-with-optimized-collectio.patch | 21 - ....patch => 0202-Only-player-pushable.patch} | 12 +- ...203-Remove-iterators-from-Inventory.patch} | 10 +- ...eligible-players-for-despawn-checks.patch} | 14 +- ...-Slightly-optimise-getNearestPlayer.patch} | 2 +- ...writeLongArray-during-chunk-loading.patch} | 4 +- ...7-Improve-sorting-in-SortedArraySet.patch} | 0 ... 0208-Make-removeIf-slightly-faster.patch} | 0 ...atch => 0209-Optimize-LinearPalette.patch} | 0 ...210-Slightly-optimized-VarInt-write.patch} | 0 ...te-ClientboundLightUpdatePacketData.patch} | 0 ...g.patch => 0212-Async-chunk-sending.patch} | 27 +- .../0213-Spawner-Configurations.patch | 171 + ...SparklyPaper-Parallel-world-ticking.patch} | 294 +- ...-SparklyPaper-Track-each-world-MSPT.patch} | 8 +- .../0215-Spawner-Configurations.patch | 169 - ...lled-Projectile-Events-still-consum.patch} | 2 +- ...ndInteract-and-NearestVisibleLiving.patch} | 0 ...emove-streams-on-InsideBrownianWalk.patch} | 0 ...=> 0219-Use-BFS-on-getSlopeDistance.patch} | 4 +- ...r-PR-Throttle-failed-spawn-attempts.patch} | 22 +- ...BlockEntity-ticking-isRemoved-check.patch} | 6 +- ...2-Raytrace-AntiXray-SDK-integration.patch} | 6 +- ...timize-addOrUpdateTransientModifier.patch} | 4 +- ... => 0224-Optimize-ContextMap.create.patch} | 0 ...Micro-optimizations-for-random-tick.patch} | 6 +- ...n-updateConnectedPlayersWithinRange.patch} | 0 ...27-Remove-streams-on-PlayerDetector.patch} | 0 ...se-direct-iteration-on-Sensing.tick.patch} | 0 ...9-Optimise-non-flush-packet-sending.patch} | 14 +- ...unk-retrieving-in-entity-fluid-push.patch} | 6 +- ...-Null-handling-on-MultifaceSpreader.patch} | 0 ....patch => 0232-More-virtual-threads.patch} | 2 +- ....patch => 0233-Async-target-finding.patch} | 117 +- ...imize-ThreadedTicketLevelPropagator.patch} | 0 ...EffectUtil-getDigSpeedAmplification.patch} | 0 ...patch => 0236-Optimise-chunkUnloads.patch} | 14 +- ...37-Optimize-BlockEntityType-isValid.patch} | 0 ...t-on-player-join-to-avoid-chunk-loa.patch} | 20 +- ...yList-implementation-to-BasicEntity.patch} | 10 +- ...ol-Core.patch => 0240-Protocol-Core.patch} | 18 +- ... => 0241-Reduce-PlayerChunk-Updates.patch} | 10 +- ... 0242-Async-switch-connection-state.patch} | 4 +- ...timize-BlockEntities-tickersInLevel.patch} | 4 +- ...e-cactus-can-even-survive-being-pla.patch} | 2 +- ...0245-Flush-location-while-knockback.patch} | 6 +- ...tch => 0246-Only-tick-items-at-hand.patch} | 8 +- ...art-sort-items-in-NearestItemSensor.patch} | 0 ...248-Optimise-player-movement-checks.patch} | 4 +- ...=> 0249-Remove-streams-in-MobSensor.patch} | 0 ...50-Remove-streams-in-TemptingSensor.patch} | 0 ...0251-Use-HashedList-on-WeightedList.patch} | 0 ...-death-item-drop-knockback-settings.patch} | 8 +- ...-Optimize-getScaledTrackingDistance.patch} | 4 +- ...ptimize-SynchedEntityData-packDirty.patch} | 0 ...patch => 0255-Optimize-isEyeInFluid.patch} | 46 +- ...patch => 0256-Cache-block-path-type.patch} | 6 +- ...ch => 0257-optimize-getEntityStatus.patch} | 0 ...on-optimized-PoweredRailBlock-logic.patch} | 2 +- ...9-optimise-ChunkGenerator-getMobsAt.patch} | 0 ...tBiome.patch => 0260-cache-getBiome.patch} | 0 ...patch => 0261-optimize-mob-spawning.patch} | 22 +- ...atch => 0262-optimize-structure-map.patch} | 8 +- ...patch => 0263-throttle-mob-spawning.patch} | 0 ... => 0264-Add-BlockExplosionHitEvent.patch} | 4 +- ...last-Protection-explosion-knockback.patch} | 6 +- ...> 0266-Use-UUID-for-cure-reputation.patch} | 18 +- ...ing-parsing-unknown-command-message.patch} | 8 +- ....patch => 0268-optimize-random-tick.patch} | 14 +- ...nvalid-flatten-text-component-parse.patch} | 0 ...-Fast-BiomeManager-seed-obfuscation.patch} | 2 +- ...tion.patch => 0271-Paw-optimization.patch} | 26 +- ...4-Paper-Rewrite-dataconverter-system.patch | 32603 ---------------- .../paper-patches/features/0001-Rebrand.patch | 10 +- .../features/0004-Gale-configuration.patch | 6 +- .../features/0006-Leaf-Bootstrap.patch | 4 +- .../0009-Purpur-Server-Paper-Changes.patch | 106 +- ...e-for-plugins-not-shutting-down-task.patch | 4 +- ...-log-legacy-Material-initialization.patch} | 0 ...> 0016-Do-not-log-Not-Secure-marker.patch} | 0 ...ch => 0017-Reduce-array-allocations.patch} | 2 +- ... 0018-CraftBukkit-UUID-to-world-map.patch} | 8 +- ...h => 0019-Specific-interval-TPS-API.patch} | 4 +- ....patch => 0020-5-second-TPS-average.patch} | 4 +- ...PI.patch => 0021-Last-tick-time-API.patch} | 4 +- ...-Show-last-tick-time-in-tps-command.patch} | 0 ...h => 0023-Pre-compute-VarLong-sizes.patch} | 0 ...mize-VarInt-write-and-VarLong-write.patch} | 0 ...atch => 0025-Virtual-thread-support.patch} | 0 ...imings.patch => 0026-Remove-Timings.patch} | 0 ...patch => 0027-KeYi-Player-Skull-API.patch} | 4 +- ...atch => 0028-Slice-Smooth-Teleports.patch} | 4 +- ....patch => 0029-Leaves-Protocol-Core.patch} | 6 +- ...patch => 0030-Leaves-Replay-Mod-API.patch} | 16 +- ... => 0031-Skip-event-if-no-listeners.patch} | 0 ...SparklyPaper-Optimize-canSee-checks.patch} | 6 +- ...atch => 0033-Including-5s-in-getTPS.patch} | 4 +- ...eption-on-missing-ResourceKey-value.patch} | 0 ...-Virtual-Thread-for-async-scheduler.patch} | 0 ...onfigurable-chat-message-signatures.patch} | 0 ...ed.patch => 0037-Matter-Secure-Seed.patch} | 4 +- ...tch => 0038-Faster-random-generator.patch} | 0 ...onfigurable-unknown-command-message.patch} | 0 ...world-map-with-optimized-collection.patch} | 2 +- ...ntityType-minecraftToBukkit-convert.patch} | 0 ...patch => 0042-Multithreaded-Tracker.patch} | 16 +- ....patch => 0043-Asynchronous-locator.patch} | 0 ...-snapshots-for-acquiring-blockstate.patch} | 2 +- ...CraftServer-getworlds-list-creation.patch} | 4 +- ...k-key.patch => 0046-Cache-chunk-key.patch} | 4 +- ... => 0047-Async-structure-locate-api.patch} | 4 +- ...> 0048-PlayerInventoryOverflowEvent.patch} | 0 ...SparklyPaper-Parallel-world-ticking.patch} | 30 +- ...r-PR-Throttle-failed-spawn-attempts.patch} | 4 +- ...tch => 0051-Async-playerdata-saving.patch} | 12 +- ...g.patch => 0052-Async-chunk-sending.patch} | 0 ...053-Optimise-player-movement-checks.patch} | 0 ...atch => 0054-optimise-ReferenceList.patch} | 0 ...tBiome.patch => 0055-cache-getBiome.patch} | 0 ...hread.patch => 0056-dump-pwt-thread.patch} | 0 ...tion.patch => 0057-Paw-optimization.patch} | 2 +- ...pawn.patch => 0058-optimize-despawn.patch} | 4 +- .../leaf/util/map/ActivityArrayMap.java | 315 + .../dreeam/leaf/util/map/ActivityBitSet.java | 104 + .../util/map/AttributeInstanceArrayMap.java | 8 +- .../util/map/BehaviorControlArraySet.java | 26 + .../GaleGlobalConfiguration.java | 2 +- .../leaves/protocol/AppleSkinProtocol.java | 2 +- .../block/MobSpawnerCooldownProvider.java | 4 +- .../org/leavesmc/leaves/replay/Recorder.java | 6 +- .../leavesmc/leaves/replay/ReplayFile.java | 2 +- .../leaves/replay/ServerPhotographer.java | 4 +- public/readme/README_CN.md | 6 +- scripts/prepareRelease.sh | 6 +- scripts/upstreamCommit.sh | 4 +- 324 files changed, 4007 insertions(+), 35581 deletions(-) rename .github/workflows/{build-1215.yml => build-1216.yml} (90%) rename leaf-api/paper-patches/features/{0004-SIMD-support.patch => 0003-SIMD-support.patch} (100%) rename leaf-api/paper-patches/features/{0005-Vectorized-map-color-conversion.patch => 0004-Vectorized-map-color-conversion.patch} (98%) rename leaf-api/paper-patches/features/{0006-Do-not-log-plugin-library-loads.patch => 0005-Do-not-log-plugin-library-loads.patch} (94%) rename leaf-api/paper-patches/features/{0007-Player-canSee-by-entity-UUID.patch => 0006-Player-canSee-by-entity-UUID.patch} (100%) rename leaf-api/paper-patches/features/{0008-Specific-interval-TPS-API.patch => 0007-Specific-interval-TPS-API.patch} (88%) rename leaf-api/paper-patches/features/{0009-5-second-TPS-average.patch => 0008-5-second-TPS-average.patch} (92%) rename leaf-api/paper-patches/features/{0010-Last-tick-time-API.patch => 0009-Last-tick-time-API.patch} (92%) rename leaf-api/paper-patches/features/{0011-Pufferfish-Sentry.patch => 0010-Pufferfish-Sentry.patch} (99%) rename leaf-api/paper-patches/features/{0012-Purpur-API-Changes.patch => 0011-Purpur-API-Changes.patch} (98%) rename leaf-api/paper-patches/features/{0013-Remove-Timings.patch => 0012-Remove-Timings.patch} (99%) rename leaf-api/paper-patches/features/{0014-KeYi-Player-Skull-API.patch => 0013-KeYi-Player-Skull-API.patch} (100%) rename leaf-api/paper-patches/features/{0015-Slice-Smooth-Teleports.patch => 0014-Slice-Smooth-Teleports.patch} (100%) create mode 100644 leaf-api/paper-patches/features/0015-Use-warning-instead-of-direct-throw.patch rename {leaf-api/paper-patches/features => leaf-archived-patches/removed/1.21.6/api}/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch (99%) rename {leaf-server/minecraft-patches/features => leaf-archived-patches/removed/1.21.6/mcserver}/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch (96%) rename leaf-server/minecraft-patches/features/0272-Paper-Fix-excess-slot-updates.patch => leaf-archived-patches/removed/1.21.6/mcserver/0275-Paper-Fix-excess-slot-updates.patch (97%) rename {leaf-server/minecraft-patches/features => leaf-archived-patches/removed/1.21.6/mcserver}/0279-Paper-Improve-Fix-MC-44654.patch (98%) rename {leaf-server/minecraft-patches/features => leaf-archived-patches/removed/1.21.6/mcserver}/0280-Paper-Cleanup-Primed-TNT-Fix.patch (98%) rename {leaf-server/minecraft-patches/features => leaf-archived-patches/removed/1.21.6/mcserver}/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch (97%) rename {leaf-server/paper-patches/features => leaf-archived-patches/removed/1.21.6/paperserver}/0015-Optimize-entity-coordinate-key.patch (97%) rename {leaf-server/paper-patches/features => leaf-archived-patches/removed/1.21.6/paperserver}/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch (97%) rename {leaf-server/paper-patches/features => leaf-archived-patches/removed/1.21.6/paperserver}/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch (98%) rename {leaf-server/paper-patches/features => leaf-archived-patches/removed/1.21.6/paperserver}/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch (97%) rename {leaf-server/paper-patches/features => leaf-archived-patches/removed/1.21.6/paperserver}/0060-Paper-Check-type-of-Material-in-get-set-stats.patch (99%) rename leaf-server/minecraft-patches/features/0241-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch => leaf-archived-patches/work/server/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch (98%) rename {leaf-server/minecraft-patches/features => leaf-archived-patches/work/server}/0270-Cache-potential-behaviors-in-Brain.patch (97%) rename {leaf-server/minecraft-patches/features => leaf-archived-patches/work/server}/0271-Use-ActivationList-on-runningBehaviors.patch (98%) rename leaf-server/minecraft-patches/features/{0129-SparklyPaper-Optimize-canSee-checks.patch => 0128-SparklyPaper-Optimize-canSee-checks.patch} (95%) rename leaf-server/minecraft-patches/features/{0130-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch => 0129-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch} (93%) rename leaf-server/minecraft-patches/features/{0131-Polpot-Make-egg-and-snowball-can-knockback-player.patch => 0130-Polpot-Make-egg-and-snowball-can-knockback-player.patch} (100%) rename leaf-server/minecraft-patches/features/{0132-Redirect-vanilla-getProfiler-to-inactive-in-PathNavi.patch => 0131-Redirect-vanilla-getProfiler-to-inactive-in-PathNavi.patch} (100%) rename leaf-server/minecraft-patches/features/{0133-Remove-useless-creating-stats-json-bases-on-player-n.patch => 0132-Remove-useless-creating-stats-json-bases-on-player-n.patch} (85%) rename leaf-server/minecraft-patches/features/{0134-Improve-Purpur-AFK-system.patch => 0133-Improve-Purpur-AFK-system.patch} (91%) rename leaf-server/minecraft-patches/features/{0135-Virtual-thread-for-chat-executor.patch => 0134-Virtual-thread-for-chat-executor.patch} (90%) rename leaf-server/minecraft-patches/features/{0136-Virtual-thread-for-user-authenticator.patch => 0135-Virtual-thread-for-user-authenticator.patch} (100%) rename leaf-server/minecraft-patches/features/{0137-Mirai-Configurable-chat-message-signatures.patch => 0136-Mirai-Configurable-chat-message-signatures.patch} (90%) rename leaf-server/minecraft-patches/features/{0138-Cache-player-profileResult.patch => 0137-Cache-player-profileResult.patch} (100%) rename leaf-server/minecraft-patches/features/{0139-Matter-Secure-Seed.patch => 0138-Matter-Secure-Seed.patch} (96%) rename leaf-server/minecraft-patches/features/{0140-Matter-Secure-Seed-command.patch => 0139-Matter-Secure-Seed-command.patch} (64%) rename leaf-server/minecraft-patches/features/{0141-Faster-random-generator.patch => 0140-Faster-random-generator.patch} (98%) rename leaf-server/minecraft-patches/features/{0142-Don-t-save-primed-tnt-entity.patch => 0141-Don-t-save-primed-tnt-entity.patch} (83%) rename leaf-server/minecraft-patches/features/{0143-Don-t-save-falling-block-entity.patch => 0142-Don-t-save-falling-block-entity.patch} (85%) rename leaf-server/minecraft-patches/features/{0144-Configurable-connection-message.patch => 0143-Configurable-connection-message.patch} (68%) rename leaf-server/minecraft-patches/features/{0145-Configurable-unknown-command-message.patch => 0144-Configurable-unknown-command-message.patch} (93%) rename leaf-server/minecraft-patches/features/{0146-Remove-stream-in-BlockBehaviour-cache-blockstate.patch => 0145-Remove-stream-in-BlockBehaviour-cache-blockstate.patch} (100%) rename leaf-server/minecraft-patches/features/{0147-Remove-stream-in-entity-visible-effects-filter.patch => 0146-Remove-stream-in-entity-visible-effects-filter.patch} (86%) rename leaf-server/minecraft-patches/features/{0148-Remove-stream-and-double-iteration-in-enough-deep-sl.patch => 0147-Remove-stream-and-double-iteration-in-enough-deep-sl.patch} (100%) rename leaf-server/minecraft-patches/features/{0149-Remove-stream-in-trial-spawner-ticking.patch => 0148-Remove-stream-in-trial-spawner-ticking.patch} (93%) rename leaf-server/minecraft-patches/features/{0150-Remove-stream-in-Brain.patch => 0149-Remove-stream-in-Brain.patch} (100%) rename leaf-server/minecraft-patches/features/{0151-Remove-stream-in-BehaviorUtils.patch => 0150-Remove-stream-in-BehaviorUtils.patch} (100%) rename leaf-server/minecraft-patches/features/{0152-Remove-stream-in-YieldJobSite.patch => 0151-Remove-stream-in-YieldJobSite.patch} (100%) rename leaf-server/minecraft-patches/features/{0153-Remove-stream-in-PlayerSensor.patch => 0152-Remove-stream-in-PlayerSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0154-Remove-stream-in-GolemSensor.patch => 0153-Remove-stream-in-GolemSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0155-Remove-stream-in-GateBehavior.patch => 0154-Remove-stream-in-GateBehavior.patch} (100%) rename leaf-server/minecraft-patches/features/{0156-Remove-stream-in-matchingSlot.patch => 0155-Remove-stream-in-matchingSlot.patch} (100%) rename leaf-server/minecraft-patches/features/{0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch => 0156-Remove-stream-in-entity-mountedOrDismounted-changes-.patch} (94%) rename leaf-server/minecraft-patches/features/{0158-Replace-Entity-active-effects-map-with-optimized-col.patch => 0157-Replace-Entity-active-effects-map-with-optimized-col.patch} (85%) rename leaf-server/minecraft-patches/features/{0159-Replace-criterion-map-with-optimized-collection.patch => 0158-Replace-criterion-map-with-optimized-collection.patch} (93%) create mode 100644 leaf-server/minecraft-patches/features/0159-Replace-brain-with-optimized-collection.patch rename leaf-server/minecraft-patches/features/{0161-Reduce-worldgen-allocations.patch => 0160-Reduce-worldgen-allocations.patch} (100%) delete mode 100644 leaf-server/minecraft-patches/features/0160-Replace-brain-maps-with-optimized-collection.patch rename leaf-server/minecraft-patches/features/{0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch => 0161-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch} (93%) create mode 100644 leaf-server/minecraft-patches/features/0162-Do-not-place-player-if-the-server-is-full.patch delete mode 100644 leaf-server/minecraft-patches/features/0163-Do-not-place-player-if-the-server-is-full.patch rename leaf-server/minecraft-patches/features/{0164-Fix-MC-65198.patch => 0163-Fix-MC-65198.patch} (100%) rename leaf-server/minecraft-patches/features/{0165-Fix-MC-200418.patch => 0164-Fix-MC-200418.patch} (74%) rename leaf-server/minecraft-patches/features/{0166-Fix-MC-119417.patch => 0165-Fix-MC-119417.patch} (85%) rename leaf-server/minecraft-patches/features/{0167-Fix-MC-223153.patch => 0166-Fix-MC-223153.patch} (84%) rename leaf-server/minecraft-patches/features/{0168-Configurable-player-knockback-zombie.patch => 0167-Configurable-player-knockback-zombie.patch} (85%) rename leaf-server/minecraft-patches/features/{0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch => 0168-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch} (87%) rename leaf-server/minecraft-patches/features/{0170-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch => 0169-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch} (92%) rename leaf-server/minecraft-patches/features/{0171-PaperPR-Fix-some-beacon-event-issues.patch => 0170-PaperPR-Fix-some-beacon-event-issues.patch} (83%) rename leaf-server/minecraft-patches/features/{0172-Dont-send-useless-entity-packets.patch => 0171-Dont-send-useless-entity-packets.patch} (92%) rename leaf-server/minecraft-patches/features/{0173-Multithreaded-Tracker.patch => 0172-Multithreaded-Tracker.patch} (89%) rename leaf-server/minecraft-patches/features/{0174-Nitori-Async-playerdata-saving.patch => 0173-Nitori-Async-playerdata-saving.patch} (81%) rename leaf-server/minecraft-patches/features/{0175-Optimize-nearby-alive-players-for-spawning.patch => 0174-Optimize-nearby-alive-players-for-spawning.patch} (93%) rename leaf-server/minecraft-patches/features/{0176-Cache-blockstate-cache-array.patch => 0175-Cache-blockstate-cache-array.patch} (100%) rename leaf-server/minecraft-patches/features/{0177-Asynchronous-locator.patch => 0176-Asynchronous-locator.patch} (87%) rename leaf-server/minecraft-patches/features/{0178-Smart-sort-entities-in-NearestLivingEntitySensor.patch => 0177-Smart-sort-entities-in-NearestLivingEntitySensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0179-Further-reduce-memory-footprint-of-CompoundTag.patch => 0178-Further-reduce-memory-footprint-of-CompoundTag.patch} (100%) rename leaf-server/minecraft-patches/features/{0180-Optimize-Entity-distanceToSqr.patch => 0179-Optimize-Entity-distanceToSqr.patch} (93%) rename leaf-server/minecraft-patches/features/{0181-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch => 0180-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch} (86%) rename leaf-server/minecraft-patches/features/{0182-Cache-tile-entity-position.patch => 0181-Cache-tile-entity-position.patch} (86%) rename leaf-server/minecraft-patches/features/{0183-TT20-Lag-compensation.patch => 0182-TT20-Lag-compensation.patch} (95%) rename leaf-server/minecraft-patches/features/{0184-C2ME-Reduce-Allocations.patch => 0183-C2ME-Reduce-Allocations.patch} (100%) rename leaf-server/minecraft-patches/features/{0185-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch => 0184-Lithium-Skip-unnecessary-calculations-if-player-is-n.patch} (81%) rename leaf-server/minecraft-patches/features/{0186-Lithium-fast-util.patch => 0185-Lithium-fast-util.patch} (97%) rename leaf-server/minecraft-patches/features/{0187-Lithium-cached-iterate-outwards.patch => 0186-Lithium-cached-iterate-outwards.patch} (100%) rename leaf-server/minecraft-patches/features/{0188-Use-faster-and-thread-safe-ban-list-date-format-pars.patch => 0187-Use-faster-and-thread-safe-ban-list-date-format-pars.patch} (100%) rename leaf-server/minecraft-patches/features/{0189-C2ME-Optimize-world-gen-math.patch => 0188-C2ME-Optimize-world-gen-math.patch} (100%) rename leaf-server/minecraft-patches/features/{0190-Cache-chunk-key.patch => 0189-Cache-chunk-key.patch} (89%) rename leaf-server/minecraft-patches/features/{0191-Cache-random-tick-block-status.patch => 0190-Cache-random-tick-block-status.patch} (100%) rename leaf-server/minecraft-patches/features/{0192-Cache-part-of-canHoldFluid-result.patch => 0191-Cache-part-of-canHoldFluid-result.patch} (100%) rename leaf-server/minecraft-patches/features/{0193-Configurable-tripwire-dupe.patch => 0192-Configurable-tripwire-dupe.patch} (100%) rename leaf-server/minecraft-patches/features/{0194-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch => 0193-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch} (94%) rename leaf-server/minecraft-patches/features/{0195-Sepals-Rearrange-the-attackable-conditions.patch => 0194-Sepals-Rearrange-the-attackable-conditions.patch} (100%) rename leaf-server/minecraft-patches/features/{0196-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch => 0195-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch} (85%) rename leaf-server/minecraft-patches/features/{0197-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch => 0196-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch} (92%) rename leaf-server/minecraft-patches/features/{0198-Optimize-checking-nearby-players-for-spawning.patch => 0197-Optimize-checking-nearby-players-for-spawning.patch} (97%) rename leaf-server/minecraft-patches/features/{0199-Cache-supporting-block-check.patch => 0198-Cache-supporting-block-check.patch} (92%) rename leaf-server/minecraft-patches/features/{0200-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch => 0199-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch} (100%) rename leaf-server/minecraft-patches/features/{0202-Remove-stream-in-villagers.patch => 0200-Remove-stream-in-villagers.patch} (94%) rename leaf-server/minecraft-patches/features/{0203-Optimize-baby-villager-sensor.patch => 0201-Optimize-baby-villager-sensor.patch} (100%) delete mode 100644 leaf-server/minecraft-patches/features/0201-Replace-brain-activity-maps-with-optimized-collectio.patch rename leaf-server/minecraft-patches/features/{0204-Only-player-pushable.patch => 0202-Only-player-pushable.patch} (89%) rename leaf-server/minecraft-patches/features/{0205-Remove-iterators-from-Inventory.patch => 0203-Remove-iterators-from-Inventory.patch} (92%) rename leaf-server/minecraft-patches/features/{0206-Cache-eligible-players-for-despawn-checks.patch => 0204-Cache-eligible-players-for-despawn-checks.patch} (88%) rename leaf-server/minecraft-patches/features/{0207-Slightly-optimise-getNearestPlayer.patch => 0205-Slightly-optimise-getNearestPlayer.patch} (96%) rename leaf-server/minecraft-patches/features/{0208-Bulk-writes-to-writeLongArray-during-chunk-loading.patch => 0206-Bulk-writes-to-writeLongArray-during-chunk-loading.patch} (94%) rename leaf-server/minecraft-patches/features/{0209-Improve-sorting-in-SortedArraySet.patch => 0207-Improve-sorting-in-SortedArraySet.patch} (100%) rename leaf-server/minecraft-patches/features/{0210-Make-removeIf-slightly-faster.patch => 0208-Make-removeIf-slightly-faster.patch} (100%) rename leaf-server/minecraft-patches/features/{0211-Optimize-LinearPalette.patch => 0209-Optimize-LinearPalette.patch} (100%) rename leaf-server/minecraft-patches/features/{0212-Slightly-optimized-VarInt-write.patch => 0210-Slightly-optimized-VarInt-write.patch} (100%) rename leaf-server/minecraft-patches/features/{0213-Rewrite-ClientboundLightUpdatePacketData.patch => 0211-Rewrite-ClientboundLightUpdatePacketData.patch} (100%) rename leaf-server/minecraft-patches/features/{0214-Async-chunk-sending.patch => 0212-Async-chunk-sending.patch} (89%) create mode 100644 leaf-server/minecraft-patches/features/0213-Spawner-Configurations.patch rename leaf-server/minecraft-patches/features/{0216-SparklyPaper-Parallel-world-ticking.patch => 0214-SparklyPaper-Parallel-world-ticking.patch} (86%) rename leaf-server/minecraft-patches/features/{0217-SparklyPaper-Track-each-world-MSPT.patch => 0215-SparklyPaper-Track-each-world-MSPT.patch} (94%) delete mode 100644 leaf-server/minecraft-patches/features/0215-Spawner-Configurations.patch rename leaf-server/minecraft-patches/features/{0218-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch => 0216-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch} (99%) rename leaf-server/minecraft-patches/features/{0219-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch => 0217-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch} (100%) rename leaf-server/minecraft-patches/features/{0220-Remove-streams-on-InsideBrownianWalk.patch => 0218-Remove-streams-on-InsideBrownianWalk.patch} (100%) rename leaf-server/minecraft-patches/features/{0221-Use-BFS-on-getSlopeDistance.patch => 0219-Use-BFS-on-getSlopeDistance.patch} (98%) rename leaf-server/minecraft-patches/features/{0222-Paper-PR-Throttle-failed-spawn-attempts.patch => 0220-Paper-PR-Throttle-failed-spawn-attempts.patch} (96%) rename leaf-server/minecraft-patches/features/{0223-Improve-BlockEntity-ticking-isRemoved-check.patch => 0221-Improve-BlockEntity-ticking-isRemoved-check.patch} (91%) rename leaf-server/minecraft-patches/features/{0224-Raytrace-AntiXray-SDK-integration.patch => 0222-Raytrace-AntiXray-SDK-integration.patch} (90%) rename leaf-server/minecraft-patches/features/{0225-Optimize-addOrUpdateTransientModifier.patch => 0223-Optimize-addOrUpdateTransientModifier.patch} (89%) rename leaf-server/minecraft-patches/features/{0226-Optimize-ContextMap.create.patch => 0224-Optimize-ContextMap.create.patch} (100%) rename leaf-server/minecraft-patches/features/{0227-Micro-optimizations-for-random-tick.patch => 0225-Micro-optimizations-for-random-tick.patch} (95%) rename leaf-server/minecraft-patches/features/{0228-Remove-streams-on-updateConnectedPlayersWithinRange.patch => 0226-Remove-streams-on-updateConnectedPlayersWithinRange.patch} (100%) rename leaf-server/minecraft-patches/features/{0229-Remove-streams-on-PlayerDetector.patch => 0227-Remove-streams-on-PlayerDetector.patch} (100%) rename leaf-server/minecraft-patches/features/{0230-Use-direct-iteration-on-Sensing.tick.patch => 0228-Use-direct-iteration-on-Sensing.tick.patch} (100%) rename leaf-server/minecraft-patches/features/{0231-Optimise-non-flush-packet-sending.patch => 0229-Optimise-non-flush-packet-sending.patch} (83%) rename leaf-server/minecraft-patches/features/{0232-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch => 0230-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch} (91%) rename leaf-server/minecraft-patches/features/{0233-Null-handling-on-MultifaceSpreader.patch => 0231-Null-handling-on-MultifaceSpreader.patch} (100%) rename leaf-server/minecraft-patches/features/{0234-More-virtual-threads.patch => 0232-More-virtual-threads.patch} (96%) rename leaf-server/minecraft-patches/features/{0235-Async-target-finding.patch => 0233-Async-target-finding.patch} (95%) rename leaf-server/minecraft-patches/features/{0236-Optimize-ThreadedTicketLevelPropagator.patch => 0234-Optimize-ThreadedTicketLevelPropagator.patch} (100%) rename leaf-server/minecraft-patches/features/{0237-Optimise-MobEffectUtil-getDigSpeedAmplification.patch => 0235-Optimise-MobEffectUtil-getDigSpeedAmplification.patch} (100%) rename leaf-server/minecraft-patches/features/{0238-Optimise-chunkUnloads.patch => 0236-Optimise-chunkUnloads.patch} (97%) rename leaf-server/minecraft-patches/features/{0239-Optimize-BlockEntityType-isValid.patch => 0237-Optimize-BlockEntityType-isValid.patch} (100%) rename leaf-server/minecraft-patches/features/{0240-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch => 0238-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch} (76%) rename leaf-server/minecraft-patches/features/{0242-Sakura-copy-EntityList-implementation-to-BasicEntity.patch => 0239-Sakura-copy-EntityList-implementation-to-BasicEntity.patch} (90%) rename leaf-server/minecraft-patches/features/{0243-Protocol-Core.patch => 0240-Protocol-Core.patch} (84%) rename leaf-server/minecraft-patches/features/{0244-Reduce-PlayerChunk-Updates.patch => 0241-Reduce-PlayerChunk-Updates.patch} (74%) rename leaf-server/minecraft-patches/features/{0245-Async-switch-connection-state.patch => 0242-Async-switch-connection-state.patch} (98%) rename leaf-server/minecraft-patches/features/{0246-Optimize-BlockEntities-tickersInLevel.patch => 0243-Optimize-BlockEntities-tickersInLevel.patch} (86%) rename leaf-server/minecraft-patches/features/{0247-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch => 0244-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch} (98%) rename leaf-server/minecraft-patches/features/{0248-Flush-location-while-knockback.patch => 0245-Flush-location-while-knockback.patch} (92%) rename leaf-server/minecraft-patches/features/{0249-Only-tick-items-at-hand.patch => 0246-Only-tick-items-at-hand.patch} (86%) rename leaf-server/minecraft-patches/features/{0250-Smart-sort-items-in-NearestItemSensor.patch => 0247-Smart-sort-items-in-NearestItemSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0251-Optimise-player-movement-checks.patch => 0248-Optimise-player-movement-checks.patch} (84%) rename leaf-server/minecraft-patches/features/{0252-Remove-streams-in-MobSensor.patch => 0249-Remove-streams-in-MobSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0253-Remove-streams-in-TemptingSensor.patch => 0250-Remove-streams-in-TemptingSensor.patch} (100%) rename leaf-server/minecraft-patches/features/{0254-Use-HashedList-on-WeightedList.patch => 0251-Use-HashedList-on-WeightedList.patch} (100%) rename leaf-server/minecraft-patches/features/{0255-Add-configurable-death-item-drop-knockback-settings.patch => 0252-Add-configurable-death-item-drop-knockback-settings.patch} (87%) rename leaf-server/minecraft-patches/features/{0256-Optimize-getScaledTrackingDistance.patch => 0253-Optimize-getScaledTrackingDistance.patch} (86%) rename leaf-server/minecraft-patches/features/{0257-Optimize-SynchedEntityData-packDirty.patch => 0254-Optimize-SynchedEntityData-packDirty.patch} (100%) rename leaf-server/minecraft-patches/features/{0258-Optimize-isEyeInFluid.patch => 0255-Optimize-isEyeInFluid.patch} (88%) rename leaf-server/minecraft-patches/features/{0259-Cache-block-path-type.patch => 0256-Cache-block-path-type.patch} (96%) rename leaf-server/minecraft-patches/features/{0260-optimize-getEntityStatus.patch => 0257-optimize-getEntityStatus.patch} (100%) rename leaf-server/minecraft-patches/features/{0261-Rail-Optimization-optimized-PoweredRailBlock-logic.patch => 0258-Rail-Optimization-optimized-PoweredRailBlock-logic.patch} (94%) rename leaf-server/minecraft-patches/features/{0262-optimise-ChunkGenerator-getMobsAt.patch => 0259-optimise-ChunkGenerator-getMobsAt.patch} (100%) rename leaf-server/minecraft-patches/features/{0263-cache-getBiome.patch => 0260-cache-getBiome.patch} (100%) rename leaf-server/minecraft-patches/features/{0264-optimize-mob-spawning.patch => 0261-optimize-mob-spawning.patch} (97%) rename leaf-server/minecraft-patches/features/{0265-optimize-structure-map.patch => 0262-optimize-structure-map.patch} (89%) rename leaf-server/minecraft-patches/features/{0266-throttle-mob-spawning.patch => 0263-throttle-mob-spawning.patch} (100%) rename leaf-server/minecraft-patches/features/{0267-Add-BlockExplosionHitEvent.patch => 0264-Add-BlockExplosionHitEvent.patch} (89%) rename leaf-server/minecraft-patches/features/{0268-Old-Blast-Protection-explosion-knockback.patch => 0265-Old-Blast-Protection-explosion-knockback.patch} (95%) rename leaf-server/minecraft-patches/features/{0269-Use-UUID-for-cure-reputation.patch => 0266-Use-UUID-for-cure-reputation.patch} (75%) rename leaf-server/minecraft-patches/features/{0273-Fix-crash-during-parsing-unknown-command-message.patch => 0267-Fix-crash-during-parsing-unknown-command-message.patch} (88%) rename leaf-server/minecraft-patches/features/{0275-optimize-random-tick.patch => 0268-optimize-random-tick.patch} (86%) rename leaf-server/minecraft-patches/features/{0276-do-not-log-invalid-flatten-text-component-parse.patch => 0269-do-not-log-invalid-flatten-text-component-parse.patch} (100%) rename leaf-server/minecraft-patches/features/{0277-Fast-BiomeManager-seed-obfuscation.patch => 0270-Fast-BiomeManager-seed-obfuscation.patch} (93%) rename leaf-server/minecraft-patches/features/{0278-Paw-optimization.patch => 0271-Paw-optimization.patch} (97%) delete mode 100644 leaf-server/minecraft-patches/features/0274-Paper-Rewrite-dataconverter-system.patch rename leaf-server/paper-patches/features/{0016-Do-not-log-legacy-Material-initialization.patch => 0015-Do-not-log-legacy-Material-initialization.patch} (100%) rename leaf-server/paper-patches/features/{0017-Do-not-log-Not-Secure-marker.patch => 0016-Do-not-log-Not-Secure-marker.patch} (100%) rename leaf-server/paper-patches/features/{0018-Reduce-array-allocations.patch => 0017-Reduce-array-allocations.patch} (98%) rename leaf-server/paper-patches/features/{0019-CraftBukkit-UUID-to-world-map.patch => 0018-CraftBukkit-UUID-to-world-map.patch} (90%) rename leaf-server/paper-patches/features/{0020-Specific-interval-TPS-API.patch => 0019-Specific-interval-TPS-API.patch} (89%) rename leaf-server/paper-patches/features/{0021-5-second-TPS-average.patch => 0020-5-second-TPS-average.patch} (97%) rename leaf-server/paper-patches/features/{0022-Last-tick-time-API.patch => 0021-Last-tick-time-API.patch} (93%) rename leaf-server/paper-patches/features/{0023-Show-last-tick-time-in-tps-command.patch => 0022-Show-last-tick-time-in-tps-command.patch} (100%) rename leaf-server/paper-patches/features/{0024-Pre-compute-VarLong-sizes.patch => 0023-Pre-compute-VarLong-sizes.patch} (100%) rename leaf-server/paper-patches/features/{0025-Optimize-VarInt-write-and-VarLong-write.patch => 0024-Optimize-VarInt-write-and-VarLong-write.patch} (100%) rename leaf-server/paper-patches/features/{0026-Virtual-thread-support.patch => 0025-Virtual-thread-support.patch} (100%) rename leaf-server/paper-patches/features/{0027-Remove-Timings.patch => 0026-Remove-Timings.patch} (100%) rename leaf-server/paper-patches/features/{0028-KeYi-Player-Skull-API.patch => 0027-KeYi-Player-Skull-API.patch} (92%) rename leaf-server/paper-patches/features/{0029-Slice-Smooth-Teleports.patch => 0028-Slice-Smooth-Teleports.patch} (90%) rename leaf-server/paper-patches/features/{0030-Leaves-Protocol-Core.patch => 0029-Leaves-Protocol-Core.patch} (87%) rename leaf-server/paper-patches/features/{0031-Leaves-Replay-Mod-API.patch => 0030-Leaves-Replay-Mod-API.patch} (88%) rename leaf-server/paper-patches/features/{0032-Skip-event-if-no-listeners.patch => 0031-Skip-event-if-no-listeners.patch} (100%) rename leaf-server/paper-patches/features/{0034-SparklyPaper-Optimize-canSee-checks.patch => 0032-SparklyPaper-Optimize-canSee-checks.patch} (94%) rename leaf-server/paper-patches/features/{0035-Including-5s-in-getTPS.patch => 0033-Including-5s-in-getTPS.patch} (84%) rename leaf-server/paper-patches/features/{0036-Don-t-throw-exception-on-missing-ResourceKey-value.patch => 0034-Don-t-throw-exception-on-missing-ResourceKey-value.patch} (100%) rename leaf-server/paper-patches/features/{0037-Virtual-Thread-for-async-scheduler.patch => 0035-Virtual-Thread-for-async-scheduler.patch} (100%) rename leaf-server/paper-patches/features/{0038-Mirai-Configurable-chat-message-signatures.patch => 0036-Mirai-Configurable-chat-message-signatures.patch} (100%) rename leaf-server/paper-patches/features/{0039-Matter-Secure-Seed.patch => 0037-Matter-Secure-Seed.patch} (95%) rename leaf-server/paper-patches/features/{0040-Faster-random-generator.patch => 0038-Faster-random-generator.patch} (100%) rename leaf-server/paper-patches/features/{0041-Configurable-unknown-command-message.patch => 0039-Configurable-unknown-command-message.patch} (100%) rename leaf-server/paper-patches/features/{0042-Replace-world-map-with-optimized-collection.patch => 0040-Replace-world-map-with-optimized-collection.patch} (92%) rename leaf-server/paper-patches/features/{0043-Cache-CraftEntityType-minecraftToBukkit-convert.patch => 0041-Cache-CraftEntityType-minecraftToBukkit-convert.patch} (100%) rename leaf-server/paper-patches/features/{0044-Multithreaded-Tracker.patch => 0042-Multithreaded-Tracker.patch} (91%) rename leaf-server/paper-patches/features/{0045-Asynchronous-locator.patch => 0043-Asynchronous-locator.patch} (100%) rename leaf-server/paper-patches/features/{0046-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch => 0044-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch} (94%) rename leaf-server/paper-patches/features/{0047-Faster-CraftServer-getworlds-list-creation.patch => 0045-Faster-CraftServer-getworlds-list-creation.patch} (85%) rename leaf-server/paper-patches/features/{0048-Cache-chunk-key.patch => 0046-Cache-chunk-key.patch} (87%) rename leaf-server/paper-patches/features/{0049-Async-structure-locate-api.patch => 0047-Async-structure-locate-api.patch} (95%) rename leaf-server/paper-patches/features/{0050-PlayerInventoryOverflowEvent.patch => 0048-PlayerInventoryOverflowEvent.patch} (100%) rename leaf-server/paper-patches/features/{0051-SparklyPaper-Parallel-world-ticking.patch => 0049-SparklyPaper-Parallel-world-ticking.patch} (98%) rename leaf-server/paper-patches/features/{0052-Paper-PR-Throttle-failed-spawn-attempts.patch => 0050-Paper-PR-Throttle-failed-spawn-attempts.patch} (94%) rename leaf-server/paper-patches/features/{0053-Async-playerdata-saving.patch => 0051-Async-playerdata-saving.patch} (78%) rename leaf-server/paper-patches/features/{0054-Async-chunk-sending.patch => 0052-Async-chunk-sending.patch} (100%) rename leaf-server/paper-patches/features/{0055-Optimise-player-movement-checks.patch => 0053-Optimise-player-movement-checks.patch} (100%) rename leaf-server/paper-patches/features/{0056-optimise-ReferenceList.patch => 0054-optimise-ReferenceList.patch} (100%) rename leaf-server/paper-patches/features/{0057-cache-getBiome.patch => 0055-cache-getBiome.patch} (100%) rename leaf-server/paper-patches/features/{0061-dump-pwt-thread.patch => 0056-dump-pwt-thread.patch} (100%) rename leaf-server/paper-patches/features/{0063-Paw-optimization.patch => 0057-Paw-optimization.patch} (95%) rename leaf-server/paper-patches/features/{0062-optimize-despawn.patch => 0058-optimize-despawn.patch} (91%) create mode 100644 leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityArrayMap.java create mode 100644 leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityBitSet.java create mode 100644 leaf-server/src/main/java/org/dreeam/leaf/util/map/BehaviorControlArraySet.java diff --git a/.github/workflows/build-1215.yml b/.github/workflows/build-1216.yml similarity index 90% rename from .github/workflows/build-1215.yml rename to .github/workflows/build-1216.yml index 5f85a946..e903cae1 100644 --- a/.github/workflows/build-1215.yml +++ b/.github/workflows/build-1216.yml @@ -1,8 +1,8 @@ -name: Build Leaf 1.21.5 +name: Build Leaf 1.21.6 on: push: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] workflow_dispatch: jobs: @@ -93,15 +93,15 @@ jobs: - name: Upload Leaf uses: actions/upload-artifact@v4.6.2 with: - name: Leaf 1.21.5 - path: ./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar + name: Leaf 1.21.6 + path: ./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar - name: Release Leaf uses: softprops/action-gh-release@v2.3.2 with: - name: "Leaf 1.21.5" - tag_name: "ver-1.21.5" - files: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" + name: "Leaf 1.21.6" + tag_name: "ver-1.21.6" + files: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar" body_path: "./release_notes.md" token: "${{ secrets.GITHUB_TOKEN }}" target_commitish: "${{ github.sha }}" @@ -111,7 +111,7 @@ jobs: - name: Calculate SHA-256 id: hash run: | - FILE_NAME="leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" + FILE_NAME="leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar" HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }') echo "sha256=$HASH" >> $GITHUB_OUTPUT @@ -121,7 +121,7 @@ jobs: host: ${{ secrets.API_HOST }} username: ${{ secrets.API_USER }} password: ${{ secrets.API_PASS }} - source: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" + source: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar" target: "~/api/uploads/" - name: Insert build to download API @@ -141,11 +141,11 @@ jobs: node insertBuild.js \ --projectName leaf \ --projectFriendlyName "Leaf" \ - --version 1.21.5 \ - --versionGroupName 1.21.5 \ - --versionName 1.21.5 \ + --version 1.21.6 \ + --versionGroupName 1.21.6 \ + --versionName 1.21.6 \ --build-number ${{ env.BUILD_NUMBER }} \ --repositoryPath "$REPO_DIR" \ --storagePath /root/api/storage \ - --download "primary:/root/api/uploads/leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \ + --download "primary:/root/api/uploads/leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \ --buildChannel default diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 5b536e73..33b9e6ca 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -2,7 +2,7 @@ name: Build Pull Request on: pull_request: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] jobs: build: @@ -34,9 +34,9 @@ jobs: - name: Rename Paperclip JARs run: | - mv leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.5.jar + mv leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.6.jar - name: Upload Leaf as build artifact uses: actions/upload-artifact@main with: - name: Leaf 1.21.5 - path: ./leaf-1.21.5.jar + name: Leaf 1.21.6 + path: ./leaf-1.21.6.jar diff --git a/.github/workflows/publish-api.yml b/.github/workflows/publish-api.yml index de37f45f..3efd3633 100644 --- a/.github/workflows/publish-api.yml +++ b/.github/workflows/publish-api.yml @@ -1,7 +1,7 @@ name: Publish API on: push: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] jobs: build: diff --git a/README.md b/README.md index e5030e43..60715a88 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
[![Download](https://img.shields.io/badge/releases-blue?label=download&style=for-the-badge&colorA=19201a&colorB=298046)](https://www.leafmc.one/download)⠀ -[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1215.yml?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ +[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1216.yml?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ [![Discord](https://img.shields.io/discord/1145991395388162119?label=discord&style=for-the-badge&colorA=19201a&colorB=298046)](https://discord.gg/gfgAwdSEuM) [![Docs](https://img.shields.io/badge/leafmc.one/docs/-blue?label=docs&style=for-the-badge&colorA=19201a&colorB=298046)](https://www.leafmc.one/docs) @@ -65,7 +65,7 @@ Building a Paperclip JAR for distribution: cn.dreeam.leaf leaf-api - 1.21.5-R0.1-SNAPSHOT + 1.21.6-R0.1-SNAPSHOT provided ``` @@ -78,7 +78,7 @@ repositories { } dependencies { - compileOnly("cn.dreeam.leaf:leaf-api:1.21.5-R0.1-SNAPSHOT") + compileOnly("cn.dreeam.leaf:leaf-api:1.21.6-R0.1-SNAPSHOT") } java { diff --git a/build.gradle.kts b/build.gradle.kts index 9773a231..e42c50b0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,6 @@ subprojects { options.release = 21 options.isFork = true options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal")) - options.forkOptions.memoryMaximumSize = "2g" // Prevent OOM during building } tasks.withType { options.encoding = Charsets.UTF_8.name() diff --git a/gradle.properties b/gradle.properties index 967b6a66..9892a4fa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=cn.dreeam.leaf -mcVersion=1.21.5 -version=1.21.5-R0.1-SNAPSHOT +mcVersion=1.21.6 +version=1.21.6-R0.1-SNAPSHOT -paperCommit=a1b30587d9d5a5d9bf1530f7d1e289f2e29991b6 +paperCommit=57c202e01516b653aea9c7e050eaded1448863e5 org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/leaf-api/build.gradle.kts.patch b/leaf-api/build.gradle.kts.patch index 53d109c7..2313c5e4 100644 --- a/leaf-api/build.gradle.kts.patch +++ b/leaf-api/build.gradle.kts.patch @@ -2,7 +2,7 @@ +++ b/paper-api/build.gradle.kts @@ -13,8 +_,10 @@ // Keep in sync with paper-server adventure-text-serializer-ansi dep - val adventureVersion = "4.21.0" + val adventureVersion = "4.23.0" val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21" -val slf4jVersion = "2.0.16" -val log4jVersion = "2.24.1" @@ -145,13 +145,11 @@ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", "https://javadoc.io/doc/org.joml/joml/1.10.8/", "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0", -@@ -184,8 +_,8 @@ - "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", +@@ -185,7 +_,7 @@ "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/", -- // "https://logging.apache.org/log4j/2.x/javadoc/log4j-api/", // TODO: Broken + "https://logging.apache.org/log4j/2.x/javadoc/log4j-api/", - "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", -+ "https://logging.apache.org/log4j/2.x/javadoc/log4j-api/", + "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.22", // Leaf - Bump Dependencies ) options.tags("apiNote:a:API Note:") diff --git a/leaf-api/paper-patches/features/0002-Gale-configuration.patch b/leaf-api/paper-patches/features/0002-Gale-configuration.patch index c186dd7d..f601413b 100644 --- a/leaf-api/paper-patches/features/0002-Gale-configuration.patch +++ b/leaf-api/paper-patches/features/0002-Gale-configuration.patch @@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ed899c4cb4b5261ceff56bbc9ca806e20904508e..618287712f3504a50dd8a5987629523fc9f17a88 100644 +index 9bab00ab10c78908090c8a1a12d4c84e9324b08b..544791edbd13d4ee711d22e6c8ef48329944e99c 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2378,6 +2378,21 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2385,6 +2385,21 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/leaf-api/paper-patches/features/0004-SIMD-support.patch b/leaf-api/paper-patches/features/0003-SIMD-support.patch similarity index 100% rename from leaf-api/paper-patches/features/0004-SIMD-support.patch rename to leaf-api/paper-patches/features/0003-SIMD-support.patch diff --git a/leaf-api/paper-patches/features/0005-Vectorized-map-color-conversion.patch b/leaf-api/paper-patches/features/0004-Vectorized-map-color-conversion.patch similarity index 98% rename from leaf-api/paper-patches/features/0005-Vectorized-map-color-conversion.patch rename to leaf-api/paper-patches/features/0004-Vectorized-map-color-conversion.patch index d303715d..43f990e0 100644 --- a/leaf-api/paper-patches/features/0005-Vectorized-map-color-conversion.patch +++ b/leaf-api/paper-patches/features/0004-Vectorized-map-color-conversion.patch @@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..00b16e4aacba50996b81fac81c3f78b6 + +} diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java -index fc9728342de7605da69813fb44b008c1343124c0..4d55f8ece0bbe0be64b700f54a52d6a2cbfad9a5 100644 +index fd6f3bce50a66004687b08fd80568543f814747a..2d6d7bc800a7c2c0f29b2d7f2512f2d27aaa9439 100644 --- a/src/main/java/org/bukkit/map/MapPalette.java +++ b/src/main/java/org/bukkit/map/MapPalette.java @@ -35,7 +35,7 @@ public final class MapPalette { @@ -120,7 +120,7 @@ index fc9728342de7605da69813fb44b008c1343124c0..4d55f8ece0bbe0be64b700f54a52d6a2 - static final Color[] colors = { + public static final Color[] colors = { // Gale - Pufferfish - vectorized map color conversion - package -> public // Start generate - MapPalette#colors - // @GeneratedFrom 1.21.5 + // @GeneratedFrom 1.21.6 new Color(0x00000000, true), @@ -395,9 +395,15 @@ public final class MapPalette { temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth()); diff --git a/leaf-api/paper-patches/features/0006-Do-not-log-plugin-library-loads.patch b/leaf-api/paper-patches/features/0005-Do-not-log-plugin-library-loads.patch similarity index 94% rename from leaf-api/paper-patches/features/0006-Do-not-log-plugin-library-loads.patch rename to leaf-api/paper-patches/features/0005-Do-not-log-plugin-library-loads.patch index 906fc35e..0492a709 100644 --- a/leaf-api/paper-patches/features/0006-Do-not-log-plugin-library-loads.patch +++ b/leaf-api/paper-patches/features/0005-Do-not-log-plugin-library-loads.patch @@ -55,10 +55,10 @@ index 163e9a0e179dc88be93614ff66ee2be3eccc694f..539786355ac89b5eb8ad876e65662e84 * This class was not meant to be constructed explicitly * diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -index 012ba8ee3d84a7bb09068e42fd1bae8ad221622e..1f2e86e9a830b990bbba3704889671465816ea1c 100644 +index a9cbd3d6cc00b8239cd7f8cdf97037f3ab12ebd2..70d57e6abbd876d7f3087905d5277777162d317c 100644 --- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java +++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -@@ -69,6 +69,7 @@ public class LibraryLoader { +@@ -66,6 +66,7 @@ public class LibraryLoader { session.setTransferListener(new AbstractTransferListener() { @Override public void transferStarted(@NotNull TransferEvent event) { @@ -66,7 +66,7 @@ index 012ba8ee3d84a7bb09068e42fd1bae8ad221622e..1f2e86e9a830b990bbba370488967146 logger.log(Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName()); } }); -@@ -94,6 +95,7 @@ public class LibraryLoader { +@@ -91,6 +92,7 @@ public class LibraryLoader { // Paper end - plugin loader api return null; } @@ -74,7 +74,7 @@ index 012ba8ee3d84a7bb09068e42fd1bae8ad221622e..1f2e86e9a830b990bbba370488967146 logger.log(Level.INFO, "[{0}] Loading {1} libraries... please wait", new Object[] { java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), desc.getLibraries().size() // Paper - use configured log prefix -@@ -146,6 +148,7 @@ public class LibraryLoader { +@@ -143,6 +145,7 @@ public class LibraryLoader { } jarFiles.add(url); diff --git a/leaf-api/paper-patches/features/0007-Player-canSee-by-entity-UUID.patch b/leaf-api/paper-patches/features/0006-Player-canSee-by-entity-UUID.patch similarity index 100% rename from leaf-api/paper-patches/features/0007-Player-canSee-by-entity-UUID.patch rename to leaf-api/paper-patches/features/0006-Player-canSee-by-entity-UUID.patch diff --git a/leaf-api/paper-patches/features/0008-Specific-interval-TPS-API.patch b/leaf-api/paper-patches/features/0007-Specific-interval-TPS-API.patch similarity index 88% rename from leaf-api/paper-patches/features/0008-Specific-interval-TPS-API.patch rename to leaf-api/paper-patches/features/0007-Specific-interval-TPS-API.patch index ddf69b09..357d520e 100644 --- a/leaf-api/paper-patches/features/0008-Specific-interval-TPS-API.patch +++ b/leaf-api/paper-patches/features/0007-Specific-interval-TPS-API.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c9ea6559f809a6732588b8908001807be3d91196..1e810d7f61e07cddd99d3f827673b724ac93b6b5 100644 +index 3bde4ad79ade5aae18e9073307f637717e8dd9e3..bac8bf1996350e4c16ba9a494c5d9bf052ad7fa3 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2438,6 +2438,35 @@ public final class Bukkit { +@@ -2447,6 +2447,35 @@ public final class Bukkit { return server.getTPS(); } @@ -47,10 +47,10 @@ index c9ea6559f809a6732588b8908001807be3d91196..1e810d7f61e07cddd99d3f827673b724 * Get a sample of the servers last tick times (in nanos) * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 618287712f3504a50dd8a5987629523fc9f17a88..7eaeb956ca9ce223a3e2d24caa258ae57d59a476 100644 +index 544791edbd13d4ee711d22e6c8ef48329944e99c..ee28284f665cd343930b8c0419009c7420830a67 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2126,6 +2126,29 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2133,6 +2133,29 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ public double @NotNull [] getTPS(); diff --git a/leaf-api/paper-patches/features/0009-5-second-TPS-average.patch b/leaf-api/paper-patches/features/0008-5-second-TPS-average.patch similarity index 92% rename from leaf-api/paper-patches/features/0009-5-second-TPS-average.patch rename to leaf-api/paper-patches/features/0008-5-second-TPS-average.patch index 362507a3..0ae6ae53 100644 --- a/leaf-api/paper-patches/features/0009-5-second-TPS-average.patch +++ b/leaf-api/paper-patches/features/0008-5-second-TPS-average.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 1e810d7f61e07cddd99d3f827673b724ac93b6b5..f998208e0b26132d29d79fc2653d9f5572046f70 100644 +index bac8bf1996350e4c16ba9a494c5d9bf052ad7fa3..c899da328fca4dccbf69b2e2d74bcdf31e0e2c33 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2438,7 +2438,30 @@ public final class Bukkit { +@@ -2447,7 +2447,30 @@ public final class Bukkit { return server.getTPS(); } @@ -72,10 +72,10 @@ index 1e810d7f61e07cddd99d3f827673b724ac93b6b5..f998208e0b26132d29d79fc2653d9f55 * Gets the average server TPS over the last 1 minute * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 7eaeb956ca9ce223a3e2d24caa258ae57d59a476..65e2a97096f6f625ad347678ebac1c3b912cb862 100644 +index ee28284f665cd343930b8c0419009c7420830a67..c067cd28639dada3aaea71298ad78969ddb79954 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2126,7 +2126,27 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2133,7 +2133,27 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ public double @NotNull [] getTPS(); diff --git a/leaf-api/paper-patches/features/0010-Last-tick-time-API.patch b/leaf-api/paper-patches/features/0009-Last-tick-time-API.patch similarity index 92% rename from leaf-api/paper-patches/features/0010-Last-tick-time-API.patch rename to leaf-api/paper-patches/features/0009-Last-tick-time-API.patch index ccc02f5f..9cb8e767 100644 --- a/leaf-api/paper-patches/features/0010-Last-tick-time-API.patch +++ b/leaf-api/paper-patches/features/0009-Last-tick-time-API.patch @@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index f998208e0b26132d29d79fc2653d9f5572046f70..2e316238da9377c046105249273b260912ebfcab 100644 +index c899da328fca4dccbf69b2e2d74bcdf31e0e2c33..ffb2f5d949cc255263674b2a03d4da809b0c36c5 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -3044,6 +3044,20 @@ public final class Bukkit { +@@ -3053,6 +3053,20 @@ public final class Bukkit { } // Paper end - Folia region threading API @@ -48,10 +48,10 @@ index f998208e0b26132d29d79fc2653d9f5572046f70..2e316238da9377c046105249273b2609 * @deprecated All methods on this class have been deprecated, see the individual methods for replacements. */ diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 65e2a97096f6f625ad347678ebac1c3b912cb862..db8c2d3ded812e8d96b8752d4890006d022e72a6 100644 +index c067cd28639dada3aaea71298ad78969ddb79954..ad65ee800d9d394d0322e7ca0b71972d81ca66a1 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2774,4 +2774,29 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2781,4 +2781,29 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value); // Paper end - API to check if the server is sleeping diff --git a/leaf-api/paper-patches/features/0011-Pufferfish-Sentry.patch b/leaf-api/paper-patches/features/0010-Pufferfish-Sentry.patch similarity index 99% rename from leaf-api/paper-patches/features/0011-Pufferfish-Sentry.patch rename to leaf-api/paper-patches/features/0010-Pufferfish-Sentry.patch index 1860a601..bbb3d919 100644 --- a/leaf-api/paper-patches/features/0011-Pufferfish-Sentry.patch +++ b/leaf-api/paper-patches/features/0010-Pufferfish-Sentry.patch @@ -178,7 +178,7 @@ index 0000000000000000000000000000000000000000..c7772aac00f6db664f7a5673bc2585fa + } +} diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 001465eedafa51ac027a4db51cba6223edfe1171..2e6d62c4f3687e299c34e876c503b400e13be05a 100644 +index dfc2d76403993640e6283f25f9f3647bb6d1a30c..cc07a76545aefbf9eb0915025c89770298be2c1c 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -597,7 +597,9 @@ public final class SimplePluginManager implements PluginManager { diff --git a/leaf-api/paper-patches/features/0012-Purpur-API-Changes.patch b/leaf-api/paper-patches/features/0011-Purpur-API-Changes.patch similarity index 98% rename from leaf-api/paper-patches/features/0012-Purpur-API-Changes.patch rename to leaf-api/paper-patches/features/0011-Purpur-API-Changes.patch index 440acf59..3feac3e5 100644 --- a/leaf-api/paper-patches/features/0012-Purpur-API-Changes.patch +++ b/leaf-api/paper-patches/features/0011-Purpur-API-Changes.patch @@ -1,12 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Github Actions -Date: Sun, 6 Apr 2025 06:33:23 +0000 +Date: Fri, 13 Jun 2025 14:00:12 +0000 Subject: [PATCH] Purpur API Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 61d7f5590e79909caba55e9f00cefdd51006d015 +Commit: dfd8a7ad14f436ea9c4704a758305e7145923c2d Patches listed below are removed in this patch, They exists in Gale or Leaf: * "co/aikar/timings/TimedEventExecutor.java.patch" @@ -21,10 +21,10 @@ Patches listed below are removed in this patch, They exists in Gale or Leaf: * "org/spigotmc/CustomTimingsHandler.java.patch" diff --git a/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -index 12207256ae0fa5f2f822116cd22f1a1250e6ee1c..07a9ccf572e514047a5af7071b9270d2ed9c1c72 100644 +index e4729256f444168dc8cb7121f66cae0df054692b..0db0e11f4e18a280f699004dc660ce211b7f895f 100644 --- a/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java +++ b/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java -@@ -441,6 +441,26 @@ public interface VanillaGoal extends Goal { +@@ -446,6 +446,26 @@ public interface VanillaGoal extends Goal { GoalKey ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class); @@ -52,10 +52,10 @@ index 12207256ae0fa5f2f822116cd22f1a1250e6ee1c..07a9ccf572e514047a5af7071b9270d2 return GoalKey.of(type, NamespacedKey.minecraft(key)); } diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java -index f738bbcefe288474c5f591dda03d713850633854..5c10ab3deb359bd0045ba5999bcbce19a7949eaa 100644 +index f738bbcefe288474c5f591dda03d713850633854..c198304386e83edc2ec582fdf66d97d624004771 100644 --- a/src/main/java/io/papermc/paper/ServerBuildInfo.java +++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java -@@ -19,6 +19,12 @@ public interface ServerBuildInfo { +@@ -19,6 +19,13 @@ public interface ServerBuildInfo { */ Key BRAND_PAPER_ID = Key.key("papermc", "paper"); @@ -65,14 +65,15 @@ index f738bbcefe288474c5f591dda03d713850633854..5c10ab3deb359bd0045ba5999bcbce19 + */ + Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur"); + // Purpur end ++ // Leaf start - Rebrand /** * The brand id for Gale. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 2e316238da9377c046105249273b260912ebfcab..98cfd68226494dbb1a2eaa6680e23a76c2129a62 100644 +index ffb2f5d949cc255263674b2a03d4da809b0c36c5..f04f42832a098836bf41e98787c2db35d154c892 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -3073,4 +3073,133 @@ public final class Bukkit { +@@ -3082,4 +3082,133 @@ public final class Bukkit { public static void restart() { server.restart(); } @@ -289,10 +290,10 @@ index 918a045165cdcde264bc24082b7afebb407271de..f283bcabff7fe6eede6cf4344537e430 + // Purpur end - ChatColor conveniences } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 5a1b9f81830dee052bafd743f4a1bf0c39288c7a..cf8fd9a981c7fbaa304988df17233ccf40d6829e 100644 +index ac8d14010940d55e2d885e75ce6ff436c46e2d69..8f45823ea89c8208374115f8ed9c5a535a64c017 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -3616,4 +3616,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -3636,4 +3636,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla return this.asItemType().getDefaultDataTypes(); } // Paper end - data component API @@ -443,10 +444,10 @@ index 6f83097b1097d0ffa81a95e6f0300cb410dfee2b..c1f19d5c1b819873fce1185b4fbf4c72 + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2d0ce00c8 100644 +index ad65ee800d9d394d0322e7ca0b71972d81ca66a1..cc12db46d30c2499dea87f953ef6bf1fa18900c9 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2438,6 +2438,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2445,6 +2445,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi // Paper end @@ -465,7 +466,7 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 /** * Sends the component to the player * -@@ -2799,4 +2811,121 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2806,4 +2818,111 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ long getLastTickOversleepTime(); // Gale end - YAPFA - last tick time - API @@ -473,7 +474,6 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + // Purpur start - Bring back server name + /** + * Get the name of this server -+ * + * @return the name of the server + */ + @NotNull @@ -481,7 +481,6 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + // Purpur end - Bring back server name + + // Purpur start - Lagging threshold -+ + /** + * Check if server is lagging according to laggy threshold setting + * @@ -491,7 +490,6 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + // Purpur end - Lagging threshold + + // Purpur start - Added the ability to add combustible items -+ + /** + * Add an Item as fuel for furnaces + * @@ -509,12 +507,10 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + // Purpur end - Added the ability to add combustible items + + // Purpur start - Debug Marker API -+ + /** + * Creates debug block highlight on specified block location and show it to all players on the server. + *

+ * Clients may be inconsistent in displaying it. -+ * + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + */ @@ -524,10 +520,9 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + * Creates debug block highlight on specified block location and show it to all players on the server. + *

+ * Clients may be inconsistent in displaying it. -+ * + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds -+ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client + */ + void sendBlockHighlight(@NotNull Location location, int duration, int argb); + @@ -535,10 +530,9 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + * Creates debug block highlight on specified block location and show it to all players on the server. + *

+ * Clients may be inconsistent in displaying it. -+ * + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds -+ * @param text Text to show above the highlight ++ * @param text Text to show above the highlight + */ + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text); + @@ -546,11 +540,10 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + * Creates debug block highlight on specified block location and show it to all players on the server. + *

+ * Clients may be inconsistent in displaying it. -+ * + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds -+ * @param text Text to show above the highlight -+ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @param text Text to show above the highlight ++ * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client + */ + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb); + @@ -558,10 +551,9 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + * Creates debug block highlight on specified block location and show it to all players on the server. + *

+ * Clients may be inconsistent in displaying it. -+ * -+ * @param location Location to highlight -+ * @param duration Duration for highlight to show in milliseconds -+ * @param color Color of the highlight. Will be ignored on some versions of vanilla client ++ * @param location Location to highlight ++ * @param duration Duration for highlight to show in milliseconds ++ * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range + */ @@ -571,11 +563,10 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + * Creates debug block highlight on specified block location and show it to all players on the server. + *

+ * Clients may be inconsistent in displaying it. -+ * -+ * @param location Location to highlight -+ * @param duration Duration for highlight to show in milliseconds -+ * @param text Text to show above the highlight -+ * @param color Color of the highlight. Will be ignored on some versions of vanilla client ++ * @param location Location to highlight ++ * @param duration Duration for highlight to show in milliseconds ++ * @param text Text to show above the highlight ++ * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range + */ @@ -588,10 +579,10 @@ index db8c2d3ded812e8d96b8752d4890006d022e72a6..b4d8bc92cf99dbc470e259f569be20e2 + // Purpur end - Debug Marker API } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index a8b64f78bf3c453094074b4b4d3c8fd07b9eb273..d0c2ff65893c1fd3903633ebc24aae879dc91f10 100644 +index 04a1379f5fe281ab72610d2f8f18e1355fe3a134..f75b76bf5c0025d4f74037de435d9cb1aa8defee 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4290,6 +4290,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4308,6 +4308,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public DragonBattle getEnderDragonBattle(); @@ -811,7 +802,7 @@ index 332c55fd6b4b3a8c0cad920a6e765ecc40e684e4..10a8d64ad2da0be2c14f34c3e7d1957c // Paper start /** diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 66a31c5d83b78dddb43e70cfd5ce7c7fb8a551b6..b6ee04873c1ee57f7e8804f6d247806f2c0e448f 100644 +index 0aa51b777fd28444b53ccc74362798553954c52d..a3d2013adf038f1fe96127c5dba442ffd2e031a8 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -1261,4 +1261,59 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -1170,7 +1161,7 @@ index 7fbfdb07585c7b28acea1f0c1f58ada0cc744441..21fcca092e2e31baa5ece0de9e44e3fa + // Purpur end } diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java -index 4d88bb2eaa43709fb6103a6f77d8c01e83bfe743..bb3773e002ebcfd8eced792bf0236c4cfbae8663 100644 +index 1be07639143cd80bd4fb304d6f3bbced58887617..120159852cae3b1a71c6c7ce949cadb386023095 100644 --- a/src/main/java/org/bukkit/entity/Villager.java +++ b/src/main/java/org/bukkit/entity/Villager.java @@ -408,4 +408,13 @@ public interface Villager extends AbstractVillager { @@ -1213,7 +1204,7 @@ index 11ae1b3ad8c215f9245945d223c52f4a62ac47d9..7f23eb5a60ff08fb31e8ba3731a43bd7 + // Purpur end } diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java -index a6414ffc4a6d8ebef3486abc877688507e34e5c8..ade8b061f0a3d94f990e997659d5ad32aa1631c4 100644 +index d0a64457e4bf40f2a78ffe90c2d402adc154e327..ea51840e4f40733a48ca34f7a8fcf17dc963d659 100644 --- a/src/main/java/org/bukkit/entity/Wolf.java +++ b/src/main/java/org/bukkit/entity/Wolf.java @@ -163,4 +163,20 @@ public interface Wolf extends Tameable, Sittable, io.papermc.paper.entity.Collar diff --git a/leaf-api/paper-patches/features/0013-Remove-Timings.patch b/leaf-api/paper-patches/features/0012-Remove-Timings.patch similarity index 99% rename from leaf-api/paper-patches/features/0013-Remove-Timings.patch rename to leaf-api/paper-patches/features/0012-Remove-Timings.patch index d6c3127a..02d4eaa1 100644 --- a/leaf-api/paper-patches/features/0013-Remove-Timings.patch +++ b/leaf-api/paper-patches/features/0012-Remove-Timings.patch @@ -2936,7 +2936,7 @@ index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e6501 server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper throw new CommandException(msg, ex); diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 2e6d62c4f3687e299c34e876c503b400e13be05a..e7f1a35610d53891d346a3284cca1bca8e53761d 100644 +index cc07a76545aefbf9eb0915025c89770298be2c1c..9788a49287ea5d537d19e55f6bffedf79d3b05d6 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -61,7 +61,6 @@ public final class SimplePluginManager implements PluginManager { diff --git a/leaf-api/paper-patches/features/0014-KeYi-Player-Skull-API.patch b/leaf-api/paper-patches/features/0013-KeYi-Player-Skull-API.patch similarity index 100% rename from leaf-api/paper-patches/features/0014-KeYi-Player-Skull-API.patch rename to leaf-api/paper-patches/features/0013-KeYi-Player-Skull-API.patch diff --git a/leaf-api/paper-patches/features/0015-Slice-Smooth-Teleports.patch b/leaf-api/paper-patches/features/0014-Slice-Smooth-Teleports.patch similarity index 100% rename from leaf-api/paper-patches/features/0015-Slice-Smooth-Teleports.patch rename to leaf-api/paper-patches/features/0014-Slice-Smooth-Teleports.patch diff --git a/leaf-api/paper-patches/features/0015-Use-warning-instead-of-direct-throw.patch b/leaf-api/paper-patches/features/0015-Use-warning-instead-of-direct-throw.patch new file mode 100644 index 00000000..f54b4b3e --- /dev/null +++ b/leaf-api/paper-patches/features/0015-Use-warning-instead-of-direct-throw.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> +Date: Mon, 30 Jun 2025 02:41:48 +0800 +Subject: [PATCH] Use warning instead of direct throw + +Dreeam's Note: +We use soft warning which in Paper is directly exception throw, +Only print warning to avoid break plugins directly. + +Also see `Configurable LibraryLoader maven repos` patch, +able to match googleapi mirror urls, to replace to repo url we custom defined. +This able to switch back to maven central repo, to prevent +situation that dependencies exist in maven central, but not in mirror. + +diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java +index c1fccd64b1329e31ccf7e6a11853ce3a749b7ea4..b0069a05c322e058f0df668908f0918c0b85a814 100644 +--- a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java ++++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java +@@ -121,10 +121,13 @@ public class MavenLibraryResolver implements ClassPathLibrary { + */ + public void addRepository(final RemoteRepository remoteRepository) { + if (MAVEN_CENTRAL_URLS.stream().anyMatch(remoteRepository.getUrl()::startsWith)) { +- LOGGER.warn( +- "Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead.", +- new RuntimeException("Plugin used Maven Central for library resolution") +- ); ++ // Leaf start - Use warning instead of direct throw ++ try { ++ throw new RuntimeException("Plugin used Maven Central for library resolution"); ++ } catch (RuntimeException e) { ++ LOGGER.error("Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead. Please contact plugin's support for help.", e); ++ } ++ // Leaf end - Use warning instead of direct throw + } + this.repositories.add(remoteRepository); + } diff --git a/leaf-api/paper-patches/features/0016-Configurable-LibraryLoader-maven-repos.patch b/leaf-api/paper-patches/features/0016-Configurable-LibraryLoader-maven-repos.patch index 125dfdfe..9a125a56 100644 --- a/leaf-api/paper-patches/features/0016-Configurable-LibraryLoader-maven-repos.patch +++ b/leaf-api/paper-patches/features/0016-Configurable-LibraryLoader-maven-repos.patch @@ -7,10 +7,10 @@ Add JVM flag `-DLeaf.library-download-repo=link` to choose library download repo e.g. `-DLeaf.library-download-repo=https://maven.aliyun.com/repository/public` diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java -index f12c25f35f3d26dc69e05c7965385e66a3d3d545..f5fb8c3214a421c4d4f681176335dc92cf59834a 100644 +index b0069a05c322e058f0df668908f0918c0b85a814..b899e9cbb2658c7f08343b2e6500fb34427fc238 100644 --- a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java +++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java -@@ -60,12 +60,25 @@ public class MavenLibraryResolver implements ClassPathLibrary { +@@ -59,12 +59,25 @@ public class MavenLibraryResolver implements ClassPathLibrary { *

This repository is also used by the legacy {@link org.bukkit.plugin.java.LibraryLoader}.

*/ public static final String MAVEN_CENTRAL_DEFAULT_MIRROR = getDefaultMavenCentralMirror(); @@ -35,18 +35,19 @@ index f12c25f35f3d26dc69e05c7965385e66a3d3d545..f5fb8c3214a421c4d4f681176335dc92 + "http://maven-central-asia.storage-download.googleapis.com/maven2" + }; + // Leaf end - Configurable LibraryLoader maven repos - // Paper end - Avoid and discourage use of Maven Central as a CDN - private static final Logger LOGGER = LoggerFactory.getLogger("MavenLibraryResolver"); -@@ -124,13 +137,32 @@ public class MavenLibraryResolver implements ClassPathLibrary { + + private final RepositorySystem repository; +@@ -120,15 +133,34 @@ public class MavenLibraryResolver implements ClassPathLibrary { + * dependencies from */ public void addRepository(final RemoteRepository remoteRepository) { - // Paper start - Avoid and discourage use of Maven Central as a CDN - if (MAVEN_CENTRAL_URLS.stream().anyMatch(remoteRepository.getUrl()::startsWith)) { +- // Leaf start - Use warning instead of direct throw - try { - throw new RuntimeException("Plugin used Maven Central for library resolution"); - } catch (RuntimeException e) { -- LOGGER.error("Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead.", e); +- LOGGER.error("Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead. Please contact plugin's support for help.", e); + // Leaf start - Configurable LibraryLoader maven repos + for (String url : MAVEN_CENTRAL_URLS) { + if (remoteRepository.getUrl().startsWith(url)) { @@ -55,12 +56,15 @@ index f12c25f35f3d26dc69e05c7965385e66a3d3d545..f5fb8c3214a421c4d4f681176335dc92 + this.repositories.add(mirrorRepo); + return; + } ++ // Leaf start - Use warning instead of direct throw + try { + throw new RuntimeException("Plugin used Maven Central for library resolution"); + } catch (RuntimeException e) { -+ LOGGER.error("Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead.", e); ++ LOGGER.error("Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead. Please contact plugin's support for help.", e); + } ++ // Leaf end - Use warning instead of direct throw } +- // Leaf end - Use warning instead of direct throw } + // Match google api maven central mirror urls + for (String url : MAVEN_CENTRAL_GOOGLE_MIRROR_URLS) { @@ -73,13 +77,13 @@ index f12c25f35f3d26dc69e05c7965385e66a3d3d545..f5fb8c3214a421c4d4f681176335dc92 + } + } + // Leaf end - Configurable LibraryLoader maven repos - // Paper end - Avoid and discourage use of Maven Central as a CDN this.repositories.add(remoteRepository); } -@@ -170,4 +202,15 @@ public class MavenLibraryResolver implements ClassPathLibrary { + +@@ -165,4 +197,15 @@ public class MavenLibraryResolver implements ClassPathLibrary { + } return central; } - // Paper end - Avoid and discourage use of Maven Central as a CDN + + // Leaf start - Configurable LibraryLoader maven repos + @org.jspecify.annotations.Nullable @@ -93,14 +97,14 @@ index f12c25f35f3d26dc69e05c7965385e66a3d3d545..f5fb8c3214a421c4d4f681176335dc92 + // Leaf end - Configurable LibraryLoader maven repos } diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -index 1f2e86e9a830b990bbba3704889671465816ea1c..fce316374a0ae06a34acbce0907dfde52b7905e8 100644 +index 70d57e6abbd876d7f3087905d5277777162d317c..15992c275ae143af5b140a787f921658de58e05a 100644 --- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java +++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -@@ -49,6 +49,7 @@ public class LibraryLoader { +@@ -47,6 +47,7 @@ public class LibraryLoader { + public static java.util.function.Function, List> REMAPPER; // Paper - remap libraries - // Paper start - Avoid and discourage use of Maven Central as a CDN private static List getRepositories() { -+ if (io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver.CUSTOM_MAVEN_CENTRAL_MIRROR_REPO != null) return List.of(io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver.CUSTOM_MAVEN_CENTRAL_MIRROR_REPO); // Leaf - Configurable LibraryLoader maven repos - return List.of(new RemoteRepository.Builder("central", "default", io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR).build()); ++ if (io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver.CUSTOM_MAVEN_CENTRAL_MIRROR_REPO != null) return List.of(io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver.CUSTOM_MAVEN_CENTRAL_MIRROR_REPO ); // Leaf - Configurable LibraryLoader maven repos + return List.of(new RemoteRepository.Builder("central", "default", MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR).build()); } - // Paper end - Avoid and discourage use of Maven Central as a CDN + diff --git a/leaf-api/paper-patches/features/0017-Leaves-Replay-Mod-API.patch b/leaf-api/paper-patches/features/0017-Leaves-Replay-Mod-API.patch index 862ef580..aaeb9364 100644 --- a/leaf-api/paper-patches/features/0017-Leaves-Replay-Mod-API.patch +++ b/leaf-api/paper-patches/features/0017-Leaves-Replay-Mod-API.patch @@ -11,10 +11,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by ReplayMod(https://github.com/ReplayMod) diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 98cfd68226494dbb1a2eaa6680e23a76c2129a62..0f8a1b82dc9d3f4911a0aaa092ef06388ace5108 100644 +index f04f42832a098836bf41e98787c2db35d154c892..b7782de2fb8e636e82a6ef89a62edeec902b367e 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -3202,4 +3202,10 @@ public final class Bukkit { +@@ -3211,4 +3211,10 @@ public final class Bukkit { server.clearBlockHighlights(); } // Purpur end - Debug Marker API @@ -26,10 +26,10 @@ index 98cfd68226494dbb1a2eaa6680e23a76c2129a62..0f8a1b82dc9d3f4911a0aaa092ef0638 + // Leaves end - Photographer API } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b4d8bc92cf99dbc470e259f569be20e2d0ce00c8..64a94b228fe70ff81b2b9af337339bc7ea15b958 100644 +index cc12db46d30c2499dea87f953ef6bf1fa18900c9..0d8463905bc15382c284fc31a1be6fbb7ee0a46b 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2928,4 +2928,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2925,4 +2925,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ void clearBlockHighlights(); // Purpur end - Debug Marker API diff --git a/leaf-api/paper-patches/features/0018-Async-structure-locate-api.patch b/leaf-api/paper-patches/features/0018-Async-structure-locate-api.patch index b44f74ae..d144d14c 100644 --- a/leaf-api/paper-patches/features/0018-Async-structure-locate-api.patch +++ b/leaf-api/paper-patches/features/0018-Async-structure-locate-api.patch @@ -9,10 +9,10 @@ Added some asynchronous structure locate methods in World, requires async-locator to be enabled in Leaf config, or else it will fall back to sync methods. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index d0c2ff65893c1fd3903633ebc24aae879dc91f10..000ed0527609690b01a32053557b74049beed73c 100644 +index f75b76bf5c0025d4f74037de435d9cb1aa8defee..0f1a6ac47c1b6d66d611a4c9bb0198b07d3e7a1c 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4084,6 +4084,60 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4102,6 +4102,60 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); diff --git a/leaf-api/paper-patches/features/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch b/leaf-archived-patches/removed/1.21.6/api/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch similarity index 99% rename from leaf-api/paper-patches/features/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch rename to leaf-archived-patches/removed/1.21.6/api/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch index 6a19d820..840c5577 100644 --- a/leaf-api/paper-patches/features/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch +++ b/leaf-archived-patches/removed/1.21.6/api/0003-Paper-Avoid-and-discourage-use-of-Maven-Central-as-a.patch @@ -3,6 +3,8 @@ From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Wed, 18 Jun 2025 10:47:21 -0700 Subject: [PATCH] Paper: Avoid and discourage use of Maven Central as a CDN +Removed since Leaf 1.21.6, added in Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch b/leaf-archived-patches/removed/1.21.6/mcserver/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch rename to leaf-archived-patches/removed/1.21.6/mcserver/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch index 328fa224..0d97e0fe 100644 --- a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch +++ b/leaf-archived-patches/removed/1.21.6/mcserver/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch @@ -4,6 +4,9 @@ Date: Sun, 19 Nov 2023 12:35:16 -0300 Subject: [PATCH] SparklyPaper: Skip EntityScheduler's executeTick checks if there isn't any tasks to be run +Removed since Leaf 1.21.6, replaced by spottedleaf's impl added on Paper +https://github.com/PaperMC/Paper/commit/7c90c7c4970b44b8bcaebd1b3f4f124e9757dc3c + Original project: https://github.com/SparklyPower/SparklyPaper On each tick, Paper runs EntityScheduler's executeTick of each entity. This is a bit expensive, due to ArrayDeque's size() call because it ain't a simple "get the current queue size" function, due to the thread checks, and because it needs to iterate all entities in all worlds. diff --git a/leaf-server/minecraft-patches/features/0272-Paper-Fix-excess-slot-updates.patch b/leaf-archived-patches/removed/1.21.6/mcserver/0275-Paper-Fix-excess-slot-updates.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0272-Paper-Fix-excess-slot-updates.patch rename to leaf-archived-patches/removed/1.21.6/mcserver/0275-Paper-Fix-excess-slot-updates.patch index 55db9ebe..41e1a530 100644 --- a/leaf-server/minecraft-patches/features/0272-Paper-Fix-excess-slot-updates.patch +++ b/leaf-archived-patches/removed/1.21.6/mcserver/0275-Paper-Fix-excess-slot-updates.patch @@ -3,6 +3,8 @@ From: AJ Ferguson Date: Mon, 6 Jan 2025 20:31:00 +1100 Subject: [PATCH] Paper: Fix excess slot updates +Removed since Leaf 1.21.6, added in Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper Paper pull request: https://github.com/PaperMC/Paper/pull/12654 diff --git a/leaf-server/minecraft-patches/features/0279-Paper-Improve-Fix-MC-44654.patch b/leaf-archived-patches/removed/1.21.6/mcserver/0279-Paper-Improve-Fix-MC-44654.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0279-Paper-Improve-Fix-MC-44654.patch rename to leaf-archived-patches/removed/1.21.6/mcserver/0279-Paper-Improve-Fix-MC-44654.patch index 3c6aa896..ea9b6de3 100644 --- a/leaf-server/minecraft-patches/features/0279-Paper-Improve-Fix-MC-44654.patch +++ b/leaf-archived-patches/removed/1.21.6/mcserver/0279-Paper-Improve-Fix-MC-44654.patch @@ -3,6 +3,8 @@ From: Owen <23108066+Owen1212055@users.noreply.github.com> Date: Fri, 20 Jun 2025 16:02:24 -0400 Subject: [PATCH] Paper: Improve Fix MC-44654 +Removed since Leaf 1.21.6, added in Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/minecraft-patches/features/0280-Paper-Cleanup-Primed-TNT-Fix.patch b/leaf-archived-patches/removed/1.21.6/mcserver/0280-Paper-Cleanup-Primed-TNT-Fix.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0280-Paper-Cleanup-Primed-TNT-Fix.patch rename to leaf-archived-patches/removed/1.21.6/mcserver/0280-Paper-Cleanup-Primed-TNT-Fix.patch index c414e012..3f16d38e 100644 --- a/leaf-server/minecraft-patches/features/0280-Paper-Cleanup-Primed-TNT-Fix.patch +++ b/leaf-archived-patches/removed/1.21.6/mcserver/0280-Paper-Cleanup-Primed-TNT-Fix.patch @@ -3,6 +3,8 @@ From: Owen <23108066+Owen1212055@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:22:37 -0400 Subject: [PATCH] Paper: Cleanup Primed TNT Fix +Removed since Leaf 1.21.6, added in Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/minecraft-patches/features/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch b/leaf-archived-patches/removed/1.21.6/mcserver/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch rename to leaf-archived-patches/removed/1.21.6/mcserver/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch index c4789c17..35eb69d4 100644 --- a/leaf-server/minecraft-patches/features/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch +++ b/leaf-archived-patches/removed/1.21.6/mcserver/0281-Paper-Fix-Raids-illager-ominus-banner-pickup-mechani.patch @@ -4,6 +4,8 @@ Date: Fri, 20 Jun 2025 19:22:27 -0400 Subject: [PATCH] Paper: Fix Raids - illager ominus banner pickup mechanic broken +Removed since Leaf 1.21.6, added in Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/paper-patches/features/0015-Optimize-entity-coordinate-key.patch b/leaf-archived-patches/removed/1.21.6/paperserver/0015-Optimize-entity-coordinate-key.patch similarity index 97% rename from leaf-server/paper-patches/features/0015-Optimize-entity-coordinate-key.patch rename to leaf-archived-patches/removed/1.21.6/paperserver/0015-Optimize-entity-coordinate-key.patch index 34ed20f0..6d49417e 100644 --- a/leaf-server/paper-patches/features/0015-Optimize-entity-coordinate-key.patch +++ b/leaf-archived-patches/removed/1.21.6/paperserver/0015-Optimize-entity-coordinate-key.patch @@ -3,6 +3,8 @@ From: Martijn Muijsers Date: Wed, 23 Nov 2022 23:32:51 +0100 Subject: [PATCH] Optimize entity coordinate key +Removed since Leaf 1.21.6, added in Paper + License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/leaf-server/paper-patches/features/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch b/leaf-archived-patches/removed/1.21.6/paperserver/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch similarity index 97% rename from leaf-server/paper-patches/features/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch rename to leaf-archived-patches/removed/1.21.6/paperserver/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch index 1a501f33..c8d7ddc6 100644 --- a/leaf-server/paper-patches/features/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch +++ b/leaf-archived-patches/removed/1.21.6/paperserver/0033-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch @@ -4,6 +4,9 @@ Date: Sun, 19 Nov 2023 12:35:16 -0300 Subject: [PATCH] SparklyPaper: Skip EntityScheduler's executeTick checks if there isn't any tasks to be run +Removed since Leaf 1.21.6, replaced by spottedleaf's impl added on Paper +https://github.com/PaperMC/Paper/commit/7c90c7c4970b44b8bcaebd1b3f4f124e9757dc3c + Original project: https://github.com/SparklyPower/SparklyPaper On each tick, Paper runs EntityScheduler's executeTick of each entity. This is a bit expensive, due to ArrayDeque's size() call because it ain't a simple "get the current queue size" function, due to the thread checks, and because it needs to iterate all entities in all worlds. diff --git a/leaf-server/paper-patches/features/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch b/leaf-archived-patches/removed/1.21.6/paperserver/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch similarity index 98% rename from leaf-server/paper-patches/features/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch rename to leaf-archived-patches/removed/1.21.6/paperserver/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch index b899e268..1f3afa5b 100644 --- a/leaf-server/paper-patches/features/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch +++ b/leaf-archived-patches/removed/1.21.6/paperserver/0058-Paper-Optimise-CraftWorld-getLoadedChunks.patch @@ -3,6 +3,8 @@ From: Spottedleaf Date: Thu, 5 Jun 2025 08:16:25 -0700 Subject: [PATCH] Paper: Optimise CraftWorld#getLoadedChunks +Removed since Paper 1.21.6, added on Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/paper-patches/features/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch b/leaf-archived-patches/removed/1.21.6/paperserver/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch similarity index 97% rename from leaf-server/paper-patches/features/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch rename to leaf-archived-patches/removed/1.21.6/paperserver/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch index bc0a0581..8d6aea54 100644 --- a/leaf-server/paper-patches/features/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch +++ b/leaf-archived-patches/removed/1.21.6/paperserver/0059-Paper-Update-CraftWorld-getForceLoadedChunks-to-avoi.patch @@ -4,6 +4,8 @@ Date: Thu, 5 Jun 2025 14:55:57 -0700 Subject: [PATCH] Paper: Update CraftWorld#getForceLoadedChunks to avoid using getChunkAt +Removed since Paper 1.21.6, added on Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/paper-patches/features/0060-Paper-Check-type-of-Material-in-get-set-stats.patch b/leaf-archived-patches/removed/1.21.6/paperserver/0060-Paper-Check-type-of-Material-in-get-set-stats.patch similarity index 99% rename from leaf-server/paper-patches/features/0060-Paper-Check-type-of-Material-in-get-set-stats.patch rename to leaf-archived-patches/removed/1.21.6/paperserver/0060-Paper-Check-type-of-Material-in-get-set-stats.patch index f4145586..1a652c71 100644 --- a/leaf-server/paper-patches/features/0060-Paper-Check-type-of-Material-in-get-set-stats.patch +++ b/leaf-archived-patches/removed/1.21.6/paperserver/0060-Paper-Check-type-of-Material-in-get-set-stats.patch @@ -3,6 +3,8 @@ From: Pedro <3602279+Doc94@users.noreply.github.com> Date: Fri, 20 Jun 2025 10:45:40 -0400 Subject: [PATCH] Paper: Check type of Material in get/set stats +Removed since Leaf 1.21.6, added in Paper + Original license: GPLv3 Original project: https://github.com/PaperMC/Paper diff --git a/leaf-server/minecraft-patches/features/0241-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch b/leaf-archived-patches/work/server/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0241-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch rename to leaf-archived-patches/work/server/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch index a8ab5e52..28f98bad 100644 --- a/leaf-server/minecraft-patches/features/0241-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch +++ b/leaf-archived-patches/work/server/0244-Sakura-Optimise-check-inside-blocks-and-traverse-blo.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Sakura: Optimise check inside blocks and traverse blocks Dreeam TODO: refactor checkinsideblcoks diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 8618a9221bb4feb459ed50c20c9dc5edb6308aec..9305f790bd80df1d7d14065e6ad621ec9c2e1a49 100644 +index e0db9281f023a09d69479f28a7c8f681641f642f..cc6b6b442d72b4a974cedd8ceef710304e52ab18 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -1701,6 +1701,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/leaf-server/minecraft-patches/features/0270-Cache-potential-behaviors-in-Brain.patch b/leaf-archived-patches/work/server/0270-Cache-potential-behaviors-in-Brain.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0270-Cache-potential-behaviors-in-Brain.patch rename to leaf-archived-patches/work/server/0270-Cache-potential-behaviors-in-Brain.patch index 28995b66..0b53e82f 100644 --- a/leaf-server/minecraft-patches/features/0270-Cache-potential-behaviors-in-Brain.patch +++ b/leaf-archived-patches/work/server/0270-Cache-potential-behaviors-in-Brain.patch @@ -3,6 +3,8 @@ From: Taiyou06 Date: Sat, 7 Jun 2025 19:21:19 +0200 Subject: [PATCH] Cache potential behaviors in Brain +Replace by ActivityBitSet and cache availableBehaviorsByPriority TreeMap entry +TODO: benchmark diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java index 655c3028440e62bcc01d8f1b3e808fd68484128e..7f6572d2259cd244222e5893c9e906075cc3cb92 100644 diff --git a/leaf-server/minecraft-patches/features/0271-Use-ActivationList-on-runningBehaviors.patch b/leaf-archived-patches/work/server/0271-Use-ActivationList-on-runningBehaviors.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0271-Use-ActivationList-on-runningBehaviors.patch rename to leaf-archived-patches/work/server/0271-Use-ActivationList-on-runningBehaviors.patch index 564402d1..52ad29c9 100644 --- a/leaf-server/minecraft-patches/features/0271-Use-ActivationList-on-runningBehaviors.patch +++ b/leaf-archived-patches/work/server/0271-Use-ActivationList-on-runningBehaviors.patch @@ -3,6 +3,8 @@ From: Taiyou06 Date: Sat, 7 Jun 2025 23:22:56 +0200 Subject: [PATCH] Use ActivationList on runningBehaviors +Replace by ActivityBitSet and cache availableBehaviorsByPriority TreeMap entry +TODO: benchmark diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java index 7f6572d2259cd244222e5893c9e906075cc3cb92..521f07a1ef8bfa708fcabf1434fdf133022ee92a 100644 diff --git a/leaf-server/build.gradle.kts.patch b/leaf-server/build.gradle.kts.patch index 5286eff6..2e94181d 100644 --- a/leaf-server/build.gradle.kts.patch +++ b/leaf-server/build.gradle.kts.patch @@ -1,21 +1,21 @@ --- a/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts -@@ -13,10 +_,11 @@ +@@ -15,10 +_,11 @@ } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" +val leafMavenPublicUrl = "https://maven.nostal.ink/repository/maven-snapshots/" // Leaf - project setup - Add publish repo dependencies { - mache("io.papermc:mache:1.21.5+build.2") + mache("io.papermc:mache:1.21.6+build.1") - paperclip("io.papermc:paperclip:3.0.3") + paperclip("cn.dreeam:quantumleaper:1.0.0-SNAPSHOT") // Leaf - project setup - Use own paperclip fork testRuntimeOnly("org.junit.platform:junit-platform-launcher") } -@@ -28,6 +_,19 @@ - // oldPaperCommit = "f4f275519f7c1fbe9db173b7144a4fe81440e365" - //} +@@ -26,6 +_,19 @@ + minecraftVersion = providers.gradleProperty("mcVersion") + gitFilePatches = false + // Leaf start - project setup + val leaf = forks.register("leaf") { @@ -31,9 +31,9 @@ + // Leaf end - project setup + spigot { - buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc" - packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment -@@ -50,6 +_,7 @@ + enabled = true + buildDataRef = "281ac0de7a76d808753ede97d11b034bc801b63d" +@@ -49,6 +_,7 @@ libraryRepositories.addAll( "https://repo.maven.apache.org/maven2/", paperMavenPublicUrl, @@ -41,7 +41,7 @@ ) } -@@ -108,7 +_,22 @@ +@@ -107,7 +_,22 @@ } } @@ -65,7 +65,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { extendsFrom(configurations.compileClasspath.get()) } -@@ -130,10 +_,20 @@ +@@ -129,10 +_,20 @@ } dependencies { @@ -87,9 +87,9 @@ + implementation("org.jline:jline-terminal-ffm:3.29.0") // use ffm on java 22+ // Leaf - Bump Dependencies + implementation("org.jline:jline-terminal-jni:3.29.0") // fall back to jni on java 21 // Leaf - Bump Dependencies implementation("net.minecrell:terminalconsoleappender:1.3.0") - implementation("net.kyori:adventure-text-serializer-ansi:4.21.0") // Keep in sync with adventureVersion from Paper-API build file + implementation("net.kyori:adventure-text-serializer-ansi:4.23.0") // Keep in sync with adventureVersion from Paper-API build file runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath }) -@@ -144,41 +_,58 @@ +@@ -143,41 +_,58 @@ all its classes to check if they are plugins. Scanning takes about 1-2 seconds so adding this speeds up the server start. */ @@ -161,7 +161,7 @@ implementation("net.neoforged:srgutils:1.0.9") // Mappings handling implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins -@@ -189,31 +_,45 @@ +@@ -188,31 +_,45 @@ implementation("io.papermc:reflection-rewriter-runtime:$reflectionRewriterVersion") implementation("io.papermc:reflection-rewriter-proxy-generator:$reflectionRewriterVersion") @@ -216,7 +216,7 @@ "Build-Number" to (build ?: ""), "Build-Time" to buildTime.toString(), "Git-Branch" to gitBranch, -@@ -267,7 +_,7 @@ +@@ -271,7 +_,7 @@ jvmArgumentProviders.add(provider) } @@ -225,7 +225,7 @@ idea { module { generatedSourceDirs.add(generatedDir.toFile()) -@@ -325,6 +_,8 @@ +@@ -329,6 +_,8 @@ val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2") minHeapSize = "${memoryGb}G" maxHeapSize = "${memoryGb}G" @@ -234,9 +234,9 @@ doFirst { workingDir.mkdirs() -@@ -370,3 +_,62 @@ - classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip }) - mainClass.set(null as String?) +@@ -391,3 +_,62 @@ + } + } } + +// Gale start - package license into jar diff --git a/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch b/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch index c3806897..6337923d 100644 --- a/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch +++ b/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch @@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..96d34149b1009b1522335784bc1858f61bb59cd1 100644 +index d6dcb6d146d89a8fb96e7c669e5deb802223abd6..84f4f0c87f904a31f3f972e9fb1da8a01474dfca 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -299,6 +299,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation -@@ -469,6 +470,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, AutoCl diff --git a/leaf-server/minecraft-patches/features/0003-Leaf-config.patch b/leaf-server/minecraft-patches/features/0003-Leaf-config.patch index 609c03c7..20ed777a 100644 --- a/leaf-server/minecraft-patches/features/0003-Leaf-config.patch +++ b/leaf-server/minecraft-patches/features/0003-Leaf-config.patch @@ -13,10 +13,10 @@ Update config reload: (Or sync reload) diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf496f0c00c4 100644 +index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b16f3f515a76ddbbd74d73464396cf094cb30599 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -108,10 +108,12 @@ public class Main { +@@ -109,10 +109,12 @@ public class Main { JvmProfiler.INSTANCE.start(Environment.SERVER); } @@ -30,10 +30,10 @@ index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf49 DedicatedServerSettings dedicatedServerSettings = new DedicatedServerSettings(optionSet); // CraftBukkit - CLI argument support dedicatedServerSettings.forceSave(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 96d34149b1009b1522335784bc1858f61bb59cd1..d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6 100644 +index 54a9c4b14a51b3480d634703d4936b15330fba53..991833bfa8d6cb6ab3faccc94199b7105523583f 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1182,6 +1182,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop parseResults, String command, String label, boolean throwCommandError) { + org.spigotmc.AsyncCatcher.catchOp("Cannot perform command async"); // Paper end CommandSourceStack commandSourceStack = parseResults.getContext().getSource(); - Profiler.get().push(() -> "/" + command); - ContextChain contextChain = this.finishParsing(parseResults, command, commandSourceStack, label); // CraftBukkit // Paper - Add UnknownCommandEvent + ContextChain contextChain = finishParsing(parseResults, command, commandSourceStack); try { -@@ -385,8 +381,6 @@ public class Commands { +@@ -387,8 +383,6 @@ public class Commands { commandSourceStack.sendFailure(Component.literal(Util.describeError(var12))); LOGGER.error("'/{}' threw an exception", command, var12); } @@ -81,7 +81,7 @@ index 1927163db5d44383b69f41e4b9855535e853d127..f1a637272a8e4ec9c46209ca6b58a490 } } -@@ -443,7 +437,7 @@ public class Commands { +@@ -445,7 +439,7 @@ public class Commands { int max = Math.max(1, server.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_CHAIN_LENGTH)); int _int = server.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT); @@ -169,10 +169,10 @@ index 18071dcc69cc28471dddb7de94e803ec1e5fc2e4..e30bb9c4046200c1a6e4e917d15b205f } } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9 100644 +index 89b7af92f9d8e4e449d9eb1a3ddfe2ec89fd63a4..4deffef83bc7afe688127b9cf184c95bf82f86c8 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -113,19 +113,8 @@ import net.minecraft.util.TimeUtil; +@@ -114,19 +114,8 @@ import net.minecraft.util.TimeUtil; import net.minecraft.util.debugchart.RemoteDebugSampleType; import net.minecraft.util.debugchart.SampleLogger; import net.minecraft.util.debugchart.TpsDebugDimensions; @@ -192,7 +192,7 @@ index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf096 import net.minecraft.util.thread.ReentrantBlockableEventLoop; import net.minecraft.world.Difficulty; import net.minecraft.world.RandomSequences; -@@ -198,13 +187,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop tickables = Lists.newArrayList(); @@ -206,7 +206,7 @@ index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf096 private ServerConnectionListener connection; public final ChunkProgressListenerFactory progressListenerFactory; @Nullable -@@ -989,9 +971,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop false : this::haveTime); // Paper start - rewrite chunk system -@@ -1258,7 +1230,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1555,10 +1519,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop serverPlayer1.connection.suspendFlushing()); this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit - // Paper start - Folia scheduler API -@@ -1673,9 +1629,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent serverLevel.updateLagCompensationTick(); // Paper - lag compensation net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers @@ -348,7 +348,7 @@ index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf096 try { serverLevel.tick(hasTimeLeft); } catch (Throwable var7) { -@@ -1729,34 +1678,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop true); @@ -790,7 +790,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 - ProfilerFiller profilerFiller = Profiler.get(); - profilerFiller.push("purge"); if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot - this.ticketStorage.purgeStaleTickets(); + this.ticketStorage.purgeStaleTickets(this.chunkMap); } this.runDistanceManagerUpdates(); @@ -807,7 +807,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 this.clearCache(); } -@@ -511,22 +499,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -511,22 +500,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon long l = gameTime - this.lastInhabitedUpdate; this.lastInhabitedUpdate = gameTime; if (!this.level.isDebug()) { @@ -833,7 +833,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 for (ChunkHolder chunkHolder : this.chunkHoldersToBroadcast) { LevelChunk tickingChunk = chunkHolder.getChunkToSend(); // Paper - rewrite chunk system if (tickingChunk != null) { -@@ -535,11 +516,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -535,11 +517,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } this.chunkHoldersToBroadcast.clear(); @@ -846,7 +846,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 int naturalSpawnChunkCount = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - Optional per player mob spawns NaturalSpawner.SpawnState spawnState; -@@ -564,7 +543,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -564,7 +544,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } // Paper end - Optional per player mob spawns this.lastSpawnState = spawnState; @@ -854,7 +854,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 boolean _boolean = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit int _int = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); List filteredSpawningCategories; -@@ -586,14 +564,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -586,14 +565,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon List list = this.spawningChunks; try { @@ -869,7 +869,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 for (LevelChunk levelChunk : list) { this.tickSpawningChunk(levelChunk, timeInhabited, filteredSpawningCategories, spawnState); -@@ -602,10 +577,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -602,10 +578,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon list.clear(); } @@ -880,7 +880,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 if (_boolean) { this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); } -@@ -814,7 +786,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -817,7 +790,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @Override protected void doRunTask(Runnable task) { @@ -889,10 +889,10 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec1293a2ec70b 100644 +index b4c983216cd839d793a09e327bb2f15ab90cbff8..1413511500ce8ae25cc4af1d54fc33c8912c24bc 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -74,8 +74,6 @@ import net.minecraft.util.Mth; +@@ -75,8 +75,6 @@ import net.minecraft.util.Mth; import net.minecraft.util.ProgressListener; import net.minecraft.util.RandomSource; import net.minecraft.util.datafix.DataFixTypes; @@ -901,7 +901,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 import net.minecraft.util.valueproviders.IntProvider; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; -@@ -704,16 +702,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -708,16 +706,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } public void tick(BooleanSupplier hasTimeLeft) { @@ -918,7 +918,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); -@@ -747,41 +741,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -751,41 +745,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.tickTime(); } @@ -960,7 +960,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } io.papermc.paper.entity.activation.ActivationRange.activateEntities(this); // Paper - EAR -@@ -790,9 +773,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -794,9 +777,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity -> { if (!entity.isRemoved()) { if (!tickRateManager.isEntityFrozen(entity)) { @@ -970,7 +970,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (true) { // Paper - rewrite chunk system Entity vehicle = entity.getVehicle(); if (vehicle != null) { -@@ -803,21 +784,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -807,21 +788,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity.stopRiding(); } @@ -992,7 +992,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } @Override -@@ -832,9 +807,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -836,9 +811,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (this.tickTime) { long l = this.levelData.getGameTime() + 1L; this.serverLevelData.setGameTime(l); @@ -1002,7 +1002,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) { this.setDayTime(this.levelData.getDayTime() + 1L); } -@@ -913,8 +886,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -917,8 +890,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ChunkPos pos = chunk.getPos(); int minBlockX = pos.getMinBlockX(); int minBlockZ = pos.getMinBlockZ(); @@ -1011,7 +1011,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow for (int i = 0; i < randomTickSpeed; i++) { -@@ -924,12 +895,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -928,12 +899,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } } // Paper - Option to disable ice and snow @@ -1024,7 +1024,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } public void tickThunder(LevelChunk chunk) { -@@ -937,8 +905,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -941,8 +909,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe boolean isRaining = this.isRaining(); int minBlockX = pos.getMinBlockX(); int minBlockZ = pos.getMinBlockZ(); @@ -1033,7 +1033,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (!this.paperConfig().environment.disableThunder && isRaining && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder BlockPos blockPos = this.findLightningTargetAround(this.getBlockRandomPos(minBlockX, 0, minBlockZ, 15)); if (this.isRainingAt(blockPos)) { -@@ -964,8 +930,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -968,8 +934,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } } } @@ -1042,7 +1042,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } @VisibleForTesting -@@ -1259,17 +1223,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1267,17 +1231,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // Paper end - log detailed entity tick information entity.setOldPosAndRot(); @@ -1060,7 +1060,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 for (Entity entity1 : entity.getPassengers()) { this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2 -@@ -1290,9 +1250,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1298,9 +1258,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe passengerEntity.setOldPosAndRot(); passengerEntity.tickCount++; passengerEntity.totalEntityAge++; // Paper - age-like counter for all entities @@ -1070,7 +1070,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 // Paper start - EAR 2 if (isActive) { passengerEntity.rideTick(); -@@ -1304,7 +1261,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1312,7 +1269,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ridingEntity.positionRider(passengerEntity); } // Paper end - EAR 2 @@ -1079,10 +1079,10 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 for (Entity entity : passengerEntity.getPassengers()) { this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2 diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d8a4661be 100644 +index b1fba7be059247bc4ba4e652f730e026e837b608..5a4b6005de28f62c98ac8172890689d3150fd4da 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -103,8 +103,6 @@ import net.minecraft.util.HashOps; +@@ -106,8 +106,6 @@ import net.minecraft.util.HashOps; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -1091,7 +1091,7 @@ index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d import net.minecraft.world.Container; import net.minecraft.world.Difficulty; import net.minecraft.world.InteractionHand; -@@ -1375,14 +1373,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1471,14 +1469,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.unsetRemoved(); */ // CraftBukkit end @@ -1106,7 +1106,7 @@ index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d // CraftBukkit start this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds LevelData worlddata = level.getLevelData(); -@@ -1399,7 +1393,6 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1495,7 +1489,6 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); level.addDuringTeleport(this); @@ -1115,10 +1115,10 @@ index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d this.stopUsingItem(); this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities())); diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 186393485396cfe9b1baef29586198356e2d2600..776ff13b399fa01bf3900280cf1b5782370732a0 100644 +index 43f70a5561d6cc62aaeba6d1e39598ecb382e369..ccbf60f546974692c2c840f4bce87e2c95d1866c 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -24,7 +24,6 @@ import net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket; +@@ -26,7 +26,6 @@ import net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ClientInformation; import net.minecraft.util.VisibleForDebug; @@ -1126,16 +1126,16 @@ index 186393485396cfe9b1baef29586198356e2d2600..776ff13b399fa01bf3900280cf1b5782 import org.slf4j.Logger; public abstract class ServerCommonPacketListenerImpl implements ServerCommonPacketListener, org.bukkit.craftbukkit.entity.CraftPlayer.TransferCookieConnection { // CraftBukkit -@@ -237,7 +236,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -273,7 +272,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } protected void keepConnectionAlive() { - Profiler.get().push("keepAlive"); long millis = Util.getMillis(); - // Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings - // This should effectively place the keepalive handling back to "as it was" before 1.12.2 -@@ -255,8 +253,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge)); + // Paper start - improve keepalives + if (this.checkIfClosed(millis) && !this.processedDisconnect) { +@@ -294,8 +292,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + // Paper end - improve keepalives } } - @@ -1234,19 +1234,19 @@ index 64b0508ef21952c65b0b967b756b2a4c64d96899..b6b03fbbd669e6331b30255df5419611 protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9cfae142a 100644 +index 162dfba21cee2f3a9eb8403bf04aa3de5211a31c..31a939facfd4b506a2cff3cee6e4b86a12b1d343 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -82,8 +82,6 @@ import net.minecraft.tags.FluidTags; - import net.minecraft.tags.TagKey; +@@ -80,8 +80,6 @@ import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; + import net.minecraft.util.ProblemReporter; import net.minecraft.util.RandomSource; -import net.minecraft.util.profiling.Profiler; -import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.Nameable; -@@ -816,8 +814,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -841,8 +839,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public void baseTick() { @@ -1255,7 +1255,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups this.inBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { -@@ -874,8 +870,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -896,8 +892,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.level() instanceof ServerLevel serverLevelx && this instanceof Leashable) { Leashable.tickLeash(serverLevelx, (Entity & Leashable)this); } @@ -1264,7 +1264,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } public void setSharedFlagOnFire(boolean isOnFire) { -@@ -1095,8 +1089,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1117,8 +1111,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -1273,7 +1273,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) { movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; -@@ -1105,7 +1097,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1127,7 +1119,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - ignore movement changes while inactive. if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) { setDeltaMovement(Vec3.ZERO); @@ -1281,8 +1281,8 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 return; } // Paper end -@@ -1140,8 +1131,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - this.setPos(vec31); +@@ -1152,8 +1143,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + this.setPos(vec32); } - profilerFiller.pop(); @@ -1290,7 +1290,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 boolean flag = !Mth.equal(movement.x, vec3.x); boolean flag1 = !Mth.equal(movement.z, vec3.z); this.horizontalCollision = flag || flag1; -@@ -1164,7 +1153,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1176,7 +1165,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (this.isRemoved()) { @@ -1298,7 +1298,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } else { if (this.horizontalCollision) { Vec3 deltaMovement = this.getDeltaMovement(); -@@ -1208,7 +1196,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1220,7 +1208,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess float blockSpeedFactor = this.getBlockSpeedFactor(); this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor)); @@ -1306,7 +1306,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } } // Paper start - detailed watchdog information -@@ -3212,8 +3199,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3407,8 +3394,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.processPortalCooldown(); if (this.portalProcess != null) { if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) { @@ -1315,7 +1315,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 this.setPortalCooldown(); TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this); if (portalDestination != null) { -@@ -3224,7 +3209,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3419,7 +3404,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -1323,7 +1323,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } else if (this.portalProcess.hasExpired()) { this.portalProcess = null; } -@@ -3779,15 +3763,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3986,15 +3970,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entity.teleport(this.calculatePassengerTransition(teleportTransition, entity)); } @@ -1339,31 +1339,31 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 return this; } -@@ -3803,11 +3784,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4010,11 +3991,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - ProfilerFiller profilerFiller = Profiler.get(); - profilerFiller.push("teleportCrossDimension"); - Entity entityx = this.getType().create(level, EntitySpawnReason.DIMENSION_TRAVEL); + Entity entityx = this.getType().create(newLevel, EntitySpawnReason.DIMENSION_TRAVEL); if (entityx == null) { - profilerFiller.pop(); return null; } else { // Paper start - Fix item duplication and teleport issues -@@ -3826,7 +3804,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - - level.resetEmptyTime(); +@@ -4034,7 +4012,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + newLevel.resetEmptyTime(); teleportTransition.postTeleportTransition().onTransition(entityx); + this.teleportSpectators(teleportTransition, oldLevel); - profilerFiller.pop(); return entityx; } } diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c713290bc008d0 100644 +index 35d71978a3d360eed97feb66d1048bee337ef2b9..97431aa47b5425578bf14b992596962c64c87f35 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -70,8 +70,6 @@ import net.minecraft.tags.FluidTags; +@@ -69,8 +69,6 @@ import net.minecraft.tags.FluidTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; @@ -1372,7 +1372,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 import net.minecraft.world.Difficulty; import net.minecraft.world.InteractionHand; import net.minecraft.world.damagesource.CombatRules; -@@ -415,8 +413,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -429,8 +427,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } super.baseTick(); @@ -1381,7 +1381,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.fireImmune() || this.level().isClientSide) { this.clearFire(); } -@@ -501,7 +497,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -515,7 +511,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.yBodyRotO = this.yBodyRot; this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -1389,7 +1389,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 } @Override -@@ -3233,11 +3228,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3285,11 +3280,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin f1 = this.getYRot(); } @@ -1401,7 +1401,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 // Paper start - stop large pitch and yaw changes from crashing the server this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F; -@@ -3249,7 +3240,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3301,7 +3292,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; // Paper end - stop large pitch and yaw changes from crashing the server @@ -1409,7 +1409,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.isFallFlying()) { this.fallFlyTicks++; } else { -@@ -3425,21 +3415,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3477,21 +3467,15 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } this.setDeltaMovement(d, d1, d2); @@ -1431,7 +1431,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.jumping && this.isAffectedByFluids()) { double fluidHeight; if (this.isInLava()) { -@@ -3468,8 +3452,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3520,8 +3504,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.noJumpDelay = 0; } @@ -1440,7 +1440,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.isFallFlying()) { this.updateFallFlying(); } -@@ -3494,9 +3476,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3546,9 +3528,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.calculateEntityAnimation(this instanceof FlyingAnimal); } @@ -1450,7 +1450,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if ((!this.isInPowderSnow || !this.canFreeze()) && !this.freezeLocked) { // Paper - Freeze Tick Lock API this.setTicksFrozen(Math.max(0, this.getTicksFrozen() - 2)); } -@@ -3506,18 +3486,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3558,18 +3538,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (this.tickCount % 40 == 0 && this.isFullyFrozen() && this.canFreeze()) { this.hurtServer(serverLevel, this.damageSources().freeze(), 1.0F); } @@ -1470,10 +1470,10 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (((ServerLevel) this.level()).hasEntityMoveEvent && !(this instanceof Player)) { if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) { diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e74d5113d 100644 +index 0470c4bbf8be7e48ce8dfa4910c3b9f5ebb23360..4d4b58b684ca115f4d8f672362d4c8252ef9481a 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -30,8 +30,6 @@ import net.minecraft.sounds.SoundEvent; +@@ -26,8 +26,6 @@ import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -1482,7 +1482,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e import net.minecraft.world.Container; import net.minecraft.world.Difficulty; import net.minecraft.world.DifficultyInstance; -@@ -316,14 +314,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -319,14 +317,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void baseTick() { super.baseTick(); @@ -1497,7 +1497,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e } @Override -@@ -489,8 +483,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -502,8 +496,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void aiStep() { super.aiStep(); @@ -1506,7 +1506,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e if (this.level() instanceof ServerLevel serverLevel && this.canPickUpLoot() && this.isAlive() -@@ -513,8 +505,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -526,8 +518,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } } @@ -1515,7 +1515,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e } protected Vec3i getPickupReach() { -@@ -724,42 +714,21 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -741,42 +731,21 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab return; } // Paper end - Allow nerfed mobs to jump and float @@ -1559,10 +1559,10 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e } diff --git a/net/minecraft/world/entity/ai/goal/GoalSelector.java b/net/minecraft/world/entity/ai/goal/GoalSelector.java -index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc17373fa77ff6 100644 +index 859b859d29b637200cf7c9a0bd52d9f712413e3d..653c58c7637c46c8b46a5082f671324a2221d431 100644 --- a/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -7,8 +7,6 @@ import java.util.EnumSet; +@@ -6,8 +6,6 @@ import java.util.EnumSet; import java.util.Map; import java.util.Set; import java.util.function.Predicate; @@ -1571,7 +1571,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 public class GoalSelector { private static final WrappedGoal NO_GOAL = new WrappedGoal(Integer.MAX_VALUE, new Goal() { -@@ -84,9 +82,6 @@ public class GoalSelector { +@@ -82,9 +80,6 @@ public class GoalSelector { } public void tick() { @@ -1581,7 +1581,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 for (WrappedGoal wrappedGoal : this.availableGoals) { if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams wrappedGoal.stop(); -@@ -94,8 +89,6 @@ public class GoalSelector { +@@ -92,8 +87,6 @@ public class GoalSelector { } this.lockedFlags.entrySet().removeIf(entry -> !entry.getValue().isRunning()); @@ -1590,7 +1590,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 for (WrappedGoal wrappedGoalx : this.availableGoals) { // Paper start -@@ -115,21 +108,15 @@ public class GoalSelector { +@@ -113,21 +106,15 @@ public class GoalSelector { } } @@ -1613,7 +1613,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 public Set getAvailableGoals() { diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 06389019deba08c7c0966affcdc90512c88db3d5..6bbdfc748f1ce66689c63424fadcf261b1e967b3 100644 +index 3b29cc4e11efe6f27023f52cfde16fd118c310ad..c8e4ccb96a0f162c780066cf4f61b970b49b7703 100644 --- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -10,8 +10,6 @@ import net.minecraft.core.Vec3i; @@ -1663,11 +1663,38 @@ index c569074403b1d8b443aaa98ba9cf9bbd0e98bd2d..b1aa7294f9479f45fcde77c5ea46db9f if (hasLineOfSight) { this.seen.add(id); } else { +diff --git a/net/minecraft/world/entity/animal/HappyGhast.java b/net/minecraft/world/entity/animal/HappyGhast.java +index 24fdfda487bf5348c32707022719ec9907debc80..4e74d5b3076f50f9294553b453f5903ef32f1e8a 100644 +--- a/net/minecraft/world/entity/animal/HappyGhast.java ++++ b/net/minecraft/world/entity/animal/HappyGhast.java +@@ -13,8 +13,6 @@ import net.minecraft.sounds.SoundEvents; + import net.minecraft.sounds.SoundSource; + import net.minecraft.tags.ItemTags; + import net.minecraft.util.Mth; +-import net.minecraft.util.profiling.Profiler; +-import net.minecraft.util.profiling.ProfilerFiller; + import net.minecraft.world.InteractionHand; + import net.minecraft.world.InteractionResult; + import net.minecraft.world.damagesource.DamageSource; +@@ -379,13 +377,8 @@ public class HappyGhast extends Animal { + @Override + protected void customServerAiStep(ServerLevel level) { + if (this.isBaby()) { +- ProfilerFiller profilerFiller = Profiler.get(); +- profilerFiller.push("happyGhastBrain"); + ((Brain)this.brain).tick(level, this); +- profilerFiller.pop(); +- profilerFiller.push("happyGhastActivityUpdate"); + HappyGhastAi.updateActivity(this); +- profilerFiller.pop(); + } + + this.checkRestriction(); diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index eaa1745d34323cd684782a7fb2e153851a736471..fc2290a62c0a01cfa3143e77384f30e17d94f039 100644 +index b7b964bd4e2d611a3e48ece072d5787193077a92..de3bf0b62371f06ecb5d2035638e352ca0c06182 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -29,8 +29,6 @@ import net.minecraft.tags.GameEventTags; +@@ -25,8 +25,6 @@ import net.minecraft.tags.GameEventTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; @@ -1676,7 +1703,7 @@ index eaa1745d34323cd684782a7fb2e153851a736471..fc2290a62c0a01cfa3143e77384f30e1 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.SimpleContainer; -@@ -241,13 +239,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -226,13 +224,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS @Override protected void customServerAiStep(ServerLevel level) { @@ -1691,10 +1718,10 @@ index eaa1745d34323cd684782a7fb2e153851a736471..fc2290a62c0a01cfa3143e77384f30e1 } diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -index b72e07ad954efa7f26f876a59f428086b40d9bb2..657f4b56699c33590a0494ef860275e952794c2a 100644 +index c1798db2972c8f2a343cf6e16fd9354ff212d906..ee2c6c86631ba50a4e8503131c678596bc2c0363 100644 --- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java +++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -@@ -24,8 +24,6 @@ import net.minecraft.util.ByIdMap; +@@ -23,8 +23,6 @@ import net.minecraft.util.ByIdMap; import net.minecraft.util.RandomSource; import net.minecraft.util.StringRepresentable; import net.minecraft.util.TimeUtil; @@ -1703,7 +1730,7 @@ index b72e07ad954efa7f26f876a59f428086b40d9bb2..657f4b56699c33590a0494ef860275e9 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; -@@ -134,13 +132,8 @@ public class Armadillo extends Animal { +@@ -135,13 +133,8 @@ public class Armadillo extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1718,7 +1745,7 @@ index b72e07ad954efa7f26f876a59f428086b40d9bb2..657f4b56699c33590a0494ef860275e9 this.forceDrops = true; // CraftBukkit if (this.dropFromGiftLootTable(level, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) { diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index 233025bc1d4ba2590223def9b206140c68ea5f26..d3d4d8b025480f9e2202157591319df3af43f9de 100644 +index b0467750dab4c6f411fd2f318009d25f83d94bc0..6a5e9e9582e322aaa1555933de97e545ba74f8f4 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java @@ -31,8 +31,6 @@ import net.minecraft.util.ByIdMap; @@ -1730,7 +1757,7 @@ index 233025bc1d4ba2590223def9b206140c68ea5f26..d3d4d8b025480f9e2202157591319df3 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -327,13 +325,8 @@ public class Axolotl extends Animal implements Bucketable { +@@ -329,13 +327,8 @@ public class Axolotl extends Animal implements Bucketable { @Override protected void customServerAiStep(ServerLevel level) { @@ -1745,10 +1772,10 @@ index 233025bc1d4ba2590223def9b206140c68ea5f26..d3d4d8b025480f9e2202157591319df3 Optional memory = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS); this.setPlayingDead(memory.isPresent() && memory.get() > 0); diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index 6336fb58f4314be2fe987d7e3de258d977369417..b63b32bac1872db7be64fcb645acd0a0a4290cee 100644 +index 757b63ee059c95e673a098706b4ee7ab4fc21f70..adc336c6cec601b8855c1013adf1eebf018597f0 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -19,8 +19,6 @@ import net.minecraft.tags.BlockTags; +@@ -18,8 +18,6 @@ import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -1757,7 +1784,7 @@ index 6336fb58f4314be2fe987d7e3de258d977369417..b63b32bac1872db7be64fcb645acd0a0 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -157,14 +155,9 @@ public class Camel extends AbstractHorse { +@@ -159,14 +157,9 @@ public class Camel extends AbstractHorse { @Override protected void customServerAiStep(ServerLevel level) { @@ -1773,10 +1800,10 @@ index 6336fb58f4314be2fe987d7e3de258d977369417..b63b32bac1872db7be64fcb645acd0a0 } diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 8ffbe420528cd63f30f9b41d4fb0a6519042eadc..fdf40dc10aad108db6ca68fcfec9ecf48f76a9c1 100644 +index 66f503e045ccb0985ec718b39be07eea538fad8d..b8703409dd3dc8e3020ed81b44ce4812984c88c3 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -29,8 +29,6 @@ import net.minecraft.tags.ItemTags; +@@ -28,8 +28,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -1785,7 +1812,7 @@ index 8ffbe420528cd63f30f9b41d4fb0a6519042eadc..fdf40dc10aad108db6ca68fcfec9ecf4 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.AgeableMob; -@@ -203,13 +201,8 @@ public class Frog extends Animal { +@@ -204,13 +202,8 @@ public class Frog extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1800,7 +1827,7 @@ index 8ffbe420528cd63f30f9b41d4fb0a6519042eadc..fdf40dc10aad108db6ca68fcfec9ecf4 } diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index ebdfd3fb6c0de48982d392bb2aa415f3676c6056..faaa8197e8421c2bbdc2a8bbaae4f4d0820dbbe7 100644 +index 17f58246849ed407821a987b200cc765eb7943f9..c1510a6f1146f446ed65a1f08984af6c29de439a 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java @@ -12,8 +12,6 @@ import net.minecraft.server.level.ServerLevel; @@ -1812,7 +1839,7 @@ index ebdfd3fb6c0de48982d392bb2aa415f3676c6056..faaa8197e8421c2bbdc2a8bbaae4f4d0 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; -@@ -98,13 +96,8 @@ public class Tadpole extends AbstractFish { +@@ -100,13 +98,8 @@ public class Tadpole extends AbstractFish { @Override protected void customServerAiStep(ServerLevel level) { @@ -1827,10 +1854,10 @@ index ebdfd3fb6c0de48982d392bb2aa415f3676c6056..faaa8197e8421c2bbdc2a8bbaae4f4d0 } diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index b22321ead9d66cb089b67276743624b3cca52fc1..9047e75a5edf9fec2b73aec272284d8003793eaa 100644 +index 75af1b92a0a60cffa3317d83bd599a3d4d26f93c..bdac4929db71a39fc02985109cedc9cd316ec3cc 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -21,8 +21,6 @@ import net.minecraft.tags.ItemTags; +@@ -20,8 +20,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -1839,7 +1866,7 @@ index b22321ead9d66cb089b67276743624b3cca52fc1..9047e75a5edf9fec2b73aec272284d80 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -189,13 +187,8 @@ public class Goat extends Animal { +@@ -190,13 +188,8 @@ public class Goat extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1854,7 +1881,7 @@ index b22321ead9d66cb089b67276743624b3cca52fc1..9047e75a5edf9fec2b73aec272284d80 } diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..622c2eac70c81ed7ccf605069b8dd68508bebf76 100644 +index 6a9f31c1f39cc14ad7b5ae3af85908bc7a4caae4..05d269b51715a71fa653900e7187b07d001afdb7 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java @@ -29,8 +29,6 @@ import net.minecraft.tags.BlockTags; @@ -1866,7 +1893,7 @@ index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..622c2eac70c81ed7ccf605069b8dd685 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; -@@ -454,12 +452,8 @@ public class Sniffer extends Animal { +@@ -465,12 +463,8 @@ public class Sniffer extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1880,10 +1907,10 @@ index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..622c2eac70c81ed7ccf605069b8dd685 } diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java -index 4405f465ad5b136390c4204b177967c6e47738dd..33c7081c2aee7a31c4dd143f9d1a36cadcfcb29f 100644 +index 0dbc528bcad2b2f79585e2462a265d43fcbebe76..662b95d27f6630ec27fd88ca279e395438faa96b 100644 --- a/net/minecraft/world/entity/monster/Zoglin.java +++ b/net/minecraft/world/entity/monster/Zoglin.java -@@ -15,8 +15,6 @@ import net.minecraft.network.syncher.SynchedEntityData; +@@ -14,8 +14,6 @@ import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; @@ -1892,7 +1919,7 @@ index 4405f465ad5b136390c4204b177967c6e47738dd..33c7081c2aee7a31c4dd143f9d1a36ca import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.damagesource.DamageSource; -@@ -249,10 +247,7 @@ public class Zoglin extends Monster implements HoglinBase { +@@ -250,10 +248,7 @@ public class Zoglin extends Monster implements HoglinBase { @Override protected void customServerAiStep(ServerLevel level) { @@ -1930,10 +1957,10 @@ index c12653070d62c44b97a07676f24caf7ab570cd2a..d91ce14cc39b1b6ccd558f53ed605d4c } diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index bdefd070cfebe7f3f792c998f2f53be720cbfbcd..2183f5aaf6cf7a4df8c659f0766af40289761987 100644 +index 567e7952efec69b4222563fae724d18a9902bb05..f66bd6cc4aab828e847b990b193be54cd0d0dc01 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -17,8 +17,6 @@ import net.minecraft.server.level.ServerLevel; +@@ -16,8 +16,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.tags.DamageTypeTags; @@ -1942,7 +1969,7 @@ index bdefd070cfebe7f3f792c998f2f53be720cbfbcd..2183f5aaf6cf7a4df8c659f0766af402 import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.AnimationState; import net.minecraft.world.entity.Entity; -@@ -204,10 +202,7 @@ public class Creaking extends Monster { +@@ -205,10 +203,7 @@ public class Creaking extends Monster { @Override protected void customServerAiStep(ServerLevel level) { @@ -1954,10 +1981,10 @@ index bdefd070cfebe7f3f792c998f2f53be720cbfbcd..2183f5aaf6cf7a4df8c659f0766af402 } diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 0d05d21158a59dc3aa648c1d6541121c5bb547e6..2989add9a4746646f06ec3f6c386ac5df4a64726 100644 +index 0ecf8533f6cad081df8713856feb74db93028f71..bde6f9d9d1cc7a5ee8334ee9207afae304ddcfa9 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -16,8 +16,6 @@ import net.minecraft.sounds.SoundEvents; +@@ -15,8 +15,6 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.ItemTags; import net.minecraft.util.RandomSource; @@ -1966,7 +1993,7 @@ index 0d05d21158a59dc3aa648c1d6541121c5bb547e6..2989add9a4746646f06ec3f6c386ac5d import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -161,10 +159,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -162,10 +160,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { @Override protected void customServerAiStep(ServerLevel level) { @@ -1978,10 +2005,10 @@ index 0d05d21158a59dc3aa648c1d6541121c5bb547e6..2989add9a4746646f06ec3f6c386ac5d if (this.isConverting()) { this.timeInOverworld++; diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index e200e974e46de6166d56e051806c00a69aefc9bb..27052ded60db7c3916de3f4c8b48227f53fd7249 100644 +index 8392ff1316f0c5be685a6ded7ccd08933c10ff4e..689f200554d8c03313b3d194f209c527f315c29a 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -17,8 +17,6 @@ import net.minecraft.tags.ItemTags; +@@ -16,8 +16,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.RandomSource; import net.minecraft.util.VisibleForDebug; @@ -1990,7 +2017,7 @@ index e200e974e46de6166d56e051806c00a69aefc9bb..27052ded60db7c3916de3f4c8b48227f import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -319,10 +317,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -320,10 +318,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @Override protected void customServerAiStep(ServerLevel level) { @@ -2026,10 +2053,10 @@ index 219978cb0341b2d691f44c1146707d875788881e..589a130f8855f464c1930a0aa8b54c03 PiglinBruteAi.maybePlayActivitySound(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index cd28ca290c081d9f5e4498f59d7b87a566f81544..67fdcbe05e8d5f4000255f753565591825f54f67 100644 +index 4a4cc7f9c95d4f4b6ad4948e3ed3504efbbcef15..dd6666bd8b8df4148a1557627ce2a6ddab245ed6 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -31,8 +31,6 @@ import net.minecraft.tags.TagKey; +@@ -27,8 +27,6 @@ import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -2038,7 +2065,7 @@ index cd28ca290c081d9f5e4498f59d7b87a566f81544..67fdcbe05e8d5f4000255f7535655918 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; -@@ -281,10 +279,7 @@ public class Warden extends Monster implements VibrationSystem { +@@ -279,10 +277,7 @@ public class Warden extends Monster implements VibrationSystem { @Override protected void customServerAiStep(ServerLevel level) { @@ -2050,10 +2077,10 @@ index cd28ca290c081d9f5e4498f59d7b87a566f81544..67fdcbe05e8d5f4000255f7535655918 if ((this.tickCount + this.getId()) % 120 == 0) { applyDarknessAround(level, this.position(), this, 20); diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index e0e0d2ea7fc60e3142c675404d152eca60263240..09d559adb603e3d34bb82b944a2a3e8c2c37b136 100644 +index 43f16df230f87a43e249a58fc10ef2da517f22ee..532618ae4acd548129006a6c42c62a5b046dbd7e 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -36,8 +36,6 @@ import net.minecraft.stats.Stats; +@@ -35,8 +35,6 @@ import net.minecraft.stats.Stats; import net.minecraft.tags.ItemTags; import net.minecraft.util.Mth; import net.minecraft.util.SpawnUtil; @@ -2062,7 +2089,7 @@ index e0e0d2ea7fc60e3142c675404d152eca60263240..09d559adb603e3d34bb82b944a2a3e8c import net.minecraft.world.Difficulty; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; -@@ -294,10 +292,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -295,10 +293,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } protected void customServerAiStep(ServerLevel level, final boolean inactive) { // Paper end - EAR 2 @@ -2074,7 +2101,7 @@ index e0e0d2ea7fc60e3142c675404d152eca60263240..09d559adb603e3d34bb82b944a2a3e8c this.assignProfessionWhenSpawned = false; } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 4c31b039eb697ba84598dd1fdded707a2f155ce5..2ebb7f0f3686fa631de874fee9474f7ab530631f 100644 +index 4b96e512905aca3b69408145054c0658ee932eed..9f630dda781dd540ab5655bd7ce916949eeee61c 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -35,8 +35,6 @@ import net.minecraft.util.AbortableIterationConsumer; @@ -2119,7 +2146,7 @@ index 4c31b039eb697ba84598dd1fdded707a2f155ce5..2ebb7f0f3686fa631de874fee9474f7a this.spigotConfig.currentPrimedTnt = 0; // Spigot } -@@ -1742,7 +1735,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1735,7 +1728,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @Override public List getEntities(@Nullable Entity entity, AABB boundingBox, Predicate predicate) { @@ -2127,7 +2154,7 @@ index 4c31b039eb697ba84598dd1fdded707a2f155ce5..2ebb7f0f3686fa631de874fee9474f7a List list = Lists.newArrayList(); // Paper start - rewrite chunk system -@@ -1771,8 +1763,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1764,8 +1756,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl public void getEntities(final EntityTypeTest entityTypeTest, final AABB boundingBox, final Predicate predicate, final List into, final int maxCount) { @@ -2169,7 +2196,7 @@ index 14a2514a408a66a83f7b5fb43b4c4dc8f23fd5f4..ec32d77447dd250857a2af1d8cc3e6e2 // Paper start - Add mobcaps commands diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java -index ec4b63a574e7ff2c807c283c9f4b402229864e51..63d0b83d648ab1a6e7c84a49f7e2e825076904ad 100644 +index 07e4025ca6c9c31905db2e6921138a0ded479dde..fa4695b7ee56724b4d47ce4da0a5aeb8b5467db4 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java @@ -13,8 +13,6 @@ import net.minecraft.Util; @@ -2181,7 +2208,7 @@ index ec4b63a574e7ff2c807c283c9f4b402229864e51..63d0b83d648ab1a6e7c84a49f7e2e825 import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; -@@ -654,10 +652,7 @@ public class ServerExplosion implements Explosion { +@@ -652,10 +650,7 @@ public class ServerExplosion implements Explosion { List list = this.calculateExplodedPositions(); this.hurtEntities(); if (this.interactsWithBlocks()) { @@ -2193,19 +2220,19 @@ index ec4b63a574e7ff2c807c283c9f4b402229864e51..63d0b83d648ab1a6e7c84a49f7e2e825 if (this.fire) { diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 5d3fc807221392d378fec283bfdefb8747fb8376..61fa8f2bf018b8892a11acec058f36914c5a1573 100644 +index 75578e6ed7233a03d9b6cd3c6d3997f1c6148392..b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -23,8 +23,6 @@ import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; +@@ -24,8 +24,6 @@ import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerLevel; + import net.minecraft.util.ProblemReporter; -import net.minecraft.util.profiling.Profiler; -import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.Level; -@@ -383,12 +381,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -385,12 +383,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } if (LightEngine.hasDifferentLightProperties(blockState, state)) { @@ -2218,7 +2245,7 @@ index 5d3fc807221392d378fec283bfdefb8747fb8376..61fa8f2bf018b8892a11acec058f3691 } boolean flag = !blockState.is(block); -@@ -915,8 +909,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -922,8 +916,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p BlockPos blockPos = this.blockEntity.getBlockPos(); if (LevelChunk.this.isTicking(blockPos)) { try { @@ -2227,7 +2254,7 @@ index 5d3fc807221392d378fec283bfdefb8747fb8376..61fa8f2bf018b8892a11acec058f3691 BlockState blockState = LevelChunk.this.getBlockState(blockPos); if (this.blockEntity.getType().isValid(blockState)) { this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), blockState, this.blockEntity); -@@ -930,8 +922,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -937,8 +929,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } // Paper end - Remove the Block Entity if it's invalid } diff --git a/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch b/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch index ded97942..8203eb83 100644 --- a/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch +++ b/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java -index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16d881401b 100644 +index ee16a05b8b2747ce95fcae1616c96143a5dec74e..36124bfd4189e35208875e971733889410242641 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java +++ b/net/minecraft/world/entity/projectile/Projectile.java -@@ -53,6 +53,55 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -50,6 +50,55 @@ public abstract class Projectile extends Entity implements TraceableEntity { super(entityType, level); } @@ -87,6 +87,6 @@ index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16 + } + // Gale end - Airplane - reduce projectile chunk loading + - public void setOwner(@Nullable Entity owner) { - if (owner != null) { - this.ownerUUID = owner.getUUID(); + protected void setOwner(@Nullable EntityReference owner) { + this.owner = owner; + } diff --git a/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch b/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch index 78a9d307..108de3bc 100644 --- a/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch +++ b/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java -index eb9fb57440f498079182030a46034008d3f6b5e8..65a9ea8d4a208f447b5e78b58b10a0917e35e4f2 100644 +index 912b099a51269f92f250c7d6094ad41817749f93..5dadb42fd2d2d03ef366ca83c9c4aae6c288aaa4 100644 --- a/net/minecraft/world/entity/ambient/Bat.java +++ b/net/minecraft/world/entity/ambient/Bat.java -@@ -244,11 +244,66 @@ public class Bat extends AmbientCreature { +@@ -245,11 +245,66 @@ public class Bat extends AmbientCreature { } } diff --git a/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch b/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch index de2a02a9..00d6fda6 100644 --- a/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch +++ b/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch @@ -19,10 +19,10 @@ require it to be initialized earlier. By moving it to the superclass, we initialize it earlier, ensuring that it is available sooner. diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 1d53c0b96ff781765155aac29256f4493f7d7c58..3941d15753aef952ad1fd5b5f96cb810f4f251e3 100644 +index 1413511500ce8ae25cc4af1d54fc33c8912c24bc..0665c2ec275086b8c555c550af93dfef197fba07 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -830,8 +830,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -834,8 +834,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // Paper start - optimise random ticking @@ -32,7 +32,7 @@ index 1d53c0b96ff781765155aac29256f4493f7d7c58..3941d15753aef952ad1fd5b5f96cb810 final LevelChunkSection[] sections = chunk.getSections(); final int minSection = ca.spottedleaf.moonrise.common.util.WorldUtil.getMinSection((ServerLevel)(Object)this); diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 9a5447dfa8cba271fdb205d21e4236c94074a7da..013e22dc4eceda9b947f1ff8fe43540b8855aa34 100644 +index 9f630dda781dd540ab5655bd7ce916949eeee61c..19a9b37bad1d465440047cbde9a00b12ba5d9a4b 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch b/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch index c9bfc054..fc037015 100644 --- a/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch +++ b/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch @@ -52,10 +52,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac4f64e1f2 100644 +index 6020b71802babb35ef60aca65afe9c2612c05bb7..e53440bd5f0e659db0745a009540520f6dc41238 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -499,6 +499,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -500,6 +500,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon long l = gameTime - this.lastInhabitedUpdate; this.lastInhabitedUpdate = gameTime; if (!this.level.isDebug()) { @@ -64,10 +64,10 @@ index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac this.tickChunks(l); // Gale - Purpur - remove vanilla profiler } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c5786545b5519eb 100644 +index 0665c2ec275086b8c555c550af93dfef197fba07..6bc70c1d53049a1f75268ab9944bfb1557ca74ee 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -879,13 +879,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -883,13 +883,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // Paper end - optimise random ticking @@ -84,7 +84,7 @@ index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c578654 for (int i = 0; i < randomTickSpeed; i++) { if (simpleRandom.nextInt(48) == 0) { // Paper - optimise random ticking this.tickPrecipitation(this.getBlockRandomPos(minBlockX, 0, minBlockZ, 15)); -@@ -903,7 +905,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -907,7 +909,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe boolean isRaining = this.isRaining(); int minBlockX = pos.getMinBlockX(); int minBlockZ = pos.getMinBlockZ(); @@ -94,10 +94,10 @@ index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c578654 if (this.isRainingAt(blockPos)) { DifficultyInstance currentDifficultyAt = this.getCurrentDifficultyAt(blockPos); diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 61fa8f2bf018b8892a11acec058f36914c5a1573..a8db2a822deb07ddc707cf73fdc5c269d9842c06 100644 +index b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6..9e2debee38bc4b25281c8a8c6e7082cca1f7b569 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -126,6 +126,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -128,6 +128,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } // Paper end - get block chunk optimisation @@ -116,7 +116,7 @@ index 61fa8f2bf018b8892a11acec058f36914c5a1573..a8db2a822deb07ddc707cf73fdc5c269 public LevelChunk(Level level, ChunkPos pos) { this(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, null, null, null); } -@@ -162,6 +174,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -164,6 +176,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p this.debug = !empty && this.level.isDebug(); this.defaultBlockState = empty ? VOID_AIR_BLOCKSTATE : AIR_BLOCKSTATE; // Paper end - get block chunk optimisation diff --git a/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch b/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch index 0c241dc7..9f584756 100644 --- a/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch +++ b/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java -index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb 100644 +index 4edd94ac765d2ab107612504b67e6e07da609313..9b0235c50426accde002cbb0a09a992f13b05cd7 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -300,11 +300,19 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -296,11 +296,19 @@ public class EnderMan extends Monster implements NeutralMob { private boolean teleport(double x, double y, double z) { BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z); diff --git a/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch b/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch index 57ea3a6c..e2ac01eb 100644 --- a/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch +++ b/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af31109d5a0a6 100644 +index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..eee9c41e40402e52b73f34a734b4cbdeb6cfbc22 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -215,7 +215,7 @@ public final class ActivationRange { +@@ -221,7 +221,7 @@ public final class ActivationRange { } // special cases. if (entity instanceof final LivingEntity living) { @@ -44,10 +44,10 @@ index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af311 } if (entity instanceof final Mob mob && mob.getTarget() != null) { diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 79f499fea47a9c675da1aed718c713290bc008d0..f019571b4b6b5e2d1953030911449a02e459591c 100644 +index 97431aa47b5425578bf14b992596962c64c87f35..e174c7b8c637e6983cf0778e6956d8d11e9cd7d1 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -2083,6 +2083,21 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2115,6 +2115,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return this.lastClimbablePos; } diff --git a/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch b/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch index 5f4def86..269068a5 100644 --- a/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch +++ b/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index 7360914a6f4dc43758c38f2c6c7f8d458cc14c4d..7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec 100644 +index e958972ca09eb0ab07d81990e661076ab0371850..5df8ee3955593e70f0e67e91431e464d177bdeeb 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -189,19 +189,25 @@ public class ServerEntity { +@@ -193,19 +193,25 @@ public class ServerEntity { packet = ClientboundEntityPositionSyncPacket.of(this.entity); flag3 = true; flag4 = true; diff --git a/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch b/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch index d8628407..7a6e0e8b 100644 --- a/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch +++ b/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e13b82511a 100644 +index 7e70c7bee633c54497d1cd2854dd60f4fb5ff160..f15da598cb1d7872fafb8b173e5134b9667c9a9f 100644 --- a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -119,6 +119,7 @@ public abstract class MoveToBlockGoal extends Goal { @@ -39,6 +39,6 @@ index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e1 for (int i5 = i4 < i3 && i4 > -i3 ? i3 : 0; i5 <= i3; i5 = i5 > 0 ? -i5 : 1 - i5) { mutableBlockPos.setWithOffset(blockPos, i4, i2 - 1, i5); + if (!this.mob.level().hasChunkAt(mutableBlockPos)) continue; // Gale - Airplane - block goal does not load chunks - if this block isn't loaded, continue - if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) { + if (this.mob.isWithinHome(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) { this.blockPos = mutableBlockPos; this.mob.movingTarget = mutableBlockPos == BlockPos.ZERO ? null : mutableBlockPos.immutable(); // Paper diff --git a/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch b/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch index cc1e7a2a..f9525f5b 100644 --- a/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch +++ b/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec757a9e9c 100644 +index 6bc70c1d53049a1f75268ab9944bfb1557ca74ee..a9c2f419200483673f6743ed94af110a8e875e71 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -784,7 +784,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -788,7 +788,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity.stopRiding(); } @@ -56,7 +56,7 @@ index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec } } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index a2513f58d6a19aef1f43fb120f6d78e53a3b129b..9e72ed6ed0c5acb69f23652dce473e914455c412 100644 +index 19a9b37bad1d465440047cbde9a00b12ba5d9a4b..b62ee276e2176da439ac2f4da4501861da746004 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -1489,10 +1489,10 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch b/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch index 7c711e3d..6167db18 100644 --- a/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch +++ b/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch @@ -22,10 +22,10 @@ you to easily disable books, should you want to preemptively remove this functionality before additional exploits are found. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9041830c19e2899479e1519488faba5c416ccd88..3c5b1cf6d47738d232282abe7f7f24c40b7bb387 100644 +index aeb43902a09ef9c1b137964065780be3e87648f4..383652f0bd32fca3551db85fb6ac42a0e326836e 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1225,6 +1225,11 @@ public class ServerGamePacketListenerImpl +@@ -1255,6 +1255,11 @@ public class ServerGamePacketListenerImpl @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch b/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch index 895a2ca0..fcd3b6e1 100644 --- a/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch +++ b/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch @@ -28,10 +28,10 @@ but is so much cheaper than the suffocation check that it's worth keeping it. diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index f019571b4b6b5e2d1953030911449a02e459591c..85759f8fe3892e0af3cbbd836defc9ee4b2705f6 100644 +index e174c7b8c637e6983cf0778e6956d8d11e9cd7d1..dc7d53e93a49297e3a5e1204025b3a50e73fba4e 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -419,7 +419,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -433,7 +433,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (this.isAlive() && this.level() instanceof ServerLevel serverLevel1) { boolean flag = this instanceof Player; @@ -43,7 +43,7 @@ index f019571b4b6b5e2d1953030911449a02e459591c..85759f8fe3892e0af3cbbd836defc9ee this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F); } else if (flag && !serverLevel1.getWorldBorder().isWithinBounds(this.getBoundingBox())) { double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getDamageSafeZone(); -@@ -1367,6 +1370,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1399,6 +1402,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return this.getHealth() <= 0.0F; } diff --git a/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch b/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch index 4fb57e07..cdefde85 100644 --- a/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch +++ b/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch @@ -20,10 +20,10 @@ launcher can very easily fill a chunk. Prevent saving Fireworks so that chunk unloads will wipe a chunks fireworks in this case. diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -index e0e193078e550225e163149638bf9e053c0531f8..70197071db4e46cd93579d92ff2f8aa7a49083cb 100644 +index d8dc196ef92e97f831cf97cd1536a46f81f9d5d1..8d29c5c7f651176639363f5227a386679f5b67f3 100644 --- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -@@ -354,4 +354,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { +@@ -350,4 +350,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { double d1 = entity.position().z - this.position().z; return DoubleDoubleImmutablePair.of(d, d1); } diff --git a/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch b/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch index f269e436..4d58edea 100644 --- a/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch +++ b/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch @@ -17,10 +17,10 @@ Licensed under: MIT (https://opensource.org/licenses/MIT) Only do an item "suck in" action once per second diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb2272e06b 100644 +index 51804b611f469f2ab53e455e8c633b867b00cc88..fcb1f6806908eb66592dc52f2b57286498cf7032 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -150,7 +150,13 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -148,7 +148,13 @@ public class ItemEntity extends Entity implements TraceableEntity { } // CraftBukkit end this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause @@ -34,7 +34,7 @@ index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb } // Paper end - EAR 2 -@@ -234,9 +240,31 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -232,9 +238,31 @@ public class ItemEntity extends Entity implements TraceableEntity { } // CraftBukkit end this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause @@ -67,10 +67,10 @@ index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb @Override public BlockPos getBlockPosBelowThatAffectsMyMovement() { diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java -index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..df5eda70d1d2eafcd32606fb93bb62409e5a8943 100644 +index 41a6ec508a10a49a37539d2f10171d15c233b280..fb099517927f3c2699a348ea7692772c5420b8d1 100644 --- a/net/minecraft/world/entity/vehicle/MinecartHopper.java +++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java -@@ -22,6 +22,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -23,6 +23,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper private static final boolean DEFAULT_ENABLED = true; private boolean enabled = true; private boolean consumedItemThisFrame = false; @@ -78,7 +78,7 @@ index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..df5eda70d1d2eafcd32606fb93bb6240 public MinecartHopper(EntityType entityType, Level level) { super(entityType, level); -@@ -150,4 +151,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -151,4 +152,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper } // Paper end @@ -105,7 +105,7 @@ index 484c2ba2752fbf3ad929e46c2f078e906f6f0637..6ced5a7e27703a7cf5a7495dc3a1a290 double getLevelY(); diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 15d4f60942c0cc612c1468b4c0fda886867a67cb..c2c7832fbb207ecfd23c7a086ef72db9648f48f9 100644 +index 800b7e78ae989868ed0b9e060c80dcd002759412..2a49f65a2ea13414099b636f463239ced4fbb5f6 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -544,7 +544,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen diff --git a/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch b/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch index 19302a20..e52c1709 100644 --- a/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch +++ b/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index 602ed4c5556723e54a80ccc3481af31109d5a0a6..bdbbbc5e0c06c71584e7514623d0c8be168befd7 100644 +index eee9c41e40402e52b73f34a734b4cbdeb6cfbc22..63ff39f3db2e695c8a14b021045c17f6d3d2f23d 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -53,27 +53,41 @@ public final class ActivationRange { +@@ -59,27 +59,41 @@ public final class ActivationRange { if (entity.activationType == ActivationType.VILLAGER) { if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) { world.wakeupInactiveRemainingVillagers--; diff --git a/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch b/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch index 6c4203db..ec2db5e7 100644 --- a/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch +++ b/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch @@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 6f60f5e92628e744a22b3d3f83c2010d8a4661be..6d1542dc07fdf1f3384e8e6d1dacca5f8c3f0b69 100644 +index ffae3e45ba88e8b733e77b87a45cc27b9ecf8c19..684a15babe984c84703e2c6af7a461f75959312d 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -414,6 +414,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -425,6 +425,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper - Fire PlayerJoinEvent when Player is actually ready // CraftBukkit end @@ -25,10 +25,10 @@ index 6f60f5e92628e744a22b3d3f83c2010d8a4661be..6d1542dc07fdf1f3384e8e6d1dacca5f public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent public @Nullable String clientBrandName = null; // Paper - Brand support diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3c5b1cf6d47738d232282abe7f7f24c40b7bb387..99670d9b8450f8c5a04927a18720468d4ddc1bec 100644 +index 383652f0bd32fca3551db85fb6ac42a0e326836e..29466047936ed44f57cb4bcb8f1bff0bdad81827 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2399,7 +2399,7 @@ public class ServerGamePacketListenerImpl +@@ -2433,7 +2433,7 @@ public class ServerGamePacketListenerImpl this.disconnectAsync(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add proper async disconnect } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); @@ -38,15 +38,15 @@ index 3c5b1cf6d47738d232282abe7f7f24c40b7bb387..99670d9b8450f8c5a04927a18720468d // CraftBukkit start if (sync) { diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index a0949d8256823731f6f7da30e74dfd0205dde380..2c025382d041c43486ae975a3f687bc4cddf8d62 100644 +index 898d9ab963a6cf1db8edf4657a65335d15f271c4..77dbd115d99d8f8e2c01ea69ca297ced06b19c12 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -334,6 +334,8 @@ public abstract class PlayerList { - return; - } +@@ -335,6 +335,8 @@ public abstract class PlayerList { + return; + } -+ player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined ++ player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined + - final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); + final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); - if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure + if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure diff --git a/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch b/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch index 0b132f1b..cc94aa67 100644 --- a/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch +++ b/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch @@ -13,28 +13,31 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/stats/ServerStatsCounter.java b/net/minecraft/stats/ServerStatsCounter.java -index b147df7479da03fae19294587cded62c210ea590..dfaead7716ac718bcdbf4c3021aed1b57676af50 100644 +index 16e06085ed3c0f6a0b35c730b63b75824f44a905..195ff539c9cb4b2a0640555fc4b59df39e06c90d 100644 --- a/net/minecraft/stats/ServerStatsCounter.java +++ b/net/minecraft/stats/ServerStatsCounter.java -@@ -117,16 +117,18 @@ public class ServerStatsCounter extends StatsCounter { - this.stats - .putAll( - STATS_CODEC.parse(dynamic.get("stats").orElseEmptyMap()) -- .resultOrPartial(string -> LOGGER.error("Failed to parse statistics for {}: {}", this.file, string)) -+ .resultOrPartial(string -> { -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Failed to parse statistics for {}: {}", this.file, string); // Gale - EMC - do not log invalid statistics -+ }) - .orElse(Map.of()) - ); - return; - } - +@@ -108,7 +108,7 @@ public class ServerStatsCounter extends StatsCounter { + try { + JsonElement jsonElement = StrictJsonParser.parse(json); + if (jsonElement.isJsonNull()) { - LOGGER.error("Unable to parse Stat data from {}", this.file); -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file); // Gale - EMC - do not log invalid statistics ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file); + return; } - } catch (IOException | JsonParseException var8) { -- LOGGER.error("Unable to parse Stat data from {}", this.file, var8); -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file, var8); // Gale - EMC - do not log invalid statistics + +@@ -117,11 +117,13 @@ public class ServerStatsCounter extends StatsCounter { + this.stats + .putAll( + STATS_CODEC.parse(dynamic.get("stats").orElseEmptyMap()) +- .resultOrPartial(string -> LOGGER.error("Failed to parse statistics for {}: {}", this.file, string)) ++ .resultOrPartial(string -> { ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Failed to parse statistics for {}: {}", this.file, string); // Gale - EMC - do not log invalid statistics ++ }) + .orElse(Map.of()) + ); + } catch (JsonParseException var5) { +- LOGGER.error("Unable to parse Stat data from {}", this.file, var5); ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file, var5); } } diff --git a/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch b/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch index ae1a99da..b337d1d7 100644 --- a/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch +++ b/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 99670d9b8450f8c5a04927a18720468d4ddc1bec..c06d9ae722455cd2315097b2b0333d2adb51f9ad 100644 +index 29466047936ed44f57cb4bcb8f1bff0bdad81827..767dfc71ad9aafffa01ed27fdeac2c19bbba6f37 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2481,7 +2481,7 @@ public class ServerGamePacketListenerImpl +@@ -2515,7 +2515,7 @@ public class ServerGamePacketListenerImpl // CraftBukkit start String rawMessage = message.signedContent(); if (rawMessage.isEmpty()) { diff --git a/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch b/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch index 7d9c06a7..59a14d2e 100644 --- a/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch +++ b/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index 52e0ae233a7b1c88bfbbc27707ef5f18453ec865..741894ed6df81fce41d9f906d6198d038aab44a8 100644 +index fdeca41d40705f28864ce4443d01cd872c9d51b0..63c32ae544d87177c9b3e1f1b73eeb9be904eebf 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java -@@ -148,7 +148,7 @@ public class PlayerAdvancements { +@@ -147,7 +147,7 @@ public class PlayerAdvancements { AdvancementHolder advancementHolder = advancementManager.get(path); if (advancementHolder == null) { if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit diff --git a/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch b/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch index 30e52b66..8a366998 100644 --- a/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch +++ b/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java -index 2158b20458de63897131db3d425d1efcc358cace..40944806284921bd084901c94595fefa78b2c20b 100644 +index 7e1a06b97ab0c744e910df1c82454ce5686c1870..5e12e021d6e3b01f0d209c23255fab0a232f69cb 100644 --- a/net/minecraft/stats/ServerRecipeBook.java +++ b/net/minecraft/stats/ServerRecipeBook.java -@@ -133,7 +133,7 @@ public class ServerRecipeBook extends RecipeBook { +@@ -102,7 +102,7 @@ public class ServerRecipeBook extends RecipeBook { private void loadRecipes(List>> recipes, Consumer>> output, Predicate>> isRecognized) { for (ResourceKey> resourceKey : recipes) { if (!isRecognized.test(resourceKey)) { diff --git a/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch b/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch index be2fe680..fdc2b986 100644 --- a/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch +++ b/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 2c025382d041c43486ae975a3f687bc4cddf8d62..2a4e52ba074dfd6dce98669282de729eae7d272a 100644 +index 8017266123a91e5bd46ae0d39a35cf2e6cbb390f..c5ab58c890c7c55f2ad75560269663d3fd5a6aa3 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1278,7 +1278,7 @@ public abstract class PlayerList { +@@ -1274,7 +1274,7 @@ public abstract class PlayerList { public void broadcastChatMessage(PlayerChatMessage message, Predicate shouldFilterMessageTo, @Nullable ServerPlayer sender, ChatType.Bound boundChatType, @Nullable Function unsignedFunction) { // Paper end boolean flag = this.verifyChatTrusted(message); diff --git a/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch b/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch index 91ac3100..3873ff46 100644 --- a/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch +++ b/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch @@ -42,10 +42,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java -index 595cdb7d013eb0b9282b133a22f51ee865d18623..b8f04b98d2117cfb274a5888d34b9836d3390ae9 100644 +index 11adb3eacce9d46f15e6c5216e9b2494df158baf..fe738894f82480c6a7c2ff8fde895daaa0ba8bc6 100644 --- a/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -352,7 +352,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -349,7 +349,7 @@ public abstract class AbstractArrow extends Projectile { this.setInGround(false); Vec3 deltaMovement = this.getDeltaMovement(); this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F)); diff --git a/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch b/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch index 7bd5bede..75163b53 100644 --- a/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch +++ b/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch @@ -13,20 +13,21 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 2a4e52ba074dfd6dce98669282de729eae7d272a..be324f5085c1cceb3d4c37bc73d0ee5ac761a99c 100644 +index b30d4d49edb36cefe6d59bf23440091cb789a6ac..292895796388df9f753c4423fffea35174df5c0b 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -402,7 +402,13 @@ public abstract class PlayerList { - scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); - } - // Paper end - Configurable player collision -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable - PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); -+ // Gale start - JettPack - make logging login location configurable -+ } else { -+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), loggableAddress, player.getId()); -+ } -+ // Gale end - JettPack - make logging login location configurable - // Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead - if (player.isDeadOrDying()) { - net.minecraft.core.Holder plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME) +@@ -403,7 +403,13 @@ public abstract class PlayerList { + scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); + } + // Paper end - Configurable player collision +- PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable ++ PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); ++ // Gale start - JettPack - make logging login location configurable ++ } else { ++ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), loggableAddress, player.getId()); ++ } ++ // Gale end - JettPack - make logging login location configurable + // Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead + if (player.isDeadOrDying()) { + net.minecraft.core.Holder plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME) diff --git a/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch b/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch index 180ecf90..a45f86c4 100644 --- a/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch +++ b/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch @@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70d1e2294b 100644 +index b2bcfb3557a0326fd7ec1059f95d6da4568dfd80..fee4a7452178c274eb835d758b718d8e874d79d0 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -@@ -378,7 +378,6 @@ public final class ChunkEntitySlices { +@@ -400,7 +400,6 @@ public final class ChunkEntitySlices { private static final class BasicEntityList { @@ -24,7 +24,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70 private static final int DEFAULT_CAPACITY = 4; private E[] storage; -@@ -389,7 +388,7 @@ public final class ChunkEntitySlices { +@@ -411,7 +410,7 @@ public final class ChunkEntitySlices { } public BasicEntityList(final int cap) { @@ -33,7 +33,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70 } public boolean isEmpty() { -@@ -401,7 +400,7 @@ public final class ChunkEntitySlices { +@@ -423,7 +422,7 @@ public final class ChunkEntitySlices { } private void resize() { @@ -43,10 +43,10 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70 } else { this.storage = Arrays.copyOf(this.storage, this.storage.length * 2); diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java -index 26207443b1223119c03db478d7e816d9cdf8e618..bbd1c262674b42eb9ea2830acb8bf94182f971f9 100644 +index 82824ae7ffbced513a8bcace684af94916135e84..47a600204ae1a1e7f166284dc26a1a7afc1dbecc 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java -@@ -14,10 +14,8 @@ import net.minecraft.world.level.entity.LevelCallback; +@@ -19,10 +19,8 @@ import net.minecraft.world.level.entity.LevelCallback; public final class ServerEntityLookup extends EntityLookup { @@ -56,8 +56,8 @@ index 26207443b1223119c03db478d7e816d9cdf8e618..bbd1c262674b42eb9ea2830acb8bf941 - public final ReferenceList trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker + public final ReferenceList trackerEntities = new ReferenceList<>(me.titaniumtown.ArrayConstants.emptyEntityArray); // Moonrise - entity tracker // Gale - JettPack - reduce array allocations - public ServerEntityLookup(final ServerLevel world, final LevelCallback worldCallback) { - super(world, worldCallback); + // Vanilla does not increment ticket timeouts if the chunk is progressing in generation. They made this change in 1.21.6 so that the ender pearl + // ticket does not expire if the chunk fails to generate before the timeout expires. Rather than blindly adjusting the entire system behavior diff --git a/net/minecraft/nbt/ByteArrayTag.java b/net/minecraft/nbt/ByteArrayTag.java index 6fbb131b472a3093b137d8ced9889777a133bd5b..cecfd48f57bc11b84c18b4e5a723228fd3c18e23 100644 --- a/net/minecraft/nbt/ByteArrayTag.java @@ -125,11 +125,24 @@ index 8ef16f98996b1ec0c9c3f158248ac95f1b07328f..6780b2493d625603b74e635c4996bb83 private static final Codec PRIMITIVE_ARG_CODEC = ExtraCodecs.JAVA.validate(TranslatableContents::filterAllowedArguments); private static final Codec ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC) .xmap( +diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java +index 5df8ee3955593e70f0e67e91431e464d177bdeeb..b7581796dda77bca66c03e421f2a83a920f44ef1 100644 +--- a/net/minecraft/server/level/ServerEntity.java ++++ b/net/minecraft/server/level/ServerEntity.java +@@ -366,7 +366,7 @@ public class ServerEntity { + if (this.entity instanceof LivingEntity livingEntityx) { + List> list = Lists.newArrayList(); + +- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + ItemStack itemBySlot = livingEntityx.getItemBySlot(equipmentSlot); + if (!itemBySlot.isEmpty()) { + list.add(Pair.of(equipmentSlot, itemBySlot.copy())); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index f14aab66d200828952b647fa8424caec757a9e9c..4da7c02024a5ad8ba34bad2adfd8228f11f39eee 100644 +index a9c2f419200483673f6743ed94af110a8e875e71..617eb1b9d30d499124576c5d7cb5152571cc6b84 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1220,7 +1220,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1228,7 +1228,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public static List getCurrentlyTickingEntities() { Entity ticking = currentlyTickingEntity.get(); @@ -138,11 +151,24 @@ index f14aab66d200828952b647fa8424caec757a9e9c..4da7c02024a5ad8ba34bad2adfd8228f return ret; } +diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java +index 45e4a7356e51e9c50d440782b55d1cbfc4b76f96..f752dceea48ed8264ae4cb60fdf2390f0e5019e1 100644 +--- a/net/minecraft/server/level/ServerPlayer.java ++++ b/net/minecraft/server/level/ServerPlayer.java +@@ -1166,7 +1166,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + this.getInventory().getNonEquipmentItems().set(i, net.minecraft.world.item.ItemStack.EMPTY); + } + } +- for (final EquipmentSlot value : EquipmentSlot.VALUES) { ++ for (final EquipmentSlot value : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + if (this.getInventory().equipment.has(value) && !shouldKeepDeathEventItem(event, this.getInventory().equipment.get(value))) { + this.getInventory().equipment.set(value, net.minecraft.world.item.ItemStack.EMPTY); + } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c06d9ae722455cd2315097b2b0333d2adb51f9ad..68368928035ffa8fb7b12a7e3c6a7f9686379933 100644 +index f953fa6adb112bc9da34cfb72045975f87c5f021..a07310aebd8406af27864358e15715fcc7694329 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2771,7 +2771,7 @@ public class ServerGamePacketListenerImpl +@@ -2784,7 +2784,7 @@ public class ServerGamePacketListenerImpl // SPIGOT-7136 - Allays if (target instanceof net.minecraft.world.entity.animal.allay.Allay || target instanceof net.minecraft.world.entity.animal.horse.AbstractHorse) { // Paper - Fix horse armor desync ServerGamePacketListenerImpl.this.send(new net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket( @@ -177,6 +203,32 @@ index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..5c1103ef028e5ffe6ce0eadc861dd3b2 private final int size; public ZeroBitStorage(int size) { +diff --git a/net/minecraft/world/entity/ConversionType.java b/net/minecraft/world/entity/ConversionType.java +index 3eea236bd1fd401fefdf7c5cc553a3db335029c7..3739272cbc73b7c4f15a2fbe874905cf06175f64 100644 +--- a/net/minecraft/world/entity/ConversionType.java ++++ b/net/minecraft/world/entity/ConversionType.java +@@ -37,7 +37,7 @@ public enum ConversionType { + } + + if (conversionParams.keepEquipment()) { +- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + ItemStack itemBySlot = oldMob.getItemBySlot(equipmentSlot); + if (!itemBySlot.isEmpty()) { + newMob.setItemSlot(equipmentSlot, itemBySlot.copyAndClear()); +diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java +index 31a939facfd4b506a2cff3cee6e4b86a12b1d343..e8cd21863aff0aa37b2e6c23a3c60335a3d279cb 100644 +--- a/net/minecraft/world/entity/Entity.java ++++ b/net/minecraft/world/entity/Entity.java +@@ -3077,7 +3077,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + private boolean attemptToShearEquipment(Player player, InteractionHand hand, ItemStack stack, Mob mob) { +- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + ItemStack itemBySlot = mob.getItemBySlot(equipmentSlot); + Equippable equippable = itemBySlot.get(DataComponents.EQUIPPABLE); + if (equippable != null diff --git a/net/minecraft/world/entity/EquipmentSlot.java b/net/minecraft/world/entity/EquipmentSlot.java index 0e44397c9d53ff30a96c9e8e392a363fa9ae0c55..dbf31389f0e9796c80afbffddf6a20cbaf184e6e 100644 --- a/net/minecraft/world/entity/EquipmentSlot.java @@ -198,7 +250,7 @@ index 0e44397c9d53ff30a96c9e8e392a363fa9ae0c55..dbf31389f0e9796c80afbffddf6a20cb private final EquipmentSlot.Type type; private final int index; diff --git a/net/minecraft/world/entity/EquipmentSlotGroup.java b/net/minecraft/world/entity/EquipmentSlotGroup.java -index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..4e847c3f9d761da5dda11dec60582d9d9e630b37 100644 +index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..1ebcab2ee9898a618ad76b18491be19859629192 100644 --- a/net/minecraft/world/entity/EquipmentSlotGroup.java +++ b/net/minecraft/world/entity/EquipmentSlotGroup.java @@ -24,6 +24,7 @@ public enum EquipmentSlotGroup implements StringRepresentable, Iterable BY_ID = ByIdMap.continuous( equipmentSlotGroup -> equipmentSlotGroup.id, values(), ByIdMap.OutOfBoundsStrategy.ZERO ); +@@ -38,7 +39,7 @@ public enum EquipmentSlotGroup implements StringRepresentable, Iterable lootTable, Map createForAllSlots(float dropChance) { +- return createForAllSlots(List.of(EquipmentSlot.values()), dropChance); ++ return createForAllSlots(List.of(EquipmentSlot.VALUES_ARRAY), dropChance); // Gale - JettPack - reduce array allocations + } + + private static Map createForAllSlots(List equipmentSlots, float dropChance) { diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..18bddc3db6f0e06f1811f2c409f207db2f462f63 100644 +index cf283389d9263ba29720bf296a778be9eaf308a7..8803c03846828b532bd2b6e164c589995907c96b 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -1173,7 +1173,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -1153,7 +1153,7 @@ public final class ItemStack implements DataComponentHolder { private void addAttributeTooltips(Consumer tooltipAdder, TooltipDisplay tooltipDisplay, @Nullable Player player) { if (tooltipDisplay.shows(DataComponents.ATTRIBUTE_MODIFIERS)) { - for (EquipmentSlotGroup equipmentSlotGroup : EquipmentSlotGroup.values()) { + for (EquipmentSlotGroup equipmentSlotGroup : EquipmentSlotGroup.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations MutableBoolean mutableBoolean = new MutableBoolean(true); - this.forEachModifier(equipmentSlotGroup, (attribute, modifier) -> { - if (mutableBoolean.isTrue()) { + this.forEachModifier( + equipmentSlotGroup, diff --git a/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/net/minecraft/world/item/crafting/ShapedRecipePattern.java index bfda76974ea8d4397e2c2ebf5bdcb5d7e5f0bab5..cabbc93409ca99180d115e2f23419ee1824d5801 100644 --- a/net/minecraft/world/item/crafting/ShapedRecipePattern.java @@ -236,10 +310,10 @@ index bfda76974ea8d4397e2c2ebf5bdcb5d7e5f0bab5..cabbc93409ca99180d115e2f23419ee1 String[] strings = new String[pattern.size() - i3 - i2]; diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 9e72ed6ed0c5acb69f23652dce473e914455c412..439b8619e9f0ed3dc1974ba2ee6214b63447ea96 100644 +index b62ee276e2176da439ac2f4da4501861da746004..97d227249405c8648b8b5e9bcca5a3f202f7b903 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -1832,7 +1832,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1825,7 +1825,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) { ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices slices = ((ServerLevel)this).moonrise$getEntityLookup().getChunk(chunkX, chunkZ); if (slices == null) { @@ -248,7 +322,7 @@ index 9e72ed6ed0c5acb69f23652dce473e914455c412..439b8619e9f0ed3dc1974ba2ee6214b6 } List ret = new java.util.ArrayList<>(); -@@ -1843,7 +1843,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1836,7 +1836,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl } } @@ -289,7 +363,7 @@ index a647d76d365a60b95a3eb7927ac426bf70d417f3..7977ecd013c55359f179b4b7f895099b @Override diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index c5b3b5e5f621f8db152aa190374ae0fe567d6828..f6c3dac2a2a17760ab7015fe75c5a4dd04c11319 100644 +index 36a72a11d28f99bfe85868461925b778cc01478e..ca2cab797fc16f0961ce994fcb45029589b3c370 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -44,7 +44,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -301,3 +375,16 @@ index c5b3b5e5f621f8db152aa190374ae0fe567d6828..f6c3dac2a2a17760ab7015fe75c5a4dd private static final int[] SLOTS_FOR_DOWN = new int[]{2, 1}; private static final int[] SLOTS_FOR_SIDES = new int[]{1}; public static final int DATA_LIT_DURATION = 1; +diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +index c8f23011a8942a5be970c606f67142cbd202b97e..98971a07757d29d6926a0aa05f229b8020af42b6 100644 +--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java ++++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +@@ -258,7 +258,7 @@ public class MapItemSavedData extends SavedData { + } + + private static boolean hasMapInvisibilityItemEquipped(Player player) { +- for (EquipmentSlot equipmentSlot : EquipmentSlot.values()) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + if (equipmentSlot != EquipmentSlot.MAINHAND + && equipmentSlot != EquipmentSlot.OFFHAND + && player.getItemBySlot(equipmentSlot).is(ItemTags.MAP_INVISIBILITY_EQUIPMENT)) { diff --git a/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch b/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch index 271b77b8..eec9b97c 100644 --- a/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch +++ b/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch @@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4b390f292 100644 +index 6714668563e3a7543765064d9824b93ec3924473..147b57bec7646eda5b9f3b1119ce7b9dfd7c328c 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -2017,10 +2017,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2087,10 +2087,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @Deprecated public float getLightLevelDependentMagicValue() { @@ -39,10 +39,10 @@ index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4 public void absSnapTo(double x, double y, double z, float yRot, float xRot) { this.absSnapTo(x, y, z); diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 7f5981f71e6380c09e40a0c80db6a77e74d5113d..6cc000611dc58a5487034ad87af4156059dd37d7 100644 +index 4d4b58b684ca115f4d8f672362d4c8252ef9481a..dcea538d00d3751b887c71450026ce2ced0093b1 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -1474,20 +1474,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1500,20 +1500,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void playAttackSound() { } diff --git a/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch index fd79f95c..5018a2ff 100644 --- a/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch +++ b/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java -index 02bc5d83b92a594ec519f0a02b0517fdb4b9e954..a3a2d51cf53ce4dba8caaaf73967ae714ed16a36 100644 +index d5536dd40a1e9a2e05967652f690abbbca287852..966ca1e0e828e4176e12cbcf8c4a6b16489708de 100644 --- a/net/minecraft/world/level/GameRules.java +++ b/net/minecraft/world/level/GameRules.java -@@ -277,7 +277,7 @@ public class GameRules { +@@ -288,7 +288,7 @@ public class GameRules { } private GameRules(Map, GameRules.Value> rules, FeatureFlagSet enabledFeatures) { diff --git a/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch b/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch index c2c4cae2..27225a8b 100644 --- a/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch +++ b/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index bed9b564c493cd84bf53fc49368fda736f3fbc2b..c61071e0019a18eb73223ed9b64619c9cb691896 100644 +index fdb02fc40579866167e8cc9bcefbd961588b53a6..58d8424262db14b2dca0b2c5a40748b6c0c18e83 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -@@ -14,9 +14,11 @@ import net.minecraft.nbt.ListTag; +@@ -14,9 +14,11 @@ import net.minecraft.core.Holder; import net.minecraft.resources.ResourceLocation; public class AttributeMap { diff --git a/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch b/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch index b695ab4c..b4fad295 100644 --- a/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch +++ b/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 85759f8fe3892e0af3cbbd836defc9ee4b2705f6..a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc 100644 +index dc7d53e93a49297e3a5e1204025b3a50e73fba4e..586b79bc844b098336c6d3bf342b570396e6af88 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -521,10 +521,9 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -535,10 +535,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } protected void tryAddFrost() { @@ -28,7 +28,7 @@ index 85759f8fe3892e0af3cbbd836defc9ee4b2705f6..a542e1dfa41ec2ea1a979dc27d0155d5 if (attribute == null) { return; } -@@ -532,7 +531,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -546,7 +545,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin float f = -0.05F * this.getPercentFrozen(); attribute.addTransientModifier(new AttributeModifier(SPEED_MODIFIER_POWDER_SNOW_ID, f, AttributeModifier.Operation.ADD_VALUE)); } diff --git a/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch b/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch index 99bab90a..d23bd021 100644 --- a/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch +++ b/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch @@ -88,10 +88,10 @@ index 5c1103ef028e5ffe6ce0eadc861dd3b2c8f3ed9f..828ced8aa5665c6f5d0b121947719c4e + @Override public void compact(net.minecraft.world.level.chunk.Palette srcPalette, net.minecraft.world.level.chunk.Palette dstPalette, short[] out) {} // Gale - Lithium - faster chunk serialization } diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java -index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f7a020da5 100644 +index a251ba67644cd02a0b00d7c8b0e2c64aa5e26291..59d48e7dc0911557c57a7e07f5f9013c010165bd 100644 --- a/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -25,6 +25,22 @@ import net.minecraft.util.ThreadingDetector; +@@ -24,6 +24,22 @@ import net.minecraft.util.ThreadingDetector; import net.minecraft.util.ZeroBitStorage; public class PalettedContainer implements PaletteResize, PalettedContainerRO { @@ -114,7 +114,7 @@ index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f private static final int MIN_PALETTE_BITS = 0; private final PaletteResize dummyPaletteResize = (bits, objectAdded) -> 0; public final IdMap registry; -@@ -344,28 +360,54 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -343,28 +359,54 @@ public class PalettedContainer implements PaletteResize, PalettedContainer public synchronized PalettedContainerRO.PackedData pack(IdMap registry, PalettedContainer.Strategy strategy) { // Paper - synchronize this.acquire(); @@ -184,7 +184,7 @@ index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f } private static void swapPalette(int[] bits, IntUnaryOperator operator) { -@@ -405,13 +447,33 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -404,13 +446,33 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @Override public void count(PalettedContainer.CountConsumer countConsumer) { diff --git a/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch b/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch index ca65b368..bd8bcd23 100644 --- a/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch +++ b/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch @@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c39f51ab2b 100644 +index 147b57bec7646eda5b9f3b1119ce7b9dfd7c328c..cb444ab1a3bef2ee5544b99dd513229a1aae4b84 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -240,6 +240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -260,6 +260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public float yRotO; public float xRotO; private AABB bb = INITIAL_AABB; @@ -24,7 +24,7 @@ index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c3 public boolean onGround; public boolean horizontalCollision; public boolean verticalCollision; -@@ -1064,6 +1065,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1086,6 +1087,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper end - detailed watchdog information public void move(MoverType type, Vec3 movement) { @@ -36,7 +36,7 @@ index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c3 final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity // Paper start - detailed watchdog information ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main"); -@@ -4155,6 +4161,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4376,6 +4382,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public final void setBoundingBox(AABB bb) { diff --git a/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch b/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch index 18fa2c99..4a989f55 100644 --- a/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch +++ b/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch @@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index c0a75b84360cdaf89bb23380210de7c39f51ab2b..e7c9b51a115d975ea4a6aaa8e051ac7daf58395e 100644 +index cb444ab1a3bef2ee5544b99dd513229a1aae4b84..ffdeaab1fa7540eddea5997d9ab1eb6faddb7128 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -864,7 +864,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -886,7 +886,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.checkBelowWorld(); if (!this.level().isClientSide) { diff --git a/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch b/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch index bdbbd494..15a83d16 100644 --- a/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch +++ b/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch @@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fbfbf57c22 100644 +index 617eb1b9d30d499124576c5d7cb5152571cc6b84..ad114ca013e0d09d40755acbe916586868a519ed 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1557,6 +1557,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1579,6 +1579,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public void destroyBlockProgress(int breakerId, BlockPos pos, int progress) { @@ -32,7 +32,7 @@ index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fb // CraftBukkit start Player breakerPlayer = null; Entity entity = this.getEntity(breakerId); -@@ -1573,7 +1582,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1595,7 +1604,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe .callEvent(); } // Paper end - Add BlockBreakProgressUpdateEvent @@ -41,7 +41,7 @@ index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fb if (serverPlayer != null && serverPlayer.level() == this && serverPlayer.getId() != breakerId) { double d = pos.getX() - serverPlayer.getX(); double d1 = pos.getY() - serverPlayer.getY(); -@@ -1584,7 +1593,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1606,7 +1615,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // CraftBukkit end if (d * d + d1 * d1 + d2 * d2 < 1024.0) { diff --git a/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch b/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch index 586228b5..da79e576 100644 --- a/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch +++ b/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b26a480fee 100644 +index 186e0a6e565d29572f5d4771a68e4a9cb2bd45de..91d4a5f7685296e397c1c341813542fd13eaf168 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -114,6 +114,7 @@ public abstract class PlayerList { +@@ -113,6 +113,7 @@ public abstract class PlayerList { private final MinecraftServer server; public final List players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety private final Map playersByUUID = Maps.newHashMap(); @@ -48,15 +48,15 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 private final UserBanList bans = new UserBanList(USERBANLIST_FILE); private final IpBanList ipBans = new IpBanList(IPBANLIST_FILE); private final ServerOpList ops = new ServerOpList(OPLIST_FILE); -@@ -311,6 +312,7 @@ public abstract class PlayerList { - this.players.add(player); - this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot - this.playersByUUID.put(player.getUUID(), player); -+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info - // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below - // Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks - player.supressTrackerForLogin = true; -@@ -582,6 +584,7 @@ public abstract class PlayerList { +@@ -312,6 +313,7 @@ public abstract class PlayerList { + this.players.add(player); + this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot + this.playersByUUID.put(player.getUUID(), player); ++ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info + // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below + // Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks + player.supressTrackerForLogin = true; +@@ -585,6 +587,7 @@ public abstract class PlayerList { player.getAdvancements().stopListening(); this.players.remove(player); this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot @@ -64,15 +64,15 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 this.server.getCustomBossEvents().onPlayerDisconnect(player); UUID uuid = player.getUUID(); ServerPlayer serverPlayer = this.playersByUUID.get(uuid); -@@ -724,6 +727,7 @@ public abstract class PlayerList { +@@ -720,6 +723,7 @@ public abstract class PlayerList { player.stopRiding(); // CraftBukkit this.players.remove(player); this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot + this.removeFromSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info - player.serverLevel().removePlayerImmediately(player, reason); + player.level().removePlayerImmediately(player, reason); // TeleportTransition teleportTransition = player.findRespawnPositionAndUseSpawnBlock(!keepInventory, TeleportTransition.DO_NOTHING); // ServerLevel level = teleportTransition.newLevel(); -@@ -802,6 +806,7 @@ public abstract class PlayerList { +@@ -798,6 +802,7 @@ public abstract class PlayerList { this.players.add(serverPlayer); this.playersByName.put(serverPlayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT), serverPlayer); // Spigot this.playersByUUID.put(serverPlayer.getUUID(), serverPlayer); @@ -80,7 +80,7 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 } // serverPlayer.initInventoryMenu(); serverPlayer.setHealth(serverPlayer.getHealth()); -@@ -904,18 +909,58 @@ public abstract class PlayerList { +@@ -900,18 +905,58 @@ public abstract class PlayerList { } public void tick() { @@ -145,16 +145,16 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 public void broadcastAll(Packet packet, net.minecraft.world.entity.player.Player entityhuman) { for (ServerPlayer entityplayer : this.players) { // Paper - replace for i with for each for thread safety diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 248ee263a853d1d3148746a63ba422115853f6a1..8032eae3256625e90313edb4fa132b19d52ba0a0 100644 +index abb19f08c736151fa5c6986e31eb4cf545073586..5e01ae7c5d11777868d72589019ad11305c9acdd 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -221,9 +221,12 @@ public abstract class Player extends LivingEntity { +@@ -230,9 +230,12 @@ public abstract class Player extends LivingEntity { } // CraftBukkit end + public final int sendAllPlayerInfoBucketIndex; // Gale - Purpur - spread out sending all player info + - public Player(Level level, BlockPos pos, float yRot, GameProfile gameProfile) { + public Player(Level level, GameProfile gameProfile) { super(EntityType.PLAYER, level); this.setUUID(gameProfile.getId()); + this.sendAllPlayerInfoBucketIndex = Math.floorMod(this.uuid.hashCode(), net.minecraft.server.players.PlayerList.SEND_PLAYER_INFO_INTERVAL); // Gale - Purpur - spread out sending all player info diff --git a/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch b/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch index 278fe12e..9f290372 100644 --- a/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch +++ b/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 1ea70e63db1d5f05cdbace8be48160b26a480fee..4a3f06a4677348c1277669514f9acef7a4334f1d 100644 +index 91d4a5f7685296e397c1c341813542fd13eaf168..8e7c77174750807bc0e925b100ff73a7bedd76e9 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -913,10 +913,19 @@ public abstract class PlayerList { +@@ -909,10 +909,19 @@ public abstract class PlayerList { ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn]; if (sendAllPlayerInfoBucket != null) { diff --git a/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch index c9f8a4a5..1e7dd2aa 100644 --- a/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch +++ b/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch @@ -37,22 +37,22 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index f1a637272a8e4ec9c46209ca6b58a4905c925a86..006b5502eda66909a971278aa5751ec187bb8a3c 100644 +index f6017445c495c65fc71b10d2a8ed4f5d3d225668..e00624a738e65ab14ec68a8d0e7861522fa32e82 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -496,6 +496,7 @@ public class Commands { - private void runSync(ServerPlayer player, java.util.Collection bukkit, RootCommandNode rootCommandNode) { +@@ -498,6 +498,7 @@ public class Commands { + private void runSync(ServerPlayer player, java.util.Collection bukkit, RootCommandNode rootCommandNode) { // Paper end - Perf: Async command map building new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API + if (org.bukkit.event.player.PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -506,6 +507,7 @@ public class Commands { +@@ -508,6 +509,7 @@ public class Commands { } } // CraftBukkit end + } // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners - - player.connection.send(new ClientboundCommandsPacket(rootCommandNode)); + player.connection.send(new ClientboundCommandsPacket(rootCommandNode, COMMAND_NODE_INSPECTOR)); } + diff --git a/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch b/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch index fe676a4b..085254bb 100644 --- a/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch +++ b/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch @@ -37,18 +37,23 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c803bb1223a 100644 +index ccbf60f546974692c2c840f4bce87e2c95d1866c..ddc89e8960f7dc2f75f0e03ccbe6eda96a0499e2 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -40,6 +40,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - private long keepAliveChallenge; +@@ -38,10 +38,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + public final Connection connection; // Paper + private final boolean transferred; + //private long keepAliveTime; // Paper - improve keepalives +- //private boolean keepAlivePending; // Paper - improve keepalives ++ private boolean keepAlivePending; // Paper - improve keepalives // Purpur - Alternative Keepalive Handling + //private long keepAliveChallenge; // Paper - improve keepalives private long closedListenerTime; private boolean closed = false; + private it.unimi.dsi.fastutil.longs.LongList keepAlives = new it.unimi.dsi.fastutil.longs.LongArrayList(); // Gale - Purpur - send multiple keep-alive packets - private int latency; + private volatile int latency; // Paper - improve keepalives - make volatile private volatile boolean suspendFlushingOnServerThread = false; // CraftBukkit start -@@ -48,7 +49,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -50,7 +51,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack public boolean processedDisconnect; // CraftBukkit end public final java.util.Map packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks @@ -60,55 +65,59 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80 protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie, net.minecraft.server.level.ServerPlayer player) { // CraftBukkit -@@ -117,6 +121,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - - @Override - public void handleKeepAlive(ServerboundKeepAlivePacket packet) { +@@ -122,6 +126,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + // Paper start - improve keepalives + long now = System.nanoTime(); + net.minecraft.server.level.ServerPlayer.PendingKeepAlive pending = this.player.pendingKeepAlives.peek(); + // Gale start - Purpur - send multiple keep-alive packets + if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().misc.keepalive.sendMultiple) { + if (this.keepAlivePending && !keepAlives.isEmpty() && keepAlives.contains(packet.getId())) { + int ping = (int) (Util.getMillis() - packet.getId()); -+ this.latency = (this.latency * 3 + ping) / 4; ++ int updatedLatency = (this.latency * 3 + ping) / 4; ++ this.latency = updatedLatency; + this.keepAlivePending = false; + this.keepAlives.clear(); // We got a valid response, let's roll with it and forget the rest + } ++ return; + } else { + // Gale end - Purpur - send multiple keep-alive packets - if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) { - int i = (int)(Util.getMillis() - this.keepAliveTime); - this.latency = (this.latency * 3 + i) / 4; -@@ -124,6 +138,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - } else if (!this.isSingleplayerOwner()) { - this.disconnectAsync(TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); // Paper - add proper async disconnect + if (pending != null && pending.challengeId() == packet.getId()) { + this.player.pendingKeepAlives.remove(pending); + +@@ -133,6 +149,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + this.latency = this.player.pingCalculator5s.getAvgLatencyMS(); + return; } + } // Gale - Purpur - send multiple keep-alive packets - } - @Override -@@ -240,6 +255,21 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - // Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings - // This should effectively place the keepalive handling back to "as it was" before 1.12.2 - final long elapsedTime = millis - this.keepAliveTime; + for (java.util.Iterator itr = this.player.pendingKeepAlives.iterator(); itr.hasNext();) { + net.minecraft.server.level.ServerPlayer.PendingKeepAlive ka = itr.next(); +@@ -274,6 +291,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + protected void keepConnectionAlive() { + long millis = Util.getMillis(); + // Paper start - improve keepalives + // Gale start - Purpur - send multiple keep-alive packets + if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().misc.keepalive.sendMultiple) { -+ if (elapsedTime >= 1000L) { // 1 second -+ if (this.keepAlivePending && !this.processedDisconnect && this.keepAlives.size() >= KEEPALIVE_LIMIT_IN_SECONDS) { -+ LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); -+ this.disconnect(TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); -+ } else if (this.checkIfClosed(millis)) { -+ this.keepAlivePending = true; -+ this.keepAliveTime = millis; // hijack this field for 1 second intervals -+ this.keepAlives.add(millis); // millis is ID -+ this.send(new ClientboundKeepAlivePacket(millis)); ++ if (this.checkIfClosed(millis) && !this.processedDisconnect) { ++ long currTime = System.nanoTime(); ++ if ((currTime - this.player.lastKeepAliveTx) >= java.util.concurrent.TimeUnit.SECONDS.toNanos(1L)) { // 1 second ++ this.player.lastKeepAliveTx = currTime; ++ if (this.keepAlivePending && !this.processedDisconnect && keepAlives.size() * 1000L >= KEEPALIVE_LIMIT) { ++ this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); ++ } else if (this.checkIfClosed(millis)) { ++ this.keepAlivePending = true; ++ this.keepAlives.add(millis); // currentTime is ID ++ this.send(new ClientboundKeepAlivePacket(millis)); ++ } + } + } + } else { + // Gale end - Purpur - send multiple keep-alive packets - if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // use vanilla's 15000L between keep alive packets - if (this.keepAlivePending) { - if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected -@@ -253,6 +283,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge)); + if (this.checkIfClosed(millis) && !this.processedDisconnect) { + long currTime = System.nanoTime(); + +@@ -292,6 +326,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + // Paper end - improve keepalives } } + } // Gale - Purpur - send multiple keep-alive packets diff --git a/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch b/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch index 35a945b0..72b85ebc 100644 --- a/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch +++ b/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103715b16f4 100644 +index ffdeaab1fa7540eddea5997d9ab1eb6faddb7128..cf13f3956ddcf350e6b2ea3b34d9a2bae214cb22 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4665,6 +4665,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4874,6 +4874,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.inBlockState; } @@ -28,10 +28,10 @@ index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103 return this.chunkPosition; } diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc..ed96755b15e9a9d3dc05ccc8afc730437fe035ff 100644 +index 586b79bc844b098336c6d3bf342b570396e6af88..af6633b8b3efceeb3bf101e069ddc1c65c7f6bfb 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -2097,8 +2097,17 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2129,8 +2129,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin public boolean onClimbableCached() { if (!this.blockPosition().equals(this.lastClimbingPosition)) { @@ -51,7 +51,7 @@ index a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc..ed96755b15e9a9d3dc05ccc8afc73043 } return this.cachedOnClimbable; -@@ -2106,11 +2115,28 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2138,11 +2147,28 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin // Gale end - Airplane - cache on climbable check public boolean onClimbable() { diff --git a/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch b/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch index e40061fd..f1edc252 100644 --- a/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch +++ b/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch @@ -13,25 +13,25 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 6d1542dc07fdf1f3384e8e6d1dacca5f8c3f0b69..13ab4a70f8208c998edeeddffea0b694d2b1347f 100644 +index f752dceea48ed8264ae4cb60fdf2390f0e5019e1..9b715b5848b33dd023feccfa93c08924c92fbe13 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2079,12 +2079,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2181,12 +2181,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void crit(Entity entityHit) { -- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4)); +- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4)); + // Gale start - MultiPaper - broadcast crit animations as the entity being critted -+ var level = this.serverLevel(); ++ var level = this.level(); + level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4)); -+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted ++ // Gale end - MultiPaper - broadcast crit animations as the entity being critte } @Override public void magicCrit(Entity entityHit) { -- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5)); +- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5)); + // Gale start - MultiPaper - broadcast crit animations as the entity being critted -+ var level = this.serverLevel(); ++ var level = this.level(); + level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 5)); + // Gale end - MultiPaper - broadcast crit animations as the entity being critted } diff --git a/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch b/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch index 51431019..ed7ad9ea 100644 --- a/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch +++ b/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch @@ -14,20 +14,20 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 4a3f06a4677348c1277669514f9acef7a4334f1d..d2dc48d5a42506716bcbe0854a860b1eaa3b5705 100644 +index ec9a9f87615e2130282551f9cc85d339c58bcbb1..0acfb86df4a350e41ea1646a38dad14d43f2cb1d 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -235,6 +235,13 @@ public abstract class PlayerList { - org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation()); - this.cserver.getPluginManager().callEvent(ev); +@@ -236,6 +236,13 @@ public abstract class PlayerList { + org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation()); + this.cserver.getPluginManager().callEvent(ev); -+ // Gale start - MultiPaper - do not place player in world if kicked before being spawned in -+ if (!connection.isConnected() || player.quitReason != null) { -+ /*pendingPlayers.remove(player.getUUID(), player);*/ // Gale - MultiPaper - do not place player in world if kicked before being spawned in - this patch was removed from Paper but might be useful later -+ return; -+ } -+ // Gale end - MultiPaper - do not place player in world if kicked before being spawned in ++ // Gale start - MultiPaper - do not place player in world if kicked before being spawned in ++ if (!connection.isConnected() || player.quitReason != null) { ++ /*pendingPlayers.remove(player.getUUID(), player);*/ // Gale - MultiPaper - do not place player in world if kicked before being spawned in - this patch was removed from Paper but might be useful later ++ return; ++ } ++ // Gale end - MultiPaper - do not place player in world if kicked before being spawned in + - org.bukkit.Location loc = ev.getSpawnLocation(); - serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); + org.bukkit.Location loc = ev.getSpawnLocation(); + serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); diff --git a/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch b/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch index e730af9b..d9edc767 100644 --- a/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch +++ b/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9..32b8613c62971bc7481d5242ee15b84cb1b361a7 100644 +index f4daf7ed86e5987ca9da8229402a154b69599f56..3cab16e4fef4acc7e56d60e1f2221806ad7ef355 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1091,6 +1091,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); protected static final EntityDataAccessor DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); protected static final EntityDataAccessor DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); @@ -56,7 +56,7 @@ index 8032eae3256625e90313edb4fa132b19d52ba0a0..2aca22f978daa826bf7ac2b25f13bf30 public static final int CLIENT_LOADED_TIMEOUT_TIME = 60; private static final short DEFAULT_SLEEP_TIMER = 0; private static final float DEFAULT_EXPERIENCE_PROGRESS = 0.0F; -@@ -322,19 +323,23 @@ public abstract class Player extends LivingEntity { +@@ -332,19 +333,23 @@ public abstract class Player extends LivingEntity { this.moveCloak(); if (this instanceof ServerPlayer serverPlayer) { this.foodData.tick(serverPlayer); diff --git a/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch b/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch index f1ccc1a9..d5dab9ac 100644 --- a/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch +++ b/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch @@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 430dec39410c4445326488b537dcd103715b16f4..4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13 100644 +index cf13f3956ddcf350e6b2ea3b34d9a2bae214cb22..09115720a4e5573960eaeeb16c96888c44e19a95 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -2161,8 +2161,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2231,8 +2231,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void push(Entity entity) { diff --git a/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch b/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch index fd41088e..0af097fd 100644 --- a/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch +++ b/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13..8508f4b94f3e4532ce36baff4e68189540b0b59a 100644 +index 09115720a4e5573960eaeeb16c96888c44e19a95..e457dc20f76d813c32225733af0b29646d501202 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1206,8 +1206,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1218,8 +1218,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } diff --git a/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch b/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch index 05a718bb..6096cc1e 100644 --- a/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch +++ b/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 18bddc3db6f0e06f1811f2c409f207db2f462f63..3ec4e0aa0777009b4ee75f6ae94732bd7e125619 100644 +index 8803c03846828b532bd2b6e164c589995907c96b..3acc2ae8533f19a6f9b2b6a1d96271f1047384a4 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -888,11 +888,11 @@ public final class ItemStack implements DataComponentHolder { +@@ -868,11 +868,11 @@ public final class ItemStack implements DataComponentHolder { } public static boolean isSameItem(ItemStack stack, ItemStack other) { diff --git a/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch b/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch index f4a62b56..dac5e4e2 100644 --- a/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch +++ b/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch @@ -13,7 +13,7 @@ As part of: Patina (https://github.com/PatinaMC/Patina) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/commands/SpreadPlayersCommand.java b/net/minecraft/server/commands/SpreadPlayersCommand.java -index d381800ad054be6b054dcca43fbe80d3f0c0c771..5904b9d985487ff8bd1f330667c43096aa298b98 100644 +index 92a820d48057ffe2ef35919341b6cdf605ca939e..b9b1bf351070cd2a744cdb683974fb2aa048d0d2 100644 --- a/net/minecraft/server/commands/SpreadPlayersCommand.java +++ b/net/minecraft/server/commands/SpreadPlayersCommand.java @@ -107,7 +107,7 @@ public class SpreadPlayersCommand { @@ -26,10 +26,10 @@ index d381800ad054be6b054dcca43fbe80d3f0c0c771..5904b9d985487ff8bd1f330667c43096 double d1 = center.y - maxRange; double d2 = center.x + maxRange; diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 13ab4a70f8208c998edeeddffea0b694d2b1347f..b3ffb2afda9ea5cafbab9f775d526af1940cfdca 100644 +index 9b715b5848b33dd023feccfa93c08924c92fbe13..99eaa04bfcd2d37d3e49513e20bb5037119ef84d 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -488,7 +488,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -562,7 +562,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc long l1 = l * l; int i = l1 > 2147483647L ? Integer.MAX_VALUE : (int)l1; int coprime = this.getCoprime(i); @@ -52,10 +52,10 @@ index 0b8d279a53196f3998b1f6901738ca8e02ef7311..9add567d2ec2f5e9cd5bee84423c5a44 } diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java -index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52640c95d7 100644 +index 5f3abbe943be394e9cb987945a238208940b5015..5b831ecd8f094bcae2ff50b96ccfc0d75b43a495 100644 --- a/net/minecraft/world/entity/projectile/FishingHook.java +++ b/net/minecraft/world/entity/projectile/FishingHook.java -@@ -48,7 +48,7 @@ import org.slf4j.Logger; +@@ -51,7 +51,7 @@ import org.slf4j.Logger; public class FishingHook extends Projectile { private static final Logger LOGGER = LogUtils.getLogger(); @@ -64,7 +64,7 @@ index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52 private boolean biting; public int outOfWaterTime; private static final int MAX_OUT_OF_WATER_TIME = 10; -@@ -86,6 +86,7 @@ public class FishingHook extends Projectile { +@@ -90,6 +90,7 @@ public class FishingHook extends Projectile { this.minWaitTime = level.paperConfig().fishingTimeRange.minimum; this.maxWaitTime = level.paperConfig().fishingTimeRange.maximum; // Paper end - Configurable fishing time ranges @@ -73,7 +73,7 @@ index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52 public FishingHook(EntityType entityType, Level level) { diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java -index 71166fbf93d62e8e1bff3db8161932ee2fc5ea86..c7ca8a71070f15c573a5748f1df9810af23febdb 100644 +index afcf185c4e2c0648c96a872fbe1fbebb6012d513..aaa990b01e886812cc1dbad819e922b23d08889c 100644 --- a/net/minecraft/world/entity/raid/Raid.java +++ b/net/minecraft/world/entity/raid/Raid.java @@ -121,7 +121,7 @@ public class Raid { @@ -104,10 +104,10 @@ index 71166fbf93d62e8e1bff3db8161932ee2fc5ea86..c7ca8a71070f15c573a5748f1df9810a for (int i3 = 0; i3 < i1; i3++) { diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 8bb0926130a14351507b2b74feca42278c080381..f7884610d5a94bb1680c1ec8bd4f3ec917b8bc8a 100644 +index c8b577a5d5f059aed368fa082bc4518cc2dbd0b0..ac5ab4ae88c8188635f5784a10002a6cdcad49b6 100644 --- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -246,7 +246,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { +@@ -248,7 +248,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { } private static void spawnGatewayPortal(ServerLevel level, BlockPos pos, EndGatewayConfiguration config) { diff --git a/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch b/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch index 81fd4d23..c328a97e 100644 --- a/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch +++ b/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch @@ -18,10 +18,10 @@ this patch is focused around the sensors used for ai delete the line of sight cache less often and use a faster nearby comparison diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ed96755b15e9a9d3dc05ccc8afc730437fe035ff..befed81ecf698d27971d18fe2743562742e4e1d3 100644 +index af6633b8b3efceeb3bf101e069ddc1c65c7f6bfb..5025e1eb7be566c21b6228038fd6596f4ac53e9a 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1008,15 +1008,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1033,15 +1033,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } if (lookingEntity != null) { diff --git a/leaf-server/minecraft-patches/features/0095-Pufferfish-Optimize-mob-spawning.patch b/leaf-server/minecraft-patches/features/0095-Pufferfish-Optimize-mob-spawning.patch index cc8eca55..390d99d6 100644 --- a/leaf-server/minecraft-patches/features/0095-Pufferfish-Optimize-mob-spawning.patch +++ b/leaf-server/minecraft-patches/features/0095-Pufferfish-Optimize-mob-spawning.patch @@ -22,18 +22,18 @@ and, in my opinion, worth the low risk of minor mob-spawning-related inconsistencies. diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index c1b3d2b4c56b657ff51c8b27b4b80e0c0d01ddbe..18a0bf81562f61fd6ede72d51d836ae28e9226c3 100644 +index 25eaae9a6ba26f7b8e318526b1fb94c301e68c9d..45db35e085161b724a19c0d6f0a558c217fba9cd 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -285,6 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation + public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning public static S spin(Function threadFunction) { - AtomicReference atomicReference = new AtomicReference<>(); -@@ -1046,6 +1047,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop filteredSpawningCategories; -@@ -557,7 +612,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -558,7 +613,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } // Paper end - PlayerNaturallySpawnCreaturesEvent boolean flag = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit @@ -159,7 +159,7 @@ index 3d7d336c2043b533012ee390e6da02ac4f64e1f2..e67196b815dad6baa823822285cff838 } else { filteredSpawningCategories = List.of(); } -@@ -572,7 +627,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -573,7 +628,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon // Paper end - chunk tick iteration optimisation for (LevelChunk levelChunk : list) { @@ -168,7 +168,7 @@ index 3d7d336c2043b533012ee390e6da02ac4f64e1f2..e67196b815dad6baa823822285cff838 } } finally { list.clear(); -@@ -592,7 +647,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -593,7 +648,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } if (!spawnCategories.isEmpty()) { diff --git a/leaf-server/minecraft-patches/features/0096-Pufferfish-Dynamic-Activation-of-Brain.patch b/leaf-server/minecraft-patches/features/0096-Pufferfish-Dynamic-Activation-of-Brain.patch index f6d2ac4f..71c0dcd7 100644 --- a/leaf-server/minecraft-patches/features/0096-Pufferfish-Dynamic-Activation-of-Brain.patch +++ b/leaf-server/minecraft-patches/features/0096-Pufferfish-Dynamic-Activation-of-Brain.patch @@ -32,10 +32,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index bdbbbc5e0c06c71584e7514623d0c8be168befd7..f3ca86e09a4a076d143fb21eac529967ff004df4 100644 +index 63ff39f3db2e695c8a14b021045c17f6d3d2f23d..3c3fe6d2e46a811932143a782bb50f9a7c87c4d2 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -173,6 +173,22 @@ public final class ActivationRange { +@@ -179,6 +179,22 @@ public final class ActivationRange { } ActivationRange.activateEntity(entity); @@ -58,7 +58,7 @@ index bdbbbc5e0c06c71584e7514623d0c8be168befd7..f3ca86e09a4a076d143fb21eac529967 } } } -@@ -184,11 +200,11 @@ public final class ActivationRange { +@@ -190,11 +206,11 @@ public final class ActivationRange { */ private static void activateEntity(final Entity entity) { if (MinecraftServer.currentTick > entity.activatedTick) { @@ -73,10 +73,10 @@ index bdbbbc5e0c06c71584e7514623d0c8be168befd7..f3ca86e09a4a076d143fb21eac529967 } } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index d99ac6eb59e10ff6af841c4496ee46fbfbf57c22..074869245407abb32775b17140e1ffadabc5fcd5 100644 +index ad114ca013e0d09d40755acbe916586868a519ed..3f70fca36f67fa421314ff92d372a97112a19025 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -771,6 +771,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -775,6 +775,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.entityTickList .forEach( entity -> { @@ -85,10 +85,10 @@ index d99ac6eb59e10ff6af841c4496ee46fbfbf57c22..074869245407abb32775b17140e1ffad if (!tickRateManager.isEntityFrozen(entity)) { entity.checkDespawn(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 8508f4b94f3e4532ce36baff4e68189540b0b59a..8370be95e4f0d1d3b99274fea415f77845ad5712 100644 +index e457dc20f76d813c32225733af0b29646d501202..57e669eeb2a05805b8ed81311344bc27292608f3 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -343,6 +343,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -364,6 +364,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public boolean fixedPose = false; // Paper - Expand Pose API private final int despawnTime; // Paper - entity despawn time limit public int totalEntityAge; // Paper - age-like counter for all entities @@ -98,10 +98,10 @@ index 8508f4b94f3e4532ce36baff4e68189540b0b59a..8370be95e4f0d1d3b99274fea415f778 // Paper start - EAR 2 public final boolean defaultActivationState; diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java -index ed11697d81789ee6cd48ee2de2c9fcb8ff2be0d4..a1379aa8eaf84868ceb8b3762f7ca3b87a2d7785 100644 +index b87c6da5272becfa1159e8352f5be5491824f66f..9dc5a7e9fdb83d98c3554fea064b06f022da4496 100644 --- a/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java -@@ -1075,6 +1075,7 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1085,6 +1085,7 @@ public class EntityType implements FeatureElement, EntityTypeT private final boolean canSpawnFarFromPlayer; private final int clientTrackingRange; private final int updateInterval; @@ -110,10 +110,10 @@ index ed11697d81789ee6cd48ee2de2c9fcb8ff2be0d4..a1379aa8eaf84868ceb8b3762f7ca3b8 @Nullable private Component description; diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 6cc000611dc58a5487034ad87af4156059dd37d7..7e466022af0f023b409462ed4d4f3a8aa80c4183 100644 +index dcea538d00d3751b887c71450026ce2ced0093b1..968422c673e23774f6b162ed9cdb02b9bb67f9a8 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -205,10 +205,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -208,10 +208,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void inactiveTick() { super.inactiveTick(); @@ -126,7 +126,7 @@ index 6cc000611dc58a5487034ad87af4156059dd37d7..7e466022af0f023b409462ed4d4f3a8a this.targetSelector.tick(); } } -@@ -717,10 +717,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -734,10 +734,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.sensing.tick(); int i = this.tickCount + this.getId(); if (i % 2 != 0 && this.tickCount > 1) { @@ -159,10 +159,10 @@ index f6c673b1abe53afcb14fd68d590431027ed29f67..21deb221b87ecb70c8a0dc963ab79124 } } diff --git a/net/minecraft/world/entity/ai/goal/GoalSelector.java b/net/minecraft/world/entity/ai/goal/GoalSelector.java -index b816b2de8eb327060ca6ea7c4afc17373fa77ff6..e82e32407cec6109b9c3b0106295217f4a3f4aa2 100644 +index 653c58c7637c46c8b46a5082f671324a2221d431..55f1c138039b80894f655d180192f5cb95e32778 100644 --- a/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -36,9 +36,13 @@ public class GoalSelector { +@@ -34,9 +34,13 @@ public class GoalSelector { } // Paper start - EAR 2 @@ -179,10 +179,10 @@ index b816b2de8eb327060ca6ea7c4afc17373fa77ff6..e82e32407cec6109b9c3b0106295217f public boolean hasTasks() { diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index fc2290a62c0a01cfa3143e77384f30e17d94f039..2ab261bba5f9e0babfc9072afd2ebbee0536041c 100644 +index de3bf0b62371f06ecb5d2035638e352ca0c06182..69500fa0b207fc3d5b1bc2bd665fa39f6725d23d 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -237,8 +237,10 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -222,8 +222,10 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS return 0.4F; } @@ -194,10 +194,10 @@ index fc2290a62c0a01cfa3143e77384f30e17d94f039..2ab261bba5f9e0babfc9072afd2ebbee AllayAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index d3d4d8b025480f9e2202157591319df3af43f9de..f54b854adedd58a37b5c38c63abc3fc94ed9ba80 100644 +index 6a5e9e9582e322aaa1555933de97e545ba74f8f4..3475ecbd95fac6c6b6e792a23cb15cdb3395985f 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -323,8 +323,10 @@ public class Axolotl extends Animal implements Bucketable { +@@ -325,8 +325,10 @@ public class Axolotl extends Animal implements Bucketable { return true; } @@ -209,11 +209,11 @@ index d3d4d8b025480f9e2202157591319df3af43f9de..f54b854adedd58a37b5c38c63abc3fc9 AxolotlAi.updateActivity(this); if (!this.isNoAi()) { diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index fdf40dc10aad108db6ca68fcfec9ecf48f76a9c1..bd80e58179fe577693fa419a77989b0db39abb04 100644 +index b8703409dd3dc8e3020ed81b44ce4812984c88c3..f5c9ef8909f3852fc7a203265ae057232fa403ad 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -199,8 +199,10 @@ public class Frog extends Animal { - VariantUtils.readVariant(compound, this.registryAccess(), Registries.FROG_VARIANT).ifPresent(this::setVariant); +@@ -200,8 +200,10 @@ public class Frog extends Animal { + VariantUtils.readVariant(input, Registries.FROG_VARIANT).ifPresent(this::setVariant); } + private int behaviorTick = 0; // Pufferfish @@ -224,10 +224,10 @@ index fdf40dc10aad108db6ca68fcfec9ecf48f76a9c1..bd80e58179fe577693fa419a77989b0d FrogAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index faaa8197e8421c2bbdc2a8bbaae4f4d0820dbbe7..72c4403a4b5fa817f91dbcd842d4b7939a4834ab 100644 +index c1510a6f1146f446ed65a1f08984af6c29de439a..5392cb211a3dc841ab38710a4ef688bde7fbe067 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -94,8 +94,10 @@ public class Tadpole extends AbstractFish { +@@ -96,8 +96,10 @@ public class Tadpole extends AbstractFish { return SoundEvents.TADPOLE_FLOP; } @@ -239,10 +239,10 @@ index faaa8197e8421c2bbdc2a8bbaae4f4d0820dbbe7..72c4403a4b5fa817f91dbcd842d4b793 TadpoleAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index 9047e75a5edf9fec2b73aec272284d8003793eaa..048e62b361e33b3edd5122fd4a47c5627491bcaf 100644 +index bdac4929db71a39fc02985109cedc9cd316ec3cc..2a72d7f422c340dabef11a6dc680358207bee637 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -185,8 +185,10 @@ public class Goat extends Animal { +@@ -186,8 +186,10 @@ public class Goat extends Animal { return (Brain)super.getBrain(); } @@ -254,10 +254,10 @@ index 9047e75a5edf9fec2b73aec272284d8003793eaa..048e62b361e33b3edd5122fd4a47c562 GoatAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 2989add9a4746646f06ec3f6c386ac5df4a64726..6691dc90c35d05a7c28c4e3ac887ed9d3bb88de9 100644 +index bde6f9d9d1cc7a5ee8334ee9207afae304ddcfa9..084f82a7baaa309aa80cc33b4c01e54cf6da4b42 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -157,8 +157,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -158,8 +158,10 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { return (Brain)super.getBrain(); } @@ -269,10 +269,10 @@ index 2989add9a4746646f06ec3f6c386ac5df4a64726..6691dc90c35d05a7c28c4e3ac887ed9d HoglinAi.updateActivity(this); if (this.isConverting()) { diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index 27052ded60db7c3916de3f4c8b48227f53fd7249..634c518c105c8dc50838a4a6690641d82fd637fb 100644 +index 689f200554d8c03313b3d194f209c527f315c29a..3e6cbf0166486995f7adcbd7b99a8b8c919956cd 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -315,8 +315,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -316,8 +316,10 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento return !this.cannotHunt; } @@ -284,10 +284,10 @@ index 27052ded60db7c3916de3f4c8b48227f53fd7249..634c518c105c8dc50838a4a6690641d8 PiglinAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index 67fdcbe05e8d5f4000255f753565591825f54f67..42ca4243d86ef4a14a9ce70da4b79f6c8eeb3a7d 100644 +index dd6666bd8b8df4148a1557627ce2a6ddab245ed6..6a9d3b749e251d3dac6fda13318bf5a0bf21f82b 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -277,8 +277,10 @@ public class Warden extends Monster implements VibrationSystem { +@@ -275,8 +275,10 @@ public class Warden extends Monster implements VibrationSystem { } } @@ -299,10 +299,10 @@ index 67fdcbe05e8d5f4000255f753565591825f54f67..42ca4243d86ef4a14a9ce70da4b79f6c super.customServerAiStep(level); if ((this.tickCount + this.getId()) % 120 == 0) { diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index c62eee45d661b6f9d2b862a709b4d23645ed41e6..202bcb28218b0d9a2a5e211fee173ecd5f625896 100644 +index 73214ccad93ccd186c149e8ce8913eb0e3fa324a..9b9514362f32ab79816678ce4be25a4a87fe49aa 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -177,6 +177,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -178,6 +178,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler (villager, poiType) -> poiType.is(PoiTypes.MEETING) ); @@ -311,7 +311,7 @@ index c62eee45d661b6f9d2b862a709b4d23645ed41e6..202bcb28218b0d9a2a5e211fee173ecd public Villager(EntityType entityType, Level level) { this(entityType, level, VillagerType.PLAINS); } -@@ -285,6 +287,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -286,6 +288,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } // Paper end - EAR 2 @@ -319,7 +319,7 @@ index c62eee45d661b6f9d2b862a709b4d23645ed41e6..202bcb28218b0d9a2a5e211fee173ecd @Override protected void customServerAiStep(ServerLevel level) { // Paper start - EAR 2 -@@ -292,7 +295,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -293,7 +296,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } protected void customServerAiStep(ServerLevel level, final boolean inactive) { // Paper end - EAR 2 diff --git a/leaf-server/minecraft-patches/features/0097-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch b/leaf-server/minecraft-patches/features/0097-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch index 2f0e4f92..4ab26276 100644 --- a/leaf-server/minecraft-patches/features/0097-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch +++ b/leaf-server/minecraft-patches/features/0097-Pufferfish-Throttle-goal-selector-during-inactive-ti.patch @@ -7,10 +7,10 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 7e466022af0f023b409462ed4d4f3a8aa80c4183..92ebc61aa7f6f70292a384b56bd8ef77a15e485c 100644 +index 968422c673e23774f6b162ed9cdb02b9bb67f9a8..275f8697031251f7e106ac3fcc165e42af362434 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -201,11 +201,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -204,11 +204,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab return this.lookControl; } diff --git a/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch b/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch index 4b458780..9b822fb1 100644 --- a/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch +++ b/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch @@ -1,12 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Github Actions -Date: Sun, 6 Apr 2025 06:33:24 +0000 +Date: Fri, 13 Jun 2025 14:00:13 +0000 Subject: [PATCH] Purpur Server Minecraft Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 61d7f5590e79909caba55e9f00cefdd51006d015 +Commit: dfd8a7ad14f436ea9c4704a758305e7145923c2d Patches listed below are removed in this patch, They exists in Gale or Leaf: * "net/minecraft/CrashReport.java.patch" @@ -44,10 +44,10 @@ Patches listed below are removed in this patch, They exists in Gale or Leaf: - Rebrand diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index f3ca86e09a4a076d143fb21eac529967ff004df4..fff12ee449878b7a6eab2edef9476bd90bafef45 100644 +index 3c3fe6d2e46a811932143a782bb50f9a7c87c4d2..b866bef893dfb4e65a6c4c48125e6d8a1c3ede64 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -155,6 +155,8 @@ public final class ActivationRange { +@@ -161,6 +161,8 @@ public final class ActivationRange { continue; } @@ -56,7 +56,7 @@ index f3ca86e09a4a076d143fb21eac529967ff004df4..fff12ee449878b7a6eab2edef9476bd9 final int worldHeight = world.getHeight(); ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange); ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange); -@@ -312,6 +314,7 @@ public final class ActivationRange { +@@ -318,6 +320,7 @@ public final class ActivationRange { * @return */ public static boolean checkIfActive(final Entity entity) { @@ -65,10 +65,10 @@ index f3ca86e09a4a076d143fb21eac529967ff004df4..fff12ee449878b7a6eab2edef9476bd9 if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId()) % 4 == 0)) { // Needed for item gravity, see ItemEntity tick return true; diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java -index cb63e4c264a31788cd1405428af70f7a018910e9..4d06587cd55af988eecdda5186577ab72ca3d533 100644 +index 3acfb2a78845dd8081dc3c01d653034232c76e60..51caf352e77df49fc04bf84f1fab29b6f4f4fc14 100644 --- a/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java -@@ -455,6 +455,19 @@ public class CommandSourceStack implements ExecutionCommandSource> { +@@ -578,11 +578,20 @@ public class Connection extends SimpleChannelInboundHandler> { private static final int MAX_PER_TICK = io.papermc.paper.configuration.GlobalConfiguration.get().misc.maxJoinsPerTick; // Paper - Buffer joins to world private static int joinAttemptsThisTick; // Paper - Buffer joins to world private static int currTick; // Paper - Buffer joins to world @@ -305,10 +305,10 @@ index 4ed9611994c5c8da01fede690197527c5b3a5731..00a82873d226f113278632a53c0faca4 } // Paper end - Buffer joins to world diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index 6c65122fe15e08c352885c7dfd3ddf496f0c00c4..bff3da0fba99532889976281dba70d6500ef432e 100644 +index b16f3f515a76ddbbd74d73464396cf094cb30599..dd6ae338fa48d52962ee0af5b1572077ba6dff91 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -108,6 +108,12 @@ public class Main { +@@ -109,6 +109,12 @@ public class Main { JvmProfiler.INSTANCE.start(Environment.SERVER); } @@ -322,10 +322,10 @@ index 6c65122fe15e08c352885c7dfd3ddf496f0c00c4..bff3da0fba99532889976281dba70d65 io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper Bootstrap.bootStrap(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 18a0bf81562f61fd6ede72d51d836ae28e9226c3..271233087ad8a0ef8e90e1d518907e166f8235a2 100644 +index 9ab4e38d6dd278b9ed7c43bf448c32983135a547..f05fa801f35f4afcc93fcace6a98cee0fa3ec531 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -265,6 +265,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; // Paper - don't store the vanilla dispatcher -@@ -286,6 +287,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning @@ -341,8 +341,8 @@ index 18a0bf81562f61fd6ede72d51d836ae28e9226c3..271233087ad8a0ef8e90e1d518907e16 + protected boolean upnp = false; // Purpur - UPnP Port Forwarding public static S spin(Function threadFunction) { - AtomicReference atomicReference = new AtomicReference<>(); -@@ -975,6 +978,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent serverLevel.updateLagCompensationTick(); // Paper - lag compensation net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers @@ -423,19 +423,19 @@ index 18a0bf81562f61fd6ede72d51d836ae28e9226c3..271233087ad8a0ef8e90e1d518907e16 if (this.tickCount % 20 == 0) { this.synchronizeTime(serverLevel); diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index 741894ed6df81fce41d9f906d6198d038aab44a8..edf115439c630a4471460db02109bbce7868de81 100644 +index 63c32ae544d87177c9b3e1f1b73eeb9be904eebf..9ecc19b8a7d4e6b27335b542308f78e5005b0e15 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java -@@ -195,6 +195,7 @@ public class PlayerAdvancements { +@@ -194,6 +194,7 @@ public class PlayerAdvancements { advancement.value().display().ifPresent(displayInfo -> { // Paper start - Add Adventure message to PlayerAdvancementDoneEvent - if (event.message() != null && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { + if (event.message() != null && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) { + if (org.purpurmc.purpur.PurpurConfig.advancementOnlyBroadcastToAffectedPlayer) this.player.sendMessage(message); else // Purpur - Configurable broadcast settings this.playerList.broadcastSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false); // Paper end } diff --git a/net/minecraft/server/commands/EnchantCommand.java b/net/minecraft/server/commands/EnchantCommand.java -index 709690044ec506c50a73197f5ba43e89f3403a5e..60baf9a5dc4a583d08007acb68bbed61768270d5 100644 +index 6f4fcee9fdba2248227708fcced1ce0f40aff6af..13f1dbd0d09428e9e0a42f99d0553283e0065f6f 100644 --- a/net/minecraft/server/commands/EnchantCommand.java +++ b/net/minecraft/server/commands/EnchantCommand.java @@ -70,7 +70,7 @@ public class EnchantCommand { @@ -457,10 +457,10 @@ index 709690044ec506c50a73197f5ba43e89f3403a5e..60baf9a5dc4a583d08007acb68bbed61 i++; } else if (targets.size() == 1) { diff --git a/net/minecraft/server/commands/GameModeCommand.java b/net/minecraft/server/commands/GameModeCommand.java -index c44cdbbdc06b25bd20a208386545a10af9b96df8..a88b8f999b181071ebb492bc1afa2d72fff3748e 100644 +index 9da9ab3b835a8dcc7e1da286be1de88a3f0240fa..4b8c9aaf1d143bc38f52f646e4e73b56013eda8c 100644 --- a/net/minecraft/server/commands/GameModeCommand.java +++ b/net/minecraft/server/commands/GameModeCommand.java -@@ -51,6 +51,18 @@ public class GameModeCommand { +@@ -53,6 +53,18 @@ public class GameModeCommand { } private static int setMode(CommandContext source, Collection players, GameType gameType) { @@ -480,19 +480,19 @@ index c44cdbbdc06b25bd20a208386545a10af9b96df8..a88b8f999b181071ebb492bc1afa2d72 for (ServerPlayer serverPlayer : players) { diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java -index f04bc30a836b6eec80b0e2cf76831b0fdccd8149..5e48519f1669ddecaca479126270012373879752 100644 +index ea9db57a1fe2f11739ceb062ea7cce15776f959a..a919d91eeaaeef0f79190cc5e78e4f8b2fb468dd 100644 --- a/net/minecraft/server/commands/GiveCommand.java +++ b/net/minecraft/server/commands/GiveCommand.java -@@ -66,6 +66,7 @@ public class GiveCommand { +@@ -69,6 +69,7 @@ public class GiveCommand { i1 -= min; ItemStack itemStack1 = item.createItemStack(min, false); boolean flag = serverPlayer.getInventory().add(itemStack1); + if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping if (flag && itemStack1.isEmpty()) { - ItemEntity itemEntity = serverPlayer.drop(itemStack, false, false, false, null); // Paper - do not fire PlayerDropItemEvent for /give command + ItemEntity itemEntity = serverPlayer.drop(itemStack, false); if (itemEntity != null) { diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 349eafa321c955c6bda7a5aa6931311d85867565..cdfb9004dd4f4ea1bbb77895b7fc020d628c485d 100644 +index ca1406178cfb1a5a10947872585e2dcf3059b460..87fc8861948b50361ec04c5a23406d3abdec6eac 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -105,6 +105,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -560,10 +560,10 @@ index 349eafa321c955c6bda7a5aa6931311d85867565..cdfb9004dd4f4ea1bbb77895b7fc020d return true; } diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java -index f6518e29f805018c72222f5aaa7b662071665b65..5748658abf0b90812005ae9d426df92daf5532f0 100644 +index 4a01088da91fc6d620cb804a9ab6d6eb1630b473..b286dc17cda16fca3af9374d2a4a8bd137c24450 100644 --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -49,6 +49,7 @@ public class DedicatedServerProperties extends Settings pointOfInterestType.is(PoiTypes.LIGHTNING_ROD), blockPos -> blockPos.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, blockPos.getX(), blockPos.getZ()) - 1, pos, @@ -874,7 +874,7 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58 PoiManager.Occupancy.ANY ); return optional.map(blockPos -> blockPos.above(1)); -@@ -1033,8 +1109,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1037,8 +1113,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); Component component; if (this.sleepStatus.areEnoughSleeping(_int)) { @@ -901,7 +901,7 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58 component = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(_int)); } -@@ -1167,6 +1261,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1175,6 +1269,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @VisibleForTesting public void resetWeatherCycle() { // CraftBukkit start @@ -909,7 +909,7 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58 this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents // If we stop due to everyone sleeping we should reset the weather duration to some other random value. // Not that everyone ever manages to get the whole server to sleep at the same time.... -@@ -1174,6 +1269,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1182,6 +1277,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.serverLevelData.setRainTime(0); } // CraftBukkit end @@ -917,7 +917,7 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58 this.serverLevelData.setThundering(false, org.bukkit.event.weather.ThunderChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents // CraftBukkit start // If we stop due to everyone sleeping we should reset the weather duration to some other random value. -@@ -2652,7 +2748,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2705,7 +2801,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Spigot start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message // Paper start - Fix merchant inventory not closing on entity removal @@ -927,10 +927,10 @@ index 074869245407abb32775b17140e1ffadabc5fcd5..e6730996dfd4c2422b6c13f10309fc58 } // Paper end - Fix merchant inventory not closing on entity removal diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b234c579f26 100644 +index 99eaa04bfcd2d37d3e49513e20bb5037119ef84d..c6fafc3cb31d0a3dbbeaf8a9493d70de502110cc 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -419,6 +419,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -430,6 +430,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent public @Nullable String clientBrandName = null; // Paper - Brand support public @Nullable org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event @@ -941,28 +941,28 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; -@@ -552,6 +556,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc - this.respawnConfig = compound.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null); - this.spawnExtraParticlesOnFall = compound.getBooleanOr("spawn_extra_particles_on_fall", false); - this.raidOmenPosition = compound.read("raid_omen_position", BlockPos.CODEC).orElse(null); +@@ -627,6 +631,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + this.respawnConfig = input.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null); + this.spawnExtraParticlesOnFall = input.getBooleanOr("spawn_extra_particles_on_fall", false); + this.raidOmenPosition = input.read("raid_omen_position", BlockPos.CODEC).orElse(null); + -+ this.tpsBar = compound.getBooleanOr("Purpur.TPSBar", false); // Purpur - Implement TPSBar -+ this.compassBar = compound.getBooleanOr("Purpur.CompassBar", false); // Purpur - Add compass command -+ this.ramBar = compound.getBooleanOr("Purpur.RamBar", false); // Purpur - Implement rambar command ++ this.tpsBar = input.getBooleanOr("Purpur.TPSBar", false); // Purpur - Implement TPSBar ++ this.compassBar = input.getBooleanOr("Purpur.CompassBar", false); // Purpur - Add compass command ++ this.ramBar = input.getBooleanOr("Purpur.RamBar", false); // Purpur - Implement rambar command } @Override -@@ -569,6 +577,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc - compound.storeNullable("raid_omen_position", BlockPos.CODEC, this.raidOmenPosition); - this.saveEnderPearls(compound); - this.getBukkitEntity().setExtraData(compound); // CraftBukkit -+ compound.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur - Implement TPSBar -+ compound.putBoolean("Purpur.CompassBar", this.compassBar); // Purpur - Add compass command -+ compound.putBoolean("Purpur.RamBar", this.ramBar); // Purpur - Add rambar command +@@ -644,6 +652,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + output.storeNullable("raid_omen_position", BlockPos.CODEC, this.raidOmenPosition); + this.saveEnderPearls(output); + this.getBukkitEntity().setExtraData(output); // CraftBukkit ++ output.putBoolean("Purpur.TPSBar", this.tpsBar); // Purpur - Implement TPSBar ++ output.putBoolean("Purpur.CompassBar", this.compassBar); // Purpur - Add compass command ++ output.putBoolean("Purpur.RamBar", this.ramBar); // Purpur - Add rambar command } - private void saveParentVehicle(CompoundTag tag) { -@@ -780,6 +791,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + private void saveParentVehicle(ValueOutput output) { +@@ -849,6 +860,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.trackEnteredOrExitedLavaOnVehicle(); this.updatePlayerAttributes(); this.advancements.flushDirty(this, true); @@ -978,7 +978,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 } private void updatePlayerAttributes() { -@@ -1062,6 +1082,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1140,6 +1160,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc // Paper - moved up to sendClientboundPlayerCombatKillPacket() sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent Team team = this.getTeam(); @@ -986,7 +986,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) { this.server.getPlayerList().broadcastSystemMessage(deathMessage, false); } else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { -@@ -1168,6 +1189,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1246,6 +1267,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc if (this.isInvulnerableTo(level, damageSource)) { return false; } else { @@ -1005,7 +1005,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 Entity entity = damageSource.getEntity(); if (!( // Paper - split the if statement. If below statement is false, hurtServer would not have been evaluated. Return false. !(entity instanceof Player player && !this.canHarmPlayer(player)) -@@ -1390,6 +1423,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1486,6 +1519,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc serverLevel.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.unsetRemoved(); // CraftBukkit end @@ -1013,19 +1013,19 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 this.setServerLevel(level); this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); -@@ -1506,7 +1540,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1601,7 +1635,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc new AABB(vec3.x() - 8.0, vec3.y() - 5.0, vec3.z() - 8.0, vec3.x() + 8.0, vec3.y() + 5.0, vec3.z() + 8.0), - monster -> monster.isPreventingPlayerRest(this.serverLevel(), this) + monster -> monster.isPreventingPlayerRest(this.level(), this) ); - if (!entitiesOfClass.isEmpty()) { + if (!this.level().purpurConfig.playerSleepNearMonsters && !entitiesOfClass.isEmpty()) { // Purpur - Config to ignore nearby mobs when sleeping return Either.left(Player.BedSleepingProblem.NOT_SAFE); } } -@@ -1543,7 +1577,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1638,7 +1672,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc CriteriaTriggers.SLEPT_IN_BED.trigger(this); }); - if (!this.serverLevel().canSleepThroughNights()) { + if (!this.level().canSleepThroughNights()) { - this.displayClientMessage(Component.translatable("sleep.not_possible"), true); + // Purpur start - Customizable sleeping actionbar messages + Component clientMessage; @@ -1042,8 +1042,8 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 + // Purpur end - Customizable sleeping actionbar messages } - ((ServerLevel)this.level()).updateSleepingPlayerList(); -@@ -1635,6 +1681,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + this.level().updateSleepingPlayerList(); +@@ -1730,6 +1776,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void openTextEdit(SignBlockEntity signEntity, boolean isFrontText) { @@ -1051,7 +1051,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 this.connection.send(new ClientboundBlockUpdatePacket(this.level(), signEntity.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(signEntity.getBlockPos(), isFrontText)); } -@@ -1937,6 +1984,26 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2039,6 +2086,26 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -1078,7 +1078,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 @Override public void displayClientMessage(Component chatComponent, boolean actionBar) { this.sendSystemMessage(chatComponent, actionBar); -@@ -2160,6 +2227,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2263,6 +2330,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc ); } @@ -1099,7 +1099,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 public void sendSystemMessage(Component mesage) { this.sendSystemMessage(mesage, false); } -@@ -2298,8 +2379,68 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2401,8 +2482,68 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); @@ -1160,15 +1160,15 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 + } + + @Override -+ public boolean canBeCollidedWith() { -+ return !this.isAfk() && super.canBeCollidedWith(); ++ public boolean canBeCollidedWith(Entity entity) { ++ return !this.isAfk() && super.canBeCollidedWith(entity); + } + // Purpur end - AFK API + public ServerStatsCounter getStats() { return this.stats; } -@@ -2926,4 +3067,56 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -3029,4 +3170,56 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end @@ -1226,7 +1226,7 @@ index b3ffb2afda9ea5cafbab9f775d526af1940cfdca..834829427f3388c6cd94b5ceadc18b23 + // Purpur end - Add rambar command } diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java -index b604cba2490a747661d6819251bc3b9a1d35c7d4..3a596650feb96123c5684bb5065e20c5b005c0b9 100644 +index 6734756d7a51e635a50a47577f9e6b6f8111db51..c4a4f08272b34f72dea4feaaeb66d153b2aab8c8 100644 --- a/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/net/minecraft/server/level/ServerPlayerGameMode.java @@ -348,6 +348,7 @@ public class ServerPlayerGameMode { @@ -1274,10 +1274,10 @@ index b604cba2490a747661d6819251bc3b9a1d35c7d4..3a596650feb96123c5684bb5065e20c5 + // Purpur end - Shift right click to use exp for mending } diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index c4f4c21f32e2aba79e15315d73124c803bb1223a..d2e8adccf33c6b842fac615006b782b09cfa7a1a 100644 +index ddc89e8960f7dc2f75f0e03ccbe6eda96a0499e2..8a4c8e2fb86274b5bf95bda510029f4c5077d836 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -54,6 +54,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -56,6 +56,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack private static final long KEEPALIVE_LIMIT = KEEPALIVE_LIMIT_IN_SECONDS * 1000; // Gale end - Purpur - send multiple keep-alive packets protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support @@ -1285,7 +1285,7 @@ index c4f4c21f32e2aba79e15315d73124c803bb1223a..d2e8adccf33c6b842fac615006b782b0 public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie, net.minecraft.server.level.ServerPlayer player) { // CraftBukkit this.server = server; -@@ -183,6 +184,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -215,6 +216,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack return; } @@ -1299,10 +1299,10 @@ index c4f4c21f32e2aba79e15315d73124c803bb1223a..d2e8adccf33c6b842fac615006b782b0 this.player.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256); } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010491b64aa 100644 +index a07310aebd8406af27864358e15715fcc7694329..72292ee9620ee369ccee00dd0280bf6041d3afca 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -321,6 +321,20 @@ public class ServerGamePacketListenerImpl +@@ -324,6 +324,20 @@ public class ServerGamePacketListenerImpl this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event } @@ -1323,7 +1323,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 @Override public void tick() { if (this.ackBlockChangesUpTo > -1) { -@@ -379,6 +393,12 @@ public class ServerGamePacketListenerImpl +@@ -382,6 +396,12 @@ public class ServerGamePacketListenerImpl if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > this.server.getPlayerIdleTimeout() * 1000L * 60L && !this.player.wonGame) { // Paper - Prevent AFK kick while watching end credits @@ -1336,7 +1336,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause } -@@ -624,6 +644,8 @@ public class ServerGamePacketListenerImpl +@@ -651,6 +671,8 @@ public class ServerGamePacketListenerImpl this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -1345,15 +1345,15 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -703,6 +725,7 @@ public class ServerGamePacketListenerImpl - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); +@@ -730,6 +752,7 @@ public class ServerGamePacketListenerImpl + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { + ServerGamePacketListenerImpl.LOGGER.warn("Disconnected on accept teleport packet. Was not expecting position data from client at this time"); // Purpur - Add more logger output for invalid movement kicks this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause return; } -@@ -1238,6 +1261,10 @@ public class ServerGamePacketListenerImpl +@@ -1268,6 +1291,10 @@ public class ServerGamePacketListenerImpl final int maxBookPageSize = pageMax.intValue(); final double multiplier = Math.clamp(io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier, 0.3D, 1D); long byteAllowed = maxBookPageSize; @@ -1364,7 +1364,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 for (final String page : pageList) { final int byteLength = page.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; byteTotal += byteLength; -@@ -1262,7 +1289,8 @@ public class ServerGamePacketListenerImpl +@@ -1292,7 +1319,8 @@ public class ServerGamePacketListenerImpl } if (byteTotal > byteAllowed) { @@ -1374,7 +1374,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect return; } -@@ -1281,31 +1309,45 @@ public class ServerGamePacketListenerImpl +@@ -1311,31 +1339,45 @@ public class ServerGamePacketListenerImpl Optional optional = packet.title(); optional.ifPresent(list::add); list.addAll(packet.pages()); @@ -1424,7 +1424,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 itemStack.set( DataComponents.WRITTEN_BOOK_CONTENT, new WrittenBookContent(this.filterableFromOutgoing(title), this.player.getName().getString(), 0, list, true) -@@ -1319,6 +1361,16 @@ public class ServerGamePacketListenerImpl +@@ -1349,6 +1391,16 @@ public class ServerGamePacketListenerImpl return this.player.isTextFilteringEnabled() ? Filterable.passThrough(filteredText.filteredOrEmpty()) : Filterable.from(filteredText); } @@ -1440,11 +1440,11 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 + @Override public void handleEntityTagQuery(ServerboundEntityTagQueryPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); -@@ -1354,7 +1406,15 @@ public class ServerGamePacketListenerImpl + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); +@@ -1388,7 +1440,15 @@ public class ServerGamePacketListenerImpl @Override public void handleMovePlayer(ServerboundMovePlayerPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); - if (containsInvalidValues(packet.getX(0.0), packet.getY(0.0), packet.getZ(0.0), packet.getYRot(0.0F), packet.getXRot(0.0F))) { + // Purpur start - Add more logger output for invalid movement kicks + boolean invalidX = Double.isNaN(packet.getX(0.0)); @@ -1457,8 +1457,8 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 + // Purpur end - Add more logger output for invalid movement kicks this.disconnect(Component.translatable("multiplayer.disconnect.invalid_player_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PLAYER_MOVEMENT); // Paper - kick event cause } else { - ServerLevel serverLevel = this.player.serverLevel(); -@@ -1536,7 +1596,7 @@ public class ServerGamePacketListenerImpl + ServerLevel serverLevel = this.player.level(); +@@ -1570,7 +1630,7 @@ public class ServerGamePacketListenerImpl movedWrongly = true; if (event.getLogWarning()) // Paper end @@ -1467,7 +1467,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 } // Paper } -@@ -1602,6 +1662,8 @@ public class ServerGamePacketListenerImpl +@@ -1635,6 +1695,8 @@ public class ServerGamePacketListenerImpl this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -1476,13 +1476,13 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 Location oldTo = to.clone(); PlayerMoveEvent event = new PlayerMoveEvent(player, from, to); this.cserver.getPluginManager().callEvent(event); -@@ -1657,6 +1719,13 @@ public class ServerGamePacketListenerImpl +@@ -1690,6 +1752,13 @@ public class ServerGamePacketListenerImpl this.player.tryResetCurrentImpulseContext(); } + // Purpur start - Dont run with scissors! -+ if (this.player.serverLevel().purpurConfig.dontRunWithScissors && this.player.isSprinting() && !(this.player.serverLevel().purpurConfig.ignoreScissorsInWater && this.player.isInWater()) && !(this.player.serverLevel().purpurConfig.ignoreScissorsInLava && this.player.isInLava()) && (isScissors(this.player.getItemInHand(InteractionHand.MAIN_HAND)) || isScissors(this.player.getItemInHand(InteractionHand.OFF_HAND))) && (int) (Math.random() * 10) == 0) { -+ this.player.hurtServer(this.player.serverLevel(), this.player.damageSources().scissors(), (float) this.player.serverLevel().purpurConfig.scissorsRunningDamage); ++ if (this.player.level().purpurConfig.dontRunWithScissors && this.player.isSprinting() && !(this.player.level().purpurConfig.ignoreScissorsInWater && this.player.isInWater()) && !(this.player.level().purpurConfig.ignoreScissorsInLava && this.player.isInLava()) && (isScissors(this.player.getItemInHand(InteractionHand.MAIN_HAND)) || isScissors(this.player.getItemInHand(InteractionHand.OFF_HAND))) && (int) (Math.random() * 10) == 0) { ++ this.player.hurtServer(this.player.level(), this.player.damageSources().scissors(), (float) this.player.level().purpurConfig.scissorsRunningDamage); + if (!org.purpurmc.purpur.PurpurConfig.dontRunWithScissors.isBlank()) this.player.sendActionBarMessage(org.purpurmc.purpur.PurpurConfig.dontRunWithScissors); + } + // Purpur end - Dont run with scissors! @@ -1490,7 +1490,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 this.player.checkMovementStatistics(this.player.getX() - x, this.player.getY() - y, this.player.getZ() - z); this.lastGoodX = this.player.getX(); this.lastGoodY = this.player.getY(); -@@ -1674,6 +1743,17 @@ public class ServerGamePacketListenerImpl +@@ -1707,6 +1776,17 @@ public class ServerGamePacketListenerImpl } } @@ -1499,7 +1499,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 + if (!stack.is(Items.SHEARS)) return false; + + ResourceLocation itemModelReference = stack.get(net.minecraft.core.component.DataComponents.ITEM_MODEL); -+ if (itemModelReference != null && itemModelReference.equals(this.player.serverLevel().purpurConfig.dontRunWithScissorsItemModelReference)) return true; ++ if (itemModelReference != null && itemModelReference.equals(this.player.level().purpurConfig.dontRunWithScissorsItemModelReference)) return true; + + return stack.getOrDefault(DataComponents.CUSTOM_MODEL_DATA, net.minecraft.world.item.component.CustomModelData.EMPTY).equals(net.minecraft.world.item.component.CustomModelData.EMPTY); + } @@ -1508,7 +1508,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 private boolean shouldCheckPlayerMovement(boolean isElytraMovement) { if (this.isSingleplayerOwner()) { return false; -@@ -2070,6 +2150,7 @@ public class ServerGamePacketListenerImpl +@@ -2104,6 +2184,7 @@ public class ServerGamePacketListenerImpl boolean cancelled; if (hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) { @@ -1516,7 +1516,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemInHand, hand); cancelled = event.useItemInHand() == Event.Result.DENY; } else { -@@ -2742,6 +2823,7 @@ public class ServerGamePacketListenerImpl +@@ -2755,6 +2836,7 @@ public class ServerGamePacketListenerImpl AABB boundingBox = target.getBoundingBox(); if (this.player.canInteractWithEntity(boundingBox, io.papermc.paper.configuration.GlobalConfiguration.get().misc.clientInteractionLeniencyDistance.or(3.0))) { // Paper - configurable lenience value for interact range @@ -1524,7 +1524,7 @@ index 68368928035ffa8fb7b12a7e3c6a7f9686379933..35ca166964e8436154891708f69ac010 packet.dispatch( new ServerboundInteractPacket.Handler() { private void performInteraction(InteractionHand hand, ServerGamePacketListenerImpl.EntityInteraction entityInteraction, PlayerInteractEntityEvent event) { // CraftBukkit -@@ -2754,6 +2836,8 @@ public class ServerGamePacketListenerImpl +@@ -2767,6 +2849,8 @@ public class ServerGamePacketListenerImpl ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event); @@ -1547,26 +1547,26 @@ index dc225eaa0daf238e091a0cf63a42158a30ecb7f0..c61a94a08486cdeba84ccfbc58ef3cab } } catch (AuthenticationUnavailableException var4) { diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index d2dc48d5a42506716bcbe0854a860b1eaa3b5705..bfcc40c09f80b5405cc414969693c195769bcb98 100644 +index 0acfb86df4a350e41ea1646a38dad14d43f2cb1d..0f02eef9bcae59bf3df6471b10dbfa8252337140 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -411,6 +411,7 @@ public abstract class PlayerList { - scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); - } - // Paper end - Configurable player collision -+ org.purpurmc.purpur.task.BossBarTask.addToAll(player); // Purpur - Implement TPSBar - if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable - PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); - // Gale start - JettPack - make logging login location configurable -@@ -522,6 +523,7 @@ public abstract class PlayerList { +@@ -412,6 +412,7 @@ public abstract class PlayerList { + scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); + } + // Paper end - Configurable player collision ++ org.purpurmc.purpur.task.BossBarTask.addToAll(player); // Purpur - Implement TPSBar + if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable + PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); + // Gale start - JettPack - make logging login location configurable +@@ -525,6 +526,7 @@ public abstract class PlayerList { } public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player, net.kyori.adventure.text.Component leaveMessage) { // Paper end - Fix kick event leave message not being sent + org.purpurmc.purpur.task.BossBarTask.removeFromAll(player.getBukkitEntity()); // Purpur - Implement TPSBar - ServerLevel serverLevel = player.serverLevel(); + ServerLevel serverLevel = player.level(); player.awardStat(Stats.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it -@@ -681,7 +683,7 @@ public abstract class PlayerList { +@@ -684,7 +686,7 @@ public abstract class PlayerList { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) // ? Component.translatable("multiplayer.disconnect.server_full") // : null; @@ -1575,7 +1575,7 @@ index d2dc48d5a42506716bcbe0854a860b1eaa3b5705..bfcc40c09f80b5405cc414969693c195 event.disallow(org.bukkit.event.player.PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure } } -@@ -1001,6 +1003,20 @@ public abstract class PlayerList { +@@ -997,6 +999,20 @@ public abstract class PlayerList { } } @@ -1596,7 +1596,7 @@ index d2dc48d5a42506716bcbe0854a860b1eaa3b5705..bfcc40c09f80b5405cc414969693c195 public void broadcastAll(Packet packet, ResourceKey dimension) { for (ServerPlayer serverPlayer : this.players) { if (serverPlayer.level().dimension() == dimension) { -@@ -1085,6 +1101,7 @@ public abstract class PlayerList { +@@ -1081,6 +1097,7 @@ public abstract class PlayerList { } else { b = (byte)(24 + permLevel); } @@ -1604,7 +1604,7 @@ index d2dc48d5a42506716bcbe0854a860b1eaa3b5705..bfcc40c09f80b5405cc414969693c195 player.connection.send(new ClientboundEntityEventPacket(player, b)); } -@@ -1093,6 +1110,27 @@ public abstract class PlayerList { +@@ -1089,6 +1106,27 @@ public abstract class PlayerList { player.getBukkitEntity().recalculatePermissions(); // CraftBukkit this.server.getCommands().sendCommands(player); } // Paper - Add sendOpLevel API @@ -1903,18 +1903,18 @@ index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188b } diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a504172a1e 100644 +index 28e2ad1238651b8adb47b77763b0c8ae8172fe8a..fb387919e51504beafd2e7947faa41795df18100 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -139,6 +139,7 @@ import net.minecraft.world.scores.Team; - import org.jetbrains.annotations.Contract; +@@ -146,6 +146,7 @@ import org.jetbrains.annotations.Contract; + import org.slf4j.Logger; public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker + public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes // CraftBukkit start - private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); private static final int CURRENT_LEVEL = 2; -@@ -259,8 +260,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + public boolean preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; keep initial motion on first snapTo +@@ -279,8 +280,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public double xOld; public double yOld; public double zOld; @@ -1923,9 +1923,9 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 - public final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random + public final RandomSource random; // Paper - Share random for entities to make them more random // Add toggle for RNG manipulation public int tickCount; - private int remainingFireTicks = -this.getFireImmuneTicks(); + private int remainingFireTicks; public boolean wasTouchingWater; -@@ -294,8 +296,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -314,8 +316,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public PortalProcessor portalProcess; public int portalCooldown; private boolean invulnerable; @@ -1936,7 +1936,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 private boolean hasGlowingTag; private final Set tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0}; -@@ -351,6 +353,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -372,6 +374,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public long activatedTick = Integer.MIN_VALUE; public boolean isTemporarilyActive; public long activatedImmunityTick = Integer.MIN_VALUE; @@ -1944,7 +1944,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 public void inactiveTick() { } -@@ -517,10 +520,39 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -534,10 +537,39 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper end - optimise entity tracker @@ -1984,7 +1984,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 this.position = Vec3.ZERO; this.blockPosition = BlockPos.ZERO; this.chunkPosition = ChunkPos.ZERO; -@@ -892,6 +924,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -914,6 +946,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v) && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) { // Paper end - Configurable nether ceiling damage @@ -1992,7 +1992,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 this.onBelowWorld(); } } -@@ -1845,7 +1878,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1900,7 +1933,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean fireImmune() { @@ -2001,52 +2001,37 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 } public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -1905,7 +1938,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - return this.isInWater() || flag; - } - -- public void updateInWaterStateAndDoWaterCurrentPushing() { -+ public void updateInWaterStateAndDoWaterCurrentPushing() { // Purpur - Movement options for armor stands - package-private -> public - TODO: use AT file - if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) { - this.wasTouchingWater = false; - } else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) { -@@ -2541,6 +2574,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - compound.putBoolean("Paper.FreezeLock", true); +@@ -2606,6 +2639,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + output.putBoolean("Paper.FreezeLock", true); } // Paper end -+ + // Purpur start - Fire immune API + if (immuneToFire != null) { -+ compound.putBoolean("Purpur.FireImmune", immuneToFire); ++ output.putBoolean("Purpur.FireImmune", immuneToFire); + } + // Purpur end - Fire immune API -+ - return compound; - } catch (Throwable var8) { - CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT"); -@@ -2671,6 +2711,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false); + } catch (Throwable var7) { + CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT"); + CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved"); +@@ -2726,6 +2764,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } + freezeLocked = input.getBooleanOr("Paper.FreezeLock", false); // Paper end + -+ // Purpur start - Fire immune API -+ if (compound.contains("Purpur.FireImmune")) { -+ immuneToFire = compound.getBoolean("Purpur.FireImmune").orElse(null); -+ } -+ // Purpur end - Fire immune API ++ immuneToFire = input.read("Purpur.FireImmune", com.mojang.serialization.Codec.BOOL).orElse(null); // Purpur - Fire immune API + - } catch (Throwable var8) { - CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT"); + } catch (Throwable var7) { + CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT"); CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded"); -@@ -2899,6 +2946,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - if (this.isAlive() && this instanceof Leashable leashable) { - if (leashable.getLeashHolder() == player) { - if (!this.level().isClientSide()) { -+ if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur - Allow leashing villagers - // CraftBukkit start - fire PlayerUnleashEntityEvent - // Paper start - Expand EntityUnleashEvent - org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials()); -@@ -3105,6 +3153,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3004,6 +3045,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + if (this.isAlive() && this instanceof Leashable leashable2) { + if (leashable2.getLeashHolder() == player) { + if (!this.level().isClientSide()) { ++ if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur - Allow leashing villagers + // Paper start - EntityUnleashEvent + if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent( + leashable2, player, hand, !player.hasInfiniteMaterials(), true +@@ -3300,6 +3342,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.passengers = ImmutableList.copyOf(list); } @@ -2060,7 +2045,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); } } -@@ -3146,6 +3201,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3341,6 +3390,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } // CraftBukkit end @@ -2075,7 +2060,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) { this.passengers = ImmutableList.of(); } else { -@@ -3215,15 +3278,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3410,15 +3467,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Vec3.directionFromRotation(this.getRotationVector()); } @@ -2095,7 +2080,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 } } } -@@ -3425,7 +3491,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3620,7 +3680,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public int getMaxAirSupply() { @@ -2104,7 +2089,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 } public int getAirSupply() { -@@ -3946,7 +4012,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4167,7 +4227,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public boolean canUsePortal(boolean allowPassengers) { @@ -2113,7 +2098,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 } public boolean canTeleport(Level fromLevel, Level toLevel) { -@@ -4488,6 +4554,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4697,6 +4757,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Mth.lerp(partialTick, this.yRotO, this.yRot); } @@ -2126,7 +2111,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { if (this.touchingUnloadedChunk()) { -@@ -4906,7 +4978,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5133,7 +5199,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public float maxUpStep() { @@ -2135,7 +2120,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 } public void onExplosionHit(@Nullable Entity entity) { -@@ -5144,4 +5216,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5391,4 +5457,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition()); } // Paper end - Expose entity id counter @@ -2181,7 +2166,7 @@ index 8370be95e4f0d1d3b99274fea415f77845ad5712..d8c83a449a1f33031aa671f3bbe366a5 + // Purpur end - Ridables } diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java -index bfd58eb04eee606ac0a8071de9bf75f46c35decb..0c1953754220ff72e18f0396134507d93ba7b1b8 100644 +index 15daba9062d54a5bdf335c3645a3227ccb5a8e06..1842cbe25cc0f9be937caf0a78e915bd3d6ea1e5 100644 --- a/net/minecraft/world/entity/EntitySelector.java +++ b/net/minecraft/world/entity/EntitySelector.java @@ -28,6 +28,8 @@ public final class EntitySelector { @@ -2194,10 +2179,10 @@ index bfd58eb04eee606ac0a8071de9bf75f46c35decb..0c1953754220ff72e18f0396134507d9 public static final Predicate PLAYER_AFFECTS_SPAWNING = (entity) -> { return !entity.isSpectator() && entity.isAlive() && entity instanceof Player player && player.affectsSpawning; diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java -index a1379aa8eaf84868ceb8b3762f7ca3b87a2d7785..d92045528d1a63799322418d86fab0bc580b7a99 100644 +index 388689c44cf63ade939e271d490051c9b3fe8034..e65b1818c49e1b7d04d5bcc912804c821f00bdbc 100644 --- a/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java -@@ -1096,6 +1096,16 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1106,6 +1106,16 @@ public class EntityType implements FeatureElement, EntityTypeT return register(vanillaEntityId(key), builder); } @@ -2214,7 +2199,7 @@ index a1379aa8eaf84868ceb8b3762f7ca3b87a2d7785..d92045528d1a63799322418d86fab0bc public static ResourceLocation getKey(EntityType entityType) { return BuiltInRegistries.ENTITY_TYPE.getKey(entityType); } -@@ -1326,6 +1336,16 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1336,6 +1346,16 @@ public class EntityType implements FeatureElement, EntityTypeT return this.category; } @@ -2231,24 +2216,24 @@ index a1379aa8eaf84868ceb8b3762f7ca3b87a2d7785..d92045528d1a63799322418d86fab0bc public String getDescriptionId() { return this.descriptionId; } -@@ -1385,7 +1405,11 @@ public class EntityType implements FeatureElement, EntityTypeT - entity.load(tag); - }, - // Paper end - Don't fire sync event during generation -- () -> LOGGER.warn("Skipping Entity with id {}", tag.getStringOr("id", "[invalid]")) +@@ -1395,7 +1415,11 @@ public class EntityType implements FeatureElement, EntityTypeT + entity.load(input); + }, + // Paper end - Don't fire sync event during generation +- () -> LOGGER.warn("Skipping Entity with id {}", input.getStringOr("id", "[invalid]")) + // Purpur start - log skipped entity's position -+ () -> {LOGGER.warn("Skipping Entity with id {}", tag.getStringOr("id", "[invalid]")); -+ EntityType.LOGGER.warn("Location: {} {}", level.getWorld().getName(), tag.read("Pos", net.minecraft.world.phys.Vec3.CODEC).orElse(net.minecraft.world.phys.Vec3.ZERO)); ++ () -> {LOGGER.warn("Skipping Entity with id {}", input.getStringOr("id", "[invalid]")); ++ EntityType.LOGGER.warn("Location: {} {}", level.getWorld().getName(), input.read("Pos", net.minecraft.world.phys.Vec3.CODEC).orElse(net.minecraft.world.phys.Vec3.ZERO)); + } + // Purpur end - log skipped entity's position ); } diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java -index c97a0e500e889b406cb2d679a3870715775f5393..81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5 100644 +index a62edee768c30c99213baa6bd736d67ae52b558c..c8354d46ed909090f7c15f396863bf7d73afcefa 100644 --- a/net/minecraft/world/entity/ExperienceOrb.java +++ b/net/minecraft/world/entity/ExperienceOrb.java -@@ -328,7 +328,7 @@ public class ExperienceOrb extends Entity { +@@ -358,7 +358,7 @@ public class ExperienceOrb extends Entity { public void playerTouch(Player entity) { if (entity instanceof ServerPlayer serverPlayer) { if (entity.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent @@ -2257,7 +2242,7 @@ index c97a0e500e889b406cb2d679a3870715775f5393..81aa1a91a2ecda3053b22c2eb9e59f0e entity.take(this, 1); int i = this.repairPlayerItems(serverPlayer, this.getValue()); if (i > 0) { -@@ -344,7 +344,7 @@ public class ExperienceOrb extends Entity { +@@ -374,7 +374,7 @@ public class ExperienceOrb extends Entity { } private int repairPlayerItems(ServerPlayer player, int value) { @@ -2267,10 +2252,10 @@ index c97a0e500e889b406cb2d679a3870715775f5393..81aa1a91a2ecda3053b22c2eb9e59f0e ); if (randomItemWith.isPresent()) { diff --git a/net/minecraft/world/entity/GlowSquid.java b/net/minecraft/world/entity/GlowSquid.java -index 3f351fdb3cb76612d88bde713a2639d4319a7c6d..745f73e1f80d9c433630e31769b404eeeb63cb88 100644 +index aab9adb8313c4b18279c7fd7500ef04bda09c6c1..86a694b94045b47f6e98c480645f75738b8a052c 100644 --- a/net/minecraft/world/entity/GlowSquid.java +++ b/net/minecraft/world/entity/GlowSquid.java -@@ -26,6 +26,47 @@ public class GlowSquid extends Squid { +@@ -27,6 +27,47 @@ public class GlowSquid extends Squid { super(entityType, level); } @@ -2319,10 +2304,10 @@ index 3f351fdb3cb76612d88bde713a2639d4319a7c6d..745f73e1f80d9c433630e31769b404ee protected ParticleOptions getInkParticle() { return ParticleTypes.GLOW_SQUID_INK; diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d89868a9f7bd1 100644 +index 5025e1eb7be566c21b6228038fd6596f4ac53e9a..d7d6e0543dc26694891e4a9049b8162caadbf5e6 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -224,9 +224,9 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -236,9 +236,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin protected int noActionTime; public float lastHurt; public boolean jumping; @@ -2335,7 +2320,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 protected InterpolationHandler interpolation = new InterpolationHandler(this); protected double lerpYHeadRot; protected int lerpHeadSteps; -@@ -271,11 +271,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -284,11 +284,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API public int shieldBlockingDelay = this.level().paperConfig().misc.shieldBlockingDelay; // Paper - Make shield blocking delay configurable @@ -2350,7 +2335,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 this.craftAttributes = new org.bukkit.craftbukkit.attribute.CraftAttributeMap(this.attributes); // CraftBukkit // CraftBukkit - this.setHealth(this.getMaxHealth()) inlined and simplified to skip the instanceof check for Player, as getBukkitEntity() is not initialized in constructor this.entityData.set(LivingEntity.DATA_HEALTH_ID, this.getMaxHealth()); -@@ -295,6 +297,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -307,6 +309,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return new EntityEquipment(); } @@ -2359,15 +2344,15 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 public Brain getBrain() { return this.brain; } -@@ -348,6 +352,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - .add(Attributes.MOVEMENT_EFFICIENCY) - .add(Attributes.ATTACK_KNOCKBACK); +@@ -362,6 +366,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin + .add(Attributes.CAMERA_DISTANCE) + .add(Attributes.WAYPOINT_TRANSMIT_RANGE); } + public boolean shouldSendAttribute(Attribute attribute) { return true; } // Purpur - Ridables @Override protected void checkFallDamage(double y, boolean onGround, BlockState state, BlockPos pos) { -@@ -429,6 +434,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -443,6 +448,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (d < 0.0) { double damagePerBlock = serverLevel1.getWorldBorder().getDamagePerBlock(); if (damagePerBlock > 0.0) { @@ -2380,7 +2365,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 this.hurtServer(serverLevel1, this.damageSources().outOfBorder(), Math.max(1, Mth.floor(-d * damagePerBlock))); } } -@@ -441,10 +452,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -455,10 +466,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin && (!flag || !((Player)this).getAbilities().invulnerable); if (flag1) { this.setAirSupply(this.decreaseAirSupply(this.getAirSupply())); @@ -2393,23 +2378,23 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 } } else if (this.getAirSupply() < this.getMaxAirSupply()) { this.setAirSupply(this.increaseAirSupply(this.getAirSupply())); -@@ -754,6 +765,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.getSleepingPos().ifPresent(pos -> compound.store("sleeping_pos", BlockPos.CODEC, pos)); - DataResult dataResult = this.brain.serializeStart(NbtOps.INSTANCE); - dataResult.resultOrPartial(LOGGER::error).ifPresent(tag -> compound.put("Brain", tag)); -+ compound.putBoolean("Purpur.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - API for any mob to burn daylight +@@ -775,6 +786,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin + this.getSleepingPos().ifPresent(blockPos -> output.store("sleeping_pos", BlockPos.CODEC, blockPos)); + DataResult> dataResult = this.brain.serializeStart(NbtOps.INSTANCE).map(tag -> new Dynamic<>(NbtOps.INSTANCE, tag)); + dataResult.resultOrPartial(LOGGER::error).ifPresent(dynamic -> output.store("Brain", Codec.PASSTHROUGH, (Dynamic)dynamic)); ++ output.putBoolean("Purpur.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - API for any mob to burn daylight if (this.lastHurtByPlayer != null) { - this.lastHurtByPlayer.store(compound, "last_hurt_by_player"); - compound.putInt("last_hurt_by_player_memory_time", this.lastHurtByPlayerMemoryTime); -@@ -877,6 +889,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.lastHurtByPlayer.store(output, "last_hurt_by_player"); + output.putInt("last_hurt_by_player_memory_time", this.lastHurtByPlayerMemoryTime); +@@ -901,6 +913,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } // Paper - The sleeping pos will always also set the actual pos, so a desync suggests something is wrong }, this::clearSleepingPos); - compound.getCompound("Brain").ifPresent(compoundTag -> this.brain = this.makeBrain(new Dynamic<>(NbtOps.INSTANCE, compoundTag))); -+ this.shouldBurnInDay = compound.getBooleanOr("Purpur.ShouldBurnInDay", false); // Purpur - API for any mob to burn daylight - this.lastHurtByPlayer = EntityReference.read(compound, "last_hurt_by_player"); - this.lastHurtByPlayerMemoryTime = compound.getIntOr("last_hurt_by_player_memory_time", 0); - this.lastHurtByMob = EntityReference.read(compound, "last_hurt_by_mob"); -@@ -1010,16 +1023,31 @@ public abstract class LivingEntity extends Entity implements Attackable { + input.read("Brain", Codec.PASSTHROUGH).ifPresent(dynamic -> this.brain = this.makeBrain((Dynamic)dynamic)); ++ this.shouldBurnInDay = input.getBooleanOr("Purpur.ShouldBurnInDay", false); // Purpur - API for any mob to burn daylight + this.lastHurtByPlayer = EntityReference.read(input, "last_hurt_by_player"); + this.lastHurtByPlayerMemoryTime = input.getIntOr("last_hurt_by_player_memory_time", 0); + this.lastHurtByMob = EntityReference.read(input, "last_hurt_by_mob"); +@@ -1035,16 +1048,31 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (lookingEntity != null) { // Gale start - Petal - reduce skull ItemStack lookups for reduced visibility EntityType type = lookingEntity.getType(); @@ -2448,7 +2433,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 return d; } -@@ -1065,6 +1093,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1090,6 +1118,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin Iterator iterator = this.activeEffects.values().iterator(); while (iterator.hasNext()) { MobEffectInstance effect = iterator.next(); @@ -2456,7 +2441,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED); if (event.isCancelled()) { continue; -@@ -1388,6 +1417,24 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1420,6 +1449,24 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.stopSleeping(); } @@ -2481,7 +2466,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 this.noActionTime = 0; if (amount < 0.0F) { amount = 0.0F; -@@ -1649,10 +1696,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1681,10 +1728,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin protected Player resolvePlayerResponsibleForDamage(DamageSource damageSource) { Entity entity = damageSource.getEntity(); if (entity instanceof Player player) { @@ -2494,7 +2479,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 } else { this.lastHurtByPlayer = null; this.lastHurtByPlayerMemoryTime = 0; -@@ -1703,6 +1750,18 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1735,6 +1782,18 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } } @@ -2513,7 +2498,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 final org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null; final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot); event.setCancelled(itemStack == null); -@@ -1848,7 +1907,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1880,7 +1939,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (this.level() instanceof ServerLevel serverLevel) { boolean var6 = false; if (this.dead && entitySource instanceof WitherBoss) { // Paper @@ -2522,7 +2507,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 BlockPos blockPos = this.blockPosition(); BlockState blockState = Blocks.WITHER_ROSE.defaultBlockState(); if (this.level().getBlockState(blockPos).isAir() && blockState.canSurvive(this.level(), blockPos)) { -@@ -1878,6 +1937,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1910,6 +1969,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin boolean flag = this.lastHurtByPlayerMemoryTime > 0; this.dropEquipment(level); // CraftBukkit - from below if (this.shouldDropLoot() && level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { @@ -2530,7 +2515,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 this.dropFromLootTable(level, damageSource, flag); // Paper start final boolean prev = this.clearEquipmentSlots; -@@ -1886,6 +1946,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1918,6 +1978,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin // Paper end this.dropCustomDeathLoot(level, damageSource, flag); this.clearEquipmentSlots = prev; // Paper @@ -2538,7 +2523,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 } // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment -@@ -3101,6 +3162,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3153,6 +3214,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin float f = (float)(d * 10.0 - 3.0); if (f > 0.0F) { this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F); @@ -2546,7 +2531,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 this.hurt(this.damageSources().flyIntoWall(), f); } } -@@ -3544,8 +3606,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3596,8 +3658,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.pushEntities(); // Paper start - Add EntityMoveEvent @@ -2559,7 +2544,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO); Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot()); io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone()); -@@ -3555,11 +3619,52 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3607,11 +3671,52 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.absSnapTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch()); } } @@ -2612,7 +2597,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 } protected void applyInput() { -@@ -3589,7 +3694,18 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3645,7 +3750,18 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin .filter(equipmentSlot1 -> canGlideUsing(this.getItemBySlot(equipmentSlot1), equipmentSlot1)) .toList(); EquipmentSlot equipmentSlot = Util.getRandom(list, this.random); @@ -2632,7 +2617,7 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 } this.gameEvent(GameEvent.ELYTRA_GLIDE); -@@ -4477,6 +4593,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4533,6 +4649,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin : slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType()); } @@ -2646,12 +2631,12 @@ index befed81ecf698d27971d18fe2743562742e4e1d3..cd8c764f9aa2321c6e157abe958d8986 return slot != EquipmentSlot.HEAD && slot != EquipmentSlot.MAINHAND && slot != EquipmentSlot.OFFHAND ? SlotAccess.forEquipmentSlot(entity, slot, itemStack -> itemStack.isEmpty() || entity.getEquipmentSlotForItem(itemStack) == slot) diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12824a8a0f 100644 +index 275f8697031251f7e106ac3fcc165e42af362434..6d8e7d23640707ba0d771174f65e58df75243f77 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -134,13 +134,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - private BlockPos restrictCenter = BlockPos.ZERO; - private float restrictRadius = -1.0F; +@@ -137,13 +137,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + private BlockPos homePosition = BlockPos.ZERO; + private int homeRadius = -1; public boolean aware = true; // CraftBukkit + public int ticksSinceLastInteraction; // Purpur - Entity lifespan @@ -2666,7 +2651,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 this.jumpControl = new JumpControl(this); this.bodyRotationControl = this.createBodyControl(); this.navigation = this.createNavigation(level); -@@ -281,6 +282,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -284,6 +285,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab target = null; } } @@ -2674,7 +2659,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 this.target = target; return true; // CraftBukkit end -@@ -320,8 +322,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -323,8 +325,28 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.resetAmbientSoundTime(); this.playAmbientSound(); } @@ -2703,23 +2688,23 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 @Override protected void playHurtSound(DamageSource source) { this.resetAmbientSoundTime(); -@@ -416,6 +438,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - compound.putBoolean("NoAI", this.isNoAi()); +@@ -423,6 +445,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + output.putBoolean("NoAI", this.isNoAi()); } - compound.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit -+ compound.putInt("Purpur.ticksSinceLastInteraction", this.ticksSinceLastInteraction); // Purpur - Entity lifespan + output.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit ++ output.putInt("Purpur.ticksSinceLastInteraction", this.ticksSinceLastInteraction); // Purpur - Entity lifespan } @Override -@@ -439,6 +462,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - this.lootTableSeed = compound.getLongOr("DeathLootTableSeed", 0L); - this.setNoAi(compound.getBooleanOr("NoAI", false)); - this.aware = compound.getBooleanOr("Bukkit.Aware", true); // CraftBukkit -+ this.ticksSinceLastInteraction = compound.getIntOr("Purpur.ticksSinceLastInteraction", 0); // Purpur- Entity lifespan +@@ -450,6 +473,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + this.lootTableSeed = input.getLongOr("DeathLootTableSeed", 0L); + this.setNoAi(input.getBooleanOr("NoAI", false)); + this.aware = input.getBooleanOr("Bukkit.Aware", true); // CraftBukkit ++ this.ticksSinceLastInteraction = input.getIntOr("Purpur.ticksSinceLastInteraction", 0); // Purpur- Entity lifespan } @Override -@@ -489,7 +513,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -502,7 +526,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab && this.canPickUpLoot() && this.isAlive() && !this.dead @@ -2728,7 +2713,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 Vec3i pickupReach = this.getPickupReach(); for (ItemEntity itemEntity : this.level() -@@ -1142,7 +1166,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1163,7 +1187,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab ); } @@ -2737,7 +2722,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 return spawnGroupData; } -@@ -1230,7 +1254,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1251,7 +1275,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } protected InteractionResult mobInteract(Player player, InteractionHand hand) { @@ -2745,8 +2730,8 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 + return tryRide(player, hand); // Purpur - Ridables } - public boolean isWithinRestriction() { -@@ -1474,6 +1498,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + public boolean isWithinHome() { +@@ -1500,6 +1524,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.playAttackSound(); } @@ -2754,7 +2739,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 return flag; } -@@ -1485,26 +1510,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1511,26 +1536,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab private net.minecraft.world.phys.Vec3 cached_position; // Gale end - JettPack - optimize sun burn tick - cache eye blockpos public boolean isSunBurnTick() { @@ -2783,7 +2768,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 } @Override -@@ -1552,4 +1559,58 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1578,4 +1585,58 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab this.getNavigation().updatePathfinderMaxVisitedNodes(); } } @@ -2843,7 +2828,7 @@ index 92ebc61aa7f6f70292a384b56bd8ef77a15e485c..6a94f42c8e048985b94db64fa0405e12 + // Purpur end - Ridables } diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index c61071e0019a18eb73223ed9b64619c9cb691896..909c9b5b82f1a41087a594fe5b5c021feb22f5e3 100644 +index 58d8424262db14b2dca0b2c5a40748b6c0c18e83..0ac398b8b10aae5e67a797b2991c66874003f282 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java @@ -20,14 +20,21 @@ public class AttributeMap { @@ -2880,10 +2865,10 @@ index c61071e0019a18eb73223ed9b64619c9cb691896..909c9b5b82f1a41087a594fe5b5c021f @Nullable diff --git a/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java b/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java -index e6fd15c3172a951d6551cf3fb42f92f39f1cf7b8..9952eed6a8ac31c757d5c27e043b85d7a949b481 100644 +index 26ffe98c94b2aaf61bf1693e86e8e7962e892a09..e6ef56d94e29a6629c9b672ed4ac4ef29ad6a286 100644 --- a/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java +++ b/net/minecraft/world/entity/ai/attributes/DefaultAttributes.java -@@ -126,12 +126,12 @@ public class DefaultAttributes { +@@ -128,12 +128,12 @@ public class DefaultAttributes { .put(EntityType.IRON_GOLEM, IronGolem.createAttributes().build()) .put(EntityType.LLAMA, Llama.createAttributes().build()) .put(EntityType.MAGMA_CUBE, MagmaCube.createAttributes().build()) @@ -2898,7 +2883,7 @@ index e6fd15c3172a951d6551cf3fb42f92f39f1cf7b8..9952eed6a8ac31c757d5c27e043b85d7 .put(EntityType.PIG, Pig.createAttributes().build()) .put(EntityType.PIGLIN, Piglin.createAttributes().build()) .put(EntityType.PIGLIN_BRUTE, PiglinBrute.createAttributes().build()) -@@ -162,7 +162,7 @@ public class DefaultAttributes { +@@ -164,7 +164,7 @@ public class DefaultAttributes { .put(EntityType.VILLAGER, Villager.createAttributes().build()) .put(EntityType.VINDICATOR, Vindicator.createAttributes().build()) .put(EntityType.WARDEN, Warden.createAttributes().build()) @@ -3096,7 +3081,7 @@ index 2591e4bbd234e51ff2c6b00db888d3b158f5a07d..e3d48c7c6615185f8a14bc96476a665b // CraftBukkit end - call EntityBreedEvent level.broadcastEntityEvent(breedOffspring, (byte)12); diff --git a/net/minecraft/world/entity/ai/control/MoveControl.java b/net/minecraft/world/entity/ai/control/MoveControl.java -index cdd85c11a214db4829305eb54e0de9670a9241ac..88adfbb7998515f1f64b2d4121549179dc719375 100644 +index b6921582adef6f4c48de4dcffd6873ac0f909a08..89ee325b26ec3a647f55e45c9122ff4196433a43 100644 --- a/net/minecraft/world/entity/ai/control/MoveControl.java +++ b/net/minecraft/world/entity/ai/control/MoveControl.java @@ -29,6 +29,20 @@ public class MoveControl implements Control { @@ -3243,10 +3228,10 @@ index 243a552f6f0c8c2bd25c0209c95e3bca08734711..38fd0196a0f5a90e39fa4eb8592f89bf } } diff --git a/net/minecraft/world/entity/ai/goal/TemptGoal.java b/net/minecraft/world/entity/ai/goal/TemptGoal.java -index 438d6347778a94b4fe430320b268a2d67afa209a..f88f618d34fb343b31de3af1a875d6633703df71 100644 +index dae935cc68e2e571d50e56ac8913c099a11cf771..a805c9426630c2c46db9d0dd536f1d16769395d3 100644 --- a/net/minecraft/world/entity/ai/goal/TemptGoal.java +++ b/net/minecraft/world/entity/ai/goal/TemptGoal.java -@@ -58,7 +58,7 @@ public class TemptGoal extends Goal { +@@ -71,7 +71,7 @@ public class TemptGoal extends Goal { } private boolean shouldFollow(LivingEntity entity) { @@ -3311,10 +3296,10 @@ index 17a08a3af468093668a41f154c2beb69c6617efa..398a97a72dca785204f6b7b8fc4abe5c if (entity == null) { if (this.isCombat && (!target.canBeSeenAsEnemy() || level.getDifficulty() == Difficulty.PEACEFUL)) { diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java -index 65a9ea8d4a208f447b5e78b58b10a0917e35e4f2..cfb7b21269933ff3b053fa180ae8d5d9db4f68bc 100644 +index 5dadb42fd2d2d03ef366ca83c9c4aae6c288aaa4..6aae3634d69edcda7aff326dcea6f87668db4835 100644 --- a/net/minecraft/world/entity/ambient/Bat.java +++ b/net/minecraft/world/entity/ambient/Bat.java -@@ -43,11 +43,87 @@ public class Bat extends AmbientCreature { +@@ -44,11 +44,87 @@ public class Bat extends AmbientCreature { public Bat(EntityType entityType, Level level) { super(entityType, level); @@ -3402,7 +3387,7 @@ index 65a9ea8d4a208f447b5e78b58b10a0917e35e4f2..cfb7b21269933ff3b053fa180ae8d5d9 @Override public boolean isFlapping() { return !this.isResting() && this.tickCount % 10.0F == 0.0F; -@@ -99,7 +175,7 @@ public class Bat extends AmbientCreature { +@@ -100,7 +176,7 @@ public class Bat extends AmbientCreature { } public static AttributeSupplier.Builder createAttributes() { @@ -3411,7 +3396,7 @@ index 65a9ea8d4a208f447b5e78b58b10a0917e35e4f2..cfb7b21269933ff3b053fa180ae8d5d9 } public boolean isResting() { -@@ -130,6 +206,14 @@ public class Bat extends AmbientCreature { +@@ -131,6 +207,14 @@ public class Bat extends AmbientCreature { @Override protected void customServerAiStep(ServerLevel level) { @@ -3426,7 +3411,7 @@ index 65a9ea8d4a208f447b5e78b58b10a0917e35e4f2..cfb7b21269933ff3b053fa180ae8d5d9 super.customServerAiStep(level); BlockPos blockPos = this.blockPosition(); BlockPos blockPos1 = blockPos.above(); -@@ -232,7 +316,7 @@ public class Bat extends AmbientCreature { +@@ -233,7 +317,7 @@ public class Bat extends AmbientCreature { } else { int maxLocalRawBrightness = level.getMaxLocalRawBrightness(pos); int i = 4; @@ -3435,7 +3420,7 @@ index 65a9ea8d4a208f447b5e78b58b10a0917e35e4f2..cfb7b21269933ff3b053fa180ae8d5d9 i = 7; } else if (randomSource.nextBoolean()) { return false; -@@ -277,6 +361,7 @@ public class Bat extends AmbientCreature { +@@ -278,6 +362,7 @@ public class Bat extends AmbientCreature { */ private static long nextHalloweenEnd = 0; @@ -3554,10 +3539,10 @@ index dd8ea03ba823996a5c97562e357650ab34d0e32e..61e7300bbf272398b2faebf5e537d9c2 + // Purpur end - Cows eat mushrooms } diff --git a/net/minecraft/world/entity/animal/AbstractFish.java b/net/minecraft/world/entity/animal/AbstractFish.java -index 363582056339f64dbe7e686b61451c095c538c00..2cf95769ec3a1662443ea31e1bc2ba01cb7b523e 100644 +index b18765bb91b4015bef326663dbc8966945929996..0002e39e2670ad92849ccc0aada163b174fe1ec2 100644 --- a/net/minecraft/world/entity/animal/AbstractFish.java +++ b/net/minecraft/world/entity/animal/AbstractFish.java -@@ -88,6 +88,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { +@@ -90,6 +90,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { @Override protected void registerGoals() { super.registerGoals(); @@ -3565,7 +3550,7 @@ index 363582056339f64dbe7e686b61451c095c538c00..2cf95769ec3a1662443ea31e1bc2ba01 this.goalSelector.addGoal(0, new PanicGoal(this, 1.25)); this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, Player.class, 8.0F, 1.6, 1.4, EntitySelector.NO_SPECTATORS::test)); this.goalSelector.addGoal(4, new AbstractFish.FishSwimGoal(this)); -@@ -101,7 +102,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { +@@ -103,7 +104,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { @Override public void travel(Vec3 travelVector) { if (this.isInWater()) { @@ -3574,7 +3559,7 @@ index 363582056339f64dbe7e686b61451c095c538c00..2cf95769ec3a1662443ea31e1bc2ba01 this.move(MoverType.SELF, this.getDeltaMovement()); this.setDeltaMovement(this.getDeltaMovement().scale(0.9)); if (this.getTarget() == null) { -@@ -161,7 +162,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { +@@ -163,7 +164,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { protected void playStepSound(BlockPos pos, BlockState block) { } @@ -3583,7 +3568,7 @@ index 363582056339f64dbe7e686b61451c095c538c00..2cf95769ec3a1662443ea31e1bc2ba01 private final AbstractFish fish; FishMoveControl(AbstractFish mob) { -@@ -169,14 +170,22 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { +@@ -171,14 +172,22 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { this.fish = mob; } @@ -3609,27 +3594,27 @@ index 363582056339f64dbe7e686b61451c095c538c00..2cf95769ec3a1662443ea31e1bc2ba01 double d = this.wantedX - this.fish.getX(); double d1 = this.wantedY - this.fish.getY(); diff --git a/net/minecraft/world/entity/animal/Animal.java b/net/minecraft/world/entity/animal/Animal.java -index b851f94d63a049292a3657009d68bc1641222104..1cae770340e969ec4f037b9121142878894102d3 100644 +index cdf44c2586db396f1afdcbae4174b8b4fb00f48e..4d99a1bf2dc141630a76942ccbf1f60824cf7495 100644 --- a/net/minecraft/world/entity/animal/Animal.java +++ b/net/minecraft/world/entity/animal/Animal.java -@@ -42,6 +42,7 @@ public abstract class Animal extends AgeableMob { +@@ -43,6 +43,7 @@ public abstract class Animal extends AgeableMob { @Nullable - public UUID loveCause; + public EntityReference loveCause; public @Nullable ItemStack breedItem; // CraftBukkit - Add breedItem variable + public abstract int getPurpurBreedTime(); // Purpur - Make entity breeding times configurable protected Animal(EntityType entityType, Level level) { super(entityType, level); -@@ -142,7 +143,7 @@ public abstract class Animal extends AgeableMob { +@@ -143,7 +144,7 @@ public abstract class Animal extends AgeableMob { ItemStack itemInHand = player.getItemInHand(hand); if (this.isFood(itemInHand)) { int age = this.getAge(); -- if (!this.level().isClientSide && age == 0 && this.canFallInLove()) { -+ if (!this.level().isClientSide && age == 0 && this.canFallInLove() && (this.level().purpurConfig.animalBreedingCooldownSeconds <= 0 || !this.level().hasBreedingCooldown(player.getUUID(), this.getClass()))) { // Purpur - Add adjustable breeding cooldown to config +- if (player instanceof ServerPlayer serverPlayer && age == 0 && this.canFallInLove()) { ++ if (player instanceof ServerPlayer serverPlayer && age == 0 && this.canFallInLove() && (this.level().purpurConfig.animalBreedingCooldownSeconds <= 0 || !this.level().hasBreedingCooldown(player.getUUID(), this.getClass()))) { // Purpur - Add adjustable breeding cooldown to config final ItemStack breedCopy = itemInHand.copy(); // Paper - Fix EntityBreedEvent copying this.usePlayerItem(player, hand, itemInHand); - this.setInLove(player, breedCopy); // Paper - Fix EntityBreedEvent copying -@@ -239,10 +240,20 @@ public abstract class Animal extends AgeableMob { + this.setInLove(serverPlayer, breedCopy); // Paper - Fix EntityBreedEvent copying +@@ -235,10 +236,20 @@ public abstract class Animal extends AgeableMob { public void spawnChildFromBreeding(ServerLevel level, Animal mate) { AgeableMob breedOffspring = this.getBreedOffspring(level, mate); if (breedOffspring != null) { @@ -3652,7 +3637,7 @@ index b851f94d63a049292a3657009d68bc1641222104..1cae770340e969ec4f037b9121142878 int experience = this.getRandom().nextInt(7) + 1; org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(breedOffspring, this, mate, breeder, this.breedItem, experience); if (entityBreedEvent.isCancelled()) { -@@ -273,8 +284,10 @@ public abstract class Animal extends AgeableMob { +@@ -269,8 +280,10 @@ public abstract class Animal extends AgeableMob { player.awardStat(Stats.ANIMALS_BRED); CriteriaTriggers.BRED_ANIMALS.trigger(player, this, animal, baby); } // Paper - Call EntityBreedEvent @@ -3666,10 +3651,10 @@ index b851f94d63a049292a3657009d68bc1641222104..1cae770340e969ec4f037b9121142878 animal.resetLove(); level.broadcastEntityEvent(this, (byte)18); diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java -index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d 100644 +index d40954f03c865bfbc5beb308bbcf7b7c9ac48eb9..ca5651f15552f91fba650747d28a75c00fa11442 100644 --- a/net/minecraft/world/entity/animal/Bee.java +++ b/net/minecraft/world/entity/animal/Bee.java -@@ -149,6 +149,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -150,6 +150,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { public Bee(EntityType entityType, Level level) { super(entityType, level); @@ -3677,7 +3662,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 // Paper start - Fix MC-167279 class BeeFlyingMoveControl extends FlyingMoveControl { public BeeFlyingMoveControl(final Mob entity, final int maxPitchChange, final boolean noGravity) { -@@ -157,22 +158,69 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -158,22 +159,69 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @Override public void tick() { @@ -3748,7 +3733,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -187,6 +235,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -188,6 +236,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @Override protected void registerGoals() { @@ -3756,7 +3741,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 this.goalSelector.addGoal(0, new Bee.BeeAttackGoal(this, 1.4F, true)); this.goalSelector.addGoal(1, new Bee.BeeEnterHiveGoal()); this.goalSelector.addGoal(2, new BreedGoal(this, 1.0)); -@@ -204,6 +253,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -205,6 +254,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.goalSelector.addGoal(7, new Bee.BeeGrowCropGoal()); this.goalSelector.addGoal(8, new Bee.BeeWanderGoal()); this.goalSelector.addGoal(9, new FloatGoal(this)); @@ -3764,7 +3749,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 this.targetSelector.addGoal(1, new Bee.BeeHurtByOtherGoal(this).setAlertOthers(new Class[0])); this.targetSelector.addGoal(2, new Bee.BeeBecomeAngryTargetGoal(this)); this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true)); -@@ -365,7 +415,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -366,7 +416,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } public static boolean isNightOrRaining(Level level) { @@ -3773,7 +3758,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 } public void setStayOutOfHiveCountdown(int stayOutOfHiveCountdown) { -@@ -388,7 +438,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -389,7 +439,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @Override protected void customServerAiStep(ServerLevel level) { boolean hasStung = this.hasStung(); @@ -3782,7 +3767,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 this.underWaterTicks++; } else { this.underWaterTicks = 0; -@@ -398,6 +448,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -399,6 +449,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.hurtServer(level, this.damageSources().drown(), 1.0F); } @@ -3790,7 +3775,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 if (hasStung) { this.timeSinceSting++; if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) { -@@ -421,6 +472,35 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -422,6 +473,35 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { return beehiveBlockEntity != null && beehiveBlockEntity.isFireNearby(); } @@ -3826,7 +3811,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 @Override public int getRemainingPersistentAngerTime() { return this.entityData.get(DATA_REMAINING_ANGER_TIME); -@@ -1082,15 +1162,15 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1080,15 +1160,15 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } } @@ -3845,7 +3830,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 } } -@@ -1135,6 +1215,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1133,6 +1213,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { Bee.this.savedFlowerPos = optional.get(); Bee.this.navigation .moveTo(Bee.this.savedFlowerPos.getX() + 0.5, Bee.this.savedFlowerPos.getY() + 0.5, Bee.this.savedFlowerPos.getZ() + 0.5, 1.2F); @@ -3853,7 +3838,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 return true; } else { Bee.this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(Bee.this.random, 20, 60); -@@ -1181,6 +1262,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1179,6 +1260,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.pollinating = false; Bee.this.navigation.stop(); Bee.this.remainingCooldownBeforeLocatingNewFlower = 200; @@ -3861,7 +3846,7 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 } @Override -@@ -1227,6 +1309,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1225,6 +1307,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { this.setWantedPos(); } @@ -3870,10 +3855,10 @@ index edca2fa21e600fa1e7ef91af673adaae7d4c86c4..e9dfff7e3726cd2229f89bb39fa1ca48 if (Bee.this.random.nextFloat() < 0.05F && this.successfulPollinatingTicks > this.lastSoundPlayedTick + 60) { this.lastSoundPlayedTick = this.successfulPollinatingTicks; diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java -index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..db536a60f3f370d163e4429865634b449f4c0cfb 100644 +index 7d20de1741e5e9219dea84fe5692f31c05fa82a2..09d518a59fe93afbeacb2d41a0c9d287f4a74443 100644 --- a/net/minecraft/world/entity/animal/Cat.java +++ b/net/minecraft/world/entity/animal/Cat.java -@@ -91,10 +91,65 @@ public class Cat extends TamableAnimal { +@@ -92,10 +92,65 @@ public class Cat extends TamableAnimal { this.reassessTameGoals(); } @@ -3939,7 +3924,7 @@ index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..db536a60f3f370d163e4429865634b44 this.goalSelector.addGoal(1, new TamableAnimal.TamableAnimalPanicGoal(1.5)); this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this)); this.goalSelector.addGoal(3, new Cat.CatRelaxOnOwnerGoal(this)); -@@ -107,6 +162,7 @@ public class Cat extends TamableAnimal { +@@ -108,6 +163,7 @@ public class Cat extends TamableAnimal { this.goalSelector.addGoal(10, new BreedGoal(this, 0.8)); this.goalSelector.addGoal(11, new WaterAvoidingRandomStrollGoal(this, 0.8, 1.0000001E-5F)); this.goalSelector.addGoal(12, new LookAtPlayerGoal(this, Player.class, 10.0F)); @@ -3947,7 +3932,7 @@ index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..db536a60f3f370d163e4429865634b44 this.targetSelector.addGoal(1, new NonTameRandomTargetGoal<>(this, Rabbit.class, false, null)); this.targetSelector.addGoal(1, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR)); } -@@ -353,6 +409,14 @@ public class Cat extends TamableAnimal { +@@ -354,6 +410,14 @@ public class Cat extends TamableAnimal { return this.isTame() && otherAnimal instanceof Cat cat && cat.isTame() && super.canMate(otherAnimal); } @@ -3962,7 +3947,7 @@ index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..db536a60f3f370d163e4429865634b44 @Nullable @Override public SpawnGroupData finalizeSpawn( -@@ -365,6 +429,7 @@ public class Cat extends TamableAnimal { +@@ -366,6 +430,7 @@ public class Cat extends TamableAnimal { @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { @@ -3970,7 +3955,7 @@ index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..db536a60f3f370d163e4429865634b44 ItemStack itemInHand = player.getItemInHand(hand); Item item = itemInHand.getItem(); if (this.isTame()) { -@@ -451,7 +516,7 @@ public class Cat extends TamableAnimal { +@@ -452,7 +517,7 @@ public class Cat extends TamableAnimal { } private void tryToTame(Player player) { @@ -3980,10 +3965,10 @@ index 9c60140ef1ae9973ce39643c5253ddb0eac1c97b..db536a60f3f370d163e4429865634b44 this.setOrderedToSit(true); this.level().broadcastEntityEvent(this, (byte)7); diff --git a/net/minecraft/world/entity/animal/Chicken.java b/net/minecraft/world/entity/animal/Chicken.java -index 351c29ffe842cc1406c36361520057ab046ca649..75cccc11019c5c6587d441e2c759d351dcb56153 100644 +index da408c313d898413dee928e9c80501ddf56d75e8..eaf913805195a580e3aa816dc28053abb9bdc246 100644 --- a/net/minecraft/world/entity/animal/Chicken.java +++ b/net/minecraft/world/entity/animal/Chicken.java -@@ -71,16 +71,76 @@ public class Chicken extends Animal { +@@ -72,16 +72,76 @@ public class Chicken extends Animal { this.setPathfindingMalus(PathType.WATER, 0.0F); } @@ -4061,7 +4046,7 @@ index 351c29ffe842cc1406c36361520057ab046ca649..75cccc11019c5c6587d441e2c759d351 } @Override -@@ -89,7 +149,7 @@ public class Chicken extends Animal { +@@ -90,7 +150,7 @@ public class Chicken extends Animal { } public static AttributeSupplier.Builder createAttributes() { @@ -4115,11 +4100,11 @@ index 75509be5b9162c1f7f91f2290ef2d80171ae61df..7e08573cba6efcd78fcce37bccc2923f public ItemStack getBucketItemStack() { return new ItemStack(Items.COD_BUCKET); diff --git a/net/minecraft/world/entity/animal/Cow.java b/net/minecraft/world/entity/animal/Cow.java -index 42c79a88679d2100528150d490554a75589e1ad8..6b504c2fdde020e086b0d01139cb56d65b7f9ad1 100644 +index 176425cbacea381990386d440059b768a583af98..b2fa170b14bc3037e5c143d320d0a1ef24738f1c 100644 --- a/net/minecraft/world/entity/animal/Cow.java +++ b/net/minecraft/world/entity/animal/Cow.java -@@ -22,12 +22,68 @@ import net.minecraft.world.level.Level; - import net.minecraft.world.level.ServerLevelAccessor; +@@ -23,12 +23,68 @@ import net.minecraft.world.level.storage.ValueInput; + import net.minecraft.world.level.storage.ValueOutput; public class Cow extends AbstractCow { + private boolean isNaturallyAggressiveToPlayers; // Purpur - Cows naturally aggressive to players chance @@ -4187,8 +4172,8 @@ index 42c79a88679d2100528150d490554a75589e1ad8..6b504c2fdde020e086b0d01139cb56d6 @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -40,6 +96,12 @@ public class Cow extends AbstractCow { - VariantUtils.writeVariant(compound, this.getVariant()); +@@ -41,6 +97,12 @@ public class Cow extends AbstractCow { + VariantUtils.writeVariant(output, this.getVariant()); } + // Purpur start - Cows naturally aggressive to players chance @@ -4198,21 +4183,21 @@ index 42c79a88679d2100528150d490554a75589e1ad8..6b504c2fdde020e086b0d01139cb56d6 + // Purpur end - Cows naturally aggressive to players chance + @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); -@@ -61,6 +123,7 @@ public class Cow extends AbstractCow { + protected void readAdditionalSaveData(ValueInput input) { + super.readAdditionalSaveData(input); +@@ -62,6 +124,7 @@ public class Cow extends AbstractCow { public SpawnGroupData finalizeSpawn( ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { + this.isNaturallyAggressiveToPlayers = level.getLevel().purpurConfig.cowNaturallyAggressiveToPlayersChance > 0.0D && random.nextDouble() <= level.getLevel().purpurConfig.cowNaturallyAggressiveToPlayersChance; // Purpur - Cows naturally aggressive to players chance - CowVariants.selectVariantToSpawn(this.random, this.registryAccess(), SpawnContext.create(level, this.blockPosition())).ifPresent(this::setVariant); + VariantUtils.selectVariantToSpawn(SpawnContext.create(level, this.blockPosition()), Registries.COW_VARIANT).ifPresent(this::setVariant); return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java -index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e45b7802a3 100644 +index 4bb273b11dbfbc6557c6771f79aa63f5f69d03cf..23696a5e2871ea07f34d4b4f6a20e2896ac3f5bd 100644 --- a/net/minecraft/world/entity/animal/Dolphin.java +++ b/net/minecraft/world/entity/animal/Dolphin.java -@@ -73,14 +73,105 @@ public class Dolphin extends AgeableWaterCreature { +@@ -74,14 +74,105 @@ public class Dolphin extends AgeableWaterCreature { private static final boolean DEFAULT_GOT_FISH = false; @Nullable public BlockPos treasurePos; @@ -4319,7 +4304,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e4 @Nullable @Override public SpawnGroupData finalizeSpawn( -@@ -89,6 +180,7 @@ public class Dolphin extends AgeableWaterCreature { +@@ -90,6 +181,7 @@ public class Dolphin extends AgeableWaterCreature { this.setAirSupply(this.getMaxAirSupply()); this.setXRot(0.0F); SpawnGroupData spawnGroupData1 = Objects.requireNonNullElseGet(spawnGroupData, () -> new AgeableMob.AgeableMobGroupData(0.1F)); @@ -4327,7 +4312,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e4 return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData1); } -@@ -155,17 +247,21 @@ public class Dolphin extends AgeableWaterCreature { +@@ -156,17 +248,21 @@ public class Dolphin extends AgeableWaterCreature { protected void registerGoals() { this.goalSelector.addGoal(0, new BreathAirGoal(this)); this.goalSelector.addGoal(0, new TryFindWaterGoal(this)); @@ -4350,7 +4335,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e4 } public static AttributeSupplier.Builder createAttributes() { -@@ -209,7 +305,7 @@ public class Dolphin extends AgeableWaterCreature { +@@ -210,7 +306,7 @@ public class Dolphin extends AgeableWaterCreature { @Override protected boolean canRide(Entity entity) { @@ -4359,7 +4344,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e4 } @Override -@@ -238,6 +334,11 @@ public class Dolphin extends AgeableWaterCreature { +@@ -239,6 +335,11 @@ public class Dolphin extends AgeableWaterCreature { @Override public void tick() { super.tick(); @@ -4371,7 +4356,7 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e4 if (this.isNoAi()) { this.setAirSupply(this.getMaxAirSupply()); } else { -@@ -398,6 +499,7 @@ public class Dolphin extends AgeableWaterCreature { +@@ -399,6 +500,7 @@ public class Dolphin extends AgeableWaterCreature { @Override public boolean canUse() { @@ -4380,10 +4365,10 @@ index 8f2af65c58da50be2776a21b10db5eb9cb5f3076..87ba416479df56bad5d13c01e96e92e4 } diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java -index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8cc19eb8e 100644 +index 517c546cfc8eca2191df57289e6a22ac64fc867c..8964bb5098c0dc36741af3656af6bc0b5b463abe 100644 --- a/net/minecraft/world/entity/animal/Fox.java +++ b/net/minecraft/world/entity/animal/Fox.java -@@ -141,6 +141,73 @@ public class Fox extends Animal { +@@ -142,6 +142,73 @@ public class Fox extends Animal { this.getNavigation().setRequiredPathLength(32.0F); } @@ -4457,7 +4442,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -160,6 +227,7 @@ public class Fox extends Animal { +@@ -161,6 +228,7 @@ public class Fox extends Animal { this, AbstractFish.class, 20, false, false, (entity, level) -> entity instanceof AbstractSchoolingFish ); this.goalSelector.addGoal(0, new Fox.FoxFloatGoal()); @@ -4465,7 +4450,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 this.goalSelector.addGoal(0, new ClimbOnTopOfPowderSnowGoal(this, this.level())); this.goalSelector.addGoal(1, new Fox.FaceplantGoal()); this.goalSelector.addGoal(2, new Fox.FoxPanicGoal(2.2)); -@@ -185,6 +253,7 @@ public class Fox extends Animal { +@@ -186,6 +254,7 @@ public class Fox extends Animal { this.goalSelector.addGoal(11, new Fox.FoxSearchForItemsGoal()); this.goalSelector.addGoal(12, new Fox.FoxLookAtPlayerGoal(this, Player.class, 24.0F)); this.goalSelector.addGoal(13, new Fox.PerchAndSearchGoal()); @@ -4473,7 +4458,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 this.targetSelector .addGoal( 3, -@@ -345,6 +414,11 @@ public class Fox extends Animal { +@@ -346,6 +415,11 @@ public class Fox extends Animal { } private void setTargetGoals() { @@ -4485,7 +4470,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 if (this.getVariant() == Fox.Variant.RED) { this.targetSelector.addGoal(4, this.landTargetGoal); this.targetSelector.addGoal(4, this.turtleEggTargetGoal); -@@ -372,6 +446,7 @@ public class Fox extends Animal { +@@ -373,6 +447,7 @@ public class Fox extends Animal { public void setVariant(Fox.Variant variant) { this.entityData.set(DATA_TYPE_ID, variant.getId()); @@ -4493,7 +4478,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 } @Nullable -@@ -706,6 +781,29 @@ public class Fox extends Animal { +@@ -703,6 +778,29 @@ public class Fox extends Animal { } // Paper end @@ -4523,7 +4508,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 @Override // Paper start - Cancellable death event protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel level, DamageSource damageSource) { -@@ -919,8 +1017,10 @@ public class Fox extends Animal { +@@ -916,8 +1014,10 @@ public class Fox extends Animal { CriteriaTriggers.BRED_ANIMALS.trigger(serverPlayer, this.animal, this.partner, fox); } @@ -4536,7 +4521,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 this.animal.resetLove(); this.partner.resetLove(); serverLevel.addFreshEntityWithPassengers(fox, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason -@@ -975,7 +1075,7 @@ public class Fox extends Animal { +@@ -972,7 +1072,7 @@ public class Fox extends Animal { } protected void onReachedTarget() { @@ -4545,7 +4530,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 BlockState blockState = Fox.this.level().getBlockState(this.blockPos); if (blockState.is(Blocks.SWEET_BERRY_BUSH)) { this.pickSweetBerries(blockState); -@@ -1089,15 +1189,15 @@ public class Fox extends Animal { +@@ -1086,15 +1186,15 @@ public class Fox extends Animal { } } @@ -4564,7 +4549,7 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 } } -@@ -1133,15 +1233,15 @@ public class Fox extends Animal { +@@ -1130,15 +1230,15 @@ public class Fox extends Animal { } } @@ -4583,11 +4568,72 @@ index 5c7572b75afcfa9965fcda5965f6ae2e59babb46..ff20a6e9745c7724dfae41d5868912c8 } } } +diff --git a/net/minecraft/world/entity/animal/HappyGhast.java b/net/minecraft/world/entity/animal/HappyGhast.java +index 4e74d5b3076f50f9294553b453f5903ef32f1e8a..e04da94daced96a7eb9fdb01c551bea667b72d76 100644 +--- a/net/minecraft/world/entity/animal/HappyGhast.java ++++ b/net/minecraft/world/entity/animal/HappyGhast.java +@@ -118,6 +118,47 @@ public class HappyGhast extends Animal { + this.removeAllGoals(goal -> true); + } + ++ // Purpur start - Ridables ++ @Override ++ public boolean dismountsUnderwater() { ++ return level().purpurConfig.useDismountsUnderwaterTag ? super.dismountsUnderwater() : !level().purpurConfig.happyGhastRidableInWater; ++ } ++ // Purpur end - Ridables ++ ++ // Purpur start - Configurable entity base attributes ++ @Override ++ public void initAttributes() { ++ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.happyGhastMaxHealth); ++ this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.happyGhastScale); ++ this.getAttribute(Attributes.TEMPT_RANGE).setBaseValue(this.level().purpurConfig.happyGhastTemptRange); ++ this.getAttribute(Attributes.FLYING_SPEED).setBaseValue(this.level().purpurConfig.happyGhastFlyingSpeed); ++ this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(this.level().purpurConfig.happyGhastMovementSpeed); ++ this.getAttribute(Attributes.FOLLOW_RANGE).setBaseValue(this.level().purpurConfig.happyGhastFollowRange); ++ this.getAttribute(Attributes.CAMERA_DISTANCE).setBaseValue(this.level().purpurConfig.happyGhastCameraDistance); ++ } ++ // Purpur end - Configurable entity base attributes ++ ++ // Purpur start - Make entity breeding times configurable ++ @Override ++ public int getPurpurBreedTime() { ++ return 6000; ++ } ++ // Purpur end - Make entity breeding times configurable ++ ++ // Purpur start - Toggle for water sensitive mob damage ++ @Override ++ public boolean isSensitiveToWater() { ++ return this.level().purpurConfig.happyGhastTakeDamageFromWater; ++ } ++ // Purpur end - Toggle for water sensitive mob damage ++ ++ // Purpur start - Mobs always drop experience ++ @Override ++ protected boolean isAlwaysExperienceDropper() { ++ return this.level().purpurConfig.happyGhastAlwaysDropExp; ++ } ++ // Purpur end - Mobs always drop experience ++ + @Override + protected void ageBoundaryReached() { + if (this.isBaby()) { +@@ -141,7 +182,7 @@ public class HappyGhast extends Animal { + + @Override + protected float sanitizeScale(float scale) { +- return Math.min(scale, 1.0F); ++ return Math.min(scale, 1.0F); // Purpur - Configurable entity base attributes + } + + @Override diff --git a/net/minecraft/world/entity/animal/IronGolem.java b/net/minecraft/world/entity/animal/IronGolem.java -index 33245f28c02c5cd42f2daec8748d615b7f5e21ec..21ed6bfcba6ea58663dc8e932814c1ac084d0402 100644 +index db309a1261778cc65da9b4bf5a962a372b83bba6..8885ab56eb72c0106ef57359ca11f70c012fc348 100644 --- a/net/minecraft/world/entity/animal/IronGolem.java +++ b/net/minecraft/world/entity/animal/IronGolem.java -@@ -57,13 +57,67 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -58,13 +58,67 @@ public class IronGolem extends AbstractGolem implements NeutralMob { private int remainingPersistentAngerTime; @Nullable private UUID persistentAngerTarget; @@ -4655,7 +4701,7 @@ index 33245f28c02c5cd42f2daec8748d615b7f5e21ec..21ed6bfcba6ea58663dc8e932814c1ac this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(2, new MoveTowardsTargetGoal(this, 0.9, 32.0F)); this.goalSelector.addGoal(2, new MoveBackToVillageGoal(this, 0.6, false)); -@@ -71,6 +125,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -72,6 +126,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { this.goalSelector.addGoal(5, new OfferFlowerGoal(this)); this.goalSelector.addGoal(7, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(8, new RandomLookAroundGoal(this)); @@ -4663,23 +4709,23 @@ index 33245f28c02c5cd42f2daec8748d615b7f5e21ec..21ed6bfcba6ea58663dc8e932814c1ac this.targetSelector.addGoal(1, new DefendVillageTargetGoal(this)); this.targetSelector.addGoal(2, new HurtByTargetGoal(this)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt)); -@@ -141,6 +196,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("PlayerCreated", this.isPlayerCreated()); -+ compound.storeNullable("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC, getSummoner()); // Purpur - Summoner API - this.addPersistentAngerSaveData(compound); +@@ -142,6 +197,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); + output.putBoolean("PlayerCreated", this.isPlayerCreated()); ++ output.storeNullable("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC, getSummoner()); // Purpur - Summoner API + this.addPersistentAngerSaveData(output); } -@@ -148,6 +204,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setPlayerCreated(compound.getBooleanOr("PlayerCreated", false)); -+ this.setSummoner(compound.read("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC).orElse(null)); // Purpur - Summoner API - this.readPersistentAngerSaveData(this.level(), compound); +@@ -149,6 +205,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { + protected void readAdditionalSaveData(ValueInput input) { + super.readAdditionalSaveData(input); + this.setPlayerCreated(input.getBooleanOr("PlayerCreated", false)); ++ this.setSummoner(input.read("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC).orElse(null)); // Purpur - Summoner API + this.readPersistentAngerSaveData(this.level(), input); } -@@ -257,16 +314,17 @@ public class IronGolem extends AbstractGolem implements NeutralMob { +@@ -258,16 +315,17 @@ public class IronGolem extends AbstractGolem implements NeutralMob { protected InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); if (!itemInHand.is(Items.IRON_INGOT)) { @@ -4700,10 +4746,10 @@ index 33245f28c02c5cd42f2daec8748d615b7f5e21ec..21ed6bfcba6ea58663dc8e932814c1ac } } diff --git a/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java -index cc2fd681d2383e62191e7b380322f2e176d79f1e..91b03b8f01ff7dd3c4a00c088fd8ba2387a5b2f7 100644 +index 1f82848c97c5b52d6c4225b07a895f00d20c7d6c..cdb11eabdd246fb6c6aed11c9f1f264648b55c26 100644 --- a/net/minecraft/world/entity/animal/MushroomCow.java +++ b/net/minecraft/world/entity/animal/MushroomCow.java -@@ -61,6 +61,51 @@ public class MushroomCow extends AbstractCow implements Shearable { +@@ -62,6 +62,51 @@ public class MushroomCow extends AbstractCow implements Shearable { super(entityType, level); } @@ -4755,7 +4801,7 @@ index cc2fd681d2383e62191e7b380322f2e176d79f1e..91b03b8f01ff7dd3c4a00c088fd8ba23 @Override public float getWalkTargetValue(BlockPos pos, LevelReader level) { return level.getBlockState(pos.below()).is(Blocks.MYCELIUM) ? 10.0F : level.getPathfindingCostFromLightLevels(pos); -@@ -121,7 +166,7 @@ public class MushroomCow extends AbstractCow implements Shearable { +@@ -122,7 +167,7 @@ public class MushroomCow extends AbstractCow implements Shearable { java.util.List drops = this.generateDefaultDrops(serverLevel, itemInHand); org.bukkit.event.player.PlayerShearEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemInHand, hand, drops); if (event != null) { @@ -4765,10 +4811,10 @@ index cc2fd681d2383e62191e7b380322f2e176d79f1e..91b03b8f01ff7dd3c4a00c088fd8ba23 // Paper end - custom shear drops } diff --git a/net/minecraft/world/entity/animal/Ocelot.java b/net/minecraft/world/entity/animal/Ocelot.java -index 9e86a42f04d06c3dcd241f16ab876b0c8422fd81..dcfa57bc691e997969bc9fef1983088322e4e4e4 100644 +index e8b184f2e1a98e565a50ce6ae6cab248d5a6e89b..4c20569ec5c504c582575851ab1d74248289b1c0 100644 --- a/net/minecraft/world/entity/animal/Ocelot.java +++ b/net/minecraft/world/entity/animal/Ocelot.java -@@ -63,6 +63,52 @@ public class Ocelot extends Animal { +@@ -64,6 +64,52 @@ public class Ocelot extends Animal { this.reassessTrustingGoals(); } @@ -4821,7 +4867,7 @@ index 9e86a42f04d06c3dcd241f16ab876b0c8422fd81..dcfa57bc691e997969bc9fef19830883 public boolean isTrusting() { return this.entityData.get(DATA_TRUSTING); } -@@ -94,12 +140,14 @@ public class Ocelot extends Animal { +@@ -95,12 +141,14 @@ public class Ocelot extends Animal { protected void registerGoals() { this.temptGoal = new Ocelot.OcelotTemptGoal(this, 0.6, itemStack -> itemStack.is(ItemTags.OCELOT_FOOD), true); this.goalSelector.addGoal(1, new FloatGoal(this)); @@ -4836,7 +4882,7 @@ index 9e86a42f04d06c3dcd241f16ab876b0c8422fd81..dcfa57bc691e997969bc9fef19830883 this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Chicken.class, false)); this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, false, false, Turtle.BABY_ON_LAND_SELECTOR)); } -@@ -233,7 +281,7 @@ public class Ocelot extends Animal { +@@ -234,7 +282,7 @@ public class Ocelot extends Animal { public boolean checkSpawnObstruction(LevelReader level) { if (level.isUnobstructed(this) && !level.containsAnyLiquid(this.getBoundingBox())) { BlockPos blockPos = this.blockPosition(); @@ -4846,10 +4892,10 @@ index 9e86a42f04d06c3dcd241f16ab876b0c8422fd81..dcfa57bc691e997969bc9fef19830883 } diff --git a/net/minecraft/world/entity/animal/Panda.java b/net/minecraft/world/entity/animal/Panda.java -index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884bb9e2859 100644 +index 44c12820b9b39acc5220db8b8d29a31c0e57526e..02bfa88568e635770675ea9173f2cf3ca21457fa 100644 --- a/net/minecraft/world/entity/animal/Panda.java +++ b/net/minecraft/world/entity/animal/Panda.java -@@ -106,6 +106,62 @@ public class Panda extends Animal { +@@ -107,6 +107,62 @@ public class Panda extends Animal { } } @@ -4912,7 +4958,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 @Override protected boolean canDispenserEquipIntoSlot(EquipmentSlot slot) { return slot == EquipmentSlot.MAINHAND && this.canPickUpLoot(); -@@ -259,6 +315,7 @@ public class Panda extends Animal { +@@ -260,6 +316,7 @@ public class Panda extends Animal { @Override protected void registerGoals() { this.goalSelector.addGoal(0, new FloatGoal(this)); @@ -4920,7 +4966,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 this.goalSelector.addGoal(2, new Panda.PandaPanicGoal(this, 2.0)); this.goalSelector.addGoal(2, new Panda.PandaBreedGoal(this, 1.0)); this.goalSelector.addGoal(3, new Panda.PandaAttackGoal(this, 1.2F, true)); -@@ -274,6 +331,7 @@ public class Panda extends Animal { +@@ -275,6 +332,7 @@ public class Panda extends Animal { this.goalSelector.addGoal(12, new Panda.PandaRollGoal(this)); this.goalSelector.addGoal(13, new FollowParentGoal(this, 1.25)); this.goalSelector.addGoal(14, new WaterAvoidingRandomStrollGoal(this, 1.0)); @@ -4928,7 +4974,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 this.targetSelector.addGoal(1, new Panda.PandaHurtByTargetGoal(this).setAlertOthers(new Class[0])); } -@@ -597,7 +655,11 @@ public class Panda extends Animal { +@@ -598,7 +656,11 @@ public class Panda extends Animal { public void setAttributes() { if (this.isWeak()) { @@ -4941,7 +4987,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 } if (this.isLazy()) { -@@ -617,7 +679,7 @@ public class Panda extends Animal { +@@ -618,7 +680,7 @@ public class Panda extends Animal { public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); if (this.isScared()) { @@ -4950,7 +4996,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 } else if (this.isOnBack()) { this.setOnBack(false); return InteractionResult.SUCCESS; -@@ -653,7 +715,7 @@ public class Panda extends Animal { +@@ -654,7 +716,7 @@ public class Panda extends Animal { return InteractionResult.SUCCESS_SERVER; } else { @@ -4959,7 +5005,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 } } -@@ -961,7 +1023,7 @@ public class Panda extends Animal { +@@ -962,7 +1024,7 @@ public class Panda extends Animal { } } @@ -4968,7 +5014,7 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 private final Panda panda; public PandaMoveControl(Panda mob) { -@@ -970,9 +1032,9 @@ public class Panda extends Animal { +@@ -971,9 +1033,9 @@ public class Panda extends Animal { } @Override @@ -4981,10 +5027,10 @@ index ecd85f3e33f80084b9ee06c9ff1f57b73399be50..99d99d59ec0eb13dc40bc88bd70ad884 } } diff --git a/net/minecraft/world/entity/animal/Parrot.java b/net/minecraft/world/entity/animal/Parrot.java -index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b0669828912f1e4214 100644 +index 22d1e36dadd6a8cbf615335074426aaab6ea7d01..dddf3a2e372bd0d483c1da01d36fe59b17b3d4e2 100644 --- a/net/minecraft/world/entity/animal/Parrot.java +++ b/net/minecraft/world/entity/animal/Parrot.java -@@ -129,12 +129,97 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -131,12 +131,97 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { public Parrot(EntityType entityType, Level level) { super(entityType, level); @@ -5083,7 +5129,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b066982891 @Nullable @Override public SpawnGroupData finalizeSpawn( -@@ -155,8 +240,11 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -157,8 +242,11 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { @Override protected void registerGoals() { @@ -5096,7 +5142,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b066982891 this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(2, new SitWhenOrderedToGoal(this)); this.goalSelector.addGoal(2, new FollowOwnerGoal(this, 1.0, 5.0F, 1.0F)); -@@ -262,7 +350,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -264,7 +352,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { } if (!this.level().isClientSide) { @@ -5105,7 +5151,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b066982891 this.tame(player); this.level().broadcastEntityEvent(this, (byte)7); } else { -@@ -270,6 +358,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -272,6 +360,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { } } @@ -5113,7 +5159,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b066982891 return InteractionResult.SUCCESS; } else if (!itemInHand.is(ItemTags.PARROT_POISONOUS_FOOD)) { if (!this.isFlying() && this.isTame() && this.isOwnedBy(player)) { -@@ -294,7 +383,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -296,7 +385,7 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { @Override public boolean isFood(ItemStack stack) { @@ -5122,7 +5168,7 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b066982891 } public static boolean checkParrotSpawnRules( -@@ -309,13 +398,13 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -311,13 +400,13 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { @Override public boolean canMate(Animal otherAnimal) { @@ -5139,10 +5185,10 @@ index cff10bb74a216238288280399910ab1fa85cb1a5..1b8350a09a9f2a708c8cd1b066982891 @Nullable diff --git a/net/minecraft/world/entity/animal/Pig.java b/net/minecraft/world/entity/animal/Pig.java -index ec2074741b52cf8f1ac3c0276bcfc9b8806b71bf..5bc370d45fc6e0a37cc77ac1b36e0caad959741c 100644 +index 155a51233895955d01c2ee73416e2daefc4dfd0f..adbbe938c14d14a628d9963acec57c32661957cd 100644 --- a/net/minecraft/world/entity/animal/Pig.java +++ b/net/minecraft/world/entity/animal/Pig.java -@@ -65,9 +65,56 @@ public class Pig extends Animal implements ItemSteerable { +@@ -66,9 +66,56 @@ public class Pig extends Animal implements ItemSteerable { super(entityType, level); } @@ -5199,7 +5245,7 @@ index ec2074741b52cf8f1ac3c0276bcfc9b8806b71bf..5bc370d45fc6e0a37cc77ac1b36e0caa this.goalSelector.addGoal(1, new PanicGoal(this, 1.25)); this.goalSelector.addGoal(3, new BreedGoal(this, 1.0)); this.goalSelector.addGoal(4, new TemptGoal(this, 1.2, itemStack -> itemStack.is(Items.CARROT_ON_A_STICK), false)); -@@ -141,6 +188,19 @@ public class Pig extends Animal implements ItemSteerable { +@@ -142,6 +189,19 @@ public class Pig extends Animal implements ItemSteerable { @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { boolean isFood = this.isFood(player.getItemInHand(hand)); @@ -5220,10 +5266,10 @@ index ec2074741b52cf8f1ac3c0276bcfc9b8806b71bf..5bc370d45fc6e0a37cc77ac1b36e0caa if (!this.level().isClientSide) { player.startRiding(this); diff --git a/net/minecraft/world/entity/animal/PolarBear.java b/net/minecraft/world/entity/animal/PolarBear.java -index fcdaaed31c38acb55e66599cd3314606d223cd67..ab08e5e589dac3341c006876378903f7cf1db25f 100644 +index d727e8e93e466b9bb91cbb43b9c1bbbccc56d486..e0b51b482607ec5a9f5b4d13d918d79b2f52f9c0 100644 --- a/net/minecraft/world/entity/animal/PolarBear.java +++ b/net/minecraft/world/entity/animal/PolarBear.java -@@ -59,11 +59,92 @@ public class PolarBear extends Animal implements NeutralMob { +@@ -60,11 +60,92 @@ public class PolarBear extends Animal implements NeutralMob { private int remainingPersistentAngerTime; @Nullable private UUID persistentAngerTarget; @@ -5316,7 +5362,7 @@ index fcdaaed31c38acb55e66599cd3314606d223cd67..ab08e5e589dac3341c006876378903f7 @Nullable @Override public AgeableMob getBreedOffspring(ServerLevel level, AgeableMob otherParent) { -@@ -72,19 +153,27 @@ public class PolarBear extends Animal implements NeutralMob { +@@ -73,19 +154,27 @@ public class PolarBear extends Animal implements NeutralMob { @Override public boolean isFood(ItemStack stack) { @@ -5345,7 +5391,7 @@ index fcdaaed31c38acb55e66599cd3314606d223cd67..ab08e5e589dac3341c006876378903f7 this.targetSelector.addGoal(1, new PolarBear.PolarBearHurtByTargetGoal()); this.targetSelector.addGoal(2, new PolarBear.PolarBearAttackPlayersGoal()); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt)); -@@ -203,6 +292,12 @@ public class PolarBear extends Animal implements NeutralMob { +@@ -204,6 +293,12 @@ public class PolarBear extends Animal implements NeutralMob { if (!this.level().isClientSide) { this.updatePersistentAnger((ServerLevel)this.level(), true); } @@ -5358,7 +5404,7 @@ index fcdaaed31c38acb55e66599cd3314606d223cd67..ab08e5e589dac3341c006876378903f7 } @Override -@@ -222,6 +317,7 @@ public class PolarBear extends Animal implements NeutralMob { +@@ -223,6 +318,7 @@ public class PolarBear extends Animal implements NeutralMob { public void setStanding(boolean standing) { this.entityData.set(DATA_STANDING_ID, standing); @@ -5367,10 +5413,10 @@ index fcdaaed31c38acb55e66599cd3314606d223cd67..ab08e5e589dac3341c006876378903f7 public float getStandingAnimationScale(float partialTick) { diff --git a/net/minecraft/world/entity/animal/Pufferfish.java b/net/minecraft/world/entity/animal/Pufferfish.java -index 4a7201fe9e946fc20ed04e729d00f7986a748bad..3b815f3ad9068eb2bdf93eac1c1aff38dffdb850 100644 +index e67f9b26444e3af42feeb0223c1b7c1e536646ba..685176ce37538cbbc614401db568acdb0ad264bb 100644 --- a/net/minecraft/world/entity/animal/Pufferfish.java +++ b/net/minecraft/world/entity/animal/Pufferfish.java -@@ -46,6 +46,39 @@ public class Pufferfish extends AbstractFish { +@@ -47,6 +47,39 @@ public class Pufferfish extends AbstractFish { this.refreshDimensions(); } @@ -5411,10 +5457,10 @@ index 4a7201fe9e946fc20ed04e729d00f7986a748bad..3b815f3ad9068eb2bdf93eac1c1aff38 protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java -index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bbad20b0fdf 100644 +index ac99590dad689f2cfffb9b9e2465f6a252d41e9c..1af1b33702296f9aa74c33436ea2904c5e5ae43d 100644 --- a/net/minecraft/world/entity/animal/Rabbit.java +++ b/net/minecraft/world/entity/animal/Rabbit.java -@@ -90,6 +90,7 @@ public class Rabbit extends Animal { +@@ -91,6 +91,7 @@ public class Rabbit extends Animal { private boolean wasOnGround; private int jumpDelayTicks; public int moreCarrotTicks = 0; @@ -5422,7 +5468,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba public Rabbit(EntityType entityType, Level level) { super(entityType, level); -@@ -98,9 +99,84 @@ public class Rabbit extends Animal { +@@ -99,9 +100,84 @@ public class Rabbit extends Animal { //this.setSpeedModifier(0.0); // CraftBukkit } @@ -5507,7 +5553,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba this.goalSelector.addGoal(1, new ClimbOnTopOfPowderSnowGoal(this, this.level())); this.goalSelector.addGoal(1, new Rabbit.RabbitPanicGoal(this, 2.2)); this.goalSelector.addGoal(2, new BreedGoal(this, 0.8)); -@@ -115,6 +191,14 @@ public class Rabbit extends Animal { +@@ -116,6 +192,14 @@ public class Rabbit extends Animal { @Override protected float getJumpPower() { @@ -5522,7 +5568,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba float f = 0.3F; if (this.moveControl.getSpeedModifier() <= 0.6) { f = 0.2F; -@@ -182,6 +266,12 @@ public class Rabbit extends Animal { +@@ -183,6 +267,12 @@ public class Rabbit extends Animal { @Override public void customServerAiStep(ServerLevel level) { @@ -5535,7 +5581,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba if (this.jumpDelayTicks > 0) { this.jumpDelayTicks--; } -@@ -403,10 +493,23 @@ public class Rabbit extends Animal { +@@ -404,10 +494,23 @@ public class Rabbit extends Animal { } this.setVariant(randomRabbitVariant); @@ -5559,7 +5605,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba Holder biome = level.getBiome(pos); int randomInt = level.getRandom().nextInt(100); if (biome.is(BiomeTags.SPAWNS_WHITE_RABBITS)) { -@@ -497,7 +600,7 @@ public class Rabbit extends Animal { +@@ -498,7 +601,7 @@ public class Rabbit extends Animal { } } @@ -5568,7 +5614,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba private final Rabbit rabbit; private double nextJumpSpeed; -@@ -507,14 +610,14 @@ public class Rabbit extends Animal { +@@ -508,14 +611,14 @@ public class Rabbit extends Animal { } @Override @@ -5585,7 +5631,7 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba } @Override -@@ -558,7 +661,7 @@ public class Rabbit extends Animal { +@@ -559,7 +662,7 @@ public class Rabbit extends Animal { @Override public boolean canUse() { if (this.nextStartTick <= 0) { @@ -5595,10 +5641,10 @@ index cc7d990f271af1371aa62e8a2ee2ee1bfffb621a..fd8026cf1d884e95e8260ad52d4e0bba } diff --git a/net/minecraft/world/entity/animal/Salmon.java b/net/minecraft/world/entity/animal/Salmon.java -index 1786205346bb02835b10676155b65d2f11f0c221..25811130990e680174a0e930a6d066ad2d580f60 100644 +index 8a3e1d420263ac53b87ffed026380dcdc4a48285..d2679beaa3be6de36227c5b66609e0df393c4376 100644 --- a/net/minecraft/world/entity/animal/Salmon.java +++ b/net/minecraft/world/entity/animal/Salmon.java -@@ -38,6 +38,39 @@ public class Salmon extends AbstractSchoolingFish { +@@ -39,6 +39,39 @@ public class Salmon extends AbstractSchoolingFish { this.refreshDimensions(); } @@ -5639,10 +5685,10 @@ index 1786205346bb02835b10676155b65d2f11f0c221..25811130990e680174a0e930a6d066ad public int getMaxSchoolSize() { return 5; diff --git a/net/minecraft/world/entity/animal/SnowGolem.java b/net/minecraft/world/entity/animal/SnowGolem.java -index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..291769d23d43f3e601d460bded72799dd6f97288 100644 +index 1b3a020e35fb2f9a28be718415c51fde5b52d399..8984a4fc0aae9fd72bc3f7222003c7593810ab77 100644 --- a/net/minecraft/world/entity/animal/SnowGolem.java +++ b/net/minecraft/world/entity/animal/SnowGolem.java -@@ -45,17 +45,63 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -46,17 +46,63 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM private static final EntityDataAccessor DATA_PUMPKIN_ID = SynchedEntityData.defineId(SnowGolem.class, EntityDataSerializers.BYTE); private static final byte PUMPKIN_FLAG = 16; private static final boolean DEFAULT_PUMPKIN = true; @@ -5708,18 +5754,18 @@ index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..291769d23d43f3e601d460bded72799d this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (entity, level) -> entity instanceof Enemy)); } -@@ -73,17 +119,19 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putBoolean("Pumpkin", this.hasPumpkin()); -+ compound.storeNullable("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC, getSummoner()); // Purpur - Summoner API +@@ -74,17 +120,19 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); + output.putBoolean("Pumpkin", this.hasPumpkin()); ++ output.storeNullable("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC, getSummoner()); // Purpur - Summoner API } @Override - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.setPumpkin(compound.getBooleanOr("Pumpkin", true)); -+ this.setSummoner(compound.read("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC).orElse(null)); // Purpur - Summoner API + protected void readAdditionalSaveData(ValueInput input) { + super.readAdditionalSaveData(input); + this.setPumpkin(input.getBooleanOr("Pumpkin", true)); ++ this.setSummoner(input.read("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC).orElse(null)); // Purpur - Summoner API } @Override @@ -5729,7 +5775,7 @@ index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..291769d23d43f3e601d460bded72799d } @Override -@@ -94,10 +142,11 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -95,10 +143,11 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM this.hurtServer(serverLevel, this.damageSources().onFire().knownCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause.MELTING), 1.0F); // CraftBukkit } @@ -5742,7 +5788,7 @@ index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..291769d23d43f3e601d460bded72799d BlockState blockState = Blocks.SNOW.defaultBlockState(); for (int i = 0; i < 4; i++) { -@@ -140,7 +189,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -141,7 +190,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM org.bukkit.event.player.PlayerShearEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemInHand, hand, drops); if (event != null) { if (event.isCancelled()) { @@ -5751,7 +5797,7 @@ index 7d73f02efb37aeafe41c23325a02d641d57bdaf4..291769d23d43f3e601d460bded72799d } drops = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getDrops()); // Paper end - custom shear drops -@@ -152,8 +201,16 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -153,8 +202,16 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM } return InteractionResult.SUCCESS; @@ -5904,10 +5950,10 @@ index 58e1bc90cbc32669fa6c66d214119f0c459ff38c..8371f3892e50150db018f0b265986ffa this.squid.movementVector = new Vec3(Mth.cos(f) * 0.2F, -0.1F + this.squid.getRandom().nextFloat() * 0.2F, Mth.sin(f) * 0.2F); } diff --git a/net/minecraft/world/entity/animal/TropicalFish.java b/net/minecraft/world/entity/animal/TropicalFish.java -index 89e14f04328995e6491c01321789be0bf9ddd438..f3c7e8b244eb7ba3d99cc0d29e388bab8e743351 100644 +index 806fb2561d1eb0fba56dc40ba5c1f306c3105880..8d1fa86c6f4881c05f11fa80018b8de7f4920006 100644 --- a/net/minecraft/world/entity/animal/TropicalFish.java +++ b/net/minecraft/world/entity/animal/TropicalFish.java -@@ -76,6 +76,39 @@ public class TropicalFish extends AbstractSchoolingFish { +@@ -77,6 +77,39 @@ public class TropicalFish extends AbstractSchoolingFish { super(entityType, level); } @@ -5948,10 +5994,10 @@ index 89e14f04328995e6491c01321789be0bf9ddd438..f3c7e8b244eb7ba3d99cc0d29e388bab return "entity.minecraft.tropical_fish.predefined." + variantId; } diff --git a/net/minecraft/world/entity/animal/Turtle.java b/net/minecraft/world/entity/animal/Turtle.java -index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde858b9b4e 100644 +index 8738424b92726f45de2c166a063d46e1071e8b29..9bdc1f10e3b40672449ad166f130ecabdacc75d3 100644 --- a/net/minecraft/world/entity/animal/Turtle.java +++ b/net/minecraft/world/entity/animal/Turtle.java -@@ -85,6 +85,52 @@ public class Turtle extends Animal { +@@ -86,6 +86,52 @@ public class Turtle extends Animal { this.moveControl = new Turtle.TurtleMoveControl(this); } @@ -6004,7 +6050,7 @@ index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde public void setHomePos(BlockPos homePos) { this.homePos = homePos; } -@@ -144,6 +190,7 @@ public class Turtle extends Animal { +@@ -145,6 +191,7 @@ public class Turtle extends Animal { @Override protected void registerGoals() { @@ -6012,7 +6058,7 @@ index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde this.goalSelector.addGoal(0, new Turtle.TurtlePanicGoal(this, 1.2)); this.goalSelector.addGoal(1, new Turtle.TurtleBreedGoal(this, 1.0)); this.goalSelector.addGoal(1, new Turtle.TurtleLayEggGoal(this, 1.0)); -@@ -324,8 +371,10 @@ public class Turtle extends Animal { +@@ -325,8 +372,10 @@ public class Turtle extends Animal { } this.turtle.setHasEgg(true); @@ -6025,7 +6071,7 @@ index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde this.animal.resetLove(); this.partner.resetLove(); RandomSource random = this.animal.getRandom(); -@@ -492,12 +541,14 @@ public class Turtle extends Animal { +@@ -493,12 +542,14 @@ public class Turtle extends Animal { } } @@ -6041,7 +6087,7 @@ index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde } private void updateSpeed() { -@@ -516,7 +567,7 @@ public class Turtle extends Animal { +@@ -517,7 +568,7 @@ public class Turtle extends Animal { } @Override @@ -6050,7 +6096,7 @@ index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde this.updateSpeed(); if (this.operation == MoveControl.Operation.MOVE_TO && !this.turtle.getNavigation().isDone()) { double d = this.wantedX - this.turtle.getX(); -@@ -530,7 +581,7 @@ public class Turtle extends Animal { +@@ -531,7 +582,7 @@ public class Turtle extends Animal { float f = (float)(Mth.atan2(d2, d) * 180.0F / (float)Math.PI) - 90.0F; this.turtle.setYRot(this.rotlerp(this.turtle.getYRot(), f, 90.0F)); this.turtle.yBodyRot = this.turtle.getYRot(); @@ -6060,10 +6106,10 @@ index d24ddf8a585395c0f7b1cd5a61aaea0516636d93..c84f63f064a7769761f75cdedaceacde this.turtle.setDeltaMovement(this.turtle.getDeltaMovement().add(0.0, this.turtle.getSpeed() * d1 * 0.1, 0.0)); } diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index 2ab261bba5f9e0babfc9072afd2ebbee0536041c..441287e74243a413c97a98b7898bab7833ac6458 100644 +index 69500fa0b207fc3d5b1bc2bd665fa39f6725d23d..7127d8e5fff81be017f0aa04606cb8404ad7b2fd 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -115,10 +115,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -112,10 +112,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS private float spinningAnimationTicks; private float spinningAnimationTicks0; public boolean forceDancing = false; // CraftBukkit @@ -6088,7 +6134,7 @@ index 2ab261bba5f9e0babfc9072afd2ebbee0536041c..441287e74243a413c97a98b7898bab78 this.setCanPickUpLoot(this.canPickUpLoot()); this.vibrationUser = new Allay.VibrationUser(); this.vibrationData = new VibrationSystem.Data(); -@@ -134,6 +147,36 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -131,6 +144,36 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } // CraftBukkit end @@ -6125,7 +6171,7 @@ index 2ab261bba5f9e0babfc9072afd2ebbee0536041c..441287e74243a413c97a98b7898bab78 @Override protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); -@@ -240,6 +283,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -225,6 +268,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -6134,10 +6180,10 @@ index 2ab261bba5f9e0babfc9072afd2ebbee0536041c..441287e74243a413c97a98b7898bab78 this.getBrain().tick(level, this); AllayAi.updateActivity(this); diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -index 657f4b56699c33590a0494ef860275e952794c2a..aea96e036846c66d411fdea55fbbf0efb60d467d 100644 +index ee2c6c86631ba50a4e8503131c678596bc2c0363..6fbeaff7178a21338920d6738767033260b7a726 100644 --- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java +++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -@@ -79,6 +79,38 @@ public class Armadillo extends Animal { +@@ -80,6 +80,38 @@ public class Armadillo extends Animal { return Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 12.0).add(Attributes.MOVEMENT_SPEED, 0.14); } @@ -6177,10 +6223,10 @@ index 657f4b56699c33590a0494ef860275e952794c2a..aea96e036846c66d411fdea55fbbf0ef protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index f54b854adedd58a37b5c38c63abc3fc94ed9ba80..de207d747026453fabe2e6e725d2aa8504fbc9a1 100644 +index 3475ecbd95fac6c6b6e792a23cb15cdb3395985f..02db38fa315ecb9d5bdba74848012710106b662e 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -118,6 +118,52 @@ public class Axolotl extends Animal implements Bucketable { +@@ -120,6 +120,52 @@ public class Axolotl extends Animal implements Bucketable { this.lookControl = new Axolotl.AxolotlLookControl(this, 20); } @@ -6233,7 +6279,7 @@ index f54b854adedd58a37b5c38c63abc3fc94ed9ba80..de207d747026453fabe2e6e725d2aa85 @Override public float getWalkTargetValue(BlockPos pos, LevelReader level) { return 0.0F; -@@ -326,6 +372,7 @@ public class Axolotl extends Animal implements Bucketable { +@@ -328,6 +374,7 @@ public class Axolotl extends Animal implements Bucketable { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -6241,7 +6287,7 @@ index f54b854adedd58a37b5c38c63abc3fc94ed9ba80..de207d747026453fabe2e6e725d2aa85 if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish this.getBrain().tick(level, this); AxolotlAi.updateActivity(this); -@@ -573,23 +620,31 @@ public class Axolotl extends Animal implements Bucketable { +@@ -575,23 +622,31 @@ public class Axolotl extends Animal implements Bucketable { } @Override @@ -6276,10 +6322,10 @@ index f54b854adedd58a37b5c38c63abc3fc94ed9ba80..de207d747026453fabe2e6e725d2aa85 super.tick(); } diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index b63b32bac1872db7be64fcb645acd0a0a4290cee..101931ff4474ab4445be3fa1a241a731ad3ac1da 100644 +index adc336c6cec601b8855c1013adf1eebf018597f0..949b6c563658e6e46ac5842d6f088ecae6d4cd0c 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -87,6 +87,20 @@ public class Camel extends AbstractHorse { +@@ -89,6 +89,20 @@ public class Camel extends AbstractHorse { groundPathNavigation.setCanWalkOverFences(true); } @@ -6298,9 +6344,9 @@ index b63b32bac1872db7be64fcb645acd0a0a4290cee..101931ff4474ab4445be3fa1a241a731 + // Purpur end - Make entity breeding times configurable + @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); -@@ -320,6 +334,23 @@ public class Camel extends AbstractHorse { + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); +@@ -322,6 +336,23 @@ public class Camel extends AbstractHorse { return this.dashCooldown; } @@ -6325,10 +6371,10 @@ index b63b32bac1872db7be64fcb645acd0a0a4290cee..101931ff4474ab4445be3fa1a241a731 public SoundEvent getAmbientSound() { return SoundEvents.CAMEL_AMBIENT; diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index bd80e58179fe577693fa419a77989b0db39abb04..89fa6a785ff73b30effd58dde4fbcbf99fdad168 100644 +index f5c9ef8909f3852fc7a203265ae057232fa403ad..c4db078db0b7bb2bd8f6757a8bd13d60a7a4fa14 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -103,6 +103,8 @@ public class Frog extends Animal { +@@ -104,6 +104,8 @@ public class Frog extends Animal { public final AnimationState croakAnimationState = new AnimationState(); public final AnimationState tongueAnimationState = new AnimationState(); public final AnimationState swimIdleAnimationState = new AnimationState(); @@ -6337,7 +6383,7 @@ index bd80e58179fe577693fa419a77989b0db39abb04..89fa6a785ff73b30effd58dde4fbcbf9 public Frog(EntityType entityType, Level level) { super(entityType, level); -@@ -110,7 +112,62 @@ public class Frog extends Animal { +@@ -111,7 +113,62 @@ public class Frog extends Animal { this.setPathfindingMalus(PathType.WATER, 4.0F); this.setPathfindingMalus(PathType.TRAPDOOR, -1.0F); this.moveControl = new SmoothSwimmingMoveControl(this, 85, 10, 0.02F, 0.1F, true); @@ -6400,7 +6446,7 @@ index bd80e58179fe577693fa419a77989b0db39abb04..89fa6a785ff73b30effd58dde4fbcbf9 @Override protected Brain.Provider brainProvider() { -@@ -202,6 +259,7 @@ public class Frog extends Animal { +@@ -203,6 +260,7 @@ public class Frog extends Animal { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -6408,7 +6454,7 @@ index bd80e58179fe577693fa419a77989b0db39abb04..89fa6a785ff73b30effd58dde4fbcbf9 if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish this.getBrain().tick(level, this); FrogAi.updateActivity(this); -@@ -384,7 +442,7 @@ public class Frog extends Animal { +@@ -385,7 +443,7 @@ public class Frog extends Animal { return level.getBlockState(pos.below()).is(BlockTags.FROGS_SPAWNABLE_ON) && isBrightEnoughToSpawn(level, pos); } @@ -6418,10 +6464,10 @@ index bd80e58179fe577693fa419a77989b0db39abb04..89fa6a785ff73b30effd58dde4fbcbf9 super(mob); } diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index 72c4403a4b5fa817f91dbcd842d4b7939a4834ab..a445bbe84d919ffadd8f3f0006b12140cd8060fd 100644 +index 5392cb211a3dc841ab38710a4ef688bde7fbe067..a3858465569c40fcfc7c8c4c4735335ac83cb078 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -62,13 +62,50 @@ public class Tadpole extends AbstractFish { +@@ -64,13 +64,50 @@ public class Tadpole extends AbstractFish { MemoryModuleType.IS_PANICKING ); public boolean ageLocked; // Paper @@ -6473,7 +6519,7 @@ index 72c4403a4b5fa817f91dbcd842d4b7939a4834ab..a445bbe84d919ffadd8f3f0006b12140 @Override protected PathNavigation createNavigation(Level level) { return new WaterBoundPathNavigation(this, level); -@@ -97,6 +134,7 @@ public class Tadpole extends AbstractFish { +@@ -99,6 +136,7 @@ public class Tadpole extends AbstractFish { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -6482,10 +6528,10 @@ index 72c4403a4b5fa817f91dbcd842d4b7939a4834ab..a445bbe84d919ffadd8f3f0006b12140 this.getBrain().tick(level, this); TadpoleAi.updateActivity(this); diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index 048e62b361e33b3edd5122fd4a47c5627491bcaf..40ba2e6dc6b1efbd17dba582561c133f6b41df25 100644 +index 2a72d7f422c340dabef11a6dc680358207bee637..11b020704a673c69bd2d4ab6313ea32e8e97cc23 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -112,6 +112,44 @@ public class Goat extends Animal { +@@ -113,6 +113,44 @@ public class Goat extends Animal { .orElseGet(() -> new ItemStack(Items.GOAT_HORN)); } @@ -6530,7 +6576,7 @@ index 048e62b361e33b3edd5122fd4a47c5627491bcaf..40ba2e6dc6b1efbd17dba582561c133f @Override protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); -@@ -188,6 +226,7 @@ public class Goat extends Animal { +@@ -189,6 +227,7 @@ public class Goat extends Animal { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -6538,7 +6584,7 @@ index 048e62b361e33b3edd5122fd4a47c5627491bcaf..40ba2e6dc6b1efbd17dba582561c133f if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish this.getBrain().tick(level, this); GoatAi.updateActivity(this); -@@ -390,6 +429,7 @@ public class Goat extends Animal { +@@ -391,6 +430,7 @@ public class Goat extends Animal { // Paper start - Goat ram API public void ram(net.minecraft.world.entity.LivingEntity entity) { @@ -6547,10 +6593,10 @@ index 048e62b361e33b3edd5122fd4a47c5627491bcaf..40ba2e6dc6b1efbd17dba582561c133f brain.setMemory(MemoryModuleType.RAM_TARGET, entity.position()); brain.eraseMemory(MemoryModuleType.RAM_COOLDOWN_TICKS); diff --git a/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index 7c473eea481f5e055cc70512027726f41f0c6f67..601e2912790759487c8d2f270f30a82689c52236 100644 +index 31ed5d7cfbda1a1f98ebfc89f5cbc65332cabdae..e78ef459d6eecb7f69882ed95cd9f9967f53989f 100644 --- a/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/net/minecraft/world/entity/animal/horse/AbstractHorse.java -@@ -126,11 +126,61 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory +@@ -127,11 +127,61 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory protected AbstractHorse(EntityType entityType, Level level) { super(entityType, level); @@ -6612,7 +6658,7 @@ index 7c473eea481f5e055cc70512027726f41f0c6f67..601e2912790759487c8d2f270f30a826 this.goalSelector.addGoal(1, new PanicGoal(this, 1.2)); this.goalSelector.addGoal(1, new RunAroundLikeCrazyGoal(this, 1.2)); this.goalSelector.addGoal(2, new BreedGoal(this, 1.0, AbstractHorse.class)); -@@ -141,6 +191,7 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory +@@ -142,6 +192,7 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory if (this.canPerformRearing()) { this.goalSelector.addGoal(9, new RandomStandGoal(this)); } @@ -6620,7 +6666,7 @@ index 7c473eea481f5e055cc70512027726f41f0c6f67..601e2912790759487c8d2f270f30a826 this.addBehaviourGoals(); } -@@ -1043,7 +1094,7 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory +@@ -1040,7 +1091,7 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory spawnGroupData = new AgeableMob.AgeableMobGroupData(0.2F); } @@ -6686,10 +6732,10 @@ index 5dff98b5b2e4bba5f874d6a99d034a3905775c9b..0783d41a6c4622b03d9d368c1af949af public SoundEvent getAmbientSound() { return SoundEvents.DONKEY_AMBIENT; diff --git a/net/minecraft/world/entity/animal/horse/Horse.java b/net/minecraft/world/entity/animal/horse/Horse.java -index a0d85cd6c5306385b074a636166ff8eee2b320ce..206f911d1184a22f401d217f713495e6e85263be 100644 +index 2a1d720557c0bd4895a32723e34512c0a557e4f2..f1080a40f759b30b921b88b4f6edd35f4795406f 100644 --- a/net/minecraft/world/entity/animal/horse/Horse.java +++ b/net/minecraft/world/entity/animal/horse/Horse.java -@@ -46,6 +46,51 @@ public class Horse extends AbstractHorse { +@@ -47,6 +47,51 @@ public class Horse extends AbstractHorse { super(entityType, level); } @@ -6742,10 +6788,10 @@ index a0d85cd6c5306385b074a636166ff8eee2b320ce..206f911d1184a22f401d217f713495e6 protected void randomizeAttributes(RandomSource random) { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(generateMaxHealth(random::nextInt)); diff --git a/net/minecraft/world/entity/animal/horse/Llama.java b/net/minecraft/world/entity/animal/horse/Llama.java -index 6916adb865ff8fea498d3a61c2b5560472a223f4..e300a1284fd98791871ba1780bb7352cd848766a 100644 +index 1e2b629641e5fa1040307461dbbf03ad2d75ba00..1bef43f42aee02a0a00556318607072ce9814860 100644 --- a/net/minecraft/world/entity/animal/horse/Llama.java +++ b/net/minecraft/world/entity/animal/horse/Llama.java -@@ -77,12 +77,95 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -78,12 +78,95 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { private Llama caravanHead; @Nullable public Llama caravanTail; // Paper @@ -6841,19 +6887,19 @@ index 6916adb865ff8fea498d3a61c2b5560472a223f4..e300a1284fd98791871ba1780bb7352c public boolean isTraderLlama() { return false; -@@ -111,6 +194,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { - super.addAdditionalSaveData(compound); - compound.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant()); - compound.putInt("Strength", this.getStrength()); -+ compound.putBoolean("Purpur.ShouldJoinCaravan", shouldJoinCaravan); // Purpur - Llama API +@@ -112,6 +195,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { + super.addAdditionalSaveData(output); + output.store("Variant", Llama.Variant.LEGACY_CODEC, this.getVariant()); + output.putInt("Strength", this.getStrength()); ++ output.putBoolean("Purpur.ShouldJoinCaravan", shouldJoinCaravan); // Purpur - Llama API } @Override -@@ -118,11 +202,13 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { - this.setStrength(compound.getIntOr("Strength", 0)); - super.readAdditionalSaveData(compound); - this.setVariant(compound.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT)); -+ this.shouldJoinCaravan = compound.getBooleanOr("Purpur.ShouldJoinCaravan", true); // Purpur - Llama API +@@ -119,11 +203,13 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { + this.setStrength(input.getIntOr("Strength", 0)); + super.readAdditionalSaveData(input); + this.setVariant(input.read("Variant", Llama.Variant.LEGACY_CODEC).orElse(Llama.Variant.DEFAULT)); ++ this.shouldJoinCaravan = input.getBooleanOr("Purpur.ShouldJoinCaravan", true); // Purpur - Llama API } @Override @@ -6863,7 +6909,7 @@ index 6916adb865ff8fea498d3a61c2b5560472a223f4..e300a1284fd98791871ba1780bb7352c this.goalSelector.addGoal(1, new RunAroundLikeCrazyGoal(this, 1.2)); this.goalSelector.addGoal(2, new LlamaFollowCaravanGoal(this, 2.1F)); this.goalSelector.addGoal(3, new RangedAttackGoal(this, 1.25, 40, 20.0F)); -@@ -133,6 +219,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -134,6 +220,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 0.7)); this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(9, new RandomLookAroundGoal(this)); @@ -6871,7 +6917,7 @@ index 6916adb865ff8fea498d3a61c2b5560472a223f4..e300a1284fd98791871ba1780bb7352c this.targetSelector.addGoal(1, new Llama.LlamaHurtByTargetGoal(this)); this.targetSelector.addGoal(2, new Llama.LlamaAttackWolfGoal(this)); } -@@ -399,6 +486,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -400,6 +487,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { public void leaveCaravan() { if (this.caravanHead != null) { @@ -6879,7 +6925,7 @@ index 6916adb865ff8fea498d3a61c2b5560472a223f4..e300a1284fd98791871ba1780bb7352c this.caravanHead.caravanTail = null; } -@@ -406,6 +494,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { +@@ -407,6 +495,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob { } public void joinCaravan(Llama caravanHead) { @@ -6944,10 +6990,10 @@ index 39725b7a6bac9390406733cd51d7341d0cb363d1..6e0b1c83a6a03d12296e0e3b2c805b64 public SoundEvent getAmbientSound() { return SoundEvents.MULE_AMBIENT; diff --git a/net/minecraft/world/entity/animal/horse/SkeletonHorse.java b/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -index 797405b187bb8102aafbf880552accd82e2c9af2..b02ca00ff18484947aa2f4ff90ab9dda2196a679 100644 +index 580134c5a075c7efdc7c2f86a179df2fa336eba9..f6ab6ecc10486694d77905239a82bda4dec94936 100644 --- a/net/minecraft/world/entity/animal/horse/SkeletonHorse.java +++ b/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -@@ -41,6 +41,51 @@ public class SkeletonHorse extends AbstractHorse { +@@ -42,6 +42,51 @@ public class SkeletonHorse extends AbstractHorse { super(entityType, level); } @@ -6999,7 +7045,7 @@ index 797405b187bb8102aafbf880552accd82e2c9af2..b02ca00ff18484947aa2f4ff90ab9dda public static AttributeSupplier.Builder createAttributes() { return createBaseHorseAttributes().add(Attributes.MAX_HEALTH, 15.0).add(Attributes.MOVEMENT_SPEED, 0.2F); } -@@ -60,6 +105,7 @@ public class SkeletonHorse extends AbstractHorse { +@@ -61,6 +106,7 @@ public class SkeletonHorse extends AbstractHorse { @Override protected void addBehaviourGoals() { @@ -7008,10 +7054,10 @@ index 797405b187bb8102aafbf880552accd82e2c9af2..b02ca00ff18484947aa2f4ff90ab9dda @Override diff --git a/net/minecraft/world/entity/animal/horse/TraderLlama.java b/net/minecraft/world/entity/animal/horse/TraderLlama.java -index 38a5554d6e28ab73c225625531c94592a46d50a8..6c6cc0261123ba6a78c8f509715c738d629de253 100644 +index 2cd1b988f44caf271a7d2dfccf118be53b77caba..a8540e491161d82a6b72262e4414f8bb16705d47 100644 --- a/net/minecraft/world/entity/animal/horse/TraderLlama.java +++ b/net/minecraft/world/entity/animal/horse/TraderLlama.java -@@ -30,6 +30,66 @@ public class TraderLlama extends Llama { +@@ -31,6 +31,66 @@ public class TraderLlama extends Llama { super(entityType, level); } @@ -7148,10 +7194,10 @@ index ee327bdec37df5197c35aef60cf456bb81f8d048..e59172ea2fafbab673dc3e9bdc25055f @Override diff --git a/net/minecraft/world/entity/animal/sheep/Sheep.java b/net/minecraft/world/entity/animal/sheep/Sheep.java -index bb51adb44cbff3e7feaa80421f5f1a01c119aa00..c53ab665a0c87d342adbe395c87e15a3f5f49708 100644 +index 4e4887cd2c6d6d22966395d68ed59da090f609a3..500c87f5f7b2eda637103125d6e541f7c9fb385f 100644 --- a/net/minecraft/world/entity/animal/sheep/Sheep.java +++ b/net/minecraft/world/entity/animal/sheep/Sheep.java -@@ -84,10 +84,57 @@ public class Sheep extends Animal implements Shearable { +@@ -62,10 +62,57 @@ public class Sheep extends Animal implements Shearable { super(entityType, level); } @@ -7210,10 +7256,10 @@ index bb51adb44cbff3e7feaa80421f5f1a01c119aa00..c53ab665a0c87d342adbe395c87e15a3 this.goalSelector.addGoal(2, new BreedGoal(this, 1.0)); this.goalSelector.addGoal(3, new TemptGoal(this, 1.1, stack -> stack.is(ItemTags.SHEEP_FOOD), false)); diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 622c2eac70c81ed7ccf605069b8dd68508bebf76..0565b37dd5320b49efb11cf28f064d6a970048aa 100644 +index 05d269b51715a71fa653900e7187b07d001afdb7..a762fc8a4616c4e48e11accdca2129fd47f300e6 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -86,6 +86,38 @@ public class Sniffer extends Animal { +@@ -87,6 +87,38 @@ public class Sniffer extends Animal { this.setPathfindingMalus(PathType.DAMAGE_CAUTIOUS, -1.0F); } @@ -7253,10 +7299,10 @@ index 622c2eac70c81ed7ccf605069b8dd68508bebf76..0565b37dd5320b49efb11cf28f064d6a protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java -index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248243e9c4e 100644 +index dca01e7e6af74bc6e26d4968ccdf0c34f8707b94..7e7cb9db1c84bdb173b444bec90663a93fb3b549 100644 --- a/net/minecraft/world/entity/animal/wolf/Wolf.java +++ b/net/minecraft/world/entity/animal/wolf/Wolf.java -@@ -100,6 +100,37 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -99,6 +99,37 @@ public class Wolf extends TamableAnimal implements NeutralMob { EntityType type = entity.getType(); return type == EntityType.SHEEP || type == EntityType.RABBIT || type == EntityType.FOX; }; @@ -7294,7 +7340,7 @@ index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248 private static final float START_HEALTH = 8.0F; private static final float TAME_HEALTH = 40.0F; private static final float ARMOR_REPAIR_UNIT = 0.125F; -@@ -122,12 +153,99 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -121,12 +152,99 @@ public class Wolf extends TamableAnimal implements NeutralMob { this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F); } @@ -7394,7 +7440,7 @@ index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248 this.goalSelector.addGoal(4, new LeapAtTargetGoal(this, 0.4F)); this.goalSelector.addGoal(5, new MeleeAttackGoal(this, 1.0, true)); this.goalSelector.addGoal(6, new FollowOwnerGoal(this, 1.0, 10.0F, 2.0F)); -@@ -136,11 +254,12 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -135,11 +253,12 @@ public class Wolf extends TamableAnimal implements NeutralMob { this.goalSelector.addGoal(9, new BegGoal(this, 8.0F)); this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(10, new RandomLookAroundGoal(this)); @@ -7408,29 +7454,29 @@ index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248 this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR)); this.targetSelector.addGoal(7, new NearestAttackableTargetGoal<>(this, AbstractSkeleton.class, false)); this.targetSelector.addGoal(8, new ResetUniversalAngerTargetGoal<>(this, true)); -@@ -231,6 +350,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor()); -+ compound.putBoolean("Purpur.IsRabid", this.isRabid); // Purpur - Configurable chance for wolves to spawn rabid - VariantUtils.writeVariant(compound, this.getVariant()); - this.addPersistentAngerSaveData(compound); +@@ -230,6 +349,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); + output.store("CollarColor", DyeColor.LEGACY_ID_CODEC, this.getCollarColor()); ++ output.putBoolean("Purpur.IsRabid", this.isRabid); // Purpur - Configurable chance for wolves to spawn rabid + VariantUtils.writeVariant(output, this.getVariant()); + this.addPersistentAngerSaveData(output); this.getSoundVariant() -@@ -245,6 +365,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { - super.readAdditionalSaveData(compound); - VariantUtils.readVariant(compound, this.registryAccess(), Registries.WOLF_VARIANT).ifPresent(this::setVariant); - this.setCollarColor(compound.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR)); +@@ -244,6 +364,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { + super.readAdditionalSaveData(input); + VariantUtils.readVariant(input, Registries.WOLF_VARIANT).ifPresent(this::setVariant); + this.setCollarColor(input.read("CollarColor", DyeColor.LEGACY_ID_CODEC).orElse(DEFAULT_COLLAR_COLOR)); + // Purpur start - Configurable chance for wolves to spawn rabid -+ this.isRabid = compound.getBooleanOr("Purpur.IsRabid", false); ++ this.isRabid = input.getBooleanOr("Purpur.IsRabid", false); + this.updatePathfinders(false); + // Purpur end - Configurable chance for wolves to spawn rabid - this.readPersistentAngerSaveData(this.level(), compound); - compound.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT)) + this.readPersistentAngerSaveData(this.level(), input); + input.read("sound_variant", ResourceKey.codec(Registries.WOLF_SOUND_VARIANT)) .flatMap(resourceKey -> this.registryAccess().lookupOrThrow(Registries.WOLF_SOUND_VARIANT).get((ResourceKey)resourceKey)) -@@ -269,6 +393,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -268,6 +392,10 @@ public class Wolf extends TamableAnimal implements NeutralMob { } - this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), this.random)); + this.setSoundVariant(WolfSoundVariants.pickRandomSoundVariant(this.registryAccess(), level.getRandom())); + // Purpur start - Configurable chance for wolves to spawn rabid + this.isRabid = level.getLevel().purpurConfig.wolfNaturalRabid > 0.0D && random.nextDouble() <= level.getLevel().purpurConfig.wolfNaturalRabid; + this.updatePathfinders(false); @@ -7438,7 +7484,7 @@ index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248 return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } -@@ -319,6 +447,11 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -318,6 +446,11 @@ public class Wolf extends TamableAnimal implements NeutralMob { public void tick() { super.tick(); if (this.isAlive()) { @@ -7450,7 +7496,7 @@ index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248 this.interestedAngleO = this.interestedAngle; if (this.isInterested()) { this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F; -@@ -532,13 +665,27 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -519,13 +652,27 @@ public class Wolf extends TamableAnimal implements NeutralMob { itemInHand.consume(1, player); this.tryToTame(player); return InteractionResult.SUCCESS_SERVER; @@ -7480,10 +7526,10 @@ index d926ecd041ca2a421057bc22efe66a8b811ee649..936ee9e80239ad965be75ceeb38d5248 this.navigation.stop(); this.setTarget(null); diff --git a/net/minecraft/world/entity/boss/EnderDragonPart.java b/net/minecraft/world/entity/boss/EnderDragonPart.java -index 31f064267514e590944ad809c95915b481e65aaa..c8bc09c3fe27e69360027698c41fd51a111ffa66 100644 +index c9443cbde85109b19e6c84274c562d83a229c763..ec82bd00f7be253beac1dfbe00a36d25daa11775 100644 --- a/net/minecraft/world/entity/boss/EnderDragonPart.java +++ b/net/minecraft/world/entity/boss/EnderDragonPart.java -@@ -27,6 +27,13 @@ public class EnderDragonPart extends Entity { +@@ -28,6 +28,13 @@ public class EnderDragonPart extends Entity { this.name = name; } @@ -7498,10 +7544,10 @@ index 31f064267514e590944ad809c95915b481e65aaa..c8bc09c3fe27e69360027698c41fd51a protected void defineSynchedData(SynchedEntityData.Builder builder) { } diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -index d813427cf20117014bc42af0eb7cdee037fbcd9c..90ac1e4bdca5b6233eeae9bc84549770bed383da 100644 +index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..220a828717e1933a44c5282b56713ba0053d2440 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java +++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java -@@ -26,6 +26,12 @@ public class EndCrystal extends Entity { +@@ -27,6 +27,12 @@ public class EndCrystal extends Entity { private static final boolean DEFAULT_SHOW_BOTTOM = true; public int time; public boolean generatedByDragonFight = false; // Paper - Fix invulnerable end crystals @@ -7514,7 +7560,7 @@ index d813427cf20117014bc42af0eb7cdee037fbcd9c..90ac1e4bdca5b6233eeae9bc84549770 public EndCrystal(EntityType entityType, Level level) { super(entityType, level); -@@ -38,6 +44,24 @@ public class EndCrystal extends Entity { +@@ -39,6 +45,24 @@ public class EndCrystal extends Entity { this.setPos(x, y, z); } @@ -7539,7 +7585,7 @@ index d813427cf20117014bc42af0eb7cdee037fbcd9c..90ac1e4bdca5b6233eeae9bc84549770 @Override protected Entity.MovementEmission getMovementEmission() { return Entity.MovementEmission.NONE; -@@ -74,6 +98,51 @@ public class EndCrystal extends Entity { +@@ -75,6 +99,51 @@ public class EndCrystal extends Entity { } } // Paper end - Fix invulnerable end crystals @@ -7591,7 +7637,7 @@ index d813427cf20117014bc42af0eb7cdee037fbcd9c..90ac1e4bdca5b6233eeae9bc84549770 } @Override -@@ -114,15 +183,17 @@ public class EndCrystal extends Entity { +@@ -115,15 +184,17 @@ public class EndCrystal extends Entity { } // CraftBukkit end if (!damageSource.is(DamageTypeTags.IS_EXPLOSION)) { @@ -7612,10 +7658,10 @@ index d813427cf20117014bc42af0eb7cdee037fbcd9c..90ac1e4bdca5b6233eeae9bc84549770 this.remove(Entity.RemovalReason.KILLED, org.bukkit.event.entity.EntityRemoveEvent.Cause.DEATH); // Paper - add Bukkit remove cause // CraftBukkit end diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c1dd87f4e 100644 +index 84d215a498d9bf6f1232bf4af5a4a98d3ba9b131..de09a91b89661118e460842453e33f383ea08a94 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -91,6 +91,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -92,6 +92,7 @@ public class EnderDragon extends Mob implements Enemy { private final net.minecraft.world.level.Explosion explosionSource; // Paper - reusable source for CraftTNTPrimed.getSource() @Nullable private BlockPos podium; // Paper end @@ -7623,7 +7669,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c public EnderDragon(EntityType entityType, Level level) { super(EntityType.ENDER_DRAGON, level); -@@ -107,6 +108,37 @@ public class EnderDragon extends Mob implements Enemy { +@@ -108,6 +109,37 @@ public class EnderDragon extends Mob implements Enemy { this.noPhysics = true; this.phaseManager = new EnderDragonPhaseManager(this); this.explosionSource = new net.minecraft.world.level.ServerExplosion(level.getMinecraftWorld(), this, null, null, new Vec3(Double.NaN, Double.NaN, Double.NaN), Float.NaN, true, net.minecraft.world.level.Explosion.BlockInteraction.DESTROY); // Paper @@ -7661,7 +7707,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c } public void setDragonFight(EndDragonFight dragonFight) { -@@ -121,6 +153,31 @@ public class EnderDragon extends Mob implements Enemy { +@@ -122,6 +154,31 @@ public class EnderDragon extends Mob implements Enemy { return this.fightOrigin; } @@ -7691,9 +7737,9 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c + // Purpur end - Toggle for water sensitive mob damage + public static AttributeSupplier.Builder createAttributes() { - return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0); + return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0).add(Attributes.CAMERA_DISTANCE, 16.0); } -@@ -170,6 +227,37 @@ public class EnderDragon extends Mob implements Enemy { +@@ -171,6 +228,37 @@ public class EnderDragon extends Mob implements Enemy { @Override public void aiStep() { @@ -7731,7 +7777,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c this.processFlappingMovement(); if (this.level().isClientSide) { this.setHealth(this.getHealth()); -@@ -198,6 +286,8 @@ public class EnderDragon extends Mob implements Enemy { +@@ -199,6 +287,8 @@ public class EnderDragon extends Mob implements Enemy { this.oFlapTime = this.flapTime; if (this.isDeadOrDying()) { @@ -7740,7 +7786,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c float f = (this.random.nextFloat() - 0.5F) * 8.0F; float f1 = (this.random.nextFloat() - 0.5F) * 4.0F; float f2 = (this.random.nextFloat() - 0.5F) * 8.0F; -@@ -207,9 +297,9 @@ public class EnderDragon extends Mob implements Enemy { +@@ -208,9 +298,9 @@ public class EnderDragon extends Mob implements Enemy { Vec3 deltaMovement = this.getDeltaMovement(); float f1 = 0.2F / ((float)deltaMovement.horizontalDistance() * 10.0F + 1.0F); f1 *= (float)Math.pow(2.0, deltaMovement.y); @@ -7752,7 +7798,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c this.flapTime += f1 * 0.5F; } else { this.flapTime += f1; -@@ -220,7 +310,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -221,7 +311,7 @@ public class EnderDragon extends Mob implements Enemy { this.flapTime = 0.5F; } else { this.flightHistory.record(this.getY(), this.getYRot()); @@ -7761,7 +7807,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c DragonPhaseInstance currentPhase = this.phaseManager.getCurrentPhase(); currentPhase.doServerTick(serverLevel1); if (this.phaseManager.getCurrentPhase() != currentPhase) { -@@ -295,7 +385,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -296,7 +386,7 @@ public class EnderDragon extends Mob implements Enemy { this.tickPart(this.body, sin1 * 0.5F, 0.0, -cos1 * 0.5F); this.tickPart(this.wing1, cos1 * 4.5F, 2.0, sin1 * 4.5F); this.tickPart(this.wing2, cos1 * -4.5F, 2.0, sin1 * -4.5F); @@ -7770,7 +7816,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c this.knockBack( serverLevel2, serverLevel2.getEntities( -@@ -345,9 +435,9 @@ public class EnderDragon extends Mob implements Enemy { +@@ -346,9 +436,9 @@ public class EnderDragon extends Mob implements Enemy { } if (this.level() instanceof ServerLevel serverLevel3) { @@ -7782,7 +7828,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c if (this.dragonFight != null) { this.dragonFight.updateDragon(this); } -@@ -460,7 +550,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -461,7 +551,7 @@ public class EnderDragon extends Mob implements Enemy { BlockPos blockPos = new BlockPos(i, i1, i2); BlockState blockState = level.getBlockState(blockPos); if (!blockState.isAir() && !blockState.is(BlockTags.DRAGON_TRANSPARENT)) { @@ -7791,7 +7837,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c // CraftBukkit start - Add blocks to list rather than destroying them //flag1 = level.removeBlock(blockPos, false) || flag1; flag1 = true; -@@ -960,6 +1050,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -961,6 +1051,7 @@ public class EnderDragon extends Mob implements Enemy { @Override protected boolean canRide(Entity entity) { @@ -7799,7 +7845,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c return false; } -@@ -985,7 +1076,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -986,7 +1077,7 @@ public class EnderDragon extends Mob implements Enemy { @Override protected float sanitizeScale(float scale) { @@ -7808,7 +7854,7 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c } // CraftBukkit start - SPIGOT-2420: Special case, the ender dragon drops 12000 xp for the first kill and 500 xp for every other kill and this over time. -@@ -995,7 +1086,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -996,7 +1087,7 @@ public class EnderDragon extends Mob implements Enemy { boolean flag = level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT); int i = 500; @@ -7818,10 +7864,10 @@ index 0f3c88601357399d3b8efd2f0e3a531482bc1f3d..6305e56f38e25f330b0eaf8ab5b9258c } diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06051659bd 100644 +index 787b74c5aa02afc4ba95fa1cdaf6cc21b6554b56..0613d80561f50e32dc4d1c471521f001659d017d 100644 --- a/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -70,6 +70,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -71,6 +71,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { private final int[] nextHeadUpdate = new int[2]; private final int[] idleHeadUpdates = new int[2]; private int destroyBlocksTick; @@ -7829,7 +7875,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 private boolean canPortal = false; // Paper public final ServerBossEvent bossEvent = (ServerBossEvent)new ServerBossEvent( this.getDisplayName(), BossEvent.BossBarColor.PURPLE, BossEvent.BossBarOverlay.PROGRESS -@@ -78,14 +79,161 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -79,14 +80,161 @@ public class WitherBoss extends Monster implements RangedAttackMob { private static final TargetingConditions.Selector LIVING_ENTITY_SELECTOR = (entity, level) -> !entity.getType().is(EntityTypeTags.WITHER_FRIENDS) && entity.attackable(); private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0).selector(LIVING_ENTITY_SELECTOR); @@ -7991,7 +8037,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 @Override protected PathNavigation createNavigation(Level level) { FlyingPathNavigation flyingPathNavigation = new FlyingPathNavigation(this, level); -@@ -96,11 +244,13 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -97,11 +245,13 @@ public class WitherBoss extends Monster implements RangedAttackMob { @Override protected void registerGoals() { @@ -8005,23 +8051,23 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 this.targetSelector.addGoal(1, new HurtByTargetGoal(this)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, LivingEntity.class, 0, false, false, LIVING_ENTITY_SELECTOR)); } -@@ -118,6 +268,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Invul", this.getInvulnerableTicks()); -+ compound.storeNullable("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC, getSummoner()); // Purpur - Summoner API +@@ -119,6 +269,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); + output.putInt("Invul", this.getInvulnerableTicks()); ++ output.storeNullable("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC, getSummoner()); // Purpur - Summoner API } @Override -@@ -127,6 +278,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -128,6 +279,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { if (this.hasCustomName()) { this.bossEvent.setName(this.getDisplayName()); } -+ this.setSummoner(compound.read("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC).orElse(null)); // Purpur - Summoner API ++ this.setSummoner(input.read("Purpur.Summoner", net.minecraft.core.UUIDUtil.CODEC).orElse(null)); // Purpur - Summoner API } @Override -@@ -258,6 +410,15 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -259,6 +411,15 @@ public class WitherBoss extends Monster implements RangedAttackMob { @Override protected void customServerAiStep(ServerLevel level) { @@ -8037,7 +8083,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 if (this.getInvulnerableTicks() > 0) { int i = this.getInvulnerableTicks() - 1; this.bossEvent.setProgress(1.0F - i / 220.0F); -@@ -270,7 +431,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -271,7 +432,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); } // CraftBukkit end @@ -8046,7 +8092,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 // CraftBukkit start - Use relative location for far away sounds // level.globalLevelEvent(1023, this.blockPosition(), 0); int viewDistance = level.getCraftServer().getViewDistance() * 16; -@@ -295,7 +456,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -296,7 +457,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { this.setInvulnerableTicks(i); if (this.tickCount % 10 == 0) { @@ -8055,7 +8101,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 } } else { super.customServerAiStep(level); -@@ -347,7 +508,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -348,7 +509,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { if (this.destroyBlocksTick > 0) { this.destroyBlocksTick--; @@ -8064,7 +8110,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 boolean flag = false; int alternativeTarget = Mth.floor(this.getBbWidth() / 2.0F + 1.0F); int floor = Mth.floor(this.getBbHeight()); -@@ -377,8 +538,10 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -378,8 +539,10 @@ public class WitherBoss extends Monster implements RangedAttackMob { } } @@ -8077,7 +8123,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 } this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); -@@ -562,11 +725,11 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -563,11 +726,11 @@ public class WitherBoss extends Monster implements RangedAttackMob { } public int getAlternativeTarget(int head) { @@ -8091,7 +8137,7 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 } public boolean isPowered() { -@@ -575,6 +738,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { +@@ -576,6 +739,7 @@ public class WitherBoss extends Monster implements RangedAttackMob { @Override protected boolean canRide(Entity entity) { @@ -8100,11 +8146,11 @@ index 09924cccf9208abda22cc7e1635b567ed166e95a..633a3d351fe613a4e4e531cd9e891f06 } diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java -index 1297f585753c53275e8e54e41b2e718b44aee1bf..0417175c7beabbca53cd080d158001eabe3941f0 100644 +index 5ee368580d878a3845349c3d50cc0dc549c42cab..83fdd22eeb141079e05018ebf5cef70e7eb78726 100644 --- a/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -95,10 +95,13 @@ public class ArmorStand extends LivingEntity { - private boolean noTickPoseDirty = false; +@@ -91,10 +91,13 @@ public class ArmorStand extends LivingEntity { + public boolean canTickSetByAPI = false; public boolean noTickEquipmentDirty = false; // Paper end - Allow ArmorStands not to tick + public boolean canMovementTick = true; // Purpur - Movement options for armor stands @@ -8117,7 +8163,7 @@ index 1297f585753c53275e8e54e41b2e718b44aee1bf..0417175c7beabbca53cd080d158001ea } public ArmorStand(Level level, double x, double y, double z) { -@@ -489,6 +492,7 @@ public class ArmorStand extends LivingEntity { +@@ -447,6 +450,7 @@ public class ArmorStand extends LivingEntity { private org.bukkit.event.entity.EntityDeathEvent brokenByPlayer(ServerLevel level, DamageSource damageSource) { // Paper ItemStack itemStack = new ItemStack(Items.ARMOR_STAND); @@ -8125,15 +8171,15 @@ index 1297f585753c53275e8e54e41b2e718b44aee1bf..0417175c7beabbca53cd080d158001ea itemStack.set(DataComponents.CUSTOM_NAME, this.getCustomName()); this.drops.add(new DefaultDrop(itemStack, stack -> Block.popResource(this.level(), this.blockPosition(), stack))); // CraftBukkit - add to drops // Paper - Restore vanilla drops behavior return this.brokenByAnything(level, damageSource); // Paper -@@ -546,6 +550,7 @@ public class ArmorStand extends LivingEntity { - +@@ -521,6 +525,7 @@ public class ArmorStand extends LivingEntity { + // Paper start - Allow ArmorStands not to tick @Override public void tick() { + maxUpStep = level().purpurConfig.armorstandStepHeight; // Purpur - Add option to set armorstand step height - // Paper start - Allow ArmorStands not to tick if (!this.canTick) { - if (this.noTickPoseDirty) { -@@ -875,4 +880,18 @@ public class ArmorStand extends LivingEntity { + if (this.noTickEquipmentDirty) { + this.noTickEquipmentDirty = false; +@@ -811,4 +816,18 @@ public class ArmorStand extends LivingEntity { } } // Paper end @@ -8153,10 +8199,10 @@ index 1297f585753c53275e8e54e41b2e718b44aee1bf..0417175c7beabbca53cd080d158001ea + // Purpur end - Movement options for armor stands } diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java -index f9a97000b75db7999b1cbe1f72d680d4d7b803b7..9dfadb5639e840e69274b35f3366322141527104 100644 +index 90fd3ca5ecd29befa9237222e9f86a8a79a011e4..7e96617f0d5e8777873b4c2cccd012d656612f96 100644 --- a/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/net/minecraft/world/entity/decoration/ItemFrame.java -@@ -232,7 +232,11 @@ public class ItemFrame extends HangingEntity { +@@ -237,7 +237,11 @@ public class ItemFrame extends HangingEntity { this.removeFramedMap(item); } else { if (dropItem) { @@ -8170,10 +8216,10 @@ index f9a97000b75db7999b1cbe1f72d680d4d7b803b7..9dfadb5639e840e69274b35f33663221 if (!item.isEmpty()) { diff --git a/net/minecraft/world/entity/decoration/Painting.java b/net/minecraft/world/entity/decoration/Painting.java -index 3f13bb1ad260d250efe2622297e432dc300e73a0..b1ee059501532cc2df5f0824e5becbd2bc6727b2 100644 +index cc34cadac8896a5f546d0879e795fea08d0c3f98..26a08b16de2318d5080be59a29c5f11e3597426d 100644 --- a/net/minecraft/world/entity/decoration/Painting.java +++ b/net/minecraft/world/entity/decoration/Painting.java -@@ -179,7 +179,11 @@ public class Painting extends HangingEntity { +@@ -182,7 +182,11 @@ public class Painting extends HangingEntity { if (level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { this.playSound(SoundEvents.PAINTING_BREAK, 1.0F, 1.0F); if (!(entity instanceof Player player && player.hasInfiniteMaterials())) { @@ -8187,10 +8233,10 @@ index 3f13bb1ad260d250efe2622297e432dc300e73a0..b1ee059501532cc2df5f0824e5becbd2 } } diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index bf2f81232ac40218c6d0241b7a0a26cb2272e06b..883a053d025e74f73556a0affa2340e42365df59 100644 +index fcb1f6806908eb66592dc52f2b57286498cf7032..7dc97fccfd329253e0f6532d1cc2c06264674e15 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -59,6 +59,12 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -56,6 +56,12 @@ public class ItemEntity extends Entity implements TraceableEntity { public boolean canMobPickup = true; // Paper - Item#canEntityPickup private int despawnRate = -1; // Paper - Alternative item-despawn-rate public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API @@ -8203,7 +8249,7 @@ index bf2f81232ac40218c6d0241b7a0a26cb2272e06b..883a053d025e74f73556a0affa2340e4 public ItemEntity(EntityType entityType, Level level) { super(entityType, level); -@@ -372,7 +378,16 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -370,7 +376,16 @@ public class ItemEntity extends Entity implements TraceableEntity { @Override public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { @@ -8221,7 +8267,7 @@ index bf2f81232ac40218c6d0241b7a0a26cb2272e06b..883a053d025e74f73556a0affa2340e4 return false; } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { return false; -@@ -556,6 +571,12 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -549,6 +564,12 @@ public class ItemEntity extends Entity implements TraceableEntity { public void setItem(ItemStack stack) { this.getEntityData().set(DATA_ITEM, stack); this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper - Alternative item-despawn-rate @@ -8235,10 +8281,10 @@ index bf2f81232ac40218c6d0241b7a0a26cb2272e06b..883a053d025e74f73556a0affa2340e4 @Override diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java -index 5d23d8754b304d5e2fd54400cc81c7fe5c14a804..9a00aead39e194de076ee651d2f75b29673cad1e 100644 +index 17d54d38dcec39eefeb989cd576cc640a36e82f5..ef070f8a9ab3a4676e2141f7c0bc20a000d0cc3a 100644 --- a/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -253,4 +253,32 @@ public class PrimedTnt extends Entity implements TraceableEntity { +@@ -238,4 +238,32 @@ public class PrimedTnt extends Entity implements TraceableEntity { return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid(); } // Paper end - Option to prevent TNT from moving in water @@ -8272,7 +8318,7 @@ index 5d23d8754b304d5e2fd54400cc81c7fe5c14a804..9a00aead39e194de076ee651d2f75b29 + // Purpur end - Shears can defuse TNT } diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java -index 22d5ccb271fc19255e99afa5d1ff10549a20dc31..21cf84f1d037e3e387a3e254599673125f89ba9c 100644 +index 894a3d988d0530d42d3a282b61cdb445a0f820ad..482de769f1b1fc0eac176cbc41a96f639dcc2d2d 100644 --- a/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java @@ -64,21 +64,24 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @@ -8342,29 +8388,29 @@ index 22d5ccb271fc19255e99afa5d1ff10549a20dc31..21cf84f1d037e3e387a3e25459967312 this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); this.setDropChance(EquipmentSlot.HEAD, 0.0F); } -@@ -217,7 +197,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - if (event.getProjectile() == arrow.getBukkitEntity()) { - // CraftBukkit end - Projectile.spawnProjectileUsingShoot( +@@ -209,7 +189,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + double squareRoot = Math.sqrt(d * d + d2 * d2); + if (this.level() instanceof ServerLevel serverLevel) { + Projectile.Delayed delayedEntity = Projectile.spawnProjectileUsingShootDelayed( // Paper - delayed - arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, 14 - serverLevel.getDifficulty().getId() * 4 -+ arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, serverLevel.purpurConfig.skeletonBowAccuracyMap.getOrDefault(serverLevel.getDifficulty().getId(), (float) (14 - serverLevel.getDifficulty().getId() * 4)) // Purpur - skeleton bow accuracy option ++ arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, serverLevel.purpurConfig.skeletonBowAccuracyMap.getOrDefault(serverLevel.getDifficulty().getId(), (float) (14 - serverLevel.getDifficulty().getId() * 4)) // Purpur - skeleton bow accuracy option ); - } // CraftBukkit - } -@@ -243,14 +223,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); + + // Paper start - call EntityShootBowEvent +@@ -246,14 +226,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + protected void readAdditionalSaveData(ValueInput input) { + super.readAdditionalSaveData(input); this.reassessWeaponGoal(); -- this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - shouldBurnInDay API -+ //this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - shouldBurnInDay API // Purpur - implemented in LivingEntity - API for any mob to burn daylight +- this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - shouldBurnInDay API ++ //this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - shouldBurnInDay API // Purpur - implemented in LivingEntity - API for any mob to burn daylight } // Paper start - shouldBurnInDay API @Override - public void addAdditionalSaveData(final net.minecraft.nbt.CompoundTag nbt) { - super.addAdditionalSaveData(nbt); -- nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); -+ //nbt.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - implemented in LivingEntity - API for any mob to burn daylight + protected void addAdditionalSaveData(final net.minecraft.world.level.storage.ValueOutput output) { + super.addAdditionalSaveData(output); +- output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); ++ //output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - implemented in LivingEntity - API for any mob to burn daylight } // Paper end - shouldBurnInDay API @@ -8474,10 +8520,10 @@ index 4ab7072b4290db7fbe72f81b89d3c428b05f737c..fa21b7dba208d5ba6ecf1d2b68965bb5 if (this.nextHeightOffsetChangeTick <= 0) { this.nextHeightOffsetChangeTick = 100; diff --git a/net/minecraft/world/entity/monster/Bogged.java b/net/minecraft/world/entity/monster/Bogged.java -index c279d38ed8d5d0fef6dea4afdc3ab308456f31a7..bc8f46b656895d916e44a9e1dc9175da96c2fde8 100644 +index afb4cee70d0feecab93d943baf7ddfd83ad7f3b5..cace310ad4ad320a8a5745c6af3ec4b57e75b6a5 100644 --- a/net/minecraft/world/entity/monster/Bogged.java +++ b/net/minecraft/world/entity/monster/Bogged.java -@@ -42,6 +42,31 @@ public class Bogged extends AbstractSkeleton implements Shearable { +@@ -43,6 +43,31 @@ public class Bogged extends AbstractSkeleton implements Shearable { super(entityType, level); } @@ -8560,10 +8606,10 @@ index 2e32567fca7a2a4cd87bc078a6eeb30e3ffabfce..7eca4b751d900c6d6ee34993c3e23681 public boolean doHurtTarget(ServerLevel level, Entity source) { if (super.doHurtTarget(level, source)) { diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java -index 3f5e1e98802e5dd1cfc9075559e1102046605a04..567e1bc0bb2e96f831206e70612dfe8bcb825b74 100644 +index eabc778ba06c14f3020391b9850ae1a283ecf106..2839c755e5ca58896bc14f95ce4889d48ec415b3 100644 --- a/net/minecraft/world/entity/monster/Creeper.java +++ b/net/minecraft/world/entity/monster/Creeper.java -@@ -54,21 +54,107 @@ public class Creeper extends Monster { +@@ -55,21 +55,107 @@ public class Creeper extends Monster { public int explosionRadius = 3; private int droppedSkulls; public @Nullable Entity entityIgniter; // CraftBukkit @@ -8671,7 +8717,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..567e1bc0bb2e96f831206e70612dfe8b this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(2, new HurtByTargetGoal(this)); } -@@ -157,6 +243,41 @@ public class Creeper extends Monster { +@@ -158,6 +244,41 @@ public class Creeper extends Monster { return false; // CraftBukkit } @@ -8713,7 +8759,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..567e1bc0bb2e96f831206e70612dfe8b @Override public SoundEvent getHurtSound(DamageSource damageSource) { return SoundEvents.CREEPER_HURT; -@@ -239,14 +360,16 @@ public class Creeper extends Monster { +@@ -240,14 +361,16 @@ public class Creeper extends Monster { } public void explodeCreeper() { @@ -8732,7 +8778,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..567e1bc0bb2e96f831206e70612dfe8b this.spawnLingeringCloud(); this.triggerOnDeathMobEffects(serverLevel, Entity.RemovalReason.KILLED); this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause -@@ -257,6 +380,7 @@ public class Creeper extends Monster { +@@ -258,6 +381,7 @@ public class Creeper extends Monster { } // CraftBukkit end } @@ -8740,7 +8786,7 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..567e1bc0bb2e96f831206e70612dfe8b } private void spawnLingeringCloud() { -@@ -285,6 +409,7 @@ public class Creeper extends Monster { +@@ -286,6 +410,7 @@ public class Creeper extends Monster { com.destroystokyo.paper.event.entity.CreeperIgniteEvent event = new com.destroystokyo.paper.event.entity.CreeperIgniteEvent((org.bukkit.entity.Creeper) getBukkitEntity(), ignited); if (event.callEvent()) { this.entityData.set(DATA_IS_IGNITED, event.isIgnited()); @@ -8749,10 +8795,10 @@ index 3f5e1e98802e5dd1cfc9075559e1102046605a04..567e1bc0bb2e96f831206e70612dfe8b } } diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba89c4397e 100644 +index f42f9c232fa588835654de0fdea36b9cdfa34571..2e6d0f035a01277aa28bbe912d5df8dc4cf04547 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -75,6 +75,67 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -71,11 +71,72 @@ public class Drowned extends Zombie implements RangedAttackMob { return Zombie.createAttributes().add(Attributes.STEP_HEIGHT, 1.0); } @@ -8773,6 +8819,11 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba + } + // Purpur end - Ridables + + @Override + protected PathNavigation createNavigation(Level level) { + return new AmphibiousPathNavigation(this, level); + } + + // Purpur start - Configurable entity base attributes + @Override + public void initAttributes() { @@ -8820,7 +8871,7 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba @Override protected void addBehaviourGoals() { this.goalSelector.addGoal(1, new Drowned.DrownedGoToWaterGoal(this, 1.0)); -@@ -82,10 +143,23 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -83,10 +144,23 @@ public class Drowned extends Zombie implements RangedAttackMob { this.goalSelector.addGoal(2, new Drowned.DrownedAttackGoal(this, 1.0, false)); this.goalSelector.addGoal(5, new Drowned.DrownedGoToBeachGoal(this, 1.0)); this.goalSelector.addGoal(6, new Drowned.DrownedSwimUpGoal(this, 1.0, this.level().getSeaLevel())); @@ -8845,7 +8896,7 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Axolotl.class, true, false)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); -@@ -398,7 +472,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -392,7 +466,7 @@ public class Drowned extends Zombie implements RangedAttackMob { } } @@ -8854,7 +8905,7 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba private final Drowned drowned; public DrownedMoveControl(Drowned mob) { -@@ -407,7 +481,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -401,7 +475,7 @@ public class Drowned extends Zombie implements RangedAttackMob { } @Override @@ -8863,7 +8914,7 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba LivingEntity target = this.drowned.getTarget(); if (this.drowned.wantsToSwim() && this.drowned.isInWater()) { if (target != null && target.getY() > this.drowned.getY() || this.drowned.searchingForLand) { -@@ -427,7 +501,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -421,7 +495,7 @@ public class Drowned extends Zombie implements RangedAttackMob { float f = (float)(Mth.atan2(d2, d) * 180.0F / (float)Math.PI) - 90.0F; this.drowned.setYRot(this.rotlerp(this.drowned.getYRot(), f, 90.0F)); this.drowned.yBodyRot = this.drowned.getYRot(); @@ -8872,7 +8923,7 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba float f2 = Mth.lerp(0.125F, this.drowned.getSpeed(), f1); this.drowned.setSpeed(f2); this.drowned.setDeltaMovement(this.drowned.getDeltaMovement().add(f2 * d * 0.005, f2 * d1 * 0.1, f2 * d2 * 0.005)); -@@ -436,7 +510,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -430,7 +504,7 @@ public class Drowned extends Zombie implements RangedAttackMob { this.drowned.setDeltaMovement(this.drowned.getDeltaMovement().add(0.0, -0.008, 0.0)); } @@ -8882,7 +8933,7 @@ index 4978cd2a7a84130fc0de1cc481b39d61f388c812..b85d1e196d2bf61ac4896205afb08eba } } diff --git a/net/minecraft/world/entity/monster/ElderGuardian.java b/net/minecraft/world/entity/monster/ElderGuardian.java -index fd33a8b59f40299ab644a4c52921b66a9b6552ca..a708692a71014aabc1fc842837e1c0a82fd3a343 100644 +index 7eef05b988d52391ab061382fd8898705c705e03..ab1c050ff326a072e817a05958b8f4ec803af063 100644 --- a/net/minecraft/world/entity/monster/ElderGuardian.java +++ b/net/minecraft/world/entity/monster/ElderGuardian.java @@ -31,6 +31,40 @@ public class ElderGuardian extends Guardian { @@ -8927,10 +8978,10 @@ index fd33a8b59f40299ab644a4c52921b66a9b6552ca..a708692a71014aabc1fc842837e1c0a8 return Guardian.createAttributes().add(Attributes.MOVEMENT_SPEED, 0.3F).add(Attributes.ATTACK_DAMAGE, 8.0).add(Attributes.MAX_HEALTH, 80.0); } diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java -index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b6fa473e0 100644 +index 9b0235c50426accde002cbb0a09a992f13b05cd7..58887b2cc931892f96793edd7a7d1db22cb8686c 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -88,12 +88,45 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -86,12 +86,45 @@ public class EnderMan extends Monster implements NeutralMob { public EnderMan(EntityType entityType, Level level) { super(entityType, level); @@ -8977,7 +9028,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b this.goalSelector.addGoal(1, new EnderMan.EndermanFreezeWhenLookedAt(this)); this.goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.0, false)); this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0, 0.0F)); -@@ -101,9 +134,10 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -99,9 +132,10 @@ public class EnderMan extends Monster implements NeutralMob { this.goalSelector.addGoal(8, new RandomLookAroundGoal(this)); this.goalSelector.addGoal(10, new EnderMan.EndermanLeaveBlockGoal(this)); this.goalSelector.addGoal(11, new EnderMan.EndermanTakeBlockGoal(this)); @@ -8989,7 +9040,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false)); } -@@ -220,7 +254,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -216,7 +250,7 @@ public class EnderMan extends Monster implements NeutralMob { boolean isBeingStaredBy(Player player) { // Paper start - EndermanAttackPlayerEvent @@ -8998,7 +9049,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b final com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent event = new com.destroystokyo.paper.event.entity.EndermanAttackPlayerEvent((org.bukkit.entity.Enderman) getBukkitEntity(), (org.bukkit.entity.Player) player.getBukkitEntity()); event.setCancelled(!shouldAttack); return event.callEvent(); -@@ -258,12 +292,12 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -254,12 +288,12 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean isSensitiveToWater() { @@ -9013,7 +9064,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b float lightLevelDependentMagicValue = this.getLightLevelDependentMagicValue(); if (lightLevelDependentMagicValue > 0.5F && level.canSeeSky(this.blockPosition()) -@@ -384,6 +418,8 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -380,6 +414,8 @@ public class EnderMan extends Monster implements NeutralMob { public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { if (this.isInvulnerableTo(level, damageSource)) { return false; @@ -9022,7 +9073,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b } else { AbstractThrownPotion abstractThrownPotion1 = damageSource.getDirectEntity() instanceof AbstractThrownPotion abstractThrownPotion ? abstractThrownPotion -@@ -400,6 +436,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -396,6 +432,7 @@ public class EnderMan extends Monster implements NeutralMob { } else { boolean flag = abstractThrownPotion1 != null && this.hurtWithCleanWater(level, damageSource, abstractThrownPotion1, amount); @@ -9030,7 +9081,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - EndermanEscapeEvent for (int i = 0; i < 64; i++) { if (this.teleport()) { -@@ -443,7 +480,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -439,7 +476,7 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean requiresCustomPersistence() { @@ -9039,7 +9090,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b } static class EndermanFreezeWhenLookedAt extends Goal { -@@ -487,8 +524,9 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -483,8 +520,9 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean canUse() { @@ -9050,7 +9101,7 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b && this.enderman.getRandom().nextInt(reducedTickDelay(2000)) == 0; } -@@ -636,8 +674,9 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -632,8 +670,9 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean canUse() { @@ -9062,10 +9113,10 @@ index 84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb..16886178079a096329d06f40d502012b } diff --git a/net/minecraft/world/entity/monster/Endermite.java b/net/minecraft/world/entity/monster/Endermite.java -index 7fad96756972308e71fd38033f06148467a7aecd..7d3932dcb263500357e9aad28881229418a0d458 100644 +index f448aac89c6125246c730a71e7ee21c8168d7003..4ea0e5f24664a1c8f2c8bdae559784434374adf6 100644 --- a/net/minecraft/world/entity/monster/Endermite.java +++ b/net/minecraft/world/entity/monster/Endermite.java -@@ -29,20 +29,72 @@ public class Endermite extends Monster { +@@ -30,20 +30,72 @@ public class Endermite extends Monster { private static final int MAX_LIFE = 2400; private static final int DEFAULT_LIFE = 0; public int life = 0; @@ -9138,26 +9189,26 @@ index 7fad96756972308e71fd38033f06148467a7aecd..7d3932dcb263500357e9aad288812294 this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers()); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); } -@@ -80,12 +132,14 @@ public class Endermite extends Monster { - public void readAdditionalSaveData(CompoundTag compound) { - super.readAdditionalSaveData(compound); - this.life = compound.getIntOr("Lifetime", 0); -+ this.isPlayerSpawned = compound.getBooleanOr("PlayerSpawned", false); // Purpur - Add back player spawned endermite API +@@ -81,12 +133,14 @@ public class Endermite extends Monster { + protected void readAdditionalSaveData(ValueInput input) { + super.readAdditionalSaveData(input); + this.life = input.getIntOr("Lifetime", 0); ++ this.isPlayerSpawned = input.getBooleanOr("PlayerSpawned", false); // Purpur - Add back player spawned endermite API } @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); - compound.putInt("Lifetime", this.life); -+ compound.putBoolean("PlayerSpawned", this.isPlayerSpawned); // Purpur - Add back player spawned endermite API + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); + output.putInt("Lifetime", this.life); ++ output.putBoolean("PlayerSpawned", this.isPlayerSpawned); // Purpur - Add back player spawned endermite API } @Override diff --git a/net/minecraft/world/entity/monster/Evoker.java b/net/minecraft/world/entity/monster/Evoker.java -index cf9f0c60efc4f7cbc275ed9b154c979e82b4d50c..76b1886e78918eccb8e2ecfe6dca033fcad5f9e1 100644 +index 7efa39ab1fb34da41a04cd6816f2571c6eba98f5..5c1992a7fd5d7c5fe23ebfad35a828263d0ff93c 100644 --- a/net/minecraft/world/entity/monster/Evoker.java +++ b/net/minecraft/world/entity/monster/Evoker.java -@@ -50,10 +50,50 @@ public class Evoker extends SpellcasterIllager { +@@ -48,10 +48,50 @@ public class Evoker extends SpellcasterIllager { this.xpReward = 10; } @@ -9208,7 +9259,7 @@ index cf9f0c60efc4f7cbc275ed9b154c979e82b4d50c..76b1886e78918eccb8e2ecfe6dca033f this.goalSelector.addGoal(1, new Evoker.EvokerCastingSpellGoal()); this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, Player.class, 8.0F, 0.6, 1.0)); this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 0.6, 1.0)); -@@ -63,6 +103,7 @@ public class Evoker extends SpellcasterIllager { +@@ -61,6 +101,7 @@ public class Evoker extends SpellcasterIllager { this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6)); this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 3.0F, 1.0F)); this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Mob.class, 8.0F)); @@ -9216,7 +9267,7 @@ index cf9f0c60efc4f7cbc275ed9b154c979e82b4d50c..76b1886e78918eccb8e2ecfe6dca033f this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Raider.class).setAlertOthers()); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true).setUnseenMemoryTicks(300)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false).setUnseenMemoryTicks(300)); -@@ -296,7 +337,7 @@ public class Evoker extends SpellcasterIllager { +@@ -279,7 +320,7 @@ public class Evoker extends SpellcasterIllager { return false; } else { ServerLevel serverLevel = getServerLevel(Evoker.this.level()); @@ -9226,11 +9277,11 @@ index cf9f0c60efc4f7cbc275ed9b154c979e82b4d50c..76b1886e78918eccb8e2ecfe6dca033f } else { List nearbyEntities = serverLevel.getNearbyEntities( diff --git a/net/minecraft/world/entity/monster/Ghast.java b/net/minecraft/world/entity/monster/Ghast.java -index 97b4352671910d2deedc6d280f3ce6e645597f3c..c2e6e2f4a2c1e72521f0afd1664d9ba02ef08d7d 100644 +index bbdff8b4043f27045684a2aa5687e2b7ca7afbb5..6f312f0b8ab60c839129ea671f2d9c128fa58e58 100644 --- a/net/minecraft/world/entity/monster/Ghast.java +++ b/net/minecraft/world/entity/monster/Ghast.java -@@ -43,11 +43,69 @@ public class Ghast extends FlyingMob implements Enemy { - this.moveControl = new Ghast.GhastMoveControl(this); +@@ -52,11 +52,57 @@ public class Ghast extends Mob implements Enemy { + this.moveControl = new Ghast.GhastMoveControl(this, false, () -> false); } + // Purpur start - Ridables @@ -9253,18 +9304,6 @@ index 97b4352671910d2deedc6d280f3ce6e645597f3c..c2e6e2f4a2c1e72521f0afd1664d9ba0 + public double getMaxY() { + return level().purpurConfig.ghastMaxY; + } -+ -+ @Override -+ public void travel(Vec3 vec3) { -+ super.travel(vec3); -+ if (getRider() != null && this.isControllable() && !onGround) { -+ float speed = (float) getAttributeValue(Attributes.FLYING_SPEED); -+ setSpeed(speed); -+ Vec3 mot = getDeltaMovement(); -+ move(net.minecraft.world.entity.MoverType.SELF, mot.multiply(speed, 1.0, speed)); -+ setDeltaMovement(mot.scale(0.9D)); -+ } -+ } + // Purpur end - Ridables + + // Purpur start - Configurable entity base attributes @@ -9299,38 +9338,45 @@ index 97b4352671910d2deedc6d280f3ce6e645597f3c..c2e6e2f4a2c1e72521f0afd1664d9ba0 this.targetSelector .addGoal(1, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, (entity, level) -> Math.abs(entity.getY() - this.getY()) <= 4.0)); } -@@ -102,7 +160,7 @@ public class Ghast extends FlyingMob implements Enemy { - } - - public static AttributeSupplier.Builder createAttributes() { -- return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.FOLLOW_RANGE, 100.0); -+ return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0).add(Attributes.FOLLOW_RANGE, 100.0).add(Attributes.FLYING_SPEED, 0.6D); // Purpur - Ridables +@@ -106,6 +152,15 @@ public class Ghast extends Mob implements Enemy { + @Override + public void travel(Vec3 travelVector) { + this.travelFlying(travelVector, 0.02F); ++ // Purpur start - Ridables ++ if (getRider() != null && this.isControllable() && !onGround) { ++ float speed = (float) getAttributeValue(Attributes.FLYING_SPEED); ++ setSpeed(speed); ++ Vec3 mot = getDeltaMovement(); ++ move(net.minecraft.world.entity.MoverType.SELF, mot.multiply(speed, 1.0, speed)); ++ setDeltaMovement(mot.scale(0.9D)); ++ } ++ // Purpur end - Ridables } @Override -@@ -190,7 +248,7 @@ public class Ghast extends FlyingMob implements Enemy { +@@ -236,7 +291,7 @@ public class Ghast extends Mob implements Enemy { } } -- static class GhastMoveControl extends MoveControl { -+ static class GhastMoveControl extends org.purpurmc.purpur.controller.FlyingMoveControllerWASD { // Purpur - Ridables - private final Ghast ghast; +- public static class GhastMoveControl extends MoveControl { ++ public static class GhastMoveControl extends org.purpurmc.purpur.controller.FlyingMoveControllerWASD { // Purpur - Ridables + private final Mob ghast; private int floatDuration; - -@@ -200,7 +258,7 @@ public class Ghast extends FlyingMob implements Enemy { + private final boolean careful; +@@ -250,7 +305,7 @@ public class Ghast extends Mob implements Enemy { } @Override - public void tick() { + public void vanillaTick() { // Purpur - Ridables - if (this.operation == MoveControl.Operation.MOVE_TO) { - if (this.floatDuration-- <= 0) { - this.floatDuration = this.floatDuration + this.ghast.getRandom().nextInt(5) + 2; + if (this.shouldBeStopped.getAsBoolean()) { + this.operation = MoveControl.Operation.WAIT; + this.ghast.stopInPlace(); diff --git a/net/minecraft/world/entity/monster/Giant.java b/net/minecraft/world/entity/monster/Giant.java -index 969eb604851d1cce50f0f99ed479189061d5de0c..3f575abee4c8933d1642400d134b0fc915215a1a 100644 +index ab0b44fd3e20fcab4e2fea985e7471575b619069..f4ec41a74b13be98f3ac78521fdd357842bc9ebd 100644 --- a/net/minecraft/world/entity/monster/Giant.java +++ b/net/minecraft/world/entity/monster/Giant.java -@@ -12,12 +12,104 @@ public class Giant extends Monster { +@@ -12,6 +12,70 @@ public class Giant extends Monster { super(entityType, level); } @@ -9399,7 +9445,10 @@ index 969eb604851d1cce50f0f99ed479189061d5de0c..3f575abee4c8933d1642400d134b0fc9 + // Purpur end - Mobs always drop experience + public static AttributeSupplier.Builder createAttributes() { - return Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 100.0).add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.ATTACK_DAMAGE, 50.0); + return Monster.createMonsterAttributes() + .add(Attributes.MAX_HEALTH, 100.0) +@@ -20,8 +84,36 @@ public class Giant extends Monster { + .add(Attributes.CAMERA_DISTANCE, 16.0); } + // Purpur - Giants AI settings @@ -9636,7 +9685,7 @@ index 8d6def85583a111841b28f20f58ddb8b8cbd7bc1..a4ce65911a5d778f60bcedb3acd9fe59 @Override diff --git a/net/minecraft/world/entity/monster/Illusioner.java b/net/minecraft/world/entity/monster/Illusioner.java -index ec090d191969983c31950b8376bbb36ee8fce922..93eaafe260312f26840a2afee8375b8a95d97ba2 100644 +index 7441b019f669653e3e738f27c866270c30acffd4..2ea8c8480dcc15eb5b4bc9686554ec912ef1f3f4 100644 --- a/net/minecraft/world/entity/monster/Illusioner.java +++ b/net/minecraft/world/entity/monster/Illusioner.java @@ -57,10 +57,52 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { @@ -9797,10 +9846,10 @@ index 5ef9566b16a4d0300ee45a993c46e734db156416..04d5910d736dee2a88a2602f4a984954 return false; } else { diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java -index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b4263b1a6f1 100644 +index ffcfdbc80df2a9e6c546348b86e7615e6109eb49..d25392babee8cb8eea9f5d6fef4529a952644e52 100644 --- a/net/minecraft/world/entity/monster/Phantom.java +++ b/net/minecraft/world/entity/monster/Phantom.java -@@ -48,19 +48,123 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -49,19 +49,111 @@ public class Phantom extends Mob implements Enemy { @Nullable public BlockPos anchorPoint; Phantom.AttackPhase attackPhase = Phantom.AttackPhase.CIRCLE; @@ -9841,18 +9890,6 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 + return level().purpurConfig.phantomMaxY; + } + -+ @Override -+ public void travel(Vec3 vec3) { -+ super.travel(vec3); -+ if (getRider() != null && this.isControllable() && !onGround) { -+ float speed = (float) getAttributeValue(Attributes.FLYING_SPEED); -+ setSpeed(speed); -+ Vec3 mot = getDeltaMovement(); -+ move(net.minecraft.world.entity.MoverType.SELF, mot.multiply(speed, speed, speed)); -+ setDeltaMovement(mot.scale(0.9D)); -+ } -+ } -+ + public static net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder createAttributes() { + return Monster.createMonsterAttributes().add(Attributes.FLYING_SPEED, 3.0D); + } @@ -9924,7 +9961,7 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 @Override public boolean isFlapping() { return (this.getUniqueFlapTickOffset() + this.tickCount) % TICKS_PER_FLAP == 0; -@@ -73,9 +177,17 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -74,9 +166,17 @@ public class Phantom extends Mob implements Enemy { @Override protected void registerGoals() { @@ -9945,7 +9982,7 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 this.targetSelector.addGoal(1, new Phantom.PhantomAttackPlayerTargetGoal()); } -@@ -91,7 +203,11 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -92,7 +192,11 @@ public class Phantom extends Mob implements Enemy { private void updatePhantomSizeInfo() { this.refreshDimensions(); @@ -9958,7 +9995,7 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 } public int getPhantomSize() { -@@ -116,6 +232,23 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -117,6 +221,23 @@ public class Phantom extends Mob implements Enemy { return true; } @@ -9982,7 +10019,7 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 @Override public void tick() { super.tick(); -@@ -147,10 +280,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -148,10 +269,7 @@ public class Phantom extends Mob implements Enemy { @Override public void aiStep() { @@ -9994,7 +10031,23 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 super.aiStep(); } -@@ -159,7 +289,11 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -167,6 +285,15 @@ public class Phantom extends Mob implements Enemy { + @Override + public void travel(Vec3 travelVector) { + this.travelFlying(travelVector, 0.2F); ++ // Purpur start - Ridables ++ if (this.getRider() != null && this.isControllable() && !this.onGround) { ++ float speed = (float) this.getAttributeValue(Attributes.FLYING_SPEED); ++ this.setSpeed(speed); ++ Vec3 mot = this.getDeltaMovement(); ++ this.move(net.minecraft.world.entity.MoverType.SELF, mot.multiply(speed, speed, speed)); ++ this.setDeltaMovement(net.minecraft.world.phys.Vec3.ZERO); ++ } ++ // Purpur end - Ridables + } + + @Override +@@ -174,7 +301,11 @@ public class Phantom extends Mob implements Enemy { ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData spawnGroupData ) { this.anchorPoint = this.blockPosition().above(5); @@ -10007,25 +10060,25 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 return super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); } -@@ -170,7 +304,7 @@ public class Phantom extends FlyingMob implements Enemy { - this.setPhantomSize(compound.getIntOr("size", 0)); +@@ -185,7 +316,7 @@ public class Phantom extends Mob implements Enemy { + this.setPhantomSize(input.getIntOr("size", 0)); // Paper start - this.spawningEntity = compound.read("Paper.SpawningEntity", net.minecraft.core.UUIDUtil.CODEC).orElse(null); -- this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); -+ //this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); // Purpur - implemented in LivingEntity - API for any mob to burn daylight + this.spawningEntity = input.read("Paper.SpawningEntity", net.minecraft.core.UUIDUtil.CODEC).orElse(null); +- this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); ++ //this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); // Purpur - implemented in LivingEntity - API for any mob to burn daylight // Paper end } -@@ -181,7 +315,7 @@ public class Phantom extends FlyingMob implements Enemy { - compound.putInt("size", this.getPhantomSize()); +@@ -196,7 +327,7 @@ public class Phantom extends Mob implements Enemy { + output.putInt("size", this.getPhantomSize()); // Paper start - compound.storeNullable("Paper.SpawningEntity", net.minecraft.core.UUIDUtil.CODEC, this.spawningEntity); -- compound.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); -+ //compound.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - implemented in LivingEntity - API for any mob to burn daylight + output.storeNullable("Paper.SpawningEntity", net.minecraft.core.UUIDUtil.CODEC, this.spawningEntity); +- output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); ++ output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Purpur - implemented in LivingEntity - API for any mob to burn daylight // Paper end } -@@ -251,6 +385,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -266,6 +397,7 @@ public class Phantom extends Mob implements Enemy { List nearbyPlayers = serverLevel.getNearbyPlayers( this.attackTargeting, Phantom.this, Phantom.this.getBoundingBox().inflate(16.0, 64.0, 16.0) ); @@ -10033,7 +10086,7 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 if (!nearbyPlayers.isEmpty()) { nearbyPlayers.sort(Comparator.comparing(Entity::getY).reversed()); -@@ -400,25 +535,160 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -415,25 +547,160 @@ public class Phantom extends Mob implements Enemy { } } @@ -10197,7 +10250,7 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 if (Phantom.this.horizontalCollision) { Phantom.this.setYRot(Phantom.this.getYRot() + 180.0F); this.speed = 0.1F; -@@ -485,6 +755,12 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -500,6 +767,12 @@ public class Phantom extends Mob implements Enemy { return false; } else if (!target.isAlive()) { return false; @@ -10211,10 +10264,10 @@ index 483b0499f1f70b3aa8862e6cd8e512748492bee0..2e1e7cf0fe1bc25437cf2f429ff33b42 return false; } else if (!this.canUse()) { diff --git a/net/minecraft/world/entity/monster/Pillager.java b/net/minecraft/world/entity/monster/Pillager.java -index d7b05fed206cfb63a75fab94f687d69fb230de9c..3d12b509a9b57f0326ec48eed93b2962f6f0e493 100644 +index 4f72db7e6f99844761de2f749e52cda156b08ad7..2ed473468032bb6edbd03882b5f5405b90a2f0f4 100644 --- a/net/minecraft/world/entity/monster/Pillager.java +++ b/net/minecraft/world/entity/monster/Pillager.java -@@ -63,16 +63,57 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve +@@ -64,16 +64,57 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve super(entityType, level); } @@ -10273,10 +10326,10 @@ index d7b05fed206cfb63a75fab94f687d69fb230de9c..3d12b509a9b57f0326ec48eed93b2962 this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false)); diff --git a/net/minecraft/world/entity/monster/Ravager.java b/net/minecraft/world/entity/monster/Ravager.java -index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..a9a2d38b896ea3620e557a5fd12149557c33c6a8 100644 +index 9d84bf2cffee25404eebbefdc9cc3f37ebc386b0..2b85cedf235e673d6030c2a649abf60b5792b242 100644 --- a/net/minecraft/world/entity/monster/Ravager.java +++ b/net/minecraft/world/entity/monster/Ravager.java -@@ -69,14 +69,62 @@ public class Ravager extends Raider { +@@ -70,14 +70,62 @@ public class Ravager extends Raider { this.setPathfindingMalus(PathType.LEAVES, 0.0F); } @@ -10339,7 +10392,7 @@ index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..a9a2d38b896ea3620e557a5fd1214955 this.targetSelector.addGoal(2, new HurtByTargetGoal(this, Raider.class).setAlertOthers()); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, true, (entity, level) -> !entity.isBaby())); -@@ -133,7 +181,7 @@ public class Ravager extends Raider { +@@ -134,7 +182,7 @@ public class Ravager extends Raider { @Override public void aiStep() { super.aiStep(); @@ -10348,7 +10401,7 @@ index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..a9a2d38b896ea3620e557a5fd1214955 if (this.isImmobile()) { this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.0); } else { -@@ -144,7 +192,7 @@ public class Ravager extends Raider { +@@ -145,7 +193,7 @@ public class Ravager extends Raider { if (this.level() instanceof ServerLevel serverLevel && this.horizontalCollision @@ -10357,7 +10410,7 @@ index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..a9a2d38b896ea3620e557a5fd1214955 boolean flag = false; AABB aabb = this.getBoundingBox().inflate(0.2); -@@ -153,7 +201,7 @@ public class Ravager extends Raider { +@@ -154,7 +202,7 @@ public class Ravager extends Raider { )) { BlockState blockState = serverLevel.getBlockState(blockPos); Block block = blockState.getBlock(); @@ -10367,18 +10420,10 @@ index ca1856b18878b94ebfb566395e5eee13cf3c1cd5..a9a2d38b896ea3620e557a5fd1214955 if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockPos, blockState.getFluidState().createLegacyBlock())) { // Paper - fix wrong block state continue; diff --git a/net/minecraft/world/entity/monster/Shulker.java b/net/minecraft/world/entity/monster/Shulker.java -index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..56401c993d9a4c41b0782831a8b857646bf18f88 100644 +index f667fc5ff1ea4149cb25608e0d12f9f73f86095e..a46ca09f661a4f8f3ede6550d613e0c704a9389b 100644 --- a/net/minecraft/world/entity/monster/Shulker.java +++ b/net/minecraft/world/entity/monster/Shulker.java -@@ -53,6 +53,7 @@ import net.minecraft.world.level.Level; - import net.minecraft.world.level.ServerLevelAccessor; - import net.minecraft.world.level.block.Blocks; - import net.minecraft.world.level.block.state.BlockState; -+import net.minecraft.world.level.entity.EntityTypeTest; - import net.minecraft.world.level.gameevent.GameEvent; - import net.minecraft.world.phys.AABB; - import net.minecraft.world.phys.Vec3; -@@ -93,12 +94,68 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -94,12 +94,68 @@ public class Shulker extends AbstractGolem implements Enemy { this.lookControl = new Shulker.ShulkerLookControl(this); } @@ -10447,7 +10492,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..56401c993d9a4c41b0782831a8b85764 this.targetSelector.addGoal(1, new HurtByTargetGoal(this, this.getClass()).setAlertOthers()); this.targetSelector.addGoal(2, new Shulker.ShulkerNearestAttackGoal(this)); this.targetSelector.addGoal(3, new Shulker.ShulkerDefenseAttackGoal(this)); -@@ -460,11 +517,21 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -461,11 +517,21 @@ public class Shulker extends AbstractGolem implements Enemy { private void hitByShulkerBullet() { Vec3 vec3 = this.position(); AABB boundingBox = this.getBoundingBox(); @@ -10459,7 +10504,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..56401c993d9a4c41b0782831a8b85764 + if ((!this.level().purpurConfig.shulkerSpawnFromBulletRequireOpenLid || !this.isClosed()) && this.teleportSomewhere()) { + float chance = this.level().purpurConfig.shulkerSpawnFromBulletBaseChance; + if (!this.level().purpurConfig.shulkerSpawnFromBulletNearbyEquation.isBlank()) { -+ int nearby = this.level().getEntities((EntityTypeTest) EntityType.SHULKER, boundingBox.inflate(this.level().purpurConfig.shulkerSpawnFromBulletNearbyRange), Entity::isAlive).size(); ++ int nearby = this.level().getEntities((net.minecraft.world.level.entity.EntityTypeTest) EntityType.SHULKER, boundingBox.inflate(this.level().purpurConfig.shulkerSpawnFromBulletNearbyRange), Entity::isAlive).size(); + try { + chance -= ((Number) scriptEngine.eval("let nearby = " + nearby + "; " + this.level().purpurConfig.shulkerSpawnFromBulletNearbyEquation)).floatValue(); + } catch (javax.script.ScriptException e) { @@ -10473,7 +10518,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..56401c993d9a4c41b0782831a8b85764 if (shulker != null) { shulker.setVariant(this.getVariant()); shulker.snapTo(vec3); -@@ -564,7 +631,7 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -565,7 +631,7 @@ public class Shulker extends AbstractGolem implements Enemy { @Override protected float sanitizeScale(float scale) { @@ -10482,7 +10527,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..56401c993d9a4c41b0782831a8b85764 } private void setVariant(Optional variant) { -@@ -572,7 +639,7 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -573,7 +639,7 @@ public class Shulker extends AbstractGolem implements Enemy { } public Optional getVariant() { @@ -10491,7 +10536,7 @@ index 1b8a4c548c1376d9cdd16a10d434da070c85f41d..56401c993d9a4c41b0782831a8b85764 } @Nullable -@@ -692,7 +759,7 @@ public class Shulker extends AbstractGolem implements Enemy { +@@ -693,7 +759,7 @@ public class Shulker extends AbstractGolem implements Enemy { } } @@ -10581,10 +10626,10 @@ index 4e34833ea5c71b817c9f42a58320fe100981ec93..bcae390578519fef362a126fbcf2b5cf continue; } diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java -index 48f26ed693b43e3f65f1559ba69b3d7249664f71..48cbc3cb983da08cfec78828b15f148459a22b44 100644 +index 743bc2986b962d4aaef00d2e457117f375ca65c7..c6ab31fa5204220f4c89dd48dd0966036a4975cf 100644 --- a/net/minecraft/world/entity/monster/Skeleton.java +++ b/net/minecraft/world/entity/monster/Skeleton.java -@@ -26,6 +26,44 @@ public class Skeleton extends AbstractSkeleton { +@@ -27,6 +27,44 @@ public class Skeleton extends AbstractSkeleton { super(entityType, level); } @@ -10629,7 +10674,7 @@ index 48f26ed693b43e3f65f1559ba69b3d7249664f71..48cbc3cb983da08cfec78828b15f1484 @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -139,4 +177,64 @@ public class Skeleton extends AbstractSkeleton { +@@ -140,4 +178,64 @@ public class Skeleton extends AbstractSkeleton { this.spawnAtLocation(level, Items.SKELETON_SKULL); } } @@ -10695,10 +10740,10 @@ index 48f26ed693b43e3f65f1559ba69b3d7249664f71..48cbc3cb983da08cfec78828b15f1484 + // Purpur end - Skeletons eat wither roses } diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java -index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c 100644 +index 7b9105cc38380d60892647e52608787dbde28f0d..b299fc08fe900b4d48ce3e6986bcea000253053e 100644 --- a/net/minecraft/world/entity/monster/Slime.java +++ b/net/minecraft/world/entity/monster/Slime.java -@@ -58,6 +58,7 @@ public class Slime extends Mob implements Enemy { +@@ -59,6 +59,7 @@ public class Slime extends Mob implements Enemy { public float oSquish; private boolean wasOnGround = false; private boolean canWander = true; // Paper - Slime pathfinder events @@ -10706,7 +10751,7 @@ index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c public Slime(EntityType entityType, Level level) { super(entityType, level); -@@ -65,12 +66,95 @@ public class Slime extends Mob implements Enemy { +@@ -66,12 +67,95 @@ public class Slime extends Mob implements Enemy { this.moveControl = new Slime.SlimeMoveControl(this); } @@ -10802,7 +10847,7 @@ index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c this.targetSelector .addGoal(1, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, (entity, level) -> Math.abs(entity.getY() - this.getY()) <= 4.0)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true)); -@@ -93,9 +177,9 @@ public class Slime extends Mob implements Enemy { +@@ -94,9 +178,9 @@ public class Slime extends Mob implements Enemy { this.entityData.set(ID_SIZE, i); this.reapplyPosition(); this.refreshDimensions(); @@ -10814,7 +10859,7 @@ index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c if (resetHealth) { this.setHealth(this.getMaxHealth()); } -@@ -359,6 +443,7 @@ public class Slime extends Mob implements Enemy { +@@ -360,6 +444,7 @@ public class Slime extends Mob implements Enemy { Vec3 deltaMovement = this.getDeltaMovement(); this.setDeltaMovement(deltaMovement.x, this.getJumpPower(), deltaMovement.z); this.hasImpulse = true; @@ -10822,7 +10867,7 @@ index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c } @Nullable -@@ -523,7 +608,7 @@ public class Slime extends Mob implements Enemy { +@@ -524,7 +609,7 @@ public class Slime extends Mob implements Enemy { } } @@ -10831,7 +10876,7 @@ index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c private float yRot; private int jumpDelay; private final Slime slime; -@@ -541,21 +626,33 @@ public class Slime extends Mob implements Enemy { +@@ -542,21 +627,33 @@ public class Slime extends Mob implements Enemy { } public void setWantedMovement(double speed) { @@ -10868,7 +10913,7 @@ index 5a81172c88f5699f1440b69b331a8ea353c1950a..9a157a2bdbbeab89dbfcd23be8bdc62c if (this.jumpDelay-- <= 0) { this.jumpDelay = this.slime.getJumpDelay(); if (this.isAggressive) { -@@ -572,7 +669,7 @@ public class Slime extends Mob implements Enemy { +@@ -573,7 +670,7 @@ public class Slime extends Mob implements Enemy { this.mob.setSpeed(0.0F); } } else { @@ -11091,10 +11136,10 @@ index afa584e2aba6bebfb2dd343215b043c983281853..fe31c4a45afd61be8b74efe9d0858ccd if (isFood && !this.isSilent()) { this.level() diff --git a/net/minecraft/world/entity/monster/Vex.java b/net/minecraft/world/entity/monster/Vex.java -index bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9..488e0605e9769d52faffecbc86c28c779d0ff25b 100644 +index a621e08fe4f88fcfa8da83bc44b23fc2ffaa5918..ab320cf5a8c68fd239e81172a2f3909a67931105 100644 --- a/net/minecraft/world/entity/monster/Vex.java +++ b/net/minecraft/world/entity/monster/Vex.java -@@ -58,6 +58,72 @@ public class Vex extends Monster implements TraceableEntity { +@@ -60,6 +60,72 @@ public class Vex extends Monster implements TraceableEntity { this.xpReward = 3; } @@ -11167,7 +11212,7 @@ index bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9..488e0605e9769d52faffecbc86c28c77 @Override public boolean isFlapping() { return this.tickCount % TICKS_PER_FLAP == 0; -@@ -70,7 +136,7 @@ public class Vex extends Monster implements TraceableEntity { +@@ -72,7 +138,7 @@ public class Vex extends Monster implements TraceableEntity { @Override public void tick() { @@ -11176,7 +11221,7 @@ index bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9..488e0605e9769d52faffecbc86c28c77 super.tick(); this.noPhysics = false; this.setNoGravity(true); -@@ -84,17 +150,19 @@ public class Vex extends Monster implements TraceableEntity { +@@ -86,17 +152,19 @@ public class Vex extends Monster implements TraceableEntity { protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new FloatGoal(this)); @@ -11197,7 +11242,7 @@ index bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9..488e0605e9769d52faffecbc86c28c77 } @Override -@@ -291,13 +359,13 @@ public class Vex extends Monster implements TraceableEntity { +@@ -298,13 +366,13 @@ public class Vex extends Monster implements TraceableEntity { } } @@ -11213,7 +11258,7 @@ index bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9..488e0605e9769d52faffecbc86c28c77 if (this.operation == MoveControl.Operation.MOVE_TO) { Vec3 vec3 = new Vec3(this.wantedX - Vex.this.getX(), this.wantedY - Vex.this.getY(), this.wantedZ - Vex.this.getZ()); double len = vec3.length(); -@@ -305,7 +373,7 @@ public class Vex extends Monster implements TraceableEntity { +@@ -312,7 +380,7 @@ public class Vex extends Monster implements TraceableEntity { this.operation = MoveControl.Operation.WAIT; Vex.this.setDeltaMovement(Vex.this.getDeltaMovement().scale(0.5)); } else { @@ -11223,10 +11268,10 @@ index bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9..488e0605e9769d52faffecbc86c28c77 Vec3 deltaMovement = Vex.this.getDeltaMovement(); Vex.this.setYRot(-((float)Mth.atan2(deltaMovement.x, deltaMovement.z)) * (180.0F / (float)Math.PI)); diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java -index d02b4bfc3834cdfae37983ec616ee3cbcd9f0988..8ba772d9f5f53dc0dea269c5089e742f20dbc308 100644 +index e12643c0a1aa9608c34cab96d5c04abc60428322..df95c6be4469eeefa248e5ef18cfaba3d4cdeea6 100644 --- a/net/minecraft/world/entity/monster/Vindicator.java +++ b/net/minecraft/world/entity/monster/Vindicator.java -@@ -56,15 +56,56 @@ public class Vindicator extends AbstractIllager { +@@ -57,15 +57,56 @@ public class Vindicator extends AbstractIllager { super(entityType, level); } @@ -11283,7 +11328,7 @@ index d02b4bfc3834cdfae37983ec616ee3cbcd9f0988..8ba772d9f5f53dc0dea269c5089e742f this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Raider.class).setAlertOthers()); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, true)); -@@ -131,6 +172,11 @@ public class Vindicator extends AbstractIllager { +@@ -132,6 +173,11 @@ public class Vindicator extends AbstractIllager { RandomSource random = level.getRandom(); this.populateDefaultEquipmentSlots(random, difficulty); this.populateDefaultEquipmentEnchantments(level, random, difficulty); @@ -11409,10 +11454,10 @@ index 3ff71ba1bd29faa4d8380dad9397ab34ef930234..b3f5b2e3e2cfc378de948c0e186727d5 protected void registerGoals() { this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractPiglin.class, true)); diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java -index 33c7081c2aee7a31c4dd143f9d1a36cadcfcb29f..743946e69af541f6d5fe626108c70f96fe7fce65 100644 +index 662b95d27f6630ec27fd88ca279e395438faa96b..2a905e8cdf22f9d7f38cc41c1474e80f704d0cb1 100644 --- a/net/minecraft/world/entity/monster/Zoglin.java +++ b/net/minecraft/world/entity/monster/Zoglin.java -@@ -84,6 +84,45 @@ public class Zoglin extends Monster implements HoglinBase { +@@ -85,6 +85,45 @@ public class Zoglin extends Monster implements HoglinBase { this.xpReward = 5; } @@ -11458,7 +11503,7 @@ index 33c7081c2aee7a31c4dd143f9d1a36cadcfcb29f..743946e69af541f6d5fe626108c70f96 @Override protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); -@@ -247,6 +286,7 @@ public class Zoglin extends Monster implements HoglinBase { +@@ -248,6 +287,7 @@ public class Zoglin extends Monster implements HoglinBase { @Override protected void customServerAiStep(ServerLevel level) { @@ -11467,10 +11512,10 @@ index 33c7081c2aee7a31c4dd143f9d1a36cadcfcb29f..743946e69af541f6d5fe626108c70f96 this.updateActivity(); } diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3c6ddf8f5 100644 +index a23607874a72723914cbfeea0ad1c51236c044d8..ab4dc7b3a7593d255dbd7d1df667fce3504af3ed 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -93,22 +93,78 @@ public class Zombie extends Monster { +@@ -92,22 +92,78 @@ public class Zombie extends Monster { private boolean canBreakDoors = false; private int inWaterTime = 0; public int conversionTime; @@ -11550,7 +11595,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 this.addBehaviourGoals(); } -@@ -118,7 +174,19 @@ public class Zombie extends Monster { +@@ -117,7 +173,19 @@ public class Zombie extends Monster { this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0)); this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(ZombifiedPiglin.class)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); @@ -11571,7 +11616,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); } -@@ -234,29 +302,7 @@ public class Zombie extends Monster { +@@ -233,29 +301,7 @@ public class Zombie extends Monster { @Override public void aiStep() { @@ -11602,7 +11647,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 super.aiStep(); } -@@ -315,6 +361,7 @@ public class Zombie extends Monster { +@@ -314,6 +360,7 @@ public class Zombie extends Monster { // CraftBukkit end } @@ -11610,25 +11655,25 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 public boolean isSunSensitive() { return this.shouldBurnInDay; // Paper - Add more Zombie API } -@@ -452,7 +499,7 @@ public class Zombie extends Monster { - compound.putBoolean("CanBreakDoors", this.canBreakDoors()); - compound.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); - compound.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); -- compound.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API -+ //compound.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API // Purpur - implemented in LivingEntity - API for any mob to burn daylight +@@ -451,7 +498,7 @@ public class Zombie extends Monster { + output.putBoolean("CanBreakDoors", this.canBreakDoors()); + output.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); + output.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); +- output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API ++ //output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API // Purpur - implemented in LivingEntity - API for any mob to burn daylight } @Override -@@ -467,7 +514,7 @@ public class Zombie extends Monster { +@@ -466,7 +513,7 @@ public class Zombie extends Monster { } else { this.getEntityData().set(DATA_DROWNED_CONVERSION_ID, false); } -- this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - Add more Zombie API -+ //this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - Add more Zombie API // Purpur - implemented in LivingEntity - API for any mob to burn daylight +- this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - Add more Zombie API ++ //this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - Add more Zombie API // Purpur - implemented in LivingEntity - API for any mob to burn daylight } @Override -@@ -519,19 +566,18 @@ public class Zombie extends Monster { +@@ -518,19 +565,18 @@ public class Zombie extends Monster { } if (spawnGroupData instanceof Zombie.ZombieGroupData zombieGroupData) { @@ -11654,7 +11699,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 Chicken chicken1 = EntityType.CHICKEN.create(this.level(), EntitySpawnReason.JOCKEY); if (chicken1 != null) { chicken1.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); -@@ -540,6 +586,7 @@ public class Zombie extends Monster { +@@ -539,6 +585,7 @@ public class Zombie extends Monster { this.startRiding(chicken1); level.addFreshEntity(chicken1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.MOUNT); // CraftBukkit } @@ -11662,7 +11707,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 } } } -@@ -552,10 +599,7 @@ public class Zombie extends Monster { +@@ -551,10 +598,7 @@ public class Zombie extends Monster { } if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { @@ -11674,7 +11719,7 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); this.setDropChance(EquipmentSlot.HEAD, 0.0F); } -@@ -605,7 +649,7 @@ public class Zombie extends Monster { +@@ -604,7 +648,7 @@ public class Zombie extends Monster { } protected void randomizeReinforcementsChance() { @@ -11684,11 +11729,11 @@ index 39b65970a48568c95ff482b9636e7391f300ffa8..783f8b9a05939b9f42fc77065f6347e3 @Override diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index a8cd7103e636b57be1270d0f3549c709330b5536..ae5939c940bdd93977fa882360fc31e46479554f 100644 +index bc80d5b302f24974ce89db502b41d659457dd98c..e218e5d5f146ec996a6f5ce7e76b1d6506ac1cb9 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -77,6 +77,66 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - .ifPresent(profession -> this.setVillagerData(this.getVillagerData().withProfession(profession))); +@@ -76,6 +76,66 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + super(entityType, level); } + // Purpur start - Ridables @@ -11754,7 +11799,7 @@ index a8cd7103e636b57be1270d0f3549c709330b5536..ae5939c940bdd93977fa882360fc31e4 @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -130,10 +190,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -129,10 +189,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); if (itemInHand.is(Items.GOLDEN_APPLE)) { @@ -11768,10 +11813,10 @@ index a8cd7103e636b57be1270d0f3549c709330b5536..ae5939c940bdd93977fa882360fc31e4 return InteractionResult.SUCCESS_SERVER; diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -index 05de183ce7b0be9b41f005b2ca36807a109fc634..39489c8a347031fb4f73faca46039786e35762ac 100644 +index 822712eaff2f6c579d982734ab14a00c02182770..f58c48d9de85fda3d13079f3e56b31af75b3c725 100644 --- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -@@ -63,6 +63,62 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -64,6 +64,62 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.setPathfindingMalus(PathType.LAVA, 8.0F); } @@ -11834,7 +11879,7 @@ index 05de183ce7b0be9b41f005b2ca36807a109fc634..39489c8a347031fb4f73faca46039786 @Override public void setPersistentAngerTarget(@Nullable UUID target) { this.persistentAngerTarget = target; -@@ -112,6 +168,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -113,6 +169,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.maybeAlertOthers(); } @@ -11847,7 +11892,7 @@ index 05de183ce7b0be9b41f005b2ca36807a109fc634..39489c8a347031fb4f73faca46039786 super.customServerAiStep(level); } -@@ -159,6 +221,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -160,6 +222,12 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { this.ticksUntilNextAlert = ALERT_INTERVAL.sample(this.random); } @@ -11860,7 +11905,7 @@ index 05de183ce7b0be9b41f005b2ca36807a109fc634..39489c8a347031fb4f73faca46039786 return super.setTarget(livingEntity, reason); // CraftBukkit } -@@ -236,7 +304,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -237,7 +305,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { @Override protected void randomizeReinforcementsChance() { @@ -11870,10 +11915,10 @@ index 05de183ce7b0be9b41f005b2ca36807a109fc634..39489c8a347031fb4f73faca46039786 @Nullable diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index 2183f5aaf6cf7a4df8c659f0766af40289761987..c9404d72de59e18dc809b8dec107f1f23d50f441 100644 +index f66bd6cc4aab828e847b990b193be54cd0d0dc01..775c11f658b81379784f7e5bdfdc8105b3410480 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -100,6 +100,37 @@ public class Creaking extends Monster { +@@ -101,6 +101,37 @@ public class Creaking extends Monster { return this.getHomePos() != null; } @@ -11911,7 +11956,7 @@ index 2183f5aaf6cf7a4df8c659f0766af40289761987..c9404d72de59e18dc809b8dec107f1f2 @Override protected BodyRotationControl createBodyControl() { return new Creaking.CreakingBodyRotationControl(this); -@@ -566,28 +597,28 @@ public class Creaking extends Monster { +@@ -567,28 +598,28 @@ public class Creaking extends Monster { } } @@ -11947,10 +11992,10 @@ index 2183f5aaf6cf7a4df8c659f0766af40289761987..c9404d72de59e18dc809b8dec107f1f2 } } diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 6691dc90c35d05a7c28c4e3ac887ed9d3bb88de9..584955d151e95727406bc68d6a6f15a33c0f920c 100644 +index 084f82a7baaa309aa80cc33b4c01e54cf6da4b42..3c126b1610718a407c16775a935b295ecbaab533 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -93,6 +93,52 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -94,6 +94,52 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { this.xpReward = 5; } @@ -12003,7 +12048,7 @@ index 6691dc90c35d05a7c28c4e3ac887ed9d3bb88de9..584955d151e95727406bc68d6a6f15a3 @VisibleForTesting public void setTimeInOverworld(int timeInOverworld) { this.timeInOverworld = timeInOverworld; -@@ -160,6 +206,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -161,6 +207,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { private int behaviorTick; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -12012,10 +12057,10 @@ index 6691dc90c35d05a7c28c4e3ac887ed9d3bb88de9..584955d151e95727406bc68d6a6f15a3 this.getBrain().tick(level, this); HoglinAi.updateActivity(this); diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index 634c518c105c8dc50838a4a6690641d82fd637fb..0afdfdc07764a26316c171c2a6722caf786875f2 100644 +index 3e6cbf0166486995f7adcbd7b99a8b8c919956cd..fb58af763cf75c80703360a5c668168775b1458c 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -134,6 +134,45 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -135,6 +135,45 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento this.xpReward = 5; } @@ -12059,9 +12104,9 @@ index 634c518c105c8dc50838a4a6690641d82fd637fb..0afdfdc07764a26316c171c2a6722caf + // Purpur end - Mobs always drop experience + @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); -@@ -318,6 +357,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); +@@ -319,6 +358,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento private int behaviorTick; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -12069,7 +12114,7 @@ index 634c518c105c8dc50838a4a6690641d82fd637fb..0afdfdc07764a26316c171c2a6722caf if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish this.getBrain().tick(level, this); PiglinAi.updateActivity(this); -@@ -420,7 +460,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -421,7 +461,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @Override public boolean wantsToPickUp(ServerLevel level, ItemStack stack) { @@ -12167,10 +12212,10 @@ index 589a130f8855f464c1930a0aa8b54c0326a22e23..c4eb58d0b0c51e930f9cb72e1de01039 PiglinBruteAi.updateActivity(this); PiglinBruteAi.maybePlayActivitySound(this); diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index 42ca4243d86ef4a14a9ce70da4b79f6c8eeb3a7d..497ea5d5aad1641d5876f23f05db82ab649c0785 100644 +index 6a9d3b749e251d3dac6fda13318bf5a0bf21f82b..147fb3eecf651dcee63d63255542ef2680140f66 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -124,8 +124,32 @@ public class Warden extends Monster implements VibrationSystem { +@@ -122,8 +122,32 @@ public class Warden extends Monster implements VibrationSystem { this.setPathfindingMalus(PathType.LAVA, 8.0F); this.setPathfindingMalus(PathType.DAMAGE_FIRE, 0.0F); this.setPathfindingMalus(PathType.DANGER_FIRE, 0.0F); @@ -12203,7 +12248,7 @@ index 42ca4243d86ef4a14a9ce70da4b79f6c8eeb3a7d..497ea5d5aad1641d5876f23f05db82ab @Override public Packet getAddEntityPacket(ServerEntity entity) { return new ClientboundAddEntityPacket(this, entity, this.hasPose(Pose.EMERGING) ? 1 : 0); -@@ -388,6 +412,7 @@ public class Warden extends Monster implements VibrationSystem { +@@ -386,6 +410,7 @@ public class Warden extends Monster implements VibrationSystem { @Contract("null->false") public boolean canTargetEntity(@Nullable Entity entity) { @@ -12212,10 +12257,10 @@ index 42ca4243d86ef4a14a9ce70da4b79f6c8eeb3a7d..497ea5d5aad1641d5876f23f05db82ab && this.level() == entity.level() && EntitySelector.NO_CREATIVE_OR_SPECTATOR.test(entity) diff --git a/net/minecraft/world/entity/npc/AbstractVillager.java b/net/minecraft/world/entity/npc/AbstractVillager.java -index 1d3381f1481bb2b192bb78462c85c2a185d94ad5..e574c38e1c1c13fc2f96340138f784697cef8c48 100644 +index f8782cdcf3015cad2693663a3c222bd60822f45b..d1a77544df7bcaa5f1dbca3139324107d687ae0d 100644 --- a/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/net/minecraft/world/entity/npc/AbstractVillager.java -@@ -35,6 +35,7 @@ import net.minecraft.world.level.portal.TeleportTransition; +@@ -35,6 +35,7 @@ import net.minecraft.world.level.storage.ValueOutput; import net.minecraft.world.phys.Vec3; public abstract class AbstractVillager extends AgeableMob implements InventoryCarrier, Npc, Merchant { @@ -12267,10 +12312,10 @@ index e282b6ab6d0d1c11ee40f5f436bd50fa90ddc88b..d6ae13c19481ce33bfa0b6c9db632830 this.spawnCat(pos, level, true); } diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae736db5f48c 100644 +index 6ecd99adc1c22681553714ff23e557b8f7854737..165d0f50e7818b6daf834507033feaa2fabcaf19 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -178,6 +178,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -179,6 +179,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler ); public long nextGolemPanic = -1; // Pufferfish @@ -12279,7 +12324,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 public Villager(EntityType entityType, Level level) { this(entityType, level, VillagerType.PLAINS); -@@ -196,6 +198,103 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -197,6 +199,103 @@ public class Villager extends AbstractVillager implements ReputationEventHandler this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE)); } @@ -12383,7 +12428,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 @Override public Brain getBrain() { return (Brain)super.getBrain(); -@@ -229,7 +328,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -230,7 +329,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler villagerBrain.setSchedule(Schedule.VILLAGER_DEFAULT); villagerBrain.addActivityWithConditions( Activity.WORK, @@ -12392,7 +12437,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 ImmutableSet.of(Pair.of(MemoryModuleType.JOB_SITE, MemoryStatus.VALUE_PRESENT)) ); } -@@ -261,7 +360,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -262,7 +361,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } public static AttributeSupplier.Builder createAttributes() { @@ -12401,7 +12446,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 } public boolean assignProfessionWhenSpawned() { -@@ -293,12 +392,20 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -294,12 +393,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler // Paper start - EAR 2 this.customServerAiStep(level, false); } @@ -12420,12 +12465,12 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 - if (!inactive && this.behaviorTick++ % this.activatedPriority == 0) { + if (!inactive && (getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) { // Purpur - Ridables this.getBrain().tick(level, this); // Paper - EAR 2 -- } -+ } else if (this.isLobotomized && shouldRestock()) restock(); // Purpur - Lobotomize stuck villagers + } ++ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur - Lobotomize stuck villagers // Pufferfish end if (this.assignProfessionWhenSpawned) { this.assignProfessionWhenSpawned = false; -@@ -354,7 +461,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -355,7 +463,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler return super.mobInteract(player, hand); } else if (this.isBaby()) { this.setUnhappy(); @@ -12434,7 +12479,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 } else { if (!this.level().isClientSide) { boolean isEmpty = this.getOffers().isEmpty(); -@@ -367,9 +474,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -368,9 +476,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } if (isEmpty) { @@ -12448,7 +12493,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 this.startTrading(player); } -@@ -506,7 +616,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -507,7 +618,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler public void updateDemand() { for (MerchantOffer merchantOffer : this.getOffers()) { @@ -12457,7 +12502,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 } } -@@ -699,7 +809,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -700,7 +811,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public boolean canBreed() { @@ -12466,7 +12511,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 } private boolean hungry() { -@@ -866,7 +976,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -867,7 +978,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } public boolean hasFarmSeeds() { @@ -12475,7 +12520,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 } @Override -@@ -921,6 +1031,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -922,6 +1033,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } public void spawnGolemIfNeeded(ServerLevel serverLevel, long gameTime, int minVillagerAmount) { @@ -12483,7 +12528,7 @@ index 202bcb28218b0d9a2a5e211fee173ecd5f625896..acb0789b3e791cbb81c23efb9bbeae73 if (this.wantsToSpawnGolem(gameTime)) { AABB aabb = this.getBoundingBox().inflate(10.0, 10.0, 10.0); List entitiesOfClass = serverLevel.getEntitiesOfClass(Villager.class, aabb); -@@ -994,6 +1105,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -995,6 +1107,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public void startSleeping(BlockPos pos) { @@ -12510,10 +12555,10 @@ index 0b7fdbc19f8a977be8168bca198c157fbe90044b..abfc2542a486d5a64bf88eac69f7d958 registry, FARMER, diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java -index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..776e4d001bc6e6d419eb4392dc85bf4594e57058 100644 +index c2573946dd1244eb5d1ef2be7823211064daa80d..dc6b30518270486cf3b2eaab4db13a507917f37d 100644 --- a/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -59,6 +59,58 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill +@@ -60,6 +60,58 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill super(entityType, level); } @@ -12572,7 +12617,7 @@ index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..776e4d001bc6e6d419eb4392dc85bf45 @Override protected void registerGoals() { this.goalSelector.addGoal(0, new FloatGoal(this)); -@@ -79,7 +131,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill +@@ -80,7 +132,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill this, new ItemStack(Items.MILK_BUCKET), SoundEvents.WANDERING_TRADER_REAPPEARED, @@ -12581,7 +12626,7 @@ index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..776e4d001bc6e6d419eb4392dc85bf45 ) ); this.goalSelector.addGoal(1, new TradeWithPlayerGoal(this)); -@@ -93,6 +145,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill +@@ -94,6 +146,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill this.goalSelector.addGoal(1, new PanicGoal(this, 0.5)); this.goalSelector.addGoal(1, new LookAtTradingPlayerGoal(this)); this.goalSelector.addGoal(2, new WanderingTrader.WanderToPositionGoal(this, 2.0, 0.35)); @@ -12589,7 +12634,7 @@ index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..776e4d001bc6e6d419eb4392dc85bf45 this.goalSelector.addGoal(4, new MoveTowardsRestrictionGoal(this, 0.35)); this.goalSelector.addGoal(8, new WaterAvoidingRandomStrollGoal(this, 0.35)); this.goalSelector.addGoal(9, new InteractGoal(this, Player.class, 3.0F, 1.0F)); -@@ -120,11 +173,14 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill +@@ -121,11 +174,14 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill if (!this.level().isClientSide) { if (this.getOffers().isEmpty()) { @@ -12606,7 +12651,7 @@ index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..776e4d001bc6e6d419eb4392dc85bf45 return InteractionResult.SUCCESS; diff --git a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index 9d9ec2bf16027b479bbc4339ad4e9dcfc2077d40..d4527765262818099dfb695d6a84b56d33888e34 100644 +index fce3f0f81d3195045cdc9ad7320f1d92f033c36d..352f55882ea77e8d89942e6c58ef3b4b78eec887 100644 --- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java @@ -137,7 +137,17 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -12629,10 +12674,10 @@ index 9d9ec2bf16027b479bbc4339ad4e9dcfc2077d40..d4527765262818099dfb695d6a84b56d blockPos = blockPos1; break; diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847a36ce9ce 100644 +index 1610ef636a0d93c1e07bad9e82ac4d9982c4e854..78dc237d5de38cff9f013d36da9bbb16104dec96 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -211,11 +211,22 @@ public abstract class Player extends LivingEntity { +@@ -220,17 +220,40 @@ public abstract class Player extends LivingEntity { private int currentImpulseContextResetGraceTime = 0; public boolean affectsSpawning = true; // Paper - Affects Spawning API public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage @@ -12651,13 +12696,11 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 + return false; + } + // Purpur end - AFK API -+ @Override public org.bukkit.craftbukkit.entity.CraftHumanEntity getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftHumanEntity) super.getBukkitEntity(); -@@ -224,6 +235,19 @@ public abstract class Player extends LivingEntity { - - public final int sendAllPlayerInfoBucketIndex; // Gale - Purpur - spread out sending all player info + } + // CraftBukkit end + // Purpur start - Ridables + public abstract void resetLastActionTime(); @@ -12672,10 +12715,10 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 + } + // Purpur end - Ridables + - public Player(Level level, BlockPos pos, float yRot, GameProfile gameProfile) { - super(EntityType.PLAYER, level); - this.setUUID(gameProfile.getId()); -@@ -281,6 +305,12 @@ public abstract class Player extends LivingEntity { + public final int sendAllPlayerInfoBucketIndex; // Gale - Purpur - spread out sending all player info + + public Player(Level level, GameProfile gameProfile) { +@@ -291,6 +314,12 @@ public abstract class Player extends LivingEntity { @Override public void tick() { @@ -12688,7 +12731,7 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 this.noPhysics = this.isSpectator(); if (this.isSpectator() || this.isPassenger()) { this.setOnGround(false); -@@ -363,6 +393,17 @@ public abstract class Player extends LivingEntity { +@@ -373,6 +402,17 @@ public abstract class Player extends LivingEntity { this.turtleHelmetTick(); } @@ -12706,7 +12749,7 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 this.cooldowns.tick(); this.updatePlayerPose(); if (this.currentImpulseContextResetGraceTime > 0) { -@@ -628,7 +669,7 @@ public abstract class Player extends LivingEntity { +@@ -638,7 +678,7 @@ public abstract class Player extends LivingEntity { List list = Lists.newArrayList(); for (Entity entity : entities) { @@ -12715,7 +12758,7 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 list.add(entity); } else if (!entity.isRemoved()) { this.touch(entity); -@@ -1222,7 +1263,7 @@ public abstract class Player extends LivingEntity { +@@ -1234,7 +1274,7 @@ public abstract class Player extends LivingEntity { flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits if (flag2) { damageSource = damageSource.critical(); // Paper - critical damage API @@ -12724,7 +12767,7 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 } float f2 = f + f1; -@@ -1819,7 +1860,23 @@ public abstract class Player extends LivingEntity { +@@ -1831,7 +1871,23 @@ public abstract class Player extends LivingEntity { @Override protected int getBaseExperienceReward(ServerLevel level) { @@ -12749,7 +12792,7 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 } @Override -@@ -1858,6 +1915,13 @@ public abstract class Player extends LivingEntity { +@@ -1870,6 +1926,13 @@ public abstract class Player extends LivingEntity { return this.inventory.add(stack); } @@ -12764,10 +12807,10 @@ index 2aca22f978daa826bf7ac2b25f13bf30a1bd4284..4217131b5f7aa985d5af452554849847 if (this.isPassenger() || !this.onGround() || this.isInWater() || this.isInPowderSnow) { return false; diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java -index b8f04b98d2117cfb274a5888d34b9836d3390ae9..6bb0653d1d033745ff419d4a59b4d89014b9cbe4 100644 +index fe738894f82480c6a7c2ff8fde895daaa0ba8bc6..9874c20c2c1b0ebdbaa58f719ddefdac463accbe 100644 --- a/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -79,6 +79,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -76,6 +76,7 @@ public abstract class AbstractArrow extends Projectile { public ItemStack pickupItemStack = this.getDefaultPickupItem(); @Nullable public ItemStack firedFromWeapon = null; @@ -12775,7 +12818,7 @@ index b8f04b98d2117cfb274a5888d34b9836d3390ae9..6bb0653d1d033745ff419d4a59b4d890 protected AbstractArrow(EntityType entityType, Level level) { super(entityType, level); -@@ -576,6 +577,12 @@ public abstract class AbstractArrow extends Projectile { +@@ -573,6 +574,12 @@ public abstract class AbstractArrow extends Projectile { return this.firedFromWeapon; } @@ -12789,10 +12832,10 @@ index b8f04b98d2117cfb274a5888d34b9836d3390ae9..6bb0653d1d033745ff419d4a59b4d890 return SoundEvents.ARROW_HIT; } diff --git a/net/minecraft/world/entity/projectile/LargeFireball.java b/net/minecraft/world/entity/projectile/LargeFireball.java -index db1b5bce212a5147be82504469f1fa9660812ebc..9e994953a8a8757496892441c155fba5a511c19b 100644 +index dd0ec97ea4561d2dccf735580faf0d65d6ac4b0d..779879f8d678a5e45e2752e6e033cc350acac89b 100644 --- a/net/minecraft/world/entity/projectile/LargeFireball.java +++ b/net/minecraft/world/entity/projectile/LargeFireball.java -@@ -19,20 +19,20 @@ public class LargeFireball extends Fireball { +@@ -20,20 +20,20 @@ public class LargeFireball extends Fireball { public LargeFireball(EntityType entityType, Level level) { super(entityType, level); @@ -12834,10 +12877,10 @@ index f736f72b8e76dd82236badcdd2756f0d4da89aa4..0dbfbadcabcf1b719addb034e676cb51 protected double getDefaultGravity() { return 0.06; diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java -index 84c846d2ef4990befb2891631ac5ae16d881401b..9f1c07be83999b7bafdee9238e8bad8c646d42f1 100644 +index 36124bfd4189e35208875e971733889410242641..ef960ee83adbb5e3ebfa44cd2457b23718045f61 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java +++ b/net/minecraft/world/entity/projectile/Projectile.java -@@ -515,7 +515,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -485,7 +485,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { @Override public boolean mayInteract(ServerLevel level, BlockPos pos) { Entity owner = this.getOwner(); @@ -12906,10 +12949,10 @@ index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..d8f9fb603fd2e3e5c1dfc05face7f42b protected void onHit(HitResult result) { super.onHit(result); diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -index bda858b1e1c6b28cd9d5a664758b3e445eaf4f22..6575e8ef16f6011f7a799ba31531a2ebefee0c4d 100644 +index 4b04ca7d50d7a85827bd89fff24434e603e99579..2258736e6f9f52efe5bd353b8949a7a0b9a4fdb8 100644 --- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -@@ -129,9 +129,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -126,9 +126,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { return; } // CraftBukkit end @@ -12921,20 +12964,20 @@ index bda858b1e1c6b28cd9d5a664758b3e445eaf4f22..6575e8ef16f6011f7a799ba31531a2eb endermite.snapTo(owner.getX(), owner.getY(), owner.getZ(), owner.getYRot(), owner.getXRot()); serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL); } -@@ -151,7 +152,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -148,7 +149,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { if (serverPlayer1 != null) { serverPlayer1.resetFallDistance(); serverPlayer1.resetCurrentImpulseContext(); -- serverPlayer1.hurtServer(serverPlayer.serverLevel(), this.damageSources().enderPearl().eventEntityDamager(this), 5.0F); // CraftBukkit // Paper - fix DamageSource API -+ serverPlayer1.hurtServer(serverPlayer.serverLevel(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage +- serverPlayer1.hurtServer(serverPlayer.level(), this.damageSources().enderPearl().eventEntityDamager(this), 5.0F); // CraftBukkit // Paper - fix DamageSource API ++ serverPlayer1.hurtServer(serverPlayer.level(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage } this.playSound(serverLevel, vec3); diff --git a/net/minecraft/world/entity/projectile/ThrownTrident.java b/net/minecraft/world/entity/projectile/ThrownTrident.java -index 00f805667ea48fd8699f3cea05781739e376cedd..e814daaa10c138b1497dffbdf9224d34cd9c9926 100644 +index bc04812ec840e255c0ae8651bf7a43e0f562aa9c..b6826fc742640e7f8311bd0269aa0d8a6a9b2db4 100644 --- a/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/net/minecraft/world/entity/projectile/ThrownTrident.java -@@ -65,7 +65,7 @@ public class ThrownTrident extends AbstractArrow { +@@ -66,7 +66,7 @@ public class ThrownTrident extends AbstractArrow { Entity owner = this.getOwner(); int i = this.entityData.get(ID_LOYALTY); @@ -12944,10 +12987,10 @@ index 00f805667ea48fd8699f3cea05781739e376cedd..e814daaa10c138b1497dffbdf9224d34 if (this.level() instanceof ServerLevel serverLevel && this.pickup == AbstractArrow.Pickup.ALLOWED) { this.spawnAtLocation(serverLevel, this.getPickupItem(), 0.1F); diff --git a/net/minecraft/world/entity/projectile/WitherSkull.java b/net/minecraft/world/entity/projectile/WitherSkull.java -index a2fdc87bedd1a63064cb8c7a7615978483268fdc..8e95577de28fc4834dcfc3d4fed747d9d14b1618 100644 +index 2419c1db39c9ffbc54352c7fa5e0ac1ef813c13a..3b68e1a73da3e70f459cdc31e8447bcee37a914d 100644 --- a/net/minecraft/world/entity/projectile/WitherSkull.java +++ b/net/minecraft/world/entity/projectile/WitherSkull.java -@@ -93,7 +93,7 @@ public class WitherSkull extends AbstractHurtingProjectile { +@@ -94,7 +94,7 @@ public class WitherSkull extends AbstractHurtingProjectile { super.onHit(result); if (!this.level().isClientSide) { // CraftBukkit start @@ -12956,7 +12999,7 @@ index a2fdc87bedd1a63064cb8c7a7615978483268fdc..8e95577de28fc4834dcfc3d4fed747d9 if (event.callEvent()) { this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); } -@@ -102,6 +102,21 @@ public class WitherSkull extends AbstractHurtingProjectile { +@@ -103,6 +103,21 @@ public class WitherSkull extends AbstractHurtingProjectile { } } @@ -12979,20 +13022,20 @@ index a2fdc87bedd1a63064cb8c7a7615978483268fdc..8e95577de28fc4834dcfc3d4fed747d9 protected void defineSynchedData(SynchedEntityData.Builder builder) { builder.define(DATA_DANGEROUS, false); diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java -index e81ae747fe95c22321fc69791a6509d601826fd6..76ebbab40f5bac6d5f588410d3c5e6716cbe0679 100644 +index a495789b2d21fa9a24d5dca4ecfa196ddce49466..2254493c889b8967011c09dc448ba375d82e2035 100644 --- a/net/minecraft/world/entity/raid/Raider.java +++ b/net/minecraft/world/entity/raid/Raider.java -@@ -400,7 +400,7 @@ public abstract class Raider extends PatrollingMonster { +@@ -401,7 +401,7 @@ public abstract class Raider extends PatrollingMonster { } private boolean cannotPickUpBanner() { -- if (!getServerLevel(this.mob).getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items -+ if (!getServerLevel(this.mob).getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING, this.mob.level().purpurConfig.pillagerMobGriefingOverride) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items // Purpur - Add mobGriefing override to everything affected +- if (!getServerLevel(this.mob).getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING)) return true; // Paper - respect game and entity rules for picking up items ++ if (!getServerLevel(this.mob).getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING, this.mob.level().purpurConfig.pillagerMobGriefingOverride)) return true; // Paper - respect game and entity rules for picking up items // Purpur - Add mobGriefing override to everything affected if (!this.mob.hasActiveRaid()) { return true; } else if (this.mob.getCurrentRaid().isOver()) { diff --git a/net/minecraft/world/entity/raid/Raids.java b/net/minecraft/world/entity/raid/Raids.java -index 693eef486f1a3b4ea7e5fd5ecf2d25d85f424d97..5837d976abf663bd46a64f46348613db9284254d 100644 +index b8de00c5f13257d0b79b44b19fbfb88a3ca20353..fc5c1acec3cc2afed40589be6f8e159c3426c08e 100644 --- a/net/minecraft/world/entity/raid/Raids.java +++ b/net/minecraft/world/entity/raid/Raids.java @@ -29,6 +29,7 @@ import net.minecraft.world.phys.Vec3; @@ -13036,10 +13079,10 @@ index 693eef486f1a3b4ea7e5fd5ecf2d25d85f424d97..5837d976abf663bd46a64f46348613db if (!raid.isStarted() && !this.raidMap.containsValue(raid)) { this.raidMap.put(this.getUniqueId(), raid); diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java -index 4541bb5233e986d9993d8593afef9b12c935d00a..4f61c17e0a4a82773834bc21e00cac6eb75f794e 100644 +index df360ff06d10fc7f996055dce5148825539e9261..d947801b616af5b5dcdcc8bb70b36f97d6a69fdd 100644 --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java -@@ -433,6 +433,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { +@@ -436,6 +436,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { float groundFriction = this.getGroundFriction(); if (groundFriction > 0.0F) { this.landFriction = groundFriction; @@ -13047,7 +13090,7 @@ index 4541bb5233e986d9993d8593afef9b12c935d00a..4f61c17e0a4a82773834bc21e00cac6e return AbstractBoat.Status.ON_LAND; } else { return AbstractBoat.Status.IN_AIR; -@@ -821,7 +822,13 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { +@@ -824,7 +825,13 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { @Override public final ItemStack getPickResult() { @@ -13063,10 +13106,10 @@ index 4541bb5233e986d9993d8593afef9b12c935d00a..4f61c17e0a4a82773834bc21e00cac6e public static enum Status { diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index 47490f6152cb1394a448ebc803c973b22da24149..41aac3b9985fbf76f3a4c4c3d4a7366d4759cfc4 100644 +index 7e61d68b36ca2768f70dc1fc130a8d7b95347b6b..00eb9aef52ee54f9750c44832f2b3a9321a9f81a 100644 --- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -103,6 +103,10 @@ public abstract class AbstractMinecart extends VehicleEntity { +@@ -102,6 +102,10 @@ public abstract class AbstractMinecart extends VehicleEntity { private double flyingY = 0.95; private double flyingZ = 0.95; public @Nullable Double maxSpeed; @@ -13077,7 +13120,7 @@ index 47490f6152cb1394a448ebc803c973b22da24149..41aac3b9985fbf76f3a4c4c3d4a7366d public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API // CraftBukkit end -@@ -111,8 +115,13 @@ public abstract class AbstractMinecart extends VehicleEntity { +@@ -110,8 +114,13 @@ public abstract class AbstractMinecart extends VehicleEntity { this.blocksBuilding = true; if (useExperimentalMovement(level)) { this.behavior = new NewMinecartBehavior(this); @@ -13091,7 +13134,7 @@ index 47490f6152cb1394a448ebc803c973b22da24149..41aac3b9985fbf76f3a4c4c3d4a7366d } } -@@ -277,6 +286,14 @@ public abstract class AbstractMinecart extends VehicleEntity { +@@ -276,6 +285,14 @@ public abstract class AbstractMinecart extends VehicleEntity { @Override public void tick() { @@ -13106,7 +13149,7 @@ index 47490f6152cb1394a448ebc803c973b22da24149..41aac3b9985fbf76f3a4c4c3d4a7366d // CraftBukkit start double prevX = this.getX(); double prevY = this.getY(); -@@ -384,15 +401,61 @@ public abstract class AbstractMinecart extends VehicleEntity { +@@ -390,15 +407,61 @@ public abstract class AbstractMinecart extends VehicleEntity { this.behavior.moveAlongTrack(level); } @@ -13197,10 +13240,10 @@ index 0d09b0809e7b224538cf5cfac9e36ec5ba10b709..4d224dc127d245556892e761fa4927a7 Vec3 deltaMovement2 = this.getDeltaMovement(); double d15 = deltaMovement2.x; diff --git a/net/minecraft/world/food/FoodData.java b/net/minecraft/world/food/FoodData.java -index 89d783315dab8ca469a1fa724cd59a329d4c2b55..7fa061718989365725ff49abd2d19d1ba3f935f9 100644 +index a1b99dea0fa5860a01158897006e1065050c029b..d1080acfe91bd1ca28e21ffc68a928dc0f233be3 100644 --- a/net/minecraft/world/food/FoodData.java +++ b/net/minecraft/world/food/FoodData.java -@@ -38,6 +38,7 @@ public class FoodData { +@@ -39,6 +39,7 @@ public class FoodData { int oldFoodLevel = this.foodLevel; org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(serverPlayer, foodProperties.nutrition() + oldFoodLevel, stack); if (!event.isCancelled()) { @@ -13208,7 +13251,7 @@ index 89d783315dab8ca469a1fa724cd59a329d4c2b55..7fa061718989365725ff49abd2d19d1b this.add(event.getFoodLevel() - oldFoodLevel, foodProperties.saturation()); } serverPlayer.getBukkitEntity().sendHealthUpdate(); -@@ -86,7 +87,7 @@ public class FoodData { +@@ -87,7 +88,7 @@ public class FoodData { this.tickTimer++; if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation if (player.getHealth() > 10.0F || difficulty == Difficulty.HARD || player.getHealth() > 1.0F && difficulty == Difficulty.NORMAL) { @@ -13237,7 +13280,7 @@ index 793e4528755fa5688efbad75418188e693ad0157..20f702c8266eb54a8835861188eb937f } diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java -index 813417a09b4acc7d57e80a53d970767e230d75b1..c4721eb0efe34f5e313bc890b4e960144eca4fe1 100644 +index f4548edae77eb86e54ba499acbb20613fd60d7bd..1f601781643945920c7522b9c6100d0a37ad535d 100644 --- a/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -65,6 +65,7 @@ public abstract class AbstractContainerMenu { @@ -13268,10 +13311,10 @@ index b42d55c1c0c405ce3ce073138343e74fa036fa65..b86e49b09a036532e7dbd56bc52b13ce } else if (this.isFuel(item)) { if (!this.moveItemStackTo(item, 1, 2, false)) { diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java -index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae2392590f 100644 +index 2346e1fc0c94084c3bb95c00be8aac36ae5f26ae..c75ad34d2e8b51999abbbca960bdda4973e356dc 100644 --- a/net/minecraft/world/inventory/AnvilMenu.java +++ b/net/minecraft/world/inventory/AnvilMenu.java -@@ -20,6 +20,12 @@ import net.minecraft.world.level.block.AnvilBlock; +@@ -21,6 +21,12 @@ import net.minecraft.world.level.block.AnvilBlock; import net.minecraft.world.level.block.state.BlockState; import org.slf4j.Logger; @@ -13284,7 +13327,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae public class AnvilMenu extends ItemCombinerMenu { public static final int INPUT_SLOT = 0; public static final int ADDITIONAL_SLOT = 1; -@@ -49,6 +55,10 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -50,6 +56,10 @@ public class AnvilMenu extends ItemCombinerMenu { private org.bukkit.craftbukkit.inventory.view.CraftAnvilView bukkitEntity; // CraftBukkit end public boolean bypassEnchantmentLevelRestriction = false; // Paper - bypass anvil level restrictions @@ -13295,7 +13338,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae public AnvilMenu(int containerId, Inventory playerInventory) { this(containerId, playerInventory, ContainerLevelAccess.NULL); -@@ -74,12 +84,17 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -75,12 +85,17 @@ public class AnvilMenu extends ItemCombinerMenu { @Override protected boolean mayPickup(Player player, boolean hasStack) { @@ -13314,7 +13357,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae player.giveExperienceLevels(-this.cost.get()); } -@@ -126,13 +141,19 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -133,13 +148,19 @@ public class AnvilMenu extends ItemCombinerMenu { @Override public void createResult() { @@ -13335,7 +13378,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae ItemStack itemStack = item.copy(); ItemStack item1 = this.inputSlots.getItem(1); ItemEnchantments.Mutable mutable = new ItemEnchantments.Mutable(EnchantmentHelper.getEnchantmentsForCrafting(itemStack)); -@@ -190,23 +211,34 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -197,23 +218,34 @@ public class AnvilMenu extends ItemCombinerMenu { int intValue = entry.getIntValue(); intValue = level == intValue ? intValue + 1 : Math.max(intValue, level); Enchantment enchantment = holder.value(); @@ -13374,7 +13417,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae intValue = enchantment.getMaxLevel(); } -@@ -235,6 +267,54 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -242,6 +274,54 @@ public class AnvilMenu extends ItemCombinerMenu { if (!this.itemName.equals(item.getHoverName().getString())) { i1 = 1; i += i1; @@ -13429,7 +13472,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae itemStack.set(DataComponents.CUSTOM_NAME, Component.literal(this.itemName)); } } else if (item.has(DataComponents.CUSTOM_NAME)) { -@@ -259,6 +339,12 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -266,6 +346,12 @@ public class AnvilMenu extends ItemCombinerMenu { this.onlyRenaming = true; } @@ -13442,7 +13485,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae if (this.cost.get() >= this.maximumRepairCost && !this.player.hasInfiniteMaterials()) { // CraftBukkit itemStack = ItemStack.EMPTY; } -@@ -279,6 +365,13 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -286,6 +372,13 @@ public class AnvilMenu extends ItemCombinerMenu { org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), itemStack); // CraftBukkit this.broadcastChanges(); @@ -13456,7 +13499,7 @@ index 65c400444314049d5529f1f76d65fbd6b1ea7af2..bcffac9f7781ea489e8e4d778181b9ae } else { org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), ItemStack.EMPTY); // CraftBukkit this.cost.set(AnvilMenu.DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item -@@ -287,7 +380,7 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -294,7 +387,7 @@ public class AnvilMenu extends ItemCombinerMenu { } public static int calculateIncreasedRepairCost(int oldRepairCost) { @@ -13567,7 +13610,7 @@ index cf9ab4c9fba11f5a0b293978853e205de81d6fc7..d0d6ae9c9c432f8bd5d9c91113fc5491 @Override diff --git a/net/minecraft/world/inventory/GrindstoneMenu.java b/net/minecraft/world/inventory/GrindstoneMenu.java -index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce14348f89e21c 100644 +index 18c15a7657e6fd994a8f17d0812c822d6adc8eab..e3892bc545d614a2e9e1bbc8589f1189b1b73038 100644 --- a/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/net/minecraft/world/inventory/GrindstoneMenu.java @@ -91,11 +91,13 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -13579,9 +13622,9 @@ index 6eaa468c90a826f9fdecf2cf672c4893122d2504..5cb69b7ffc82905e5ba8c99c76ce1434 // Paper start - Fire BlockExpEvent on grindstone use org.bukkit.event.block.BlockExpEvent event = new org.bukkit.event.block.BlockExpEvent(org.bukkit.craftbukkit.block.CraftBlock.at(level, blockPos), this.getExperienceAmount(level)); event.callEvent(); -- ExperienceOrb.award((ServerLevel) level, Vec3.atCenterOf(blockPos), event.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player); +- ExperienceOrb.awardWithDirection((ServerLevel) level, Vec3.atCenterOf(blockPos), Vec3.ZERO, event.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player, null); + org.purpurmc.purpur.event.inventory.GrindstoneTakeResultEvent grindstoneTakeResultEvent = new org.purpurmc.purpur.event.inventory.GrindstoneTakeResultEvent(player.getBukkitEntity(), getBukkitView(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), event.getExpToDrop()); grindstoneTakeResultEvent.callEvent(); // Purpur - Grindstone API -+ ExperienceOrb.award((ServerLevel) level, Vec3.atCenterOf(blockPos), grindstoneTakeResultEvent.getExperienceAmount(), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player); // Purpur - Grindstone API ++ ExperienceOrb.awardWithDirection((ServerLevel) level, Vec3.atCenterOf(blockPos), Vec3.ZERO, grindstoneTakeResultEvent.getExperienceAmount(), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player, null); // Purpur - Grindstone API // Paper end - Fire BlockExpEvent on grindstone use } @@ -13721,7 +13764,7 @@ index 34d52c941395645e77de810855b14012c259cf02..c605bd700fd9f5a6596a2bf964849278 return itemStack; diff --git a/net/minecraft/world/inventory/PlayerEnderChestContainer.java b/net/minecraft/world/inventory/PlayerEnderChestContainer.java -index bc2b95973192069fc64581b59583b19df876f55d..b68d57eee9605dba8ecd31f82185ec3ea81d60c1 100644 +index beb74bc8398de8b48f41af7daef14d624826310e..7ae8d115b6f4af45db9309b46ed4b4fdd8e25c08 100644 --- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java +++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java @@ -25,11 +25,18 @@ public class PlayerEnderChestContainer extends SimpleContainer { @@ -13833,7 +13876,7 @@ index bd919b9a83f9736f02783b1ba3863fd1b77c7e89..eb8d2d6f9c65185f5fe16a13ab0cdbba return optional; } else { diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java -index cc363ba3bc719d8b93992141d779b4c1d1bbd2fb..571a0f27a86ab24a9f8750ce1ab802bfd64d9ccf 100644 +index b5b53168755525eccaa0a4361172006522cf4e05..2860d49c072d4b9e473390a84e45171b984b198e 100644 --- a/net/minecraft/world/item/BlockItem.java +++ b/net/minecraft/world/item/BlockItem.java @@ -145,7 +145,16 @@ public class BlockItem extends Item { @@ -13952,7 +13995,7 @@ index 45fc973971d00c35e5b715bfa6ae5042822ed35f..2ab3da301f7edbb811c2e055f75434a7 } else if (!player.getProjectile(itemInHand).isEmpty()) { this.startSoundPlayed = false; diff --git a/net/minecraft/world/item/DyeColor.java b/net/minecraft/world/item/DyeColor.java -index 0416f4ef5c50f6579a6ef495e699a5c8c95d3878..437db0888d50654702e1fa2286a4ea9cc08d6d67 100644 +index d9c03b5e3768146bc8bcae2f86387b62ae89450b..eceb19b432d1bf5f1931568e78ab1e257ae657d1 100644 --- a/net/minecraft/world/item/DyeColor.java +++ b/net/minecraft/world/item/DyeColor.java @@ -216,4 +216,10 @@ public enum DyeColor implements StringRepresentable { @@ -14014,14 +14057,13 @@ index 3becd19d3264fa631497e967656cc7ca39252586..f824f155549857d5205ba67eb5916e0b if (player instanceof net.minecraft.server.level.ServerPlayer serverPlayer) { serverPlayer.deregisterEnderPearl(thrownEnderpearl.projectile()); diff --git a/net/minecraft/world/item/FireworkRocketItem.java b/net/minecraft/world/item/FireworkRocketItem.java -index 18d63d2da49451a2d5e1da7bf0c00e05e2f192bc..1f081e098ce3bec61b7f374e9b737838783657bb 100644 +index 83cfe63b0245f79d0873477ab3aae75f690ecb68..f32370217735b5e9556a0df7652682d89f23c595 100644 --- a/net/minecraft/world/item/FireworkRocketItem.java +++ b/net/minecraft/world/item/FireworkRocketItem.java -@@ -62,6 +62,19 @@ public class FireworkRocketItem extends Item implements ProjectileItem { - com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) player.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemInHand), (org.bukkit.entity.Firework) delayed.projectile().getBukkitEntity(), org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand)); - if (event.callEvent() && delayed.attemptSpawn()) { - player.awardStat(Stats.ITEM_USED.get(this)); // Moved up from below -+ +@@ -72,6 +72,17 @@ public class FireworkRocketItem extends Item implements ProjectileItem { + if (player.dropAllLeashConnections(null)) { + level.playSound(null, player, SoundEvents.LEAD_BREAK, SoundSource.NEUTRAL, 1.0F, 1.0F); + } + // Purpur start - Implement elytra settings + if (level.purpurConfig.elytraDamagePerFireworkBoost > 0) { + java.util.List list = net.minecraft.world.entity.EquipmentSlot.VALUES.stream().filter((enumitemslot) -> net.minecraft.world.entity.LivingEntity.canGlideUsing(player.getItemBySlot(enumitemslot), enumitemslot)).toList(); @@ -14033,7 +14075,6 @@ index 18d63d2da49451a2d5e1da7bf0c00e05e2f192bc..1f081e098ce3bec61b7f374e9b737838 + } + } + // Purpur end - Implement elytra settings -+ if (event.shouldConsume() && !player.hasInfiniteMaterials()) { itemInHand.shrink(1); // Moved up from below } else { @@ -14086,10 +14127,10 @@ index 3bf3d4030c4da65fa386a8b8083d259a6046d15e..77a8d5d334cd93d23149afa8e58f4114 consumer.accept(context); if (player != null) { diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 3ec4e0aa0777009b4ee75f6ae94732bd7e125619..07f1b27116baf2a06e6cd4eeaa8639e166fb362d 100644 +index 3acc2ae8533f19a6f9b2b6a1d96271f1047384a4..793c0a380b84d246db748be7e8807f1c0fa92d65 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -458,6 +458,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -450,6 +450,7 @@ public final class ItemStack implements DataComponentHolder { // revert back all captured blocks for (org.bukkit.block.BlockState blockstate : blocks) { ((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace(); @@ -14097,7 +14138,7 @@ index 3ec4e0aa0777009b4ee75f6ae94732bd7e125619..07f1b27116baf2a06e6cd4eeaa8639e1 } SignItem.openSign = null; // SPIGOT-6758 - Reset on early return -@@ -481,6 +482,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -473,6 +474,7 @@ public final class ItemStack implements DataComponentHolder { if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically block.onPlace(serverLevel, newPos, oldBlock, true, context); } @@ -14105,7 +14146,7 @@ index 3ec4e0aa0777009b4ee75f6ae94732bd7e125619..07f1b27116baf2a06e6cd4eeaa8639e1 serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point } -@@ -617,6 +619,26 @@ public final class ItemStack implements DataComponentHolder { +@@ -593,6 +595,26 @@ public final class ItemStack implements DataComponentHolder { return this.isDamageableItem() && this.getDamageValue() > 0; } @@ -14132,7 +14173,7 @@ index 3ec4e0aa0777009b4ee75f6ae94732bd7e125619..07f1b27116baf2a06e6cd4eeaa8639e1 public int getDamageValue() { return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage()); } -@@ -702,6 +724,14 @@ public final class ItemStack implements DataComponentHolder { +@@ -678,6 +700,14 @@ public final class ItemStack implements DataComponentHolder { org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(serverPlayer, this); // Paper - Add EntityDamageItemEvent } // CraftBukkit end @@ -14147,7 +14188,7 @@ index 3ec4e0aa0777009b4ee75f6ae94732bd7e125619..07f1b27116baf2a06e6cd4eeaa8639e1 this.shrink(1); onBreak.accept(item); } -@@ -1280,6 +1310,12 @@ public final class ItemStack implements DataComponentHolder { +@@ -1210,6 +1240,12 @@ public final class ItemStack implements DataComponentHolder { return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty(); } @@ -14161,10 +14202,10 @@ index 3ec4e0aa0777009b4ee75f6ae94732bd7e125619..07f1b27116baf2a06e6cd4eeaa8639e1 return this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY); } diff --git a/net/minecraft/world/item/Items.java b/net/minecraft/world/item/Items.java -index ae228cd15342ac159dd61bf4d09c2d80b7f44fee..4afa2d9f5825ccc70492b9c3d82ac5616d6f7faa 100644 +index cb27584b484c5103feb85e139a3dbf95a23a1236..b309312491bf822582d8cc182d609f7b74399ae8 100644 --- a/net/minecraft/world/item/Items.java +++ b/net/minecraft/world/item/Items.java -@@ -382,7 +382,7 @@ public class Items { +@@ -383,7 +383,7 @@ public class Items { public static final Item PURPUR_BLOCK = registerBlock(Blocks.PURPUR_BLOCK); public static final Item PURPUR_PILLAR = registerBlock(Blocks.PURPUR_PILLAR); public static final Item PURPUR_STAIRS = registerBlock(Blocks.PURPUR_STAIRS); @@ -14173,7 +14214,7 @@ index ae228cd15342ac159dd61bf4d09c2d80b7f44fee..4afa2d9f5825ccc70492b9c3d82ac561 public static final Item CREAKING_HEART = registerBlock(Blocks.CREAKING_HEART); public static final Item CHEST = registerBlock(Blocks.CHEST, properties -> properties.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY)); public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE); -@@ -2034,7 +2034,7 @@ public class Items { +@@ -2089,7 +2089,7 @@ public class Items { "sweet_berries", createBlockItemWithCustomItemName(Blocks.SWEET_BERRY_BUSH), new Item.Properties().food(Foods.SWEET_BERRIES) ); public static final Item GLOW_BERRIES = registerItem( @@ -14398,10 +14439,10 @@ index 879c8fe1f20decc793cfa39e686b61d521bd76ba..9c383a1028988cdd3de8b29ba72a4d7b } diff --git a/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/net/minecraft/world/item/enchantment/EnchantmentHelper.java -index b86bc2e0aca5a7ef5b01be6a21c3a8bcd1ebcca0..7afb0ee8f92f4241ce3ebcd8e5fd9f50033e3a42 100644 +index 66234431b265e0596275ca468cd40f8da98c22e2..e0cc0b49ea47bb38f7f4fe5ef3c793b0009d03c9 100644 --- a/net/minecraft/world/item/enchantment/EnchantmentHelper.java +++ b/net/minecraft/world/item/enchantment/EnchantmentHelper.java -@@ -608,4 +608,58 @@ public class EnchantmentHelper { +@@ -606,4 +606,58 @@ public class EnchantmentHelper { interface EnchantmentVisitor { void accept(Holder enchantment, int level); } @@ -14517,10 +14558,10 @@ index 9333c63f217e1207eced37c5be150e192f2fcc3e..156cee58134ada34d249aab948c02ada public ItemStack assemble() { diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java -index 650ebce14d618076cec2066d134d2ae51a87076a..0babc951d9fed6d32d3dba549cc5ced4dc6b0588 100644 +index 42f44222a8dd61f70d4583b0ca82a16400baaa5a..41ba9f234e840fadee3c8a52ba9655b97a8b7381 100644 --- a/net/minecraft/world/level/BaseSpawner.java +++ b/net/minecraft/world/level/BaseSpawner.java -@@ -54,6 +54,7 @@ public abstract class BaseSpawner { +@@ -61,6 +61,7 @@ public abstract class BaseSpawner { } public boolean isNearPlayer(Level level, BlockPos pos) { @@ -14529,7 +14570,7 @@ index 650ebce14d618076cec2066d134d2ae51a87076a..0babc951d9fed6d32d3dba549cc5ced4 } diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java -index 892a7c1eb1b321ca6d5ca709142e7feae1220815..7719bc8ff1fbbc67cdf15e1fec28dc9233cea207 100644 +index 9175a7e4e6076626cb46144c5858c2f2474f1858..452b6df03152dbd2311774bf4872983d3df92665 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java @@ -185,7 +185,7 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst @@ -14542,10 +14583,10 @@ index 892a7c1eb1b321ca6d5ca709142e7feae1220815..7719bc8ff1fbbc67cdf15e1fec28dc92 if (distance < 0.0 || d < distance * distance) { return true; diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java -index a3a2d51cf53ce4dba8caaaf73967ae714ed16a36..e0bc8e8d0a3414af452d6a889f37a828128c8d59 100644 +index 966ca1e0e828e4176e12cbcf8c4a6b16489708de..e4ac7ee4e39b609aa70d6d4b766962a4c942911e 100644 --- a/net/minecraft/world/level/GameRules.java +++ b/net/minecraft/world/level/GameRules.java -@@ -343,6 +343,13 @@ public class GameRules { +@@ -354,6 +354,13 @@ public class GameRules { this.getRule(key).setFrom(rule, level); // CraftBukkit - per-world } @@ -14560,18 +14601,17 @@ index a3a2d51cf53ce4dba8caaaf73967ae714ed16a36..e0bc8e8d0a3414af452d6a889f37a828 return this.getRule(key).get(); } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 439b8619e9f0ed3dc1974ba2ee6214b63447ea96..a94f6eb93a4271d8b50cbb55dce04affd1ac4a13 100644 +index 97d227249405c8648b8b5e9bcca5a3f202f7b903..dd8c7afecd62edc2ab3933034bf469aea729be53 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -163,6 +163,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl - return this.galeConfig; +@@ -164,12 +164,56 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl } // Gale end - Gale configuration -+ public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur - Purpur config files ++ public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur - Purpur config files public static @Nullable BlockPos lastPhysicsProblem; // Spigot private int tileTickPosition; -@@ -170,6 +171,48 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl + public final Map explosionDensityCache = new java.util.HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Faster redstone torch rapid clock removal; Move from Map in BlockRedstoneTorch to here public final ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom simpleRandom = new ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom(net.minecraft.world.level.levelgen.RandomSupport.generateUniqueSeed()); // Gale - Pufferfish - move random tick random @@ -14616,11 +14656,12 @@ index 439b8619e9f0ed3dc1974ba2ee6214b63447ea96..a94f6eb93a4271d8b50cbb55dce04aff + return java.util.Objects.hash(playerUUID, animalType); + } + } ++ // Purpur end - Add adjustable breeding cooldown to config + public CraftWorld getWorld() { return this.world; } -@@ -846,6 +889,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -846,6 +890,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration @@ -14629,7 +14670,7 @@ index 439b8619e9f0ed3dc1974ba2ee6214b63447ea96..a94f6eb93a4271d8b50cbb55dce04aff this.generator = generator; this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment); -@@ -2127,4 +2172,14 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -2124,4 +2170,14 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl return this.id; } } @@ -14658,27 +14699,13 @@ index ec32d77447dd250857a2af1d8cc3e6e233aa3e6e..345d4b80bd4383e0fb66d744d87bc8ef double d2 = nearestPlayer.distanceToSqr(d, y, d1); if (level.isLoadedAndInBounds(mutableBlockPos) && isRightDistanceToPlayerAndSpawnPoint(level, chunk, mutableBlockPos, d2)) { // Paper - don't load chunks for mob spawn diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java -index 63d0b83d648ab1a6e7c84a49f7e2e825076904ad..619d00f79276665777f3a58dec7a5f353bd7d660 100644 +index fa4695b7ee56724b4d47ce4da0a5aeb8b5467db4..1669c21534a453c9cf16b992df7a6bf276dea887 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java -@@ -314,7 +314,7 @@ public class ServerExplosion implements Explosion { - ) { - this.level = level; - this.source = source; -- this.radius = (float) Math.max(radius, 0.0); // CraftBukkit - clamp bad values -+ this.radius = (float) (level == null || level.purpurConfig.explosionClampRadius ? Math.max(radius, 0.0) : radius); // CraftBukkit - clamp bad values // Purpur - Config to remove explosion radius clamp - this.center = center; - this.fire = fire; - this.blockInteraction = blockInteraction; -@@ -636,10 +636,27 @@ public class ServerExplosion implements Explosion { - - public void explode() { - // CraftBukkit start -- if (this.radius < 0.1F) { -+ if ((this.level == null || this.level.purpurConfig.explosionClampRadius) && this.radius < 0.1F) { // Purpur - Config to remove explosion radius clamp - return; - } - // CraftBukkit end +@@ -646,6 +646,23 @@ public class ServerExplosion implements Explosion { + this.directMappedBlockCache = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH]; + this.mutablePos = new BlockPos.MutableBlockPos(); + // Paper end - collision optimisations + // Purpur start - add PreExplodeEvents + if (this.source != null) { + Location location = new Location(this.level.getWorld(), this.center.x, this.center.y, this.center.z); @@ -14696,9 +14723,9 @@ index 63d0b83d648ab1a6e7c84a49f7e2e825076904ad..619d00f79276665777f3a58dec7a5f35 + } + } + // Purpur end - Add PreExplodeEvents - // Paper start - collision optimisations - this.blockCache = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>(); - this.chunkPosCache = new long[CHUNK_CACHE_WIDTH * CHUNK_CACHE_WIDTH]; + this.level.gameEvent(this.source, GameEvent.EXPLODE, this.center); + List list = this.calculateExplodedPositions(); + this.hurtEntities(); diff --git a/net/minecraft/world/level/block/AnvilBlock.java b/net/minecraft/world/level/block/AnvilBlock.java index e8bac6deb63e0f94fb5f8b38602b2e3333e5fa8d..b14736c25cfdd94c6e3f159e53865150b06edef6 100644 --- a/net/minecraft/world/level/block/AnvilBlock.java @@ -14839,7 +14866,7 @@ index e1193bcb666b7d38c511df7c1ebddb5897cefa8f..29248afa290b3143375f0538b4dfc80a level.scheduleTick(pos, this, _int); } diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java -index 064e08e28acf7497e950d4e7f6ad7bddd92418b4..a425131042b46843c1f41ee0e9454866f193c5d3 100644 +index cc5e4e82c2339d17edf76b9212774c9dfd8e514d..4a92d21c2b1a9473d001534cb88cdc37108dd716 100644 --- a/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java @@ -99,6 +99,10 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -14929,10 +14956,10 @@ index 064e08e28acf7497e950d4e7f6ad7bddd92418b4..a425131042b46843c1f41ee0e9454866 public void updateEntityMovementAfterFallOn(BlockGetter level, Entity entity) { diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java -index cea1e405c940cd51cf830f28bfc6ce72c0c36a12..4941bf9df0c8ed6316572920323f7c5f6791b002 100644 +index ff2743d808f3c309bf098b98a6fcba7d019f54c1..941c57083803d69503e83c3ccbbb2759ba3db605 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6583,6 +6583,7 @@ public class Blocks { +@@ -6571,6 +6571,7 @@ public class Blocks { BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .forceSolidOff() @@ -14940,7 +14967,7 @@ index cea1e405c940cd51cf830f28bfc6ce72c0c36a12..4941bf9df0c8ed6316572920323f7c5f .instabreak() .sound(SoundType.AZALEA) .noOcclusion() -@@ -6594,6 +6595,7 @@ public class Blocks { +@@ -6582,6 +6583,7 @@ public class Blocks { BlockBehaviour.Properties.of() .mapColor(MapColor.PLANT) .forceSolidOff() @@ -14965,7 +14992,7 @@ index ab93da06d9e9858668aa796db497f282afa7020a..23a9c30baf8d33855703d45c2739fd50 } diff --git a/net/minecraft/world/level/block/CactusBlock.java b/net/minecraft/world/level/block/CactusBlock.java -index 8f6878cc8e72513446895bfc79886075bfcd5565..0f8cfa5423cd1813c655237aa544dad2dc56ba4d 100644 +index d4fbf130e23a959be8268085067b3bea1541be9a..2e79ce7e02aaa4abcef1507bba71e0305b6c696f 100644 --- a/net/minecraft/world/level/block/CactusBlock.java +++ b/net/minecraft/world/level/block/CactusBlock.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.pathfinder.PathComputationType; @@ -15332,10 +15359,10 @@ index 68914268ca9350a6c1d794e011e1f9a8aecd609c..8e53b45dbf740de6c6fe499ef424d11b TheEndGatewayBlockEntity.triggerCooldown(level, pos, state, theEndGatewayBlockEntity); } diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java -index cf2b105c98a3b22b9bea59cbafcd598657dc92b5..65d3477ed32c3f0db58aab6ab87d8f1721cbe876 100644 +index f6c64277c3d6e16250e2bf963b6427404e27aa9b..997831c2b916899da8518c1415233812e6ec16b8 100644 --- a/net/minecraft/world/level/block/EndPortalBlock.java +++ b/net/minecraft/world/level/block/EndPortalBlock.java -@@ -59,6 +59,13 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { +@@ -60,6 +60,13 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier) { if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity.canUsePortal(false)) { @@ -15614,10 +15641,10 @@ index db83c3630064a6875b477021a1f78bdf59c4ddc3..bbf8447cf986015f8a2e55f39d7b4f0d } diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java -index 2f08780430fc643991ffb4aeba1f1ae8e78944d2..1c58af94050b75cd8f405a201448c822792e594a 100644 +index 6c5629a6f5f91496a55eb0bf281ceae1567915b1..44707c0bf2c11f7bf7e30f747357ca2a1c6057d6 100644 --- a/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -72,7 +72,7 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -67,7 +67,7 @@ public class NetherPortalBlock extends Block implements Portal { protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { if (level.spigotConfig.enableZombiePigmenPortalSpawns && level.dimensionType().natural() // Spigot && level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) @@ -15626,7 +15653,7 @@ index 2f08780430fc643991ffb4aeba1f1ae8e78944d2..1c58af94050b75cd8f405a201448c822 && level.anyPlayerCloseEnoughForSpawning(pos)) { while (level.getBlockState(pos).is(this)) { pos = pos.below(); -@@ -118,6 +118,13 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -113,6 +113,13 @@ public class NetherPortalBlock extends Block implements Portal { protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier) { if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity.canUsePortal(false)) { @@ -15640,7 +15667,7 @@ index 2f08780430fc643991ffb4aeba1f1ae8e78944d2..1c58af94050b75cd8f405a201448c822 // CraftBukkit start - Entity in portal org.bukkit.event.entity.EntityPortalEnterEvent event = new org.bukkit.event.entity.EntityPortalEnterEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.util.CraftLocation.toBukkit(pos, level), org.bukkit.PortalType.NETHER); // Paper - add portal type level.getCraftServer().getPluginManager().callEvent(event); -@@ -130,7 +137,7 @@ public class NetherPortalBlock extends Block implements Portal { +@@ -125,7 +132,7 @@ public class NetherPortalBlock extends Block implements Portal { @Override public int getPortalTransitionTime(ServerLevel level, Entity entity) { return entity instanceof Player player @@ -15764,7 +15791,7 @@ index 248ac9bc820a96fc7653471308b18834fc735a77..ef70ba88e492904c426c7d35df442fa6 } // CraftBukkit end diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java -index 6c64fc260669266869f7495ff07e1270dcb4ac75..a2202d2b4352be07b2445064339c61ba6a2521c7 100644 +index 61acb6ec728d46bf2b0b08439ab418f355f50c79..ebc0df13fc204472742a611b25f1ffd34478b042 100644 --- a/net/minecraft/world/level/block/PoweredRailBlock.java +++ b/net/minecraft/world/level/block/PoweredRailBlock.java @@ -28,7 +28,7 @@ public class PoweredRailBlock extends BaseRailBlock { @@ -15845,10 +15872,18 @@ index 9131098e3ae4e6ffdf1491eb62537e385f75b6b2..ddedc08a96e500a390421d39be36590f && ( blockState.is(BlockTags.SNOW_LAYER_CAN_SURVIVE_ON) diff --git a/net/minecraft/world/level/block/SpawnerBlock.java b/net/minecraft/world/level/block/SpawnerBlock.java -index e8d7b6adbcb84e8d89067b54318e0feb3c3276a6..2076474168410f376beebc072af4959e5d08c101 100644 +index e8d7b6adbcb84e8d89067b54318e0feb3c3276a6..dc2846e26e778b2885fd9c558081c7677d48169a 100644 --- a/net/minecraft/world/level/block/SpawnerBlock.java +++ b/net/minecraft/world/level/block/SpawnerBlock.java -@@ -38,6 +38,59 @@ public class SpawnerBlock extends BaseEntityBlock { +@@ -14,6 +14,7 @@ import net.minecraft.world.level.block.state.BlockBehaviour; + import net.minecraft.world.level.block.state.BlockState; + + public class SpawnerBlock extends BaseEntityBlock { ++ private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger(); + public static final MapCodec CODEC = simpleCodec(SpawnerBlock::new); + + @Override +@@ -38,6 +39,62 @@ public class SpawnerBlock extends BaseEntityBlock { ); } @@ -15861,7 +15896,10 @@ index e8d7b6adbcb84e8d89067b54318e0feb3c3276a6..2076474168410f376beebc072af4959e + net.minecraft.world.level.SpawnData nextSpawnData = blockEntity instanceof SpawnerBlockEntity spawnerBlock ? spawnerBlock.getSpawner().nextSpawnData : null; + java.util.Optional> type = java.util.Optional.empty(); + if (nextSpawnData != null) { -+ type = net.minecraft.world.entity.EntityType.by(nextSpawnData.getEntityToSpawn()); ++ try (net.minecraft.util.ProblemReporter.ScopedCollector scopedCollector = new net.minecraft.util.ProblemReporter.ScopedCollector(blockEntity.problemPath(), LOGGER)) { ++ net.minecraft.world.level.storage.ValueInput valueInput = net.minecraft.world.level.storage.TagValueInput.create(scopedCollector, player.level().registryAccess(), nextSpawnData.entityToSpawn()); ++ type = net.minecraft.world.entity.EntityType.by(valueInput); ++ } + net.minecraft.nbt.CompoundTag spawnDataTag = new net.minecraft.nbt.CompoundTag(); + spawnDataTag.storeNullable("SpawnData", net.minecraft.world.level.SpawnData.CODEC, nextSpawnData); + item.set(net.minecraft.core.component.DataComponents.CUSTOM_DATA, net.minecraft.world.item.component.CustomData.EMPTY.update(compoundTag -> compoundTag.put("Purpur.SpawnData", spawnDataTag))); @@ -15908,7 +15946,7 @@ index e8d7b6adbcb84e8d89067b54318e0feb3c3276a6..2076474168410f376beebc072af4959e @Override protected void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { super.spawnAfterBreak(state, level, pos, stack, dropExperience); -@@ -46,6 +99,7 @@ public class SpawnerBlock extends BaseEntityBlock { +@@ -46,6 +103,7 @@ public class SpawnerBlock extends BaseEntityBlock { @Override public int getExpDrop(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) { @@ -15917,7 +15955,7 @@ index e8d7b6adbcb84e8d89067b54318e0feb3c3276a6..2076474168410f376beebc072af4959e int i = 15 + level.random.nextInt(15) + level.random.nextInt(15); // this.popExperience(level, pos, i); diff --git a/net/minecraft/world/level/block/SpongeBlock.java b/net/minecraft/world/level/block/SpongeBlock.java -index ad5daac30b85fead93637c83fb9d96e02c6df216..8661443ed346cfb193138b5f37c3dd931a6d6644 100644 +index 6764a77998e23de08eaf3a82a0cc0006868e1c3e..f7b6c0029e8d35ebf0fad380b8bc3b1530e2f8f1 100644 --- a/net/minecraft/world/level/block/SpongeBlock.java +++ b/net/minecraft/world/level/block/SpongeBlock.java @@ -53,8 +53,8 @@ public class SpongeBlock extends Block { @@ -15939,7 +15977,7 @@ index ad5daac30b85fead93637c83fb9d96e02c6df216..8661443ed346cfb193138b5f37c3dd93 + if (!fluidState.is(FluidTags.WATER) && (!level.purpurConfig.spongeAbsorbsLava || !fluidState.is(FluidTags.LAVA)) && (!level.purpurConfig.spongeAbsorbsWaterFromMud || !blockState.is(Blocks.MUD))) { // Purpur - Option for sponges to work on lava and mud return BlockPos.TraversalNodeStatus.SKIP; } else if (blockState.getBlock() instanceof BucketPickup bucketPickup - && !bucketPickup.pickupBlock(null, level, blockPos, blockState).isEmpty()) { + && !bucketPickup.pickupBlock(null, blockList, blockPos, blockState).isEmpty()) { // CraftBukkit @@ -76,6 +76,10 @@ public class SpongeBlock extends Block { } else { if (blockState.getBlock() instanceof LiquidBlock) { @@ -16142,7 +16180,7 @@ index 0b6debe0e55e404e6f34b3bc437fe7c7a30cec7c..a70f552fddc58efdce770c36abb548ef if (!level.addFreshEntity(witherBoss, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BUILD_WITHER)) { return; diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index f6c3dac2a2a17760ab7015fe75c5a4dd04c11319..7185a084720a8b2d521227bb0e9bbf9758dec628 100644 +index ca2cab797fc16f0961ce994fcb45029589b3c370..beda1b89b8083c63b9e177495ef063a7e5574627 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -186,6 +186,21 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -16177,7 +16215,7 @@ index f6c3dac2a2a17760ab7015fe75c5a4dd04c11319..7185a084720a8b2d521227bb0e9bbf97 private static boolean canBurn( diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java -index 027502d0af5512c31878978c4d05c52fa3029cca..f5216355ef13593bc7333d50a003012e25b3d7ea 100644 +index d679ab599dfd0bdbdc3ab5530d7fcd1c38baf7fa..0e4f6455ec48c5a7fcd4613c1c5b79d599e4960a 100644 --- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java @@ -56,7 +56,17 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity { @@ -16236,10 +16274,10 @@ index 027502d0af5512c31878978c4d05c52fa3029cca..f5216355ef13593bc7333d50a003012e @Override diff --git a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bc7b9d6faded66e95c38cfc5571b09c05af30deb 100644 +index 503c8625cd77a564e55fc1427137d43a5cc12d9e..c2e15c6e1c6bfc5a9d89afc9b8aa9551bad2cc8f 100644 --- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -142,6 +142,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -143,6 +143,16 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name public double getEffectRange() { if (this.effectRange < 0) { @@ -16256,7 +16294,7 @@ index b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bc7b9d6faded66e95c38cfc5571b09c0 return this.levels * 10 + 10; } else { return effectRange; -@@ -171,6 +181,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -172,6 +182,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name int y = pos.getY(); int z = pos.getZ(); BlockPos blockPos; @@ -16264,7 +16302,7 @@ index b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bc7b9d6faded66e95c38cfc5571b09c0 if (blockEntity.lastCheckY < y) { blockPos = pos; blockEntity.checkingBeamSections = Lists.newArrayList(); -@@ -200,6 +211,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -201,6 +212,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } } else { @@ -16272,7 +16310,7 @@ index b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bc7b9d6faded66e95c38cfc5571b09c0 if (section == null || blockState.getLightBlock() >= 15 && !blockState.is(Blocks.BEDROCK)) { blockEntity.checkingBeamSections.clear(); blockEntity.lastCheckY = height; -@@ -219,7 +231,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -220,7 +232,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name blockEntity.levels = updateBase(level, x, y, z); } @@ -16282,10 +16320,10 @@ index b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bc7b9d6faded66e95c38cfc5571b09c0 playSound(level, pos, SoundEvents.BEACON_AMBIENT); } diff --git a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index 331eb5416307378162e39e20192ba06a047b70ea..129e63c18e8c641ad2413111632c8a54b1385d1d 100644 +index 91f7ee163107d846e7f6a5783be6eff96e783886..b1b49fa83794f4237994e9b985816ddf6d20b7e9 100644 --- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -@@ -72,7 +72,7 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -75,7 +75,7 @@ public class BeehiveBlockEntity extends BlockEntity { "leash", "UUID" ); @@ -16294,7 +16332,7 @@ index 331eb5416307378162e39e20192ba06a047b70ea..129e63c18e8c641ad2413111632c8a54 private static final int MIN_TICKS_BEFORE_REENTERING_HIVE = 400; private static final int MIN_OCCUPATION_TICKS_NECTAR = 2400; public static final int MIN_OCCUPATION_TICKS_NECTARLESS = 600; -@@ -147,11 +147,33 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -150,11 +150,33 @@ public class BeehiveBlockEntity extends BlockEntity { return list; } @@ -16328,7 +16366,7 @@ index 331eb5416307378162e39e20192ba06a047b70ea..129e63c18e8c641ad2413111632c8a54 // Paper start - Add EntityBlockStorage clearEntities public void clearBees() { this.stored.clear(); -@@ -389,8 +411,8 @@ public class BeehiveBlockEntity extends BlockEntity { +@@ -392,8 +414,8 @@ public class BeehiveBlockEntity extends BlockEntity { return this.stored.stream().map(BeehiveBlockEntity.BeeData::toOccupant).toList(); } @@ -16340,35 +16378,34 @@ index 331eb5416307378162e39e20192ba06a047b70ea..129e63c18e8c641ad2413111632c8a54 private int ticksInHive; diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java -index a1075c26d55cc01219acd94d0138f81aa9d34c48..d7a08a4ecac2bb4f5626fb53e27f8d50b6936f1c 100644 +index 5986825d6a381eeb445dd424dd127864aa703163..a5ade8268a74738170caf519e7e45e13862bc39d 100644 --- a/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlockEntity.java @@ -105,6 +105,10 @@ public abstract class BlockEntity { - this.persistentDataContainer.putAll((CompoundTag) persistentDataTag); - } + input.read("PublicBukkitValues", CompoundTag.CODEC) + .ifPresent(this.persistentDataContainer::putAll); // Paper end - read persistent data container + + -+ this.persistentLore = tag.read("Purpur.persistentLore", net.minecraft.world.item.component.ItemLore.CODEC).orElse(null); // Purpur - Persistent BlockEntity Lore and DisplayName ++ this.persistentLore = input.read("Purpur.persistentLore", net.minecraft.world.item.component.ItemLore.CODEC).orElse(null); // Purpur - Persistent BlockEntity Lore and DisplayName + } - public final void loadWithComponents(CompoundTag tag, HolderLookup.Provider registries) { -@@ -118,6 +122,12 @@ public abstract class BlockEntity { + public final void loadWithComponents(ValueInput input) { +@@ -117,6 +121,11 @@ public abstract class BlockEntity { } - protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries) { + protected void saveAdditional(ValueOutput output) { + // Purpur start - Persistent BlockEntity Lore and DisplayName + if (this.persistentLore != null) { -+ net.minecraft.resources.RegistryOps registryOps = registries.createSerializationContext(NbtOps.INSTANCE); -+ tag.store("Purpur.persistentLore", net.minecraft.world.item.component.ItemLore.CODEC, registryOps, this.persistentLore); ++ output.store("Purpur.persistentLore", net.minecraft.world.item.component.ItemLore.CODEC, this.persistentLore); + } + // Purpur end - Persistent BlockEntity Lore and DisplayName } public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) { -@@ -379,4 +389,17 @@ public abstract class BlockEntity { - private ComponentHelper() { +@@ -402,4 +411,17 @@ public abstract class BlockEntity { + return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos(); } } + @@ -16386,7 +16423,7 @@ index a1075c26d55cc01219acd94d0138f81aa9d34c48..d7a08a4ecac2bb4f5626fb53e27f8d50 + // Purpur end - Persistent BlockEntity Lore and DisplayName } diff --git a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java -index 2f07a23a6151a4dfb28ddc0ab38ec2abefcdd27c..aeb10f21cd9dab3b134d1d8478083453dc37e3f2 100644 +index 0e87d20639c382be2221d73c7498480d21ebeafb..3ea9fe4c936f024c15a6bba6e7c5d960a3def1f9 100644 --- a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java +++ b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java @@ -151,7 +151,7 @@ public class ConduitBlockEntity extends BlockEntity { @@ -16415,57 +16452,50 @@ index 2f07a23a6151a4dfb28ddc0ab38ec2abefcdd27c..aeb10f21cd9dab3b134d1d8478083453 // CraftBukkit start return i; } -@@ -209,17 +209,17 @@ public class ConduitBlockEntity extends BlockEntity { - blockEntity.destroyTargetUUID = null; - } else if (blockEntity.destroyTarget == null) { - List entitiesOfClass = level.getEntitiesOfClass( -- LivingEntity.class, getDestroyRangeAABB(pos), collidedEntity -> collidedEntity instanceof Enemy && collidedEntity.isInWaterOrRain() -+ LivingEntity.class, getDestroyRangeAABB(pos, level), collidedEntity -> collidedEntity instanceof Enemy && collidedEntity.isInWaterOrRain() // Purpur - Conduit behavior configuration - ); - if (!entitiesOfClass.isEmpty()) { - blockEntity.destroyTarget = entitiesOfClass.get(level.random.nextInt(entitiesOfClass.size())); - } -- } else if (!blockEntity.destroyTarget.isAlive() || !pos.closerThan(blockEntity.destroyTarget.blockPosition(), 8.0)) { -+ } else if (!blockEntity.destroyTarget.isAlive() || !pos.closerThan(blockEntity.destroyTarget.blockPosition(), level.purpurConfig.conduitDamageDistance)) { // Purpur - Conduit behavior configuration - blockEntity.destroyTarget = null; - } - - if (damageTarget && blockEntity.destroyTarget != null) { // CraftBukkit -- if (blockEntity.destroyTarget.hurtServer((net.minecraft.server.level.ServerLevel) level, level.damageSources().magic().eventBlockDamager(level, pos), 4.0F)) // CraftBukkit -+ if (blockEntity.destroyTarget.hurtServer((net.minecraft.server.level.ServerLevel) level, level.damageSources().magic().eventBlockDamager(level, pos), level.purpurConfig.conduitDamageAmount)) // CraftBukkit // Purpur - Conduit behavior configuration +@@ -202,7 +202,7 @@ public class ConduitBlockEntity extends BlockEntity { + EntityReference entityReference = updateDestroyTarget(blockEntity.destroyTarget, level, pos, canDestroy); + LivingEntity livingEntity = EntityReference.get(entityReference, level, LivingEntity.class); + if (damageTarget && livingEntity != null) { // CraftBukkit +- if (livingEntity.hurtServer(level, level.damageSources().magic().eventBlockDamager(level, pos), 4.0F)) // CraftBukkit - move up ++ if (livingEntity.hurtServer(level, level.damageSources().magic().eventBlockDamager(level, pos), level.purpurConfig.conduitDamageAmount)) // CraftBukkit - move up // Purpur - Conduit behavior configuration level.playSound( - null, - blockEntity.destroyTarget.getX(), -@@ -249,16 +249,22 @@ public class ConduitBlockEntity extends BlockEntity { + null, livingEntity.getX(), livingEntity.getY(), livingEntity.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F + ); +@@ -224,20 +224,26 @@ public class ConduitBlockEntity extends BlockEntity { + return selectNewTarget(level, pos); + } else { + LivingEntity livingEntity = EntityReference.get(destroyTarget, level, LivingEntity.class); +- return livingEntity != null && livingEntity.isAlive() && pos.closerThan(livingEntity.blockPosition(), 8.0) ? destroyTarget : null; ++ return livingEntity != null && livingEntity.isAlive() && pos.closerThan(livingEntity.blockPosition(), level.purpurConfig.conduitDamageDistance) ? destroyTarget : null; // Purpur - Conduit behavior configuration + } + } + + @Nullable + private static EntityReference selectNewTarget(ServerLevel level, BlockPos pos) { + List entitiesOfClass = level.getEntitiesOfClass( +- LivingEntity.class, getDestroyRangeAABB(pos), livingEntity -> livingEntity instanceof Enemy && livingEntity.isInWaterOrRain() ++ LivingEntity.class, getDestroyRangeAABB(pos, level), livingEntity -> livingEntity instanceof Enemy && livingEntity.isInWaterOrRain() // Purpur - Conduit behavior configuration + ); + return entitiesOfClass.isEmpty() ? null : new EntityReference<>(Util.getRandom(entitiesOfClass, level.random)); } public static AABB getDestroyRangeAABB(BlockPos pos) { +- return new AABB(pos).inflate(8.0); + // Purpur start - Conduit behavior configuration + return getDestroyRangeAABB(pos, null); + } + + private static AABB getDestroyRangeAABB(BlockPos pos, Level level) { + // Purpur end - Conduit behavior configuration - int x = pos.getX(); - int y = pos.getY(); - int z = pos.getZ(); -- return new AABB(x, y, z, x + 1, y + 1, z + 1).inflate(8.0); -+ return new AABB(x, y, z, x + 1, y + 1, z + 1).inflate(level == null ? 8.0 : level.purpurConfig.conduitDamageDistance); // Purpur - Conduit behavior configuration ++ return new AABB(pos).inflate(level == null ? 8.0 : level.purpurConfig.conduitDamageDistance); // Purpur - Conduit behavior configuration } - @Nullable - private static LivingEntity findDestroyTarget(Level level, BlockPos pos, UUID targetId) { - List entitiesOfClass = level.getEntitiesOfClass( -- LivingEntity.class, getDestroyRangeAABB(pos), collidedEntity -> collidedEntity.getUUID().equals(targetId) -+ LivingEntity.class, getDestroyRangeAABB(pos, level), collidedEntity -> collidedEntity.getUUID().equals(targetId) // Purpur - Conduit behavior configuration - ); - return entitiesOfClass.size() == 1 ? entitiesOfClass.get(0) : null; - } + private static void animationTick(Level level, BlockPos pos, List positions, @Nullable Entity entity, int tickCount) { diff --git a/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java b/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java -index 4b2462ece4eb5abb76ea9259b3e6a77f8a8e4e07..d35d04823e5d0de4487310caadd013f7dab1f419 100644 +index 5dd044c13e09423af43330df565bfe6ce88a883c..93f34bbfae6f8f02ff4ea92d6745cd1d288c8dbd 100644 --- a/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java +++ b/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java -@@ -31,6 +31,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable +@@ -30,6 +30,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable private static final RandomSource RANDOM = RandomSource.create(); @Nullable private Component name; @@ -16473,24 +16503,24 @@ index 4b2462ece4eb5abb76ea9259b3e6a77f8a8e4e07..d35d04823e5d0de4487310caadd013f7 public EnchantingTableBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.ENCHANTING_TABLE, pos, state); -@@ -42,12 +43,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable - if (this.hasCustomName()) { - tag.store("CustomName", ComponentSerialization.CODEC, registries.createSerializationContext(NbtOps.INSTANCE), this.name); - } -+ tag.putInt("Purpur.Lapis", this.lapis); // Purpur - Enchantment Table Persists Lapis +@@ -39,12 +40,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable + protected void saveAdditional(ValueOutput output) { + super.saveAdditional(output); + output.storeNullable("CustomName", ComponentSerialization.CODEC, this.name); ++ output.putInt("Purpur.Lapis", this.lapis); // Purpur - Enchantment Table Persists Lapis } @Override - protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) { - super.loadAdditional(tag, registries); - this.name = parseCustomNameSafe(tag.get("CustomName"), registries); -+ this.lapis = tag.getIntOr("Purpur.Lapis", 0); // Purpur - Enchantment Table Persists Lapis + protected void loadAdditional(ValueInput input) { + super.loadAdditional(input); + this.name = parseCustomNameSafe(input, "CustomName"); ++ this.lapis = input.getIntOr("Purpur.Lapis", 0); // Purpur - Enchantment Table Persists Lapis } public static void bookAnimationTick(Level level, BlockPos pos, BlockState state, EnchantingTableBlockEntity enchantingTable) { -@@ -139,4 +142,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable - public void removeComponentsFromTag(CompoundTag tag) { - tag.remove("CustomName"); +@@ -136,4 +139,14 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable + public void removeComponentsFromTag(ValueOutput output) { + output.discard("CustomName"); } + + // Purpur start - Enchantment Table Persists Lapis @@ -16504,10 +16534,10 @@ index 4b2462ece4eb5abb76ea9259b3e6a77f8a8e4e07..d35d04823e5d0de4487310caadd013f7 + // Purpur end - Enchantment Table Persists Lapis } diff --git a/net/minecraft/world/level/block/entity/SignBlockEntity.java b/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 8f87248a77c2083541105cfd1da1bc87bd122ba4..4c5de8783b2fc87a442e194e0069ce9cd5b5fd6c 100644 +index be1b138a78d8cb87956d531a801d85e677ca6f4a..2e0b2b55031343e32b4972c0f0017e950d56652d 100644 --- a/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -151,16 +151,32 @@ public class SignBlockEntity extends BlockEntity { +@@ -148,16 +148,32 @@ public class SignBlockEntity extends BlockEntity { return this.setText(updater.apply(text), isFrontText); } @@ -16542,25 +16572,28 @@ index 8f87248a77c2083541105cfd1da1bc87bd122ba4..4c5de8783b2fc87a442e194e0069ce9c ); } } -@@ -298,6 +314,24 @@ public class SignBlockEntity extends BlockEntity { - return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel)level, 2, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events +@@ -307,6 +323,27 @@ public class SignBlockEntity extends BlockEntity { + return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, level, 2, string, component, level.getServer(), player); // Paper - Fix commands from signs not firing command events } + // Purpur start - Signs allow color codes + public ClientboundBlockEntityDataPacket getTranslatedUpdatePacket(boolean filtered, boolean front) { -+ final CompoundTag nbt = new CompoundTag(); -+ this.saveAdditional(nbt, this.getLevel().registryAccess()); -+ final Component[] lines = front ? frontText.getMessages(filtered) : backText.getMessages(filtered); -+ final String side = front ? "front_text" : "back_text"; -+ for (int i = 0; i < 4; i++) { -+ final var component = io.papermc.paper.adventure.PaperAdventure.asAdventure(lines[i]); -+ final String line = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().serialize(component); -+ final CompoundTag sideNbt = nbt.getCompoundOrEmpty(side); -+ final net.minecraft.nbt.ListTag messagesNbt = sideNbt.getListOrEmpty("messages"); -+ messagesNbt.set(i, net.minecraft.nbt.StringTag.valueOf(line)); ++ try (net.minecraft.util.ProblemReporter.ScopedCollector scopedCollector = new net.minecraft.util.ProblemReporter.ScopedCollector(this.problemPath(), LOGGER)) { ++ net.minecraft.world.level.storage.TagValueOutput tagValueOutput = net.minecraft.world.level.storage.TagValueOutput.createWithContext(scopedCollector, this.getLevel().registryAccess()); ++ this.saveAdditional(tagValueOutput); ++ ++ final Component[] lines = front ? frontText.getMessages(filtered) : backText.getMessages(filtered); ++ final String side = front ? "front_text" : "back_text"; ++ net.minecraft.world.level.storage.ValueOutput sideNbt = tagValueOutput.child(side); ++ net.minecraft.world.level.storage.ValueOutput.TypedOutputList messagesNbt = sideNbt.list("messages", com.mojang.serialization.Codec.STRING); ++ for (int i = 0; i < 4; i++) { ++ final net.kyori.adventure.text.Component component = io.papermc.paper.adventure.PaperAdventure.asAdventure(lines[i]); ++ final String line = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().serialize(component); ++ messagesNbt.add(line); ++ } ++ tagValueOutput.putString("PurpurEditor", "true"); ++ return ClientboundBlockEntityDataPacket.create(this, (blockEntity, registryAccess) -> tagValueOutput.buildResult()); + } -+ nbt.putString("PurpurEditor", "true"); -+ return ClientboundBlockEntityDataPacket.create(this, (blockEntity, registryAccess) -> nbt); + } + // Purpur end - Signs allow color codes + @@ -16599,17 +16632,17 @@ index ad143a92569f5b420ccaa2089758b2fb3b4ab7c5..5a3660e02bc805e9a35a81b8a61f07b3 } diff --git a/net/minecraft/world/level/chunk/storage/EntityStorage.java b/net/minecraft/world/level/chunk/storage/EntityStorage.java -index f9fb1380be9cbe960127c208c65c19f770e50b6d..17315201b8d3546058e2440b8fb8a5bb465f1259 100644 +index f1f8575a4b37114ced3cdb1d2ea33a36a2db44fd..2afe96a69c09decbe972332d2d38f67427d880d8 100644 --- a/net/minecraft/world/level/chunk/storage/EntityStorage.java +++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java -@@ -100,6 +100,7 @@ public class EntityStorage implements EntityPersistentStorage { - } - // Paper end - Entity load/save limit per chunk - CompoundTag compoundTag1 = new CompoundTag(); -+ if (!entity.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity - if (entity.save(compoundTag1)) { - listTag.add(compoundTag1); - } +@@ -108,6 +108,7 @@ public class EntityStorage implements EntityPersistentStorage { + } + // Paper end - Entity load/save limit per chunk + TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector.forChild(entity.problemPath()), entity.registryAccess()); ++ if (!entity.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity + if (entity.save(tagValueOutput)) { + CompoundTag compoundTag1 = tagValueOutput.buildResult(); + listTag.add(compoundTag1); diff --git a/net/minecraft/world/level/levelgen/DensityFunctions.java b/net/minecraft/world/level/levelgen/DensityFunctions.java index 04527a5c65ad630f794fed9071d485aedd02257a..77731406cb3dc417aa2fe1cb4352f3d2d7d498aa 100644 --- a/net/minecraft/world/level/levelgen/DensityFunctions.java @@ -16747,7 +16780,7 @@ index 9e6b2bbc1f83d32d0332f036be4f1a0e18b826bf..db6baaa698fe93aba3fbd595158b568b } else if (blockState.is(Blocks.HONEY_BLOCK)) { return PathType.STICKY_HONEY; diff --git a/net/minecraft/world/level/portal/PortalShape.java b/net/minecraft/world/level/portal/PortalShape.java -index 21e3d5702fae0b1d94739744228c4cab608adb6b..07140dddebca268c25a243f6c6e082c3adf919e2 100644 +index b19260f442fe272efed8e61d1316bf0d6ff38023..0ecc5a49de322d531c33042858f8420d370f3805 100644 --- a/net/minecraft/world/level/portal/PortalShape.java +++ b/net/minecraft/world/level/portal/PortalShape.java @@ -28,7 +28,7 @@ public class PortalShape { @@ -16760,7 +16793,7 @@ index 21e3d5702fae0b1d94739744228c4cab608adb6b..07140dddebca268c25a243f6c6e082c3 private static final double SAFE_TRAVEL_MAX_VERTICAL_DELTA = 1.0; private final Direction.Axis axis; diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index c8f23011a8942a5be970c606f67142cbd202b97e..7bbeed6c998c91e68376d3f17a510d68e3cd0b27 100644 +index 98971a07757d29d6926a0aa05f229b8020af42b6..bf01c9d54248ceb8f97cf1e1c0e4234a338cb8ce 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -81,6 +81,7 @@ public class MapItemSavedData extends SavedData { @@ -16788,10 +16821,10 @@ index c4f29da30d63deb3f9eabafcf62a946ff148b6b7..f3083702286dfb7932f08e0b811eded7 return stack; } diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java -index c22acc8889fbb3c9ee698624189c195ee4b5eefb..5767fbfd7f33c5276fb4335ce473b2e1baca411c 100644 +index 84f3073444ae9e11e5d11224d6af6474ced925e2..e53398996bbb278c6e06024d8ca945b364a44c10 100644 --- a/net/minecraft/world/phys/AABB.java +++ b/net/minecraft/world/phys/AABB.java -@@ -465,4 +465,10 @@ public class AABB { +@@ -476,4 +476,10 @@ public class AABB { return new AABB(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ); } } @@ -16804,10 +16837,10 @@ index c22acc8889fbb3c9ee698624189c195ee4b5eefb..5767fbfd7f33c5276fb4335ce473b2e1 } diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..234f123959830cc2adb78b9dc8752906140e5b11 +index 0000000000000000000000000000000000000000..ed777b003140486fd5d8d1db7af770301e30bec9 --- /dev/null +++ b/org/purpurmc/purpur/PurpurConfig.java -@@ -0,0 +1,597 @@ +@@ -0,0 +1,592 @@ +package org.purpurmc.purpur; + +import com.google.common.base.Throwables; @@ -17040,11 +17073,6 @@ index 0000000000000000000000000000000000000000..234f123959830cc2adb78b9dc8752906 + deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer); + } + -+ public static String serverModName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); -+ private static void serverModName() { -+ serverModName = getString("settings.server-mod-name", serverModName); -+ } -+ + public static double laggingThreshold = 19.0D; + private static void tickLoopSettings() { + laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold); @@ -17399,7 +17427,7 @@ index 0000000000000000000000000000000000000000..234f123959830cc2adb78b9dc8752906 + startupCommands.add(command); + }); + } -+ ++ + public static boolean generateEndVoidRings = false; + private static void generateEndVoidRings() { + generateEndVoidRings = getBoolean("settings.generate-end-void-rings", generateEndVoidRings); @@ -17407,10 +17435,10 @@ index 0000000000000000000000000000000000000000..234f123959830cc2adb78b9dc8752906 +} diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..31cc4e6e68a9743aaaeb296cb31e64526d3f1f73 +index 0000000000000000000000000000000000000000..a03e166b490952534e8050654c1afa975795f731 --- /dev/null +++ b/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -0,0 +1,3596 @@ +@@ -0,0 +1,3614 @@ +package org.purpurmc.purpur; + +import java.util.ArrayList; @@ -17670,11 +17698,6 @@ index 0000000000000000000000000000000000000000..31cc4e6e68a9743aaaeb296cb31e6452 + infinityWorksWithoutArrows = getBoolean("gameplay-mechanics.infinity-bow.works-without-arrows", infinityWorksWithoutArrows); + } + -+ public boolean explosionClampRadius = true; -+ private void explosionSettings() { -+ explosionClampRadius = getBoolean("gameplay-mechanics.clamp-explosion-radius", explosionClampRadius); -+ } -+ + public List itemImmuneToCactus = new ArrayList<>(); + public List itemImmuneToExplosion = new ArrayList<>(); + public List itemImmuneToFire = new ArrayList<>(); @@ -19385,6 +19408,29 @@ index 0000000000000000000000000000000000000000..31cc4e6e68a9743aaaeb296cb31e6452 + chanceHeadHalloweenOnEntity = (float) getDouble("gameplay-mechanics.halloween.head-chance", chanceHeadHalloweenOnEntity); + } + ++ public boolean happyGhastRidableInWater = false; ++ public double happyGhastMaxHealth = 20.0D; ++ public double happyGhastTemptRange = 16.0D; ++ public double happyGhastFlyingSpeed = 0.05D; ++ public double happyGhastMovementSpeed = 0.05D; ++ public double happyGhastFollowRange = 16.0D; ++ public double happyGhastCameraDistance = 8.0D; ++ public double happyGhastScale = 1.0D; ++ public boolean happyGhastTakeDamageFromWater = false; ++ public boolean happyGhastAlwaysDropExp = false; ++ private void happyGhastSettings() { ++ happyGhastRidableInWater = getBoolean("mobs.happy_ghast.ridable-in-water", happyGhastRidableInWater); ++ happyGhastMaxHealth = getDouble("mobs.happy_ghast.attributes.max_health", happyGhastMaxHealth); ++ happyGhastTemptRange = getDouble("mobs.happy_ghast.attributes.tempt_range", happyGhastTemptRange); ++ happyGhastFlyingSpeed = getDouble("mobs.happy_ghast.attributes.flying_speed", happyGhastFlyingSpeed); ++ happyGhastMovementSpeed = getDouble("mobs.happy_ghast.attributes.movement_speed", happyGhastMovementSpeed); ++ happyGhastFollowRange = getDouble("mobs.happy_ghast.attributes.follow_range", happyGhastFollowRange); ++ happyGhastCameraDistance = getDouble("mobs.happy_ghast.attributes.camera_distance", happyGhastCameraDistance); ++ happyGhastScale = Mth.clamp(getDouble("mobs.happy_ghast.attributes.scale", happyGhastScale), 0.0625D, 1.0D); ++ happyGhastTakeDamageFromWater = getBoolean("mobs.happy_ghast.takes-damage-from-water", happyGhastTakeDamageFromWater); ++ happyGhastAlwaysDropExp = getBoolean("mobs.happy_ghast.always-drop-exp", happyGhastAlwaysDropExp); ++ } ++ + public boolean hoglinRidable = false; + public boolean hoglinRidableInWater = true; + public boolean hoglinControllable = true; @@ -21825,31 +21871,37 @@ index 0000000000000000000000000000000000000000..922e48799c43ca322a8f550c98a26e1e +} diff --git a/org/purpurmc/purpur/entity/PurpurStoredBee.java b/org/purpurmc/purpur/entity/PurpurStoredBee.java new file mode 100644 -index 0000000000000000000000000000000000000000..800cc8b2204c0ef885ff65005f6850749aaf445b +index 0000000000000000000000000000000000000000..683a98b424f170b4f819422550f3f7865abd39cf --- /dev/null +++ b/org/purpurmc/purpur/entity/PurpurStoredBee.java -@@ -0,0 +1,105 @@ +@@ -0,0 +1,116 @@ +package org.purpurmc.purpur.entity; + ++import com.mojang.logging.LogUtils; +import io.papermc.paper.adventure.PaperAdventure; +import net.kyori.adventure.text.Component; +import net.minecraft.core.RegistryAccess; +import net.minecraft.nbt.CompoundTag; ++import net.minecraft.util.ProblemReporter; +import net.minecraft.world.level.block.entity.BeehiveBlockEntity; +import net.minecraft.world.level.block.entity.BlockEntity; ++import net.minecraft.world.level.storage.TagValueInput; ++import net.minecraft.world.level.storage.ValueInput; +import org.bukkit.block.EntityBlockStorage; -+import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; +import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry; ++import org.bukkit.craftbukkit.util.CraftChatMessage; +import org.bukkit.entity.Bee; +import org.bukkit.entity.EntityType; +import org.bukkit.persistence.PersistentDataContainer; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -+ ++import org.slf4j.Logger; +import java.util.Locale; + +public class PurpurStoredBee implements StoredEntity { ++ static final Logger LOGGER = LogUtils.getLogger(); ++ + private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); + + private final EntityBlockStorage blockStorage; @@ -21858,16 +21910,21 @@ index 0000000000000000000000000000000000000000..800cc8b2204c0ef885ff65005f685074 + + private Component customName; + -+ public PurpurStoredBee(BeehiveBlockEntity.BeeData data, EntityBlockStorage blockStorage) { ++ public PurpurStoredBee(BeehiveBlockEntity.BeeData data, EntityBlockStorage blockStorage, final BeehiveBlockEntity blockEntity) { + this.handle = data; + this.blockStorage = blockStorage; + + CompoundTag customData = handle.occupant.entityData().copyTag(); -+ net.minecraft.network.chat.Component customNameMinecraft = BlockEntity.parseCustomNameSafe(customData.get("CustomName"), RegistryAccess.EMPTY); -+ this.customName = customNameMinecraft == null ? null : PaperAdventure.asAdventure(customNameMinecraft); + -+ if (customData.get("BukkitValues") instanceof CompoundTag compoundTag) { -+ this.persistentDataContainer.putAll(compoundTag); ++ try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(blockEntity.problemPath(), LOGGER)) { ++ ValueInput valueInput = TagValueInput.create(scopedCollector, RegistryAccess.EMPTY, customData); ++ ++ net.minecraft.network.chat.Component customNameMinecraft = BlockEntity.parseCustomNameSafe(valueInput, "CustomName"); ++ this.customName = customNameMinecraft == null ? null : PaperAdventure.asAdventure(customNameMinecraft); ++ ++ if (customData.get("BukkitValues") instanceof CompoundTag compoundTag) { ++ this.persistentDataContainer.putAll(compoundTag); ++ } + } + } + @@ -21930,7 +21987,7 @@ index 0000000000000000000000000000000000000000..800cc8b2204c0ef885ff65005f685074 + if(customName == null) { + handle.occupant.entityData().copyTag().remove("CustomName"); + } else { -+ handle.occupant.entityData().copyTag().putString("CustomName", net.minecraft.network.chat.Component.Serializer.toJson(PaperAdventure.asVanilla(customName), RegistryAccess.EMPTY)); ++ handle.occupant.entityData().copyTag().putString("CustomName", CraftChatMessage.toJSON(PaperAdventure.asVanilla(customName))); + } + } +} diff --git a/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch b/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch index 2d2474e1..7d30f106 100644 --- a/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch +++ b/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Pufferfish and Purpur patches diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 271233087ad8a0ef8e90e1d518907e166f8235a2..ecf1e794c78962440da02aadfbe78d9782df2cf0 100644 +index db1f0031a6ae6ba1b9ea265043b87817e2c746f8..1aab4d41054f8e780e6c0ccdb96affee19068311 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -276,7 +276,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation @@ -26,7 +26,7 @@ index 271233087ad8a0ef8e90e1d518907e166f8235a2..ecf1e794c78962440da02aadfbe78d97 public boolean lagging = false; // Purpur - Lagging threshold protected boolean upnp = false; // Purpur - UPnP Port Forwarding -@@ -1239,9 +1239,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop byteAllowed) { @@ -78,10 +78,10 @@ index 35ca166964e8436154891708f69ac010491b64aa..586c00610fdba178f27391820d623c3a this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect return; diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index d8c83a449a1f33031aa671f3bbe366a504172a1e..d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa 100644 +index d8209037e988bc7a68f634a6650930bd1082c4d1..a2a4ad515a4ef0fa24948d0f47c5bd78ec7e6555 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -526,23 +526,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -543,23 +543,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Purpur end - Add canSaveToDisk to Entity @@ -128,10 +128,10 @@ index d8c83a449a1f33031aa671f3bbe366a504172a1e..d4a7cabf25b3ba2b085c68a3a7ed73a0 public Entity(EntityType entityType, Level level) { this.type = entityType; diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index cd8c764f9aa2321c6e157abe958d89868a9f7bd1..ed15b5f29658d799a36dcbd196a8fcb107be4bda 100644 +index d7d6e0543dc26694891e4a9049b8162caadbf5e6..d59caf13e9066f2171c360e07a26122a540380a0 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1024,13 +1024,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1049,13 +1049,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin // Gale start - Petal - reduce skull ItemStack lookups for reduced visibility EntityType type = lookingEntity.getType(); // Purpur start - Mob head visibility percent @@ -150,10 +150,10 @@ index cd8c764f9aa2321c6e157abe958d89868a9f7bd1..ed15b5f29658d799a36dcbd196a8fcb1 } // Purpur end - Mob head visibility percent diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 6a94f42c8e048985b94db64fa0405e12824a8a0f..fbcf26c0bfb9f496c99bd5a2ba988be06162cd52 100644 +index 6d8e7d23640707ba0d771174f65e58df75243f77..c5f4b878aa5d736d987982c94fbf557c0f267bbf 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -1505,10 +1505,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1531,10 +1531,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void playAttackSound() { } @@ -195,10 +195,10 @@ index 60ec389615cfcad388ed37b8d3ee04e87db36755..34fe1d3bd6603225f84ab18794bbb118 BlockPos blockPos = entity.blockPosition(); List list = Lists.newArrayList(); diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index 441287e74243a413c97a98b7898bab7833ac6458..18107d9be4d9ba816852ee4595a5349867834bef 100644 +index 7127d8e5fff81be017f0aa04606cb8404ad7b2fd..a25976d6f0dec86b88017cd5f86f3b51c8d7444b 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -283,8 +283,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -268,8 +268,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -209,10 +209,10 @@ index 441287e74243a413c97a98b7898bab7833ac6458..18107d9be4d9ba816852ee4595a53498 AllayAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index de207d747026453fabe2e6e725d2aa8504fbc9a1..524a7c31708a03f7a9dae75731caa8a450a6488d 100644 +index 02db38fa315ecb9d5bdba74848012710106b662e..2cdf2fb60d4d3642f0870944be9bd5abafa9e817 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -372,8 +372,7 @@ public class Axolotl extends Animal implements Bucketable { +@@ -374,8 +374,7 @@ public class Axolotl extends Animal implements Bucketable { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -223,10 +223,10 @@ index de207d747026453fabe2e6e725d2aa8504fbc9a1..524a7c31708a03f7a9dae75731caa8a4 AxolotlAi.updateActivity(this); if (!this.isNoAi()) { diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 89fa6a785ff73b30effd58dde4fbcbf99fdad168..71bae5f5ed284fed30262872771f85de97383d6d 100644 +index c4db078db0b7bb2bd8f6757a8bd13d60a7a4fa14..a7e9179c287671a689cb5ce668b5a33896da87a4 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -259,8 +259,7 @@ public class Frog extends Animal { +@@ -260,8 +260,7 @@ public class Frog extends Animal { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -237,10 +237,10 @@ index 89fa6a785ff73b30effd58dde4fbcbf99fdad168..71bae5f5ed284fed30262872771f85de FrogAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index a445bbe84d919ffadd8f3f0006b12140cd8060fd..7a3bfa91ffc5c7c6b04eef7b1b1d3c04c5a6d856 100644 +index a3858465569c40fcfc7c8c4c4735335ac83cb078..5abdf4253f1d0a6f35d8e05f7a0a2b4100083f76 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -134,8 +134,7 @@ public class Tadpole extends AbstractFish { +@@ -136,8 +136,7 @@ public class Tadpole extends AbstractFish { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -251,10 +251,10 @@ index a445bbe84d919ffadd8f3f0006b12140cd8060fd..7a3bfa91ffc5c7c6b04eef7b1b1d3c04 TadpoleAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index 40ba2e6dc6b1efbd17dba582561c133f6b41df25..39d4da47dcd7bbb33ad907b428dc0f65eaa23a82 100644 +index 11b020704a673c69bd2d4ab6313ea32e8e97cc23..c608c71eb601c169f543823c5c342b8928b9cf50 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -226,8 +226,7 @@ public class Goat extends Animal { +@@ -227,8 +227,7 @@ public class Goat extends Animal { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -265,10 +265,10 @@ index 40ba2e6dc6b1efbd17dba582561c133f6b41df25..39d4da47dcd7bbb33ad907b428dc0f65 GoatAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 584955d151e95727406bc68d6a6f15a33c0f920c..865a83fc73d79893e9bdedad37a6e3986d15fc2b 100644 +index 3c126b1610718a407c16775a935b295ecbaab533..8c9f240badf5a678ee4e1815e010a204f8704f4e 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -206,8 +206,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -207,8 +207,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { private int behaviorTick; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -279,10 +279,10 @@ index 584955d151e95727406bc68d6a6f15a33c0f920c..865a83fc73d79893e9bdedad37a6e398 HoglinAi.updateActivity(this); if (this.isConverting()) { diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index 0afdfdc07764a26316c171c2a6722caf786875f2..732d44372cf226ca9d008ebc26d1838237ec96d6 100644 +index fb58af763cf75c80703360a5c668168775b1458c..e442784741f1d0b4892284b6811343f954b50182 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -357,8 +357,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -358,8 +358,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento private int behaviorTick; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -293,10 +293,10 @@ index 0afdfdc07764a26316c171c2a6722caf786875f2..732d44372cf226ca9d008ebc26d18382 PiglinAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java -index 9f1c07be83999b7bafdee9238e8bad8c646d42f1..554e679a756dc1bf529053594231a958717f3573 100644 +index ef960ee83adbb5e3ebfa44cd2457b23718045f61..e53c18efb573dea39a3d45f3cdb827d73b901ab6 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java +++ b/net/minecraft/world/entity/projectile/Projectile.java -@@ -85,7 +85,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -82,7 +82,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { if (maxChunkLoadsPerProjectile >= 0 && this.chunksLoadedByProjectile >= maxChunkLoadsPerProjectile) { if (maxProjectileChunkLoadsConfig.perProjectile.removeFromWorldAfterReachLimit) { @@ -306,10 +306,10 @@ index 9f1c07be83999b7bafdee9238e8bad8c646d42f1..554e679a756dc1bf529053594231a958 this.setDeltaMovement(0, this.getDeltaMovement().y, 0); } diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java -index 31cc4e6e68a9743aaaeb296cb31e64526d3f1f73..cadfbb7310fce33eda24d69c39fda5689c7fb882 100644 +index a03e166b490952534e8050654c1afa975795f731..88a2ad8e3b30cb9f447eb4001d33c7799339b6a0 100644 --- a/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2435,6 +2435,13 @@ public class PurpurWorldConfig { +@@ -2453,6 +2453,13 @@ public class PurpurWorldConfig { piglinMobGriefingOverride = getBooleanOrDefault("mobs.piglin.mob-griefing-override", piglinMobGriefingOverride); piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater); piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier); diff --git a/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch b/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch index dafe82e0..c2f22db5 100644 --- a/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch +++ b/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/PurpurMC/Purpur diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index ecf1e794c78962440da02aadfbe78d9782df2cf0..cf958bb871137dc88a8c36be867f2192acba2687 100644 +index b567eed9e07e281c56ff707ad938661f37f4ee3f..54bb75a2a128e7747ab01cb0d40c81fb4340ffd1 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1838,7 +1838,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 1.18.x that updated by Mojang. By removing this check, it gives ability for hackers to use some modules of hack clients. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 586c00610fdba178f27391820d623c3a5254529f..44e96e867d8a4403a7c88f772d2aa60cbe9f516b 100644 +index 1aaa94a2800687faa4d86698a4e1ad72bdaf15f3..d1245f54d55e4a3c406feef3cc2d5e25bb6346ce 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2075,8 +2075,13 @@ public class ServerGamePacketListenerImpl +@@ -2108,8 +2108,13 @@ public class ServerGamePacketListenerImpl BlockPos blockPos = hitResult.getBlockPos(); if (this.player.canInteractWithBlock(blockPos, 1.0)) { Vec3 vec3 = location.subtract(Vec3.atCenterOf(blockPos)); diff --git a/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch b/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch index 4fbcb65f..c8c31ce3 100644 --- a/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch +++ b/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove change non-editable sign warning diff --git a/net/minecraft/world/level/block/entity/SignBlockEntity.java b/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 4c5de8783b2fc87a442e194e0069ce9cd5b5fd6c..f150c1e963dc5e7d968e1656f6f1884fe4762202 100644 +index 2e0b2b55031343e32b4972c0f0017e950d56652d..3b73a8af99e398642e9603593369420c4ca8eb77 100644 --- a/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -140,7 +140,7 @@ public class SignBlockEntity extends BlockEntity { +@@ -137,7 +137,7 @@ public class SignBlockEntity extends BlockEntity { this.setAllowedPlayerEditor(null); this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); } else { diff --git a/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch b/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch index b066fd11..6be9edf2 100644 --- a/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch +++ b/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 883a053d025e74f73556a0affa2340e42365df59..8aab412c8e70b6f9d8e05a26cefac330dd7a2ea1 100644 +index 7dc97fccfd329253e0f6532d1cc2c06264674e15..605de72224f6baa112dbfd2c83fd7a1ceba6a540 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -322,7 +322,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -320,7 +320,7 @@ public class ItemEntity extends Entity implements TraceableEntity { ItemStack item = this.getItem(); ItemStack item1 = itemEntity.getItem(); if (Objects.equals(this.target, itemEntity.target) && areMergable(item, item1)) { diff --git a/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch b/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch index 47b881eb..e9a42a6f 100644 --- a/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch +++ b/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch @@ -9,10 +9,10 @@ Original project: https://github.com/Cryptite/Slice Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 834829427f3388c6cd94b5ceadc18b234c579f26..5775a39220bb5f48e2ce01c51402ac8b194a8d9d 100644 +index 6d453bdf4f265c23e7e349d07d766553ef0a4fad..737cba1729e980f58afa5e5aa83908c64c3a1a45 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -423,6 +423,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -434,6 +434,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc private boolean tpsBar = false; // Purpur - Implement TPSBar private boolean compassBar = false; // Purpur - Add compass command private boolean ramBar = false; // Purpur - Implement rambar commands @@ -21,12 +21,12 @@ index 834829427f3388c6cd94b5ceadc18b234c579f26..5775a39220bb5f48e2ce01c51402ac8b // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index bfcc40c09f80b5405cc414969693c195769bcb98..d7d68dbdd39ff6e61531d2edeafdd923f0573c89 100644 +index 7fdcdc311e5a3236df0c7d479d0e206e2fa15dd0..2f00e7899c36a2a34f810fc6083846eb3883131f 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -798,11 +798,11 @@ public abstract class PlayerList { +@@ -794,11 +794,11 @@ public abstract class PlayerList { byte b = (byte)(keepInventory ? 1 : 0); - ServerLevel serverLevel = serverPlayer.serverLevel(); + ServerLevel serverLevel = serverPlayer.level(); LevelData levelData = serverLevel.getLevelData(); - serverPlayer.connection.send(new ClientboundRespawnPacket(serverPlayer.createCommonSpawnInfo(serverLevel), b)); + if (!serverPlayer.smoothWorldTeleport || !isSameLogicalHeight((ServerLevel) fromWorld, level)) serverPlayer.connection.send(new ClientboundRespawnPacket(serverPlayer.createCommonSpawnInfo(serverLevel), b)); // Leaf - Slice @@ -38,7 +38,7 @@ index bfcc40c09f80b5405cc414969693c195769bcb98..d7d68dbdd39ff6e61531d2edeafdd923 serverPlayer.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getSharedSpawnPos(), level.getSharedSpawnAngle())); serverPlayer.connection.send(new ClientboundChangeDifficultyPacket(levelData.getDifficulty(), levelData.isDifficultyLocked())); serverPlayer.connection -@@ -890,6 +890,8 @@ public abstract class PlayerList { +@@ -886,6 +886,8 @@ public abstract class PlayerList { return serverPlayer; } diff --git a/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch index b31796ca..63fd221a 100644 --- a/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch +++ b/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch @@ -56,10 +56,10 @@ index 62b9d9486c15a1ec6527f786df4e9fc483390bcb..5384bbc6bb3dbe5481f9d8cb10282551 int i = buffer.readableBytes(); if (i >= 0 && i <= maxSize) { diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index cf958bb871137dc88a8c36be867f2192acba2687..2c50bde56da7174dcea828feedecb92c98347a45 100644 +index 54bb75a2a128e7747ab01cb0d40c81fb4340ffd1..0fed0f181c4d1f31d01bdaa5dc9417ccd68b3f03 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1736,6 +1736,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entityType, Level level) { diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index 7a3bfa91ffc5c7c6b04eef7b1b1d3c04c5a6d856..07fd03f1a8e72a5b39e5f9fd13f401dbfdb45280 100644 +index 5abdf4253f1d0a6f35d8e05f7a0a2b4100083f76..5d3479a55a10444e3ad3d9ec16160f9d520a1dc6 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -284,7 +284,7 @@ public class Tadpole extends AbstractFish { +@@ -286,7 +286,7 @@ public class Tadpole extends AbstractFish { } } @@ -35,10 +35,10 @@ index 7a3bfa91ffc5c7c6b04eef7b1b1d3c04c5a6d856..07fd03f1a8e72a5b39e5f9fd13f401db } diff --git a/net/minecraft/world/level/storage/loot/LootPool.java b/net/minecraft/world/level/storage/loot/LootPool.java -index 29ad43245a310756c4227acd7532e905f7f8b8ee..ad422817593449b8e914628b51d760e732e2d50c 100644 +index 6901e629d941e22e64d83eed4e8cfee3165a96a1..fdc26c8d8c82c20534c57af2a0281b99998cc9f6 100644 --- a/net/minecraft/world/level/storage/loot/LootPool.java +++ b/net/minecraft/world/level/storage/loot/LootPool.java -@@ -36,7 +36,7 @@ public class LootPool { +@@ -37,7 +37,7 @@ public class LootPool { ) .apply(instance, LootPool::new) ); @@ -48,10 +48,10 @@ index 29ad43245a310756c4227acd7532e905f7f8b8ee..ad422817593449b8e914628b51d760e7 private final Predicate compositeCondition; private final List functions; diff --git a/net/minecraft/world/level/storage/loot/LootTable.java b/net/minecraft/world/level/storage/loot/LootTable.java -index 7a8eb1e8b07647e1124594f78652d34731e4fda6..6cfe7ef8c81f506bce9c971b597cc4e902bcabbe 100644 +index 8612cdf7161f8ddff60a6478cc901318b8f958ba..07a962d647baa99b0e1bf3898a07cc914e91397e 100644 --- a/net/minecraft/world/level/storage/loot/LootTable.java +++ b/net/minecraft/world/level/storage/loot/LootTable.java -@@ -49,7 +49,7 @@ public class LootTable { +@@ -50,7 +50,7 @@ public class LootTable { public static final LootTable EMPTY = new LootTable(LootContextParamSets.EMPTY, Optional.empty(), List.of(), List.of()); private final ContextKeySet paramSet; private final Optional randomSequence; @@ -61,23 +61,23 @@ index 7a8eb1e8b07647e1124594f78652d34731e4fda6..6cfe7ef8c81f506bce9c971b597cc4e9 private final BiFunction compositeFunction; public org.bukkit.craftbukkit.CraftLootTable craftLootTable; // CraftBukkit diff --git a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java -index 8e91ddc6c0e492d165ad8322b4a3d5c3bad5409c..6e420bfb3c223b094157bdfec7dad20d8eab4968 100644 +index eeaa49e9f70a18b5d39493aeff73f31b05ac2faa..8cd0403d7873c4c37caef75935b06b056c3d951d 100644 --- a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java +++ b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java -@@ -9,7 +9,7 @@ import net.minecraft.world.level.storage.loot.ValidationContext; - import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; - - public abstract class CompositeEntryBase extends LootPoolEntryContainer { +@@ -16,7 +16,7 @@ public abstract class CompositeEntryBase extends LootPoolEntryContainer { + return "Empty children list"; + } + }; - protected final List children; + public final List children; // Leaves - private -> public private final ComposableEntryContainer composedChildren; protected CompositeEntryBase(List children, List conditions) { diff --git a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java -index e0e933245e038b7229eeddbda272b081161ab603..c5e3834fa970ac909cefea43420378394153d781 100644 +index 65e27bce9e59ef97bc8b914d646fba924d0f0877..a49bdcdf37b351436e0ba6d7865f10827c4e6ab4 100644 --- a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java +++ b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java -@@ -13,7 +13,7 @@ import net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder; +@@ -14,7 +14,7 @@ import net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder; import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; public abstract class LootPoolEntryContainer implements ComposableEntryContainer { @@ -87,23 +87,23 @@ index e0e933245e038b7229eeddbda272b081161ab603..c5e3834fa970ac909cefea4342037839 protected LootPoolEntryContainer(List conditions) { diff --git a/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java b/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java -index f7b647e81ca99040bae8161a2bc0dcacf5bd537f..069df530b1db72bd4a2b1b80b2570dca545dfd20 100644 +index 141026601cd9a4561426b85fd1f8e7dc0544fbd7..a5d7ebb93c147bf0f806ac3c9b2dc4b878573944 100644 --- a/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java +++ b/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java -@@ -22,7 +22,7 @@ public class NestedLootTable extends LootPoolSingletonContainer { - .and(singletonFields(instance)) - .apply(instance, NestedLootTable::new) - ); +@@ -29,7 +29,7 @@ public class NestedLootTable extends LootPoolSingletonContainer { + return "->{inline}"; + } + }; - private final Either, LootTable> contents; + public final Either, LootTable> contents; // Leaves - private -> public private NestedLootTable( Either, LootTable> contents, int weight, int quality, List conditions, List functions diff --git a/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java b/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java -index 7134c54984a12949cd6a2e8dc35c2e1c0431e524..52f36fbb9bfcad81004e531efab85e9b87d3284d 100644 +index bae72197acc929c7ed3e964f156115d728eb2176..8f3094f42f3366a1313d70c0b27fbe5632b2082a 100644 --- a/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java +++ b/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java -@@ -11,7 +11,7 @@ import net.minecraft.world.level.storage.loot.LootContext; +@@ -12,7 +12,7 @@ import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.ValidationContext; public abstract class CompositeLootItemCondition implements LootItemCondition { diff --git a/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch b/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch index 93a6b810..9fa20f7d 100644 --- a/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch +++ b/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch @@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by Xaero Map diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 88ee35fffd6ae3183c23891ab22ec5c45e3c711f..5372599cf3d1310e28530945db13c0df4d4dbd15 100644 +index e547d6c9ee9ad3438cc839389db26a3417cc4ba4..4de0da41eaa71edd0ec7c6829dce424795a63dd8 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1239,6 +1239,7 @@ public abstract class PlayerList { +@@ -1235,6 +1235,7 @@ public abstract class PlayerList { player.connection.send(new ClientboundInitializeBorderPacket(worldBorder)); player.connection.send(new ClientboundSetTimePacket(level.getGameTime(), level.getDayTime(), level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getSharedSpawnPos(), level.getSharedSpawnAngle())); diff --git a/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch b/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch index 168bfebb..111a1626 100644 --- a/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch +++ b/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch @@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by Syncmatica (https://github.com/End-Tech/syncmatica) diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 44e96e867d8a4403a7c88f772d2aa60cbe9f516b..0bf9ead58e256dccd3c1e89bd08ebae9d630b49e 100644 +index d1245f54d55e4a3c406feef3cc2d5e25bb6346ce..8e0e119b41ca1e49d7e3f7874c5fb3c2b434e737 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -319,8 +319,11 @@ public class ServerGamePacketListenerImpl +@@ -322,8 +322,11 @@ public class ServerGamePacketListenerImpl this.signedMessageDecoder = SignedMessageChain.Decoder.unsigned(player.getUUID(), server::enforceSecureProfile); this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event diff --git a/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch b/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch index d84ccea7..d3a6da08 100644 --- a/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch +++ b/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch @@ -11,10 +11,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by ReplayMod(https://github.com/ReplayMod) diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java -index 4d06587cd55af988eecdda5186577ab72ca3d533..6d1096d6cdf0ae23ab4cacabe4dbe531fea455a7 100644 +index 51caf352e77df49fc04bf84f1fab29b6f4f4fc14..3fb3afb4171e6ff57c73cd228c2b41b2cb543ea5 100644 --- a/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java -@@ -625,7 +625,7 @@ public class CommandSourceStack implements ExecutionCommandSource getOnlinePlayerNames() { @@ -92,10 +92,10 @@ index b305ba9bab617bf4e52d0e6ddf160bacc5751a94..bbaf1a29f86a9bfc13795249d545b6f7 if (players.size() >= resultLimit) { return players; diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 2c50bde56da7174dcea828feedecb92c98347a45..ee07832a92b3f73bd85d13388276cf224743c0ed 100644 +index 3a1822e0f37c86dfad56ae06c14fffb960ff99ec..32c934a489df7a06892265c6d762e88c3716a5c6 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1639,7 +1639,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { - PlayerList playerList = context.getSource().getServer().getPlayerList(); + (commandContext, suggestionsBuilder) -> { + PlayerList playerList = commandContext.getSource().getServer().getPlayerList(); return SharedSuggestionProvider.suggest( - playerList.getPlayers() + playerList.realPlayers // Leaves - only real player .stream() - .filter(player -> !playerList.isOp(player.getGameProfile())) - .map(player -> player.getGameProfile().getName()), + .filter(serverPlayer -> !playerList.isOp(serverPlayer.getGameProfile())) + .map(serverPlayer -> serverPlayer.getGameProfile().getName()), diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e083c2f8ba 100644 +index 95c128f028c3cce7d0b37821a6e75208323fb4e9..2cf0fa70ae3d7675cac3cf7a0002097b4e773fe1 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -212,6 +212,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current) public boolean hasRidableMoveEvent = false; // Purpur - Ridables @@ -145,7 +145,7 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 @Override public @Nullable LevelChunk getChunkIfLoaded(int x, int z) { -@@ -690,6 +691,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -694,6 +695,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Paper end - rewrite chunk system this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle @@ -153,7 +153,7 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 } // Paper start -@@ -2690,6 +2692,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2735,6 +2737,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.add(serverPlayer); @@ -162,10 +162,10 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 + ServerLevel.this.realPlayers.add(serverPlayer); + } + // Leaves end - skip - ServerLevel.this.updateSleepingPlayerList(); - } - -@@ -2760,6 +2767,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe + if (serverPlayer.isReceivingWaypoints()) { + ServerLevel.this.getWaypointManager().addPlayer(serverPlayer); + } +@@ -2813,6 +2820,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ServerLevel.this.getChunkSource().removeEntity(entity); if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.remove(serverPlayer); @@ -174,14 +174,27 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 + ServerLevel.this.realPlayers.remove(serverPlayer); + } + // Leaves end - skip + ServerLevel.this.getWaypointManager().removePlayer(serverPlayer); ServerLevel.this.updateSleepingPlayerList(); } - +diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java +index 4210089d6ba271ef9d68e18699b1122f07e1946a..8d1571f3db4e7f6c4309b8a46ed0359ecdee85a5 100644 +--- a/net/minecraft/server/level/ServerPlayer.java ++++ b/net/minecraft/server/level/ServerPlayer.java +@@ -216,7 +216,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + private static final boolean DEFAULT_SEEN_CREDITS = false; + private static final boolean DEFAULT_SPAWN_EXTRA_PARTICLES_ON_FALL = false; + public ServerGamePacketListenerImpl connection; +- private final MinecraftServer server; ++ public final MinecraftServer server; // Leaves - private -> public + public ServerPlayerGameMode gameMode; + private final PlayerAdvancements advancements; + private final ServerStatsCounter stats; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd4ad5df72 100644 +index 418d6970d46b3b592c17f7721ca3ecfd1edce8ad..70d394d8a257390af20bdea5895f7d8a74b16dec 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -132,6 +132,7 @@ public abstract class PlayerList { +@@ -131,6 +131,7 @@ public abstract class PlayerList { private boolean allowCommandsForAllPlayers; private static final boolean ALLOW_LOGOUTIVATOR = false; private int sendAllPlayerInfoIn; @@ -189,7 +202,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd // CraftBukkit start private org.bukkit.craftbukkit.CraftServer cserver; -@@ -150,6 +151,106 @@ public abstract class PlayerList { +@@ -149,6 +150,106 @@ public abstract class PlayerList { abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor @@ -275,7 +288,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd + this.server.getCustomBossEvents().onPlayerConnect(player); + } + -+ worldserver1 = player.serverLevel(); ++ worldserver1 = player.level(); + java.util.Iterator iterator = player.getActiveEffects().iterator(); + while (iterator.hasNext()) { + MobEffectInstance mobeffect = iterator.next(); @@ -296,34 +309,34 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) { player.isRealPlayer = true; // Paper player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed -@@ -317,6 +418,7 @@ public abstract class PlayerList { +@@ -318,6 +419,7 @@ public abstract class PlayerList { - // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below - this.players.add(player); -+ this.realPlayers.add(player); // Leaves - replay api - this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot - this.playersByUUID.put(player.getUUID(), player); - this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info -@@ -379,6 +481,12 @@ public abstract class PlayerList { - continue; - } + // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below + this.players.add(player); ++ this.realPlayers.add(player); // Leaves - replay api + this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot + this.playersByUUID.put(player.getUUID(), player); + this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info +@@ -380,6 +482,12 @@ public abstract class PlayerList { + continue; + } -+ // Leaves start - skip photographer -+ if (entityplayer1 instanceof org.leavesmc.leaves.replay.ServerPhotographer) { -+ continue; -+ } -+ // Leaves end - skip photographer ++ // Leaves start - skip photographer ++ if (entityplayer1 instanceof org.leavesmc.leaves.replay.ServerPhotographer) { ++ continue; ++ } ++ // Leaves end - skip photographer + - onlinePlayers.add(entityplayer1); // Paper - Use single player info update packet on join - } - // Paper start - Use single player info update packet on join -@@ -520,6 +628,43 @@ public abstract class PlayerList { + onlinePlayers.add(entityplayer1); // Paper - Use single player info update packet on join + } + // Paper start - Use single player info update packet on join +@@ -523,6 +631,43 @@ public abstract class PlayerList { } } + // Leaves start - replay mod api + public void removePhotographer(org.leavesmc.leaves.replay.ServerPhotographer entityplayer) { -+ ServerLevel worldserver = entityplayer.serverLevel(); ++ ServerLevel worldserver = entityplayer.level(); + + entityplayer.awardStat(Stats.LEAVE_GAME); + @@ -361,7 +374,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player) { // CraftBukkit - return string // Paper - return Component // Paper start - Fix kick event leave message not being sent return this.remove(player, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? player.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName()))); -@@ -596,6 +741,7 @@ public abstract class PlayerList { +@@ -599,6 +744,7 @@ public abstract class PlayerList { player.retireScheduler(); // Paper - Folia schedulers player.getAdvancements().stopListening(); this.players.remove(player); @@ -369,7 +382,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot this.removeFromSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info this.server.getCustomBossEvents().onPlayerDisconnect(player); -@@ -688,7 +834,7 @@ public abstract class PlayerList { +@@ -691,7 +837,7 @@ public abstract class PlayerList { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) // ? Component.translatable("multiplayer.disconnect.server_full") // : null; diff --git a/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch b/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch index ccd7d83c..b496be3d 100644 --- a/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch +++ b/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch @@ -19,10 +19,10 @@ This patch was ported downstream from the Petal fork. Makes most pathfinding-related work happen asynchronously diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index fbcf26c0bfb9f496c99bd5a2ba988be06162cd52..cf136bc3d0d285ebde23c6e31c002933564fdcb2 100644 +index c5f4b878aa5d736d987982c94fbf557c0f267bbf..a6be753d1284167e090c40e6dcfbaa56b4e3d774 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -243,6 +243,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -246,6 +246,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Nullable @Override public LivingEntity getTarget() { @@ -290,20 +290,20 @@ index 4f9f3367b1ca3903df03a80fa2b01a3d24e6e77d..51413df5cd61b3ff59c6c6c3ec69d673 + // Leaf end - Kaiiju - petal - Async path processing } diff --git a/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java b/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java -index d8f532c5e68ff4dff933556c4f981e9474c044e6..95733482a647935e1e7f81fa71a0e99ea52e9a9b 100644 +index 73bba480f3f017a8aed14562bd82ba33db04391c..ed73a102d1ca58d0c2d4ea6d715511284fa90896 100644 --- a/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java +++ b/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java -@@ -56,7 +56,7 @@ public abstract class DoorInteractGoal extends Goal { +@@ -54,7 +54,7 @@ public abstract class DoorInteractGoal extends Goal { + return false; } else { - GroundPathNavigation groundPathNavigation = (GroundPathNavigation)this.mob.getNavigation(); - Path path = groundPathNavigation.getPath(); + Path path = this.mob.getNavigation().getPath(); - if (path != null && !path.isDone()) { + if (path != null && path.isProcessed() && !path.isDone()) { // Kaiiju - async pathfinding - ensure path is processed for (int i = 0; i < Math.min(path.getNextNodeIndex() + 2, path.getNodeCount()); i++) { Node node = path.getNode(i); this.doorPos = new BlockPos(node.x, node.y + 1, node.z); diff --git a/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java b/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java -index 66a02fe7594522ef391d67e09856bf3f70fe597d..55e4e6542ac05d89b8d062c546de85b29fb0099f 100644 +index 458ceec68ca138b0aa9b70d6c934473c01d468f4..dc42e63d1c166aed02081e687ada76a0e74da7a7 100644 --- a/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java @@ -12,9 +12,25 @@ public class AmphibiousPathNavigation extends PathNavigation { @@ -333,7 +333,7 @@ index 66a02fe7594522ef391d67e09856bf3f70fe597d..55e4e6542ac05d89b8d062c546de85b2 } diff --git a/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java b/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java -index 71ea68b56b3069bdf8e47931156b6ef49ea8ce5d..5de4c1138c7092ff8240fcb30cd64ff1f4d12088 100644 +index 077863b758fbc3e51f25bcf842d00a2cc07c6a2f..29490cf3cb3c42dbc1dff683d8942a40e2df71b6 100644 --- a/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java @@ -16,9 +16,25 @@ public class FlyingPathNavigation extends PathNavigation { @@ -371,7 +371,7 @@ index 71ea68b56b3069bdf8e47931156b6ef49ea8ce5d..5de4c1138c7092ff8240fcb30cd64ff1 if (!this.isDone()) { if (this.canUpdatePath()) { diff --git a/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java -index 045cfafb3afe8271d60852ae3c7cdcb039b44d4f..3f55b00e2f8924a8450df8a3f9812a4ae2983df3 100644 +index 86fccf3617a32f3791b03d8067e2eaf6b8d8bebb..9cef6797e6d8eb43a51a1b94fea3947dd3d534da 100644 --- a/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java @@ -24,9 +24,25 @@ public class GroundPathNavigation extends PathNavigation { @@ -401,7 +401,7 @@ index 045cfafb3afe8271d60852ae3c7cdcb039b44d4f..3f55b00e2f8924a8450df8a3f9812a4a } diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 6bbdfc748f1ce66689c63424fadcf261b1e967b3..84e855a4a9890a4772aee2383797cbc3d9b46dc3 100644 +index c8e4ccb96a0f162c780066cf4f61b970b49b7703..83cbb78fece9ddabcbbf3fc7a7dac06f5c02ab7c 100644 --- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -167,6 +167,10 @@ public abstract class PathNavigation { @@ -482,7 +482,7 @@ index 6bbdfc748f1ce66689c63424fadcf261b1e967b3..84e855a4a9890a4772aee2383797cbc3 Vec3 vec3 = new Vec3((endNode.x + this.mob.getX()) / 2.0, (endNode.y + this.mob.getY()) / 2.0, (endNode.z + this.mob.getZ()) / 2.0); return pos.closerToCenterThan(vec3, this.path.getNodeCount() - this.path.getNextNodeIndex()); diff --git a/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java b/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java -index 2979846853898d78a2df19df2287da16dbe4ae71..1289a6e85f3fdb9187323343b6c20e17b6a7e296 100644 +index ea0f6a19e4a79538e68917ba86cbc98be4dbca8d..e2ed5b1d9eca79dc5a63d70d718fdf8298969e97 100644 --- a/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java @@ -15,11 +15,27 @@ public class WaterBoundPathNavigation extends PathNavigation { @@ -560,10 +560,10 @@ index 1f96fd5085bacb4c584576c7cb9f51e7898e9b03..03b6c8c8dcd42e864751e68be9d35d20 + // Leaf end - Kaiiju - await on async path processing } diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java -index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..04c0dad21c4cdd464a8ebe830bcdd217bb4156ec 100644 +index ca5651f15552f91fba650747d28a75c00fa11442..119e2b6b198fd4b2aaef7a9a5f46568bd52bd071 100644 --- a/net/minecraft/world/entity/animal/Bee.java +++ b/net/minecraft/world/entity/animal/Bee.java -@@ -936,7 +936,8 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -937,7 +937,8 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } else { Bee.this.pathfindRandomlyTowards(Bee.this.hivePos); } @@ -573,7 +573,7 @@ index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..04c0dad21c4cdd464a8ebe830bcdd217 boolean flag = this.pathfindDirectlyTowards(Bee.this.hivePos); if (!flag) { this.dropAndBlacklistHive(); -@@ -990,7 +991,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -991,7 +992,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { return true; } else { Path path = Bee.this.navigation.getPath(); @@ -583,10 +583,10 @@ index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..04c0dad21c4cdd464a8ebe830bcdd217 } } diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 71bae5f5ed284fed30262872771f85de97383d6d..50f9a11f8cb53fd1fa34017598ff3fe828b3ca25 100644 +index a7e9179c287671a689cb5ce668b5a33896da87a4..7d450b6ccde99657a7fac354ae386a80f9f7e879 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -488,9 +488,25 @@ public class Frog extends Animal { +@@ -489,9 +489,25 @@ public class Frog extends Animal { return pathType != PathType.WATER_BORDER && super.canCutCorner(pathType); } @@ -613,10 +613,10 @@ index 71bae5f5ed284fed30262872771f85de97383d6d..50f9a11f8cb53fd1fa34017598ff3fe8 } } diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index b85d1e196d2bf61ac4896205afb08eba89c4397e..c22f7054e0f78dcce3e3f9765e2ee9b63ca195ff 100644 +index 2e6d0f035a01277aa28bbe912d5df8dc4cf04547..f4428016e4fabc99dc79ecc39b7f6e0617e4dc7a 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -313,7 +313,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -308,7 +308,7 @@ public class Drowned extends Zombie implements RangedAttackMob { protected boolean closeToNextPos() { Path path = this.getNavigation().getPath(); @@ -656,10 +656,10 @@ index fe31c4a45afd61be8b74efe9d0858ccd0aced075..e1717b5c854aa81fdd7b7e715d7c3498 } diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index 497ea5d5aad1641d5876f23f05db82ab649c0785..e5193d7320ea17e86b776c705ec45010019493d6 100644 +index 147fb3eecf651dcee63d63255542ef2680140f66..a6109ac9d7f8a9aa4074b3e9504244b1d565a2d4 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -580,6 +580,16 @@ public class Warden extends Monster implements VibrationSystem { +@@ -576,6 +576,16 @@ public class Warden extends Monster implements VibrationSystem { @Override protected PathFinder createPathFinder(int maxVisitedNodes) { this.nodeEvaluator = new WalkNodeEvaluator(); diff --git a/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch b/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch index 5c809db3..d76de9de 100644 --- a/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch +++ b/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch @@ -11,7 +11,7 @@ Original project: https://github.com/Bloom-host/Petal 2. EuclideanGameEventListenerRegistry is not used concurrently so we ban that usage for improved performance with allays diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java -index 2627583ab12d886b1fba0b1d1e599f942926b499..440d70811d96f97d3463c6aff131cbc5bd588254 100644 +index 0a94670dc20bb9c521b0395633eb100393895f6a..83c811eb5e493fa6630f16c206787f227fde089b 100644 --- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java @@ -65,7 +65,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi @@ -38,10 +38,10 @@ index 2627583ab12d886b1fba0b1d1e599f942926b499..440d70811d96f97d3463c6aff131cbc5 if (entity.getLastHurtByMob() instanceof ServerPlayer serverPlayer) { DamageSource damageSource = entity.getLastDamageSource() == null diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96131c8712 100644 +index 9e2debee38bc4b25281c8a8c6e7082cca1f7b569..27aa58ab47e7a7b0edddd1c483dc9165696ebf11 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -80,7 +80,19 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -82,7 +82,19 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p private Supplier fullStatus; @Nullable private LevelChunk.PostLoadProcessor postLoad; @@ -62,7 +62,7 @@ index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96 private final LevelChunkTicks blockTicks; private final LevelChunkTicks fluidTicks; private LevelChunk.UnsavedListener unsavedListener = chunkPos -> {}; -@@ -155,7 +167,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -157,7 +169,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p ) { super(pos, data, level, net.minecraft.server.MinecraftServer.getServer().registryAccess().lookupOrThrow(Registries.BIOME), inhabitedTime, sections, blendingData); // Paper - Anti-Xray - The world isn't ready yet, use server singleton for registry this.level = (ServerLevel) level; // CraftBukkit - type @@ -71,7 +71,7 @@ index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96 for (Heightmap.Types types : Heightmap.Types.values()) { if (ChunkStatus.FULL.heightmapsAfter().contains(types)) { -@@ -267,10 +279,27 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -269,10 +281,27 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Override public GameEventListenerRegistry getListenerRegistry(int sectionY) { @@ -103,7 +103,7 @@ index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96 } // Paper start - Perf: Reduce instructions and provide final method -@@ -617,7 +646,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -620,7 +649,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } private void removeGameEventListenerRegistry(int sectionY) { diff --git a/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch b/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch index 14e93be2..d81408ef 100644 --- a/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch +++ b/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch @@ -7,10 +7,10 @@ Co-authored by: Martijn Muijsers Co-authored by: MachineBreaker diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index a94f6eb93a4271d8b50cbb55dce04affd1ac4a13..9ac2ecb78f6214616376b0e3badef21dc3f72114 100644 +index dd8c7afecd62edc2ab3933034bf469aea729be53..3bd42eb81eae3af9323021a5dc6edaa06dfcaead 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -987,17 +987,19 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -988,17 +988,19 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl for (int i = 0, len = entities.size(); i < len; ++i) { Entity entity = entities.get(i); diff --git a/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch b/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch index aa11a26c..7efd239d 100644 --- a/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch +++ b/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix sprint glitch diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ed15b5f29658d799a36dcbd196a8fcb107be4bda..09aa0b344aff0c48eec9a296d47c0704bd0fdc5c 100644 +index d59caf13e9066f2171c360e07a26122a540380a0..97098f05dda8a46716162dd0330ca60d30814999 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1387,7 +1387,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1419,7 +1419,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin player.setRealHealth(health); } diff --git a/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch b/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch index 4b0b4c32..32a33da7 100644 --- a/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch +++ b/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable movement speed of more entities diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index c22f7054e0f78dcce3e3f9765e2ee9b63ca195ff..2e04078664cd723e3e0c80565e4b6e6416b13901 100644 +index f4428016e4fabc99dc79ecc39b7f6e0617e4dc7a..7ff380212ce5e56e0e58e5f52f8c75bda5061ef0 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -97,6 +97,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -98,6 +98,7 @@ public class Drowned extends Zombie implements RangedAttackMob { public void initAttributes() { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.drownedMaxHealth); this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.drownedScale); @@ -29,10 +29,10 @@ index a4ce65911a5d778f60bcedb3acd9fe59a5094c96..f4200bdf2002c13259821b2781137089 @Override diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..447adc3dcfd31a6fb9e673555e9793a82f9e02d4 100644 +index ab4dc7b3a7593d255dbd7d1df667fce3504af3ed..185d138f65e884eb9b3fdd753bc4e2a14a25c4b1 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -127,6 +127,7 @@ public class Zombie extends Monster { +@@ -126,6 +126,7 @@ public class Zombie extends Monster { public void initAttributes() { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieMaxHealth); this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombieScale); @@ -40,7 +40,7 @@ index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..447adc3dcfd31a6fb9e673555e9793a8 } // Purpur end - Configurable entity base attributes -@@ -194,7 +195,7 @@ public class Zombie extends Monster { +@@ -193,7 +194,7 @@ public class Zombie extends Monster { public static AttributeSupplier.Builder createAttributes() { return Monster.createMonsterAttributes() .add(Attributes.FOLLOW_RANGE, 35.0) @@ -50,10 +50,10 @@ index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..447adc3dcfd31a6fb9e673555e9793a8 .add(Attributes.ARMOR, 2.0) .add(Attributes.SPAWN_REINFORCEMENTS_CHANCE); diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index ae5939c940bdd93977fa882360fc31e46479554f..ba480249c1e8813931a668a37977347a73f3a3f5 100644 +index e218e5d5f146ec996a6f5ce7e76b1d6506ac1cb9..18966860f550ad1f35ec6a03a0b78af73628b964 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -98,6 +98,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -97,6 +97,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { @Override public void initAttributes() { this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieVillagerMaxHealth); @@ -62,10 +62,10 @@ index ae5939c940bdd93977fa882360fc31e46479554f..ba480249c1e8813931a668a37977347a @Override diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -index 39489c8a347031fb4f73faca46039786e35762ac..4de1d0966157b20526386becee10b9be45f7a9ba 100644 +index f58c48d9de85fda3d13079f3e56b31af75b3c725..cc349403ceb9b094362e706f4e5b200a51071380 100644 --- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -@@ -85,6 +85,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -86,6 +86,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { public void initAttributes() { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombifiedPiglinMaxHealth); this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombifiedPiglinScale); @@ -73,7 +73,7 @@ index 39489c8a347031fb4f73faca46039786e35762ac..4de1d0966157b20526386becee10b9be } // Purpur end - Configurable entity base attributes -@@ -136,7 +137,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -137,7 +138,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { public static AttributeSupplier.Builder createAttributes() { return Zombie.createAttributes() .add(Attributes.SPAWN_REINFORCEMENTS_CHANCE, 0.0) @@ -83,10 +83,10 @@ index 39489c8a347031fb4f73faca46039786e35762ac..4de1d0966157b20526386becee10b9be } diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java -index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d5e5cccb6 100644 +index 88a2ad8e3b30cb9f447eb4001d33c7799339b6a0..b3dd4862b9fa220f4aeabc3598169852f8b12482 100644 --- a/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1625,6 +1625,7 @@ public class PurpurWorldConfig { +@@ -1620,6 +1620,7 @@ public class PurpurWorldConfig { public boolean drownedTakeDamageFromWater = false; public boolean drownedBreakDoors = false; public boolean drownedAlwaysDropExp = false; @@ -94,7 +94,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void drownedSettings() { drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable); drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater); -@@ -1643,6 +1644,7 @@ public class PurpurWorldConfig { +@@ -1638,6 +1639,7 @@ public class PurpurWorldConfig { drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater); drownedBreakDoors = getBoolean("mobs.drowned.can-break-doors", drownedBreakDoors); drownedAlwaysDropExp = getBoolean("mobs.drowned.always-drop-exp", drownedAlwaysDropExp); @@ -102,7 +102,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean elderGuardianRidable = false; -@@ -2037,6 +2039,7 @@ public class PurpurWorldConfig { +@@ -2055,6 +2057,7 @@ public class PurpurWorldConfig { public boolean huskJockeyTryExistingChickens = true; public boolean huskTakeDamageFromWater = false; public boolean huskAlwaysDropExp = false; @@ -110,7 +110,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void huskSettings() { huskRidable = getBoolean("mobs.husk.ridable", huskRidable); huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater); -@@ -2054,6 +2057,7 @@ public class PurpurWorldConfig { +@@ -2072,6 +2075,7 @@ public class PurpurWorldConfig { huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens); huskTakeDamageFromWater = getBoolean("mobs.husk.takes-damage-from-water", huskTakeDamageFromWater); huskAlwaysDropExp = getBoolean("mobs.husk.always-drop-exp", huskAlwaysDropExp); @@ -118,7 +118,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean illusionerRidable = false; -@@ -3424,6 +3428,7 @@ public class PurpurWorldConfig { +@@ -3442,6 +3446,7 @@ public class PurpurWorldConfig { public boolean zombieTakeDamageFromWater = false; public boolean zombieAlwaysDropExp = false; public double zombieHeadVisibilityPercent = 0.5D; @@ -126,7 +126,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void zombieSettings() { zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); -@@ -3449,6 +3454,7 @@ public class PurpurWorldConfig { +@@ -3467,6 +3472,7 @@ public class PurpurWorldConfig { zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater); zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp); zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent); @@ -134,7 +134,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean zombieHorseRidable = false; -@@ -3498,6 +3504,7 @@ public class PurpurWorldConfig { +@@ -3516,6 +3522,7 @@ public class PurpurWorldConfig { public int zombieVillagerCuringTimeMax = 6000; public boolean zombieVillagerCureEnabled = true; public boolean zombieVillagerAlwaysDropExp = false; @@ -142,7 +142,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void zombieVillagerSettings() { zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable); zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater); -@@ -3518,6 +3525,7 @@ public class PurpurWorldConfig { +@@ -3536,6 +3543,7 @@ public class PurpurWorldConfig { zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax); zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled); zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp); @@ -150,7 +150,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean zombifiedPiglinRidable = false; -@@ -3532,6 +3540,7 @@ public class PurpurWorldConfig { +@@ -3550,6 +3558,7 @@ public class PurpurWorldConfig { public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = false; public boolean zombifiedPiglinTakeDamageFromWater = false; public boolean zombifiedPiglinAlwaysDropExp = false; @@ -158,7 +158,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void zombifiedPiglinSettings() { zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable); zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater); -@@ -3553,6 +3562,7 @@ public class PurpurWorldConfig { +@@ -3571,6 +3580,7 @@ public class PurpurWorldConfig { zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry); zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater); zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp); diff --git a/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch b/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch index 07560db6..9fe50807 100644 --- a/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch +++ b/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch @@ -7,7 +7,7 @@ Replace `thenApply` with `thenCompose`. Once one task is completed then the next to prevent blocking threads while waiting to complete all tasks. But may cause the sequence of future compose disorder. diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java -index d1fcc73f579d1c4ac79213ad039c8d803ff51b1a..9918572306e983281d05c6d28c8a5d843348ad2d 100644 +index 0a69469c79aaa2466cda04f6acefed18e421d555..82ee6c27ebc2718ad88b640775d949ec6d7cfed2 100644 --- a/net/minecraft/Util.java +++ b/net/minecraft/Util.java @@ -620,17 +620,39 @@ public class Util { @@ -51,10 +51,10 @@ index d1fcc73f579d1c4ac79213ad039c8d803ff51b1a..9918572306e983281d05c6d28c8a5d84 CompletableFuture> completableFuture = new CompletableFuture<>(); return fallibleSequence(completableFutures, completableFuture::completeExceptionally).applyToEither(completableFuture, Function.identity()); diff --git a/net/minecraft/server/ReloadableServerRegistries.java b/net/minecraft/server/ReloadableServerRegistries.java -index d8c472b8c6aadcaadef14abd8ab43f466e94417e..bc079b6c3d751f2a63d089bf209cf7d8e0da76e8 100644 +index 512d59188ff43e34463e2845aa8a174792c407a7..ca84304526050176ca7406f7a13c144798a0ed74 100644 --- a/net/minecraft/server/ReloadableServerRegistries.java +++ b/net/minecraft/server/ReloadableServerRegistries.java -@@ -52,7 +52,7 @@ public class ReloadableServerRegistries { +@@ -50,7 +50,7 @@ public class ReloadableServerRegistries { List>> list1 = LootDataType.values() .map(lootDataType -> scheduleRegistryLoad((LootDataType)lootDataType, registryOps, resourceManager, backgroundExecutor, conversions)) // Paper .toList(); diff --git a/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch b/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch index 6adee127..617f42dc 100644 --- a/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch +++ b/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch @@ -9,10 +9,10 @@ But still recommend to turn-off `checkForMinecartNearItemWhileActive` Since `Reduce-hopper-item-checks.patch` will cause lag under massive dropped items diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 8aab412c8e70b6f9d8e05a26cefac330dd7a2ea1..ecec91d28d1b71d549f48185af5f1ef3286768be 100644 +index 605de72224f6baa112dbfd2c83fd7a1ceba6a540..52314a8fe4188689431f9a1261226859b967f5f1 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -248,7 +248,11 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -246,7 +246,11 @@ public class ItemEntity extends Entity implements TraceableEntity { this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause return; // Gale - EMC - reduce hopper item checks } diff --git a/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch b/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch index 6b9c1f90..0792ac16 100644 --- a/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch +++ b/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch @@ -9,11 +9,27 @@ Original project: https://github.com/PlazmaMC/PlazmaBukkit Add Pufferfish DAB support for Camel, Sniffer https://github.com/pufferfish-gg/Pufferfish/issues/83 +diff --git a/net/minecraft/world/entity/animal/HappyGhast.java b/net/minecraft/world/entity/animal/HappyGhast.java +index e04da94daced96a7eb9fdb01c551bea667b72d76..e53773e086a589ee5fd83fde0bee1881ff43e926 100644 +--- a/net/minecraft/world/entity/animal/HappyGhast.java ++++ b/net/minecraft/world/entity/animal/HappyGhast.java +@@ -415,9 +415,11 @@ public class HappyGhast extends Animal { + return HappyGhastAi.makeBrain(this.brainProvider().makeBrain(dynamic)); + } + ++ private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations + @Override + protected void customServerAiStep(ServerLevel level) { + if (this.isBaby()) { ++ if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations + ((Brain)this.brain).tick(level, this); + HappyGhastAi.updateActivity(this); + } diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -index fb8a56d0ee80b0d397f2acd3af1f52fc26676b62..5d93eb5e56e45d485c0718db9e3d8754e97b691c 100644 +index b0ce3ab6939cb9e37171bb64e8c5308deb03195e..c520c4e478e3191cea7c2345a2e4c42b67c0762a 100644 --- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java +++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -@@ -162,8 +162,10 @@ public class Armadillo extends Animal { +@@ -163,8 +163,10 @@ public class Armadillo extends Animal { return ArmadilloAi.makeBrain(this.brainProvider().makeBrain(dynamic)); } @@ -25,10 +41,10 @@ index fb8a56d0ee80b0d397f2acd3af1f52fc26676b62..5d93eb5e56e45d485c0718db9e3d8754 ArmadilloAi.updateActivity(this); if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) { diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index 101931ff4474ab4445be3fa1a241a731ad3ac1da..8d2dc9b94a13c386b7e54788a9ec6baf15c09a13 100644 +index 949b6c563658e6e46ac5842d6f088ecae6d4cd0c..c2107133d3def5ef5de7837499d33b5dbf5c20b6 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -167,9 +167,11 @@ public class Camel extends AbstractHorse { +@@ -169,9 +169,11 @@ public class Camel extends AbstractHorse { return pose == Pose.SITTING ? SITTING_DIMENSIONS.scale(this.getAgeScale()) : super.getDefaultDimensions(pose); } @@ -41,10 +57,10 @@ index 101931ff4474ab4445be3fa1a241a731ad3ac1da..8d2dc9b94a13c386b7e54788a9ec6baf CamelAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 0565b37dd5320b49efb11cf28f064d6a970048aa..598216a2794d2c7b325a9e479dfb553427fa0bc7 100644 +index a762fc8a4616c4e48e11accdca2129fd47f300e6..08bc21733c08b9df28803b36d3fb17aa3cc29345 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -482,8 +482,10 @@ public class Sniffer extends Animal { +@@ -493,8 +493,10 @@ public class Sniffer extends Animal { return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES); } @@ -55,6 +71,22 @@ index 0565b37dd5320b49efb11cf28f064d6a970048aa..598216a2794d2c7b325a9e479dfb5534 this.getBrain().tick(level, this); SnifferAi.updateActivity(this); super.customServerAiStep(level); +diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java +index 2a905e8cdf22f9d7f38cc41c1474e80f704d0cb1..385e6d997ea511dd44a7319879baff14addee8bd 100644 +--- a/net/minecraft/world/entity/monster/Zoglin.java ++++ b/net/minecraft/world/entity/monster/Zoglin.java +@@ -285,9 +285,10 @@ public class Zoglin extends Monster implements HoglinBase { + this.setAggressive(this.brain.hasMemoryValue(MemoryModuleType.ATTACK_TARGET)); + } + ++ private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations + @Override + protected void customServerAiStep(ServerLevel level) { +- if (getRider() == null || !this.isControllable()) // Purpur - only use brain if no rider ++ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Purpur - only use brain if no rider // Leaf - Plazma - Add missing Pufferfish configurations + this.getBrain().tick(level, this); + this.updateActivity(); + } diff --git a/net/minecraft/world/entity/monster/breeze/Breeze.java b/net/minecraft/world/entity/monster/breeze/Breeze.java index d91ce14cc39b1b6ccd558f53ed605d4c6a5acae5..52558a99c915da3c46e5f63bd8014cfcdb38505f 100644 --- a/net/minecraft/world/entity/monster/breeze/Breeze.java @@ -71,10 +103,10 @@ index d91ce14cc39b1b6ccd558f53ed605d4c6a5acae5..52558a99c915da3c46e5f63bd8014cfc BreezeAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index c9404d72de59e18dc809b8dec107f1f23d50f441..91c6956311da3694cb3cda2f7a86c7e110c0d212 100644 +index 775c11f658b81379784f7e5bdfdc8105b3410480..49f962bbbce22dd26555ee2092ceff96e82aa6b2 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -231,8 +231,10 @@ public class Creaking extends Monster { +@@ -232,8 +232,10 @@ public class Creaking extends Monster { return (Brain)super.getBrain(); } diff --git a/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch b/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch index f52a2a4c..be049c54 100644 --- a/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch +++ b/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch @@ -9,10 +9,10 @@ Original project: https://github.com/PlazmaMC/PlazmaBukkit Add more Purpur configurable options for entities diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index 18107d9be4d9ba816852ee4595a5349867834bef..ffa224d6cff03ad903ed38636eb3857f5919912f 100644 +index a25976d6f0dec86b88017cd5f86f3b51c8d7444b..cb88b1afe261f95998a19fcb555f91143834ba3a 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -177,6 +177,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -174,6 +174,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } // Purpur end - Configurable entity base attributes @@ -32,10 +32,10 @@ index 18107d9be4d9ba816852ee4595a5349867834bef..ffa224d6cff03ad903ed38636eb3857f protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index 8d2dc9b94a13c386b7e54788a9ec6baf15c09a13..29c264b70eb5ce15e8c24d444d3fd50c5cab6a1c 100644 +index c2107133d3def5ef5de7837499d33b5dbf5c20b6..04c3fb56a4014025b6a9c01e97f0ffbd678b414a 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -101,6 +101,18 @@ public class Camel extends AbstractHorse { +@@ -103,6 +103,18 @@ public class Camel extends AbstractHorse { } // Purpur end - Make entity breeding times configurable @@ -52,9 +52,9 @@ index 8d2dc9b94a13c386b7e54788a9ec6baf15c09a13..29c264b70eb5ce15e8c24d444d3fd50c + // Leaf start - Plazma - Add missing purpur configuration options + @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); -@@ -171,7 +183,7 @@ public class Camel extends AbstractHorse { + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); +@@ -173,7 +185,7 @@ public class Camel extends AbstractHorse { @Override protected void customServerAiStep(ServerLevel level) { Brain brain = this.getBrain(); @@ -64,10 +64,10 @@ index 8d2dc9b94a13c386b7e54788a9ec6baf15c09a13..29c264b70eb5ce15e8c24d444d3fd50c CamelAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 50f9a11f8cb53fd1fa34017598ff3fe828b3ca25..9f9abbd3272cba17f79dc4da6cf2cd4d3ab2cc8b 100644 +index 7d450b6ccde99657a7fac354ae386a80f9f7e879..7143a7b8aae713fd7f2f167a949f98b964e72c78 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -169,6 +169,23 @@ public class Frog extends Animal { +@@ -170,6 +170,23 @@ public class Frog extends Animal { } // Purpur end - Make entity breeding times configurable @@ -92,10 +92,10 @@ index 50f9a11f8cb53fd1fa34017598ff3fe828b3ca25..9f9abbd3272cba17f79dc4da6cf2cd4d protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index 07fd03f1a8e72a5b39e5f9fd13f401dbfdb45280..daa315bfbedb0ec21a684d9141fb41ad40ce45b1 100644 +index 5d3479a55a10444e3ad3d9ec16160f9d520a1dc6..0e322f480e0a6302124847e26c4bed06678e78e4 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -106,6 +106,23 @@ public class Tadpole extends AbstractFish { +@@ -108,6 +108,23 @@ public class Tadpole extends AbstractFish { } // Purpur end - Ridables @@ -120,10 +120,10 @@ index 07fd03f1a8e72a5b39e5f9fd13f401dbfdb45280..daa315bfbedb0ec21a684d9141fb41ad protected PathNavigation createNavigation(Level level) { return new WaterBoundPathNavigation(this, level); diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 598216a2794d2c7b325a9e479dfb553427fa0bc7..fca5464de3fe07c74e26c9c608efaa3c150c11a1 100644 +index 08bc21733c08b9df28803b36d3fb17aa3cc29345..1f545d4c9a3de0d6630a92481920ed6c3553ce97 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -118,6 +118,18 @@ public class Sniffer extends Animal { +@@ -119,6 +119,18 @@ public class Sniffer extends Animal { } // Purpur end - Make entity breeding times configurable @@ -142,7 +142,7 @@ index 598216a2794d2c7b325a9e479dfb553427fa0bc7..fca5464de3fe07c74e26c9c608efaa3c @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -485,7 +497,7 @@ public class Sniffer extends Animal { +@@ -496,7 +508,7 @@ public class Sniffer extends Animal { private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations @Override protected void customServerAiStep(ServerLevel level) { @@ -152,10 +152,10 @@ index 598216a2794d2c7b325a9e479dfb553427fa0bc7..fca5464de3fe07c74e26c9c608efaa3c SnifferAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index 91c6956311da3694cb3cda2f7a86c7e110c0d212..d4adacff205f6c6d94f2c7376485ac259aa94d61 100644 +index 49f962bbbce22dd26555ee2092ceff96e82aa6b2..ef0522feaa1cc9704f778309c1e6cf1d68379376 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -131,6 +131,18 @@ public class Creaking extends Monster { +@@ -132,6 +132,18 @@ public class Creaking extends Monster { } // Purpur end - Configurable entity base attributes @@ -174,7 +174,7 @@ index 91c6956311da3694cb3cda2f7a86c7e110c0d212..d4adacff205f6c6d94f2c7376485ac25 @Override protected BodyRotationControl createBodyControl() { return new Creaking.CreakingBodyRotationControl(this); -@@ -234,7 +246,7 @@ public class Creaking extends Monster { +@@ -235,7 +247,7 @@ public class Creaking extends Monster { private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations @Override protected void customServerAiStep(ServerLevel level) { @@ -184,10 +184,10 @@ index 91c6956311da3694cb3cda2f7a86c7e110c0d212..d4adacff205f6c6d94f2c7376485ac25 CreakingAi.updateActivity(this); } diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index e5193d7320ea17e86b776c705ec45010019493d6..ed221514a407f1c07986d138a17c588a523d76b8 100644 +index a6109ac9d7f8a9aa4074b3e9504244b1d565a2d4..e0bd1268f77b7234331c9fea0b11b5b04a66a4ad 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -150,6 +150,23 @@ public class Warden extends Monster implements VibrationSystem { +@@ -148,6 +148,23 @@ public class Warden extends Monster implements VibrationSystem { } // Purpur end - Ridables @@ -211,7 +211,7 @@ index e5193d7320ea17e86b776c705ec45010019493d6..ed221514a407f1c07986d138a17c588a @Override public Packet getAddEntityPacket(ServerEntity entity) { return new ClientboundAddEntityPacket(this, entity, this.hasPose(Pose.EMERGING) ? 1 : 0); -@@ -304,7 +321,7 @@ public class Warden extends Monster implements VibrationSystem { +@@ -302,7 +319,7 @@ public class Warden extends Monster implements VibrationSystem { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -221,10 +221,10 @@ index e5193d7320ea17e86b776c705ec45010019493d6..ed221514a407f1c07986d138a17c588a super.customServerAiStep(level); if ((this.tickCount + this.getId()) % 120 == 0) { diff --git a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -index 900c2fdd58da1ba6441f74175b6967b608248315..bf7f1338584d67ed93bd73f5de83a9811d08558f 100644 +index 04b8d4be8d7b36585041b5ff69251d4150e54cae..c73840d0a08366b2d2ee3286589ab4e4e03d122d 100644 --- a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -@@ -27,7 +27,7 @@ import net.minecraft.world.level.storage.loot.LootTable; +@@ -28,7 +28,7 @@ import net.minecraft.world.level.storage.loot.LootTable; public abstract class AbstractChestBoat extends AbstractBoat implements HasCustomInventoryScreen, ContainerEntity { private static final int CONTAINER_SIZE = 27; @@ -233,7 +233,7 @@ index 900c2fdd58da1ba6441f74175b6967b608248315..bf7f1338584d67ed93bd73f5de83a981 @Nullable private ResourceKey lootTable; private long lootTableSeed; -@@ -111,7 +111,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto +@@ -108,7 +108,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto @Override public int getContainerSize() { @@ -243,10 +243,10 @@ index 900c2fdd58da1ba6441f74175b6967b608248315..bf7f1338584d67ed93bd73f5de83a981 @Override diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java -index 234f123959830cc2adb78b9dc8752906140e5b11..e0dceff32b47b334ddcb76271e3cf3ea0d27e5f1 100644 +index ed777b003140486fd5d8d1db7af770301e30bec9..31450de492fbfdd83608ae668072bebd525db566 100644 --- a/org/purpurmc/purpur/PurpurConfig.java +++ b/org/purpurmc/purpur/PurpurConfig.java -@@ -322,6 +322,7 @@ public class PurpurConfig { +@@ -317,6 +317,7 @@ public class PurpurConfig { } public static int barrelRows = 3; @@ -254,7 +254,7 @@ index 234f123959830cc2adb78b9dc8752906140e5b11..e0dceff32b47b334ddcb76271e3cf3ea public static boolean enderChestSixRows = false; public static boolean enderChestPermissionRows = false; public static boolean cryingObsidianValidForPortalFrame = false; -@@ -365,6 +366,7 @@ public class PurpurConfig { +@@ -360,6 +361,7 @@ public class PurpurConfig { case 1 -> 9; default -> 27; }); @@ -263,10 +263,10 @@ index 234f123959830cc2adb78b9dc8752906140e5b11..e0dceff32b47b334ddcb76271e3cf3ea org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java -index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86baa2b5df 100644 +index b3dd4862b9fa220f4aeabc3598169852f8b12482..a6370d8b7bb6e07c7e41beb78b1778351b41cde1 100644 --- a/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1189,12 +1189,20 @@ public class PurpurWorldConfig { +@@ -1184,12 +1184,20 @@ public class PurpurWorldConfig { public boolean allayControllable = true; public double allayMaxHealth = 20.0D; public double allayScale = 1.0D; @@ -287,7 +287,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean armadilloRidable = false; -@@ -1349,6 +1357,10 @@ public class PurpurWorldConfig { +@@ -1344,6 +1352,10 @@ public class PurpurWorldConfig { public double camelMovementSpeedMin = 0.09D; public double camelMovementSpeedMax = 0.09D; public int camelBreedingTicks = 6000; @@ -298,7 +298,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 private void camelSettings() { camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater); camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin); -@@ -1358,6 +1370,10 @@ public class PurpurWorldConfig { +@@ -1353,6 +1365,10 @@ public class PurpurWorldConfig { camelMovementSpeedMin = getDouble("mobs.camel.attributes.movement_speed.min", camelMovementSpeedMin); camelMovementSpeedMax = getDouble("mobs.camel.attributes.movement_speed.max", camelMovementSpeedMax); camelBreedingTicks = getInt("mobs.camel.breeding-delay-ticks", camelBreedingTicks); @@ -309,7 +309,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean catRidable = false; -@@ -1504,12 +1520,20 @@ public class PurpurWorldConfig { +@@ -1499,12 +1515,20 @@ public class PurpurWorldConfig { public boolean creakingControllable = true; public double creakingMaxHealth = 1.0D; public double creakingScale = 1.0D; @@ -330,7 +330,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean creeperRidable = false; -@@ -1841,12 +1865,22 @@ public class PurpurWorldConfig { +@@ -1836,12 +1860,22 @@ public class PurpurWorldConfig { public boolean frogControllable = true; public float frogRidableJumpHeight = 0.65F; public int frogBreedingTicks = 6000; @@ -353,7 +353,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean ghastRidable = false; -@@ -2918,6 +2952,10 @@ public class PurpurWorldConfig { +@@ -2936,6 +2970,10 @@ public class PurpurWorldConfig { public double snifferMaxHealth = 14.0D; public double snifferScale = 1.0D; public int snifferBreedingTicks = 6000; @@ -364,7 +364,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 private void snifferSettings() { snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); -@@ -2925,6 +2963,10 @@ public class PurpurWorldConfig { +@@ -2943,6 +2981,10 @@ public class PurpurWorldConfig { snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth); snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D); snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks); @@ -375,7 +375,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean squidRidable = false; -@@ -3026,10 +3068,20 @@ public class PurpurWorldConfig { +@@ -3044,10 +3086,20 @@ public class PurpurWorldConfig { public boolean tadpoleRidable = false; public boolean tadpoleRidableInWater = true; public boolean tadpoleControllable = true; @@ -396,7 +396,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean traderLlamaRidable = false; -@@ -3263,10 +3315,20 @@ public class PurpurWorldConfig { +@@ -3281,10 +3333,20 @@ public class PurpurWorldConfig { public boolean wardenRidable = false; public boolean wardenRidableInWater = true; public boolean wardenControllable = true; diff --git a/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch b/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch index 31cdb852..db472574 100644 --- a/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch +++ b/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch @@ -11,10 +11,10 @@ The "distanceToSqr" call is a bit expensive, so avoiding it is pretty nice, arou We could also check if the x,y,z coordinates are equal, but for now, let's just keep the identity check, which also helps us since Minecraft's code does reuse the original delta movement Vec3 object diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index 7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec..b3fe9ea70148cdbefbdb617abaf81fe48ee26685 100644 +index b7581796dda77bca66c03e421f2a83a920f44ef1..4859433b0a4160e7ee0af4c2e750956f6ca07649 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -211,6 +211,7 @@ public class ServerEntity { +@@ -215,6 +215,7 @@ public class ServerEntity { if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity)this.entity).isFallFlying()) { Vec3 deltaMovement = this.entity.getDeltaMovement(); @@ -22,7 +22,7 @@ index 7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec..b3fe9ea70148cdbefbdb617abaf81fe4 double d = deltaMovement.distanceToSqr(this.lastSentMovement); if (d > 1.0E-7 || d > 0.0 && deltaMovement.lengthSqr() == 0.0) { this.lastSentMovement = deltaMovement; -@@ -228,6 +229,7 @@ public class ServerEntity { +@@ -232,6 +233,7 @@ public class ServerEntity { this.broadcast.accept(new ClientboundSetEntityMotionPacket(this.entity.getId(), this.lastSentMovement)); } } diff --git a/leaf-server/minecraft-patches/features/0129-SparklyPaper-Optimize-canSee-checks.patch b/leaf-server/minecraft-patches/features/0128-SparklyPaper-Optimize-canSee-checks.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0129-SparklyPaper-Optimize-canSee-checks.patch rename to leaf-server/minecraft-patches/features/0128-SparklyPaper-Optimize-canSee-checks.patch index 3103d67b..9d18069c 100644 --- a/leaf-server/minecraft-patches/features/0129-SparklyPaper-Optimize-canSee-checks.patch +++ b/leaf-server/minecraft-patches/features/0128-SparklyPaper-Optimize-canSee-checks.patch @@ -16,7 +16,7 @@ This seems stupid, but it does seem that it improves the performance a bit, and We also create a "canSee" method tailored for "ChunkMap#updatePlayer()", a method without the equals check (the "updatePlayer()" already checks if the entity is the same entity) because the CraftPlayer's `equals()` check is a *bit* expensive compared to only checking the object's identity, and because the identity has already been check, we don't need to check it twice. diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index a95feb65b392a971ac570dd3fd771b6ff89a2684..c60b9e4076450de2157c1a3cf4f98cc2c19e4e6a 100644 +index 78040fb6b6fd168e62494d3953006bfb38c2909f..74d11e8983f12f6f33fe2eb3016730507e1031d4 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java @@ -1295,7 +1295,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/leaf-server/minecraft-patches/features/0130-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch b/leaf-server/minecraft-patches/features/0129-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0130-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch rename to leaf-server/minecraft-patches/features/0129-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch index 45316079..61118149 100644 --- a/leaf-server/minecraft-patches/features/0130-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch +++ b/leaf-server/minecraft-patches/features/0129-SparklyPaper-Allow-throttling-hopper-checks-if-the-t.patch @@ -7,7 +7,7 @@ Subject: [PATCH] SparklyPaper: Allow throttling hopper checks if the target Original project: https://github.com/SparklyPower/SparklyPaper diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index c2c7832fbb207ecfd23c7a086ef72db9648f48f9..0ea3fef7cccbbeac608e87313e809fbc045a1bdf 100644 +index 2a49f65a2ea13414099b636f463239ced4fbb5f6..9705149eee437ebca99687c47b294659b67375fe 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -423,6 +423,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen diff --git a/leaf-server/minecraft-patches/features/0131-Polpot-Make-egg-and-snowball-can-knockback-player.patch b/leaf-server/minecraft-patches/features/0130-Polpot-Make-egg-and-snowball-can-knockback-player.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0131-Polpot-Make-egg-and-snowball-can-knockback-player.patch rename to leaf-server/minecraft-patches/features/0130-Polpot-Make-egg-and-snowball-can-knockback-player.patch diff --git a/leaf-server/minecraft-patches/features/0132-Redirect-vanilla-getProfiler-to-inactive-in-PathNavi.patch b/leaf-server/minecraft-patches/features/0131-Redirect-vanilla-getProfiler-to-inactive-in-PathNavi.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0132-Redirect-vanilla-getProfiler-to-inactive-in-PathNavi.patch rename to leaf-server/minecraft-patches/features/0131-Redirect-vanilla-getProfiler-to-inactive-in-PathNavi.patch diff --git a/leaf-server/minecraft-patches/features/0133-Remove-useless-creating-stats-json-bases-on-player-n.patch b/leaf-server/minecraft-patches/features/0132-Remove-useless-creating-stats-json-bases-on-player-n.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0133-Remove-useless-creating-stats-json-bases-on-player-n.patch rename to leaf-server/minecraft-patches/features/0132-Remove-useless-creating-stats-json-bases-on-player-n.patch index 3128e960..43e479e1 100644 --- a/leaf-server/minecraft-patches/features/0133-Remove-useless-creating-stats-json-bases-on-player-n.patch +++ b/leaf-server/minecraft-patches/features/0132-Remove-useless-creating-stats-json-bases-on-player-n.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove useless creating stats json bases on player name logic diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 4f8d925425bef31ed70501826ddb9ddd4ad5df72..33962beef40e9dcaf09d096735c7966b146665ab 100644 +index 70d394d8a257390af20bdea5895f7d8a74b16dec..f0c66fce913af9433d53572a3dd3fc31d512346b 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1578,6 +1578,8 @@ public abstract class PlayerList { +@@ -1574,6 +1574,8 @@ public abstract class PlayerList { if (serverStatsCounter == null) { File file = this.server.getWorldPath(LevelResource.PLAYER_STATS_DIR).toFile(); File file1 = new File(file, uuid + ".json"); @@ -17,7 +17,7 @@ index 4f8d925425bef31ed70501826ddb9ddd4ad5df72..33962beef40e9dcaf09d096735c7966b if (!file1.exists()) { File file2 = new File(file, displayName + ".json"); // CraftBukkit Path path = file2.toPath(); -@@ -1585,6 +1587,8 @@ public abstract class PlayerList { +@@ -1581,6 +1583,8 @@ public abstract class PlayerList { file2.renameTo(file1); } } diff --git a/leaf-server/minecraft-patches/features/0134-Improve-Purpur-AFK-system.patch b/leaf-server/minecraft-patches/features/0133-Improve-Purpur-AFK-system.patch similarity index 91% rename from leaf-server/minecraft-patches/features/0134-Improve-Purpur-AFK-system.patch rename to leaf-server/minecraft-patches/features/0133-Improve-Purpur-AFK-system.patch index c2d02781..8d495cb6 100644 --- a/leaf-server/minecraft-patches/features/0134-Improve-Purpur-AFK-system.patch +++ b/leaf-server/minecraft-patches/features/0133-Improve-Purpur-AFK-system.patch @@ -7,10 +7,10 @@ AFK command & command cooldown AFK title message diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index eb600398e4802bb47231bbc0c55fb24ce24a6efb..54cc28bb1693be2077cb30d1dc85f9ae24a6c954 100644 +index 1dc009e85403fe0b6a68daefecfe5cb25ad263cd..de450f9ef03944b101b483126af6a778ae8a4d1d 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -247,6 +247,7 @@ public class Commands { +@@ -277,6 +277,7 @@ public class Commands { StopCommand.register(this.dispatcher); TransferCommand.register(this.dispatcher); WhitelistCommand.register(this.dispatcher); @@ -19,10 +19,10 @@ index eb600398e4802bb47231bbc0c55fb24ce24a6efb..54cc28bb1693be2077cb30d1dc85f9ae org.purpurmc.purpur.command.DemoCommand.register(this.dispatcher); // Purpur - Add demo command org.purpurmc.purpur.command.PingCommand.register(this.dispatcher); // Purpur - Add ping command diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index f3fb661e2cbf8119264d113a06bcb7bb5150be91..034a946cd545d775188a4375a87c90d253ebdb08 100644 +index 8dabe3ca6f5c5b0cd5f5a3801e1cbd853520738e..b71b4db16ac8b42c0061f15db05d4315dd7fecb4 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2387,6 +2387,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2490,6 +2490,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc // Purpur start - AFK API private boolean isAfk = false; @@ -33,7 +33,7 @@ index f3fb661e2cbf8119264d113a06bcb7bb5150be91..034a946cd545d775188a4375a87c90d2 @Override public void setAfk(boolean afk) { -@@ -2424,6 +2428,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2527,6 +2531,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc String prefix = (split.length > 0 ? split[0] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListPrefix, ""); String suffix = (split.length > 1 ? split[1] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListSuffix, ""); if (afk) { @@ -53,10 +53,10 @@ index f3fb661e2cbf8119264d113a06bcb7bb5150be91..034a946cd545d775188a4375a87c90d2 } else { getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true); diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca053de70958 100644 +index 2eecf924618192e1b8cf3971ac6cc3c95ec7f235..1306f920b5908731d04004e1b180c3ac4ad0745d 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2327,6 +2327,7 @@ public class ServerGamePacketListenerImpl +@@ -2361,6 +2361,7 @@ public class ServerGamePacketListenerImpl @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { @@ -64,7 +64,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 this.tryHandleChat(packet.command(), () -> { // CraftBukkit start - SPIGOT-7346: Prevent disconnected players from executing commands if (this.player.hasDisconnected()) { -@@ -2335,7 +2336,7 @@ public class ServerGamePacketListenerImpl +@@ -2369,7 +2370,7 @@ public class ServerGamePacketListenerImpl // CraftBukkit end this.performUnsignedChatCommand(packet.command()); this.detectRateSpam("/" + packet.command()); // Spigot @@ -73,7 +73,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 } private void performUnsignedChatCommand(String command) { -@@ -2368,6 +2369,7 @@ public class ServerGamePacketListenerImpl +@@ -2402,6 +2403,7 @@ public class ServerGamePacketListenerImpl public void handleSignedChatCommand(ServerboundChatCommandSignedPacket packet) { Optional optional = this.unpackAndApplyLastSeen(packet.lastSeenMessages()); if (!optional.isEmpty()) { @@ -81,7 +81,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 this.tryHandleChat(packet.command(), () -> { // CraftBukkit start - SPIGOT-7346: Prevent disconnected players from executing commands if (this.player.hasDisconnected()) { -@@ -2376,7 +2378,7 @@ public class ServerGamePacketListenerImpl +@@ -2410,7 +2412,7 @@ public class ServerGamePacketListenerImpl // CraftBukkit end this.performSignedChatCommand(packet, optional.get()); this.detectRateSpam("/" + packet.command()); // Spigot @@ -90,7 +90,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 } } -@@ -2483,12 +2485,17 @@ public class ServerGamePacketListenerImpl +@@ -2517,12 +2519,17 @@ public class ServerGamePacketListenerImpl return dispatcher.parse(command, this.player.createCommandSourceStack()); } @@ -110,7 +110,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 this.player.resetLastActionTime(); // CraftBukkit start if (sync) { -@@ -2500,6 +2507,40 @@ public class ServerGamePacketListenerImpl +@@ -2534,6 +2541,40 @@ public class ServerGamePacketListenerImpl } } @@ -152,19 +152,19 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 synchronized (this.lastSeenMessages) { Optional var10000; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 33962beef40e9dcaf09d096735c7966b146665ab..5d8b445d5b2762b2266c3e12b3423b9c2044ac7d 100644 +index f0c66fce913af9433d53572a3dd3fc31d512346b..84914c3245de053ba07b105e44f9d838fa3efc4c 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -673,6 +673,7 @@ public abstract class PlayerList { +@@ -676,6 +676,7 @@ public abstract class PlayerList { org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerLeave(player); // Leaves - protocol // Paper end - Fix kick event leave message not being sent org.purpurmc.purpur.task.BossBarTask.removeFromAll(player.getBukkitEntity()); // Purpur - Implement TPSBar + net.minecraft.server.network.ServerGamePacketListenerImpl.afkCooldown.remove(player.getBukkitEntity().getUniqueId()); // Leaf - Improve Purpur AFK system - ServerLevel serverLevel = player.serverLevel(); + ServerLevel serverLevel = player.level(); player.awardStat(Stats.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java -index e0dceff32b47b334ddcb76271e3cf3ea0d27e5f1..ba206b753afe26a5b4c6a2fd1fc438d9a581c3dc 100644 +index 31450de492fbfdd83608ae668072bebd525db566..b83b4536ac756b797f6f2d14886372f01e91145c 100644 --- a/org/purpurmc/purpur/PurpurConfig.java +++ b/org/purpurmc/purpur/PurpurConfig.java @@ -175,6 +175,11 @@ public class PurpurConfig { diff --git a/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch b/leaf-server/minecraft-patches/features/0134-Virtual-thread-for-chat-executor.patch similarity index 90% rename from leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch rename to leaf-server/minecraft-patches/features/0134-Virtual-thread-for-chat-executor.patch index 00607b62..a1c6431b 100644 --- a/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch +++ b/leaf-server/minecraft-patches/features/0134-Virtual-thread-for-chat-executor.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Virtual thread for chat executor diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 2ecda6d2af7721113384c11d4a96a3b3cb082232..7f6dac89c98132645799b7976b972bf43f475fe8 100644 +index 534082a0441dcde9115652cb67dbc8310529ecee..5251e0b274ab5c182f89e52013a542c2b8f30304 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -2663,7 +2663,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop void writeJsonWithCodec(Codec codec, T value, int maxLength) { // Paper end - Adventure; add max length parameter DataResult dataResult = codec.encodeStart(JsonOps.INSTANCE, value); @@ -59,7 +59,7 @@ index b5afc05924ae899e020c303c8b86398e1d4ab8a0..73c2ed488c34cddbafdcbb6f2636264e } diff --git a/net/minecraft/network/protocol/status/ServerStatus.java b/net/minecraft/network/protocol/status/ServerStatus.java -index 094d1821d298fc228270b2d6cf0445949434f3e2..21334ae4764740e5cf1382726d5f5231fa220d5d 100644 +index a491be4250de3199c3e1aa9e5482b568692bd2f5..5db038df25a1b5bf2f7395464250dc0bbf8d8241 100644 --- a/net/minecraft/network/protocol/status/ServerStatus.java +++ b/net/minecraft/network/protocol/status/ServerStatus.java @@ -23,7 +23,10 @@ public record ServerStatus( @@ -91,10 +91,10 @@ index 094d1821d298fc228270b2d6cf0445949434f3e2..21334ae4764740e5cf1382726d5f5231 public record Favicon(byte[] iconBytes) { diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index cdfb9004dd4f4ea1bbb77895b7fc020d628c485d..54910c2e1d6e6bb556e536fda060bd09402e04e8 100644 +index 87fc8861948b50361ec04c5a23406d3abdec6eac..77f11179836636424927843f5f10c3fd23d2b2d4 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -616,6 +616,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -614,6 +614,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @Override public boolean enforceSecureProfile() { @@ -103,10 +103,10 @@ index cdfb9004dd4f4ea1bbb77895b7fc020d628c485d..54910c2e1d6e6bb556e536fda060bd09 // Paper start - Add setting for proxy online mode status return properties.enforceSecureProfile diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 4d48ffeecba7fc4b53dad5f0a4d9c1bb8eac50c1..18f0d486c478087f404d8bb6cd840079e2c8d239 100644 +index 169d039a00339fc8eeb697ba03808f321ed4ad4c..23fefdc7122ff8e195c27651dc3a83000f62a95e 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -328,10 +328,30 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -371,10 +371,30 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } public void send(Packet packet) { @@ -125,10 +125,10 @@ index 4d48ffeecba7fc4b53dad5f0a4d9c1bb8eac50c1..18f0d486c478087f404d8bb6cd840079 this.send(packet, null); } - public void send(Packet packet, @Nullable PacketSendListener listener) { + public void send(Packet packet, @Nullable ChannelFutureListener channelFutureListener) { + // Leaf start - Mirai - Configurable chat message signatures + if (!org.dreeam.leaf.config.modules.network.ChatMessageSignature.enabled) { -+ if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat && listener != null) { ++ if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat && channelFutureListener != null) { + this.send(chat); + return; + } @@ -138,10 +138,10 @@ index 4d48ffeecba7fc4b53dad5f0a4d9c1bb8eac50c1..18f0d486c478087f404d8bb6cd840079 if (packet == null || this.processedDisconnect) { // Spigot return; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 5d8b445d5b2762b2266c3e12b3423b9c2044ac7d..a829c7b293be5ddc5165a86df1251b10fd6f8650 100644 +index 84914c3245de053ba07b105e44f9d838fa3efc4c..e4543611016a648314459144e43565300153f0fe 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1538,7 +1538,7 @@ public abstract class PlayerList { +@@ -1534,7 +1534,7 @@ public abstract class PlayerList { public void broadcastChatMessage(PlayerChatMessage message, Predicate shouldFilterMessageTo, @Nullable ServerPlayer sender, ChatType.Bound boundChatType, @Nullable Function unsignedFunction) { // Paper end boolean flag = this.verifyChatTrusted(message); @@ -150,7 +150,7 @@ index 5d8b445d5b2762b2266c3e12b3423b9c2044ac7d..a829c7b293be5ddc5165a86df1251b10 OutgoingChatMessage outgoingChatMessage = OutgoingChatMessage.create(message); boolean flag1 = false; -@@ -1563,6 +1563,7 @@ public abstract class PlayerList { +@@ -1559,6 +1559,7 @@ public abstract class PlayerList { } public boolean verifyChatTrusted(PlayerChatMessage message) { diff --git a/leaf-server/minecraft-patches/features/0138-Cache-player-profileResult.patch b/leaf-server/minecraft-patches/features/0137-Cache-player-profileResult.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0138-Cache-player-profileResult.patch rename to leaf-server/minecraft-patches/features/0137-Cache-player-profileResult.patch diff --git a/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch b/leaf-server/minecraft-patches/features/0138-Matter-Secure-Seed.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch rename to leaf-server/minecraft-patches/features/0138-Matter-Secure-Seed.patch index 2452640d..760f4b9a 100644 --- a/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch +++ b/leaf-server/minecraft-patches/features/0138-Matter-Secure-Seed.patch @@ -13,10 +13,10 @@ Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java -index 5748658abf0b90812005ae9d426df92daf5532f0..4a0eed7d7645ed539857592d233214e9a74499f1 100644 +index b286dc17cda16fca3af9374d2a4a8bd137c24450..72028edf5bbe8094779139c4a52da2a95fef10e8 100644 --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -114,7 +114,17 @@ public class DedicatedServerProperties extends Settings GsonHelper.parse(!property.isEmpty() ? property : "{}"), new JsonObject()), this.get("level-type", property -> property.toLowerCase(Locale.ROOT), WorldPresets.NORMAL.location().toString()) diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index e67196b815dad6baa823822285cff83848e549ce..ac7b4625ed9ec94ca438b6fedcd3e6bb6414b157 100644 +index 4979171c8da6f366aab636fb3058ca457fe75061..91574985958950dffe0f393d7dfac4818af3b151 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -674,6 +674,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -675,6 +675,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } public ChunkGenerator getGenerator() { @@ -48,10 +48,10 @@ index e67196b815dad6baa823822285cff83848e549ce..ac7b4625ed9ec94ca438b6fedcd3e6bb } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 9b193bf81cf7f9f45dfa207a826043e083c2f8ba..11e8738b7cf388e0742bfe5e6136365f6ac066f9 100644 +index 2cf0fa70ae3d7675cac3cf7a0002097b4e773fe1..d57a3a9b8ebd2f5d381336a0b5e81d71e2de6530 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -625,6 +625,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -628,6 +628,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe chunkGenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkGenerator, gen); } // CraftBukkit end @@ -60,10 +60,10 @@ index 9b193bf81cf7f9f45dfa207a826043e083c2f8ba..11e8738b7cf388e0742bfe5e6136365f DataFixer fixerUpper = server.getFixerUpper(); // Paper - rewrite chunk system diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java -index 9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c..c257a19ff6b15ee6a83e9c946e2b20309ada9b51 100644 +index b299fc08fe900b4d48ce3e6986bcea000253053e..2885d4271405409ad2a681ea13aadf383a3520ca 100644 --- a/net/minecraft/world/entity/monster/Slime.java +++ b/net/minecraft/world/entity/monster/Slime.java -@@ -412,7 +412,11 @@ public class Slime extends Mob implements Enemy { +@@ -413,7 +413,11 @@ public class Slime extends Mob implements Enemy { } ChunkPos chunkPos = new ChunkPos(pos); @@ -77,10 +77,10 @@ index 9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c..c257a19ff6b15ee6a83e9c946e2b2030 final double maxHeightSlimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.slimeChunk.maximum; if (random.nextInt(10) == 0 && flag && pos.getY() < maxHeightSlimeChunk) { diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java -index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..6683df8d0f5a61ab094393f761a3d3a22d6e0455 100644 +index 182c14b660f8860bed627eed4e01fd4002153e9a..686c031ec73acc80683aaa39a78fe9221f0215a6 100644 --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -87,6 +87,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -88,6 +88,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(ChunkAccess.DATA_TYPE_REGISTRY); // CraftBukkit end public final Registry biomeRegistry; // CraftBukkit @@ -91,7 +91,7 @@ index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..6683df8d0f5a61ab094393f761a3d3a2 // Paper start - rewrite chunk system private volatile ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles; -@@ -191,6 +195,17 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -192,6 +196,17 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh return GameEventListenerRegistry.NOOP; } diff --git a/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch b/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed-command.patch similarity index 64% rename from leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch rename to leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed-command.patch index e612d244..25980dd3 100644 --- a/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch +++ b/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed-command.patch @@ -7,24 +7,22 @@ Original license: GPLv3 Original project: https://github.com/plasmoapp/matter diff --git a/net/minecraft/server/commands/SeedCommand.java b/net/minecraft/server/commands/SeedCommand.java -index a65affc41a4fc299bc2281f0f53f2e075633899d..18dd6fa908104ea9fbb32faaca0725d4d6849b09 100644 +index 7c1e18d8362be5ae885c32b05e98b9ef45942d93..e54ed64059956555767c0c01057a8319e671b1d2 100644 --- a/net/minecraft/server/commands/SeedCommand.java +++ b/net/minecraft/server/commands/SeedCommand.java -@@ -12,6 +12,17 @@ public class SeedCommand { - long seed = context.getSource().getLevel().getSeed(); +@@ -12,6 +12,15 @@ public class SeedCommand { + long seed = commandContext.getSource().getLevel().getSeed(); Component component = ComponentUtils.copyOnClickText(String.valueOf(seed)); - context.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false); -+ + commandContext.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false); + // Leaf start - Matter - Secure Seed command + if (org.dreeam.leaf.config.modules.misc.SecureSeed.enabled) { -+ su.plo.matter.Globals.setupGlobals(context.getSource().getLevel()); ++ su.plo.matter.Globals.setupGlobals(commandContext.getSource().getLevel()); + String seedStr = su.plo.matter.Globals.seedToString(su.plo.matter.Globals.worldSeed); + Component featureSeedComponent = ComponentUtils.copyOnClickText(seedStr); + -+ context.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false); ++ commandContext.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false); + } + // Leaf end - Matter - Secure Seed command -+ return (int)seed; })); } diff --git a/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch b/leaf-server/minecraft-patches/features/0140-Faster-random-generator.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch rename to leaf-server/minecraft-patches/features/0140-Faster-random-generator.patch index 5a3bac6e..4818423e 100644 --- a/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch +++ b/leaf-server/minecraft-patches/features/0140-Faster-random-generator.patch @@ -14,7 +14,7 @@ ThreadUnsafeRandom (Moonrise): 102,265,100 ns SimpleThreadUnsafeRandom (Moonrise): 97,054,600 ns diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index ac7b4625ed9ec94ca438b6fedcd3e6bb6414b157..6d5a15122079f2d1568ceb7086db21ad454f58e6 100644 +index 91574985958950dffe0f393d7dfac4818af3b151..eaaa66c4d86d4ebda0acf8f1dbe8ecb55aa28285 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -154,7 +154,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -27,10 +27,10 @@ index ac7b4625ed9ec94ca438b6fedcd3e6bb6414b157..6d5a15122079f2d1568ceb7086db21ad final ServerLevel world = this.level; final int randomTickSpeed = world.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 11e8738b7cf388e0742bfe5e6136365f6ac066f9..16cafa0acb7b2972ce08ab56921e73eb44eff6fa 100644 +index d57a3a9b8ebd2f5d381336a0b5e81d71e2de6530..08d12a1acc3a672a77daa15f82392cd603c30283 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -891,7 +891,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -895,7 +895,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private void optimiseRandomTick(final LevelChunk chunk, final int tickSpeed) { final LevelChunkSection[] sections = chunk.getSections(); final int minSection = ca.spottedleaf.moonrise.common.util.WorldUtil.getMinSection((ServerLevel)(Object)this); @@ -39,7 +39,7 @@ index 11e8738b7cf388e0742bfe5e6136365f6ac066f9..16cafa0acb7b2972ce08ab56921e73eb final boolean doubleTickFluids = !ca.spottedleaf.moonrise.common.PlatformHooks.get().configFixMC224294(); final ChunkPos cpos = chunk.getPos(); -@@ -940,7 +940,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -944,7 +944,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.simpleRandom.nextInt(16); } // Gale - Airplane - optimize random calls in chunk ticking public void tickChunk(LevelChunk chunk, int randomTickSpeed) { @@ -97,10 +97,10 @@ index 8516d47b0ba79d91638837199e7ae0fb6cb44a79..4f4b55dd099dd2c2fea118b18b535881 RandomSource fork(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa..ddaaf29305a9cdb6dcccd38d4ec37fac6f0a1a51 100644 +index 0cdd3eb97e74aa3955f014a1f8f6a7d1580d323f..574be7359a2ad62c95a42c46c7a0f3c7a42eb44e 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -149,7 +149,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -155,7 +155,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper start - Share random for entities to make them more random @@ -110,7 +110,7 @@ index d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa..ddaaf29305a9cdb6dcccd38d4ec37fac private static final class RandomRandomSource extends ca.spottedleaf.moonrise.common.util.ThreadUnsafeRandom { public RandomRandomSource() { diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 9ac2ecb78f6214616376b0e3badef21dc3f72114..f145453f70a219c1be33b241309ae2ab22a8004b 100644 +index 3bd42eb81eae3af9323021a5dc6edaa06dfcaead..8ebfb2f5cf439190ea9bd4ad81d737fbcd4514c2 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -117,7 +117,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0142-Don-t-save-primed-tnt-entity.patch b/leaf-server/minecraft-patches/features/0141-Don-t-save-primed-tnt-entity.patch similarity index 83% rename from leaf-server/minecraft-patches/features/0142-Don-t-save-primed-tnt-entity.patch rename to leaf-server/minecraft-patches/features/0141-Don-t-save-primed-tnt-entity.patch index 8060b7c7..a5c28e0d 100644 --- a/leaf-server/minecraft-patches/features/0142-Don-t-save-primed-tnt-entity.patch +++ b/leaf-server/minecraft-patches/features/0141-Don-t-save-primed-tnt-entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't save primed tnt entity diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java -index 9a00aead39e194de076ee651d2f75b29673cad1e..36e3937c9e09852937c94c268c877a15337835c5 100644 +index ef070f8a9ab3a4676e2141f7c0bc20a000d0cc3a..1acfc005260628cc70ebf063acc92fb2904d7794 100644 --- a/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -281,4 +281,11 @@ public class PrimedTnt extends Entity implements TraceableEntity { +@@ -266,4 +266,11 @@ public class PrimedTnt extends Entity implements TraceableEntity { return super.interact(player, hand); } // Purpur end - Shears can defuse TNT diff --git a/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch b/leaf-server/minecraft-patches/features/0142-Don-t-save-falling-block-entity.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch rename to leaf-server/minecraft-patches/features/0142-Don-t-save-falling-block-entity.patch index b8c6533c..9a5c8158 100644 --- a/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch +++ b/leaf-server/minecraft-patches/features/0142-Don-t-save-falling-block-entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't save falling block entity diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java -index 31edd0d45ac6c38887e4cebffe5a7cf377b47466..149d5845480c03fe4e29b09cac7fcd1bec147507 100644 +index 595dee03e3a7d98d703e48fb53d82d7f392a2b3d..c99ddedaf25a009f0d19f97d01e7545b0c59aee2 100644 --- a/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -385,4 +385,11 @@ public class FallingBlockEntity extends Entity { +@@ -390,4 +390,11 @@ public class FallingBlockEntity extends Entity { this.forceTickAfterTeleportToDuplicate = entity != null && flag && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation; // Paper return entity; } diff --git a/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch b/leaf-server/minecraft-patches/features/0143-Configurable-connection-message.patch similarity index 68% rename from leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch rename to leaf-server/minecraft-patches/features/0143-Configurable-connection-message.patch index d978ce03..4fd491fe 100644 --- a/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch +++ b/leaf-server/minecraft-patches/features/0143-Configurable-connection-message.patch @@ -5,28 +5,28 @@ Subject: [PATCH] Configurable connection message diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index a829c7b293be5ddc5165a86df1251b10fd6f8650..8b7b60e2f143dcbb44f3084c3c4d2306b9708f0d 100644 +index e4543611016a648314459144e43565300153f0fe..70bec2fc50c1e6a928e450e617e76dd4434172f9 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -438,7 +438,7 @@ public abstract class PlayerList { - // Ensure that player inventory is populated with its viewer - player.containerMenu.transferTo(player.containerMenu, bukkitPlayer); +@@ -439,7 +439,7 @@ public abstract class PlayerList { + // Ensure that player inventory is populated with its viewer + player.containerMenu.transferTo(player.containerMenu, bukkitPlayer); -- org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, io.papermc.paper.adventure.PaperAdventure.asAdventure(mutableComponent)); // Paper - Adventure -+ org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, getJoinMsg(mutableComponent, bukkitPlayer)); // Paper - Adventure // Leaf - Configurable connection message - join message - this.cserver.getPluginManager().callEvent(playerJoinEvent); +- org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, io.papermc.paper.adventure.PaperAdventure.asAdventure(mutableComponent)); // Paper - Adventure ++ org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, getJoinMsg(mutableComponent, bukkitPlayer)); // Paper - Adventure // Leaf - Configurable connection message - join message + this.cserver.getPluginManager().callEvent(playerJoinEvent); - if (!player.connection.isAcceptingMessages()) { -@@ -452,7 +452,7 @@ public abstract class PlayerList { + if (!player.connection.isAcceptingMessages()) { +@@ -453,7 +453,7 @@ public abstract class PlayerList { - final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); + final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); -- if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure -+ if (org.dreeam.leaf.config.modules.misc.ConnectionMessage.joinEnabled && jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure // Leaf - Configurable connection message - join message - joinMessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(jm); // Paper - Adventure - this.server.getPlayerList().broadcastSystemMessage(joinMessage, false); // Paper - Adventure - } -@@ -682,7 +682,7 @@ public abstract class PlayerList { +- if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure ++ if (org.dreeam.leaf.config.modules.misc.ConnectionMessage.joinEnabled && jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure // Leaf - Configurable connection message - join message + joinMessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(jm); // Paper - Adventure + this.server.getPlayerList().broadcastSystemMessage(joinMessage, false); // Paper - Adventure + } +@@ -685,7 +685,7 @@ public abstract class PlayerList { player.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason } @@ -35,7 +35,7 @@ index a829c7b293be5ddc5165a86df1251b10fd6f8650..8b7b60e2f143dcbb44f3084c3c4d2306 this.cserver.getPluginManager().callEvent(playerQuitEvent); player.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); -@@ -1691,4 +1691,40 @@ public abstract class PlayerList { +@@ -1687,4 +1687,40 @@ public abstract class PlayerList { public boolean isAllowCommandsForAllPlayers() { return this.allowCommandsForAllPlayers; } diff --git a/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0144-Configurable-unknown-command-message.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0144-Configurable-unknown-command-message.patch index 6385c426..26912e28 100644 --- a/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch +++ b/leaf-server/minecraft-patches/features/0144-Configurable-unknown-command-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable unknown command message diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b11aa95552 100644 +index de450f9ef03944b101b483126af6a778ae8a4d1d..d201c3965d5a55de740175c140bc7ee411f1be78 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -403,31 +403,8 @@ public class Commands { +@@ -405,31 +405,8 @@ public class Commands { // Paper start - Add UnknownCommandEvent final net.kyori.adventure.text.TextComponent.Builder builder = net.kyori.adventure.text.Component.text(); // source.sendFailure(ComponentUtils.fromMessage(var7.getRawMessage())); @@ -18,7 +18,7 @@ index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b1 - int min = Math.min(var7.getInput().length(), var7.getCursor()); - MutableComponent mutableComponent = Component.empty() - .withStyle(ChatFormatting.GRAY) -- .withStyle(style -> style.withClickEvent(new ClickEvent.SuggestCommand("/" + label))); // CraftBukkit // Paper +- .withStyle(style -> style.withClickEvent(new ClickEvent.SuggestCommand("/" + command))); - if (min > 10) { - mutableComponent.append(CommonComponents.ELLIPSIS); - } @@ -37,22 +37,22 @@ index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b1 - .append(io.papermc.paper.adventure.PaperAdventure.asAdventure(mutableComponent)); - } - org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(source.getBukkitSender(), command, org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty() ? null : builder.build()); -+ org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(source.getBukkitSender(), command, getUnknownCommandMessage(builder, var7, label)); // Leaf - Configurable unknown command message ++ org.bukkit.event.command.UnknownCommandEvent event = new org.bukkit.event.command.UnknownCommandEvent(source.getBukkitSender(), command, getUnknownCommandMessage(builder, var7, command)); // Leaf - Configurable unknown command message org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event); if (event.message() != null) { source.sendFailure(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false); -@@ -678,6 +655,92 @@ public class Commands { +@@ -663,6 +640,92 @@ public class Commands { }; } + // Leaf start - Configurable unknown command message + private static net.kyori.adventure.text.Component getUnknownCommandMessage( -+ net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException commandSyntaxException, String label ++ net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException commandSyntaxException, String command + ) { + String rawMessage = org.dreeam.leaf.config.modules.misc.UnknownCommandMessage.unknownCommandMessage; + + if ("default".equals(rawMessage)) { -+ return getVanillaUnknownCommandMessage(builder, commandSyntaxException, label); ++ return getVanillaUnknownCommandMessage(builder, commandSyntaxException, command); + } + + net.kyori.adventure.text.Component messageComponent = null; @@ -71,7 +71,7 @@ index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b1 + final net.kyori.adventure.text.Component context = net.kyori.adventure.text.Component.translatable("command.context.here") + .color(net.kyori.adventure.text.format.NamedTextColor.RED) + .decorate(net.kyori.adventure.text.format.TextDecoration.ITALIC); -+ final net.kyori.adventure.text.event.ClickEvent event = net.kyori.adventure.text.event.ClickEvent.suggestCommand("/" + label); ++ final net.kyori.adventure.text.event.ClickEvent event = net.kyori.adventure.text.event.ClickEvent.suggestCommand("/" + command); + + detail.color(net.kyori.adventure.text.format.NamedTextColor.GRAY); + @@ -100,7 +100,7 @@ index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b1 + } + + private static net.kyori.adventure.text.Component getVanillaUnknownCommandMessage( -+ net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException var7, String label ++ net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException var7, String command + ) { + builder.color(net.kyori.adventure.text.format.NamedTextColor.RED).append(io.papermc.paper.command.brigadier.MessageComponentSerializer.message().deserialize(var7.getRawMessage())); + @@ -108,7 +108,7 @@ index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b1 + int min = Math.min(var7.getInput().length(), var7.getCursor()); + MutableComponent mutableComponent = Component.empty() + .withStyle(ChatFormatting.GRAY) -+ .withStyle(style -> style.withClickEvent(new ClickEvent.SuggestCommand("/" + label))); // CraftBukkit // Paper ++ .withStyle(style -> style.withClickEvent(new ClickEvent.SuggestCommand("/" + command))); + if (min > 10) { + mutableComponent.append(CommonComponents.ELLIPSIS); + } diff --git a/leaf-server/minecraft-patches/features/0146-Remove-stream-in-BlockBehaviour-cache-blockstate.patch b/leaf-server/minecraft-patches/features/0145-Remove-stream-in-BlockBehaviour-cache-blockstate.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0146-Remove-stream-in-BlockBehaviour-cache-blockstate.patch rename to leaf-server/minecraft-patches/features/0145-Remove-stream-in-BlockBehaviour-cache-blockstate.patch diff --git a/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch b/leaf-server/minecraft-patches/features/0146-Remove-stream-in-entity-visible-effects-filter.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch rename to leaf-server/minecraft-patches/features/0146-Remove-stream-in-entity-visible-effects-filter.patch index eb2dd953..274d4b32 100644 --- a/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch +++ b/leaf-server/minecraft-patches/features/0146-Remove-stream-in-entity-visible-effects-filter.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stream in entity visible effects filter diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 09aa0b344aff0c48eec9a296d47c0704bd0fdc5c..fdbe3d4d71ba30c8330760555e97ff436643a7a9 100644 +index 97098f05dda8a46716162dd0330ca60d30814999..1d60ff59942680e9993d875505db0dfb8d7a5f96 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -988,12 +988,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1013,12 +1013,15 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } private void updateSynchronizedMobEffectParticles() { diff --git a/leaf-server/minecraft-patches/features/0148-Remove-stream-and-double-iteration-in-enough-deep-sl.patch b/leaf-server/minecraft-patches/features/0147-Remove-stream-and-double-iteration-in-enough-deep-sl.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0148-Remove-stream-and-double-iteration-in-enough-deep-sl.patch rename to leaf-server/minecraft-patches/features/0147-Remove-stream-and-double-iteration-in-enough-deep-sl.patch diff --git a/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch b/leaf-server/minecraft-patches/features/0148-Remove-stream-in-trial-spawner-ticking.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch rename to leaf-server/minecraft-patches/features/0148-Remove-stream-in-trial-spawner-ticking.patch index c469f856..3a0d3410 100644 --- a/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch +++ b/leaf-server/minecraft-patches/features/0148-Remove-stream-in-trial-spawner-ticking.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Remove stream in trial spawner ticking diff --git a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java -index 6b3d92e76a16358c89ee07e1970c764ba4a8e2dc..5edc7278387c3fc61909582ebf34e905abc68fc4 100644 +index 3e3380dfe8fde979f0d843813583d6f07efb96c4..f4b092e3c81f692aa4632e116960e71eb084bdc8 100644 --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java @@ -173,17 +173,21 @@ public enum TrialSpawnerState implements StringRepresentable { } - private static Optional calculatePositionToSpawnSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner, TrialSpawnerData spawnerData) { -- List list = spawnerData.detectedPlayers + private static Optional calculatePositionToSpawnSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner, TrialSpawnerStateData data) { +- List list = data.detectedPlayers - .stream() - .map(level::getPlayerByUUID) - .filter(Objects::nonNull) @@ -26,7 +26,7 @@ index 6b3d92e76a16358c89ee07e1970c764ba4a8e2dc..5edc7278387c3fc61909582ebf34e905 + // Leaf start - Remove stream in trial spawner ticking + List list = new java.util.ArrayList<>(); + -+ for (UUID uuid : spawnerData.detectedPlayers) { ++ for (UUID uuid : data.detectedPlayers) { + Player player = level.getPlayerByUUID(uuid); + + if (player != null @@ -78,4 +78,4 @@ index 6b3d92e76a16358c89ee07e1970c764ba4a8e2dc..5edc7278387c3fc61909582ebf34e905 + // Leaf end - Remove stream in trial spawner ticking } - private boolean timeToSpawnItemSpawner(ServerLevel level, TrialSpawnerData spawnerData) { + private boolean timeToSpawnItemSpawner(ServerLevel level, TrialSpawnerStateData data) { diff --git a/leaf-server/minecraft-patches/features/0150-Remove-stream-in-Brain.patch b/leaf-server/minecraft-patches/features/0149-Remove-stream-in-Brain.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0150-Remove-stream-in-Brain.patch rename to leaf-server/minecraft-patches/features/0149-Remove-stream-in-Brain.patch diff --git a/leaf-server/minecraft-patches/features/0151-Remove-stream-in-BehaviorUtils.patch b/leaf-server/minecraft-patches/features/0150-Remove-stream-in-BehaviorUtils.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0151-Remove-stream-in-BehaviorUtils.patch rename to leaf-server/minecraft-patches/features/0150-Remove-stream-in-BehaviorUtils.patch diff --git a/leaf-server/minecraft-patches/features/0152-Remove-stream-in-YieldJobSite.patch b/leaf-server/minecraft-patches/features/0151-Remove-stream-in-YieldJobSite.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0152-Remove-stream-in-YieldJobSite.patch rename to leaf-server/minecraft-patches/features/0151-Remove-stream-in-YieldJobSite.patch diff --git a/leaf-server/minecraft-patches/features/0153-Remove-stream-in-PlayerSensor.patch b/leaf-server/minecraft-patches/features/0152-Remove-stream-in-PlayerSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0153-Remove-stream-in-PlayerSensor.patch rename to leaf-server/minecraft-patches/features/0152-Remove-stream-in-PlayerSensor.patch diff --git a/leaf-server/minecraft-patches/features/0154-Remove-stream-in-GolemSensor.patch b/leaf-server/minecraft-patches/features/0153-Remove-stream-in-GolemSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0154-Remove-stream-in-GolemSensor.patch rename to leaf-server/minecraft-patches/features/0153-Remove-stream-in-GolemSensor.patch diff --git a/leaf-server/minecraft-patches/features/0155-Remove-stream-in-GateBehavior.patch b/leaf-server/minecraft-patches/features/0154-Remove-stream-in-GateBehavior.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0155-Remove-stream-in-GateBehavior.patch rename to leaf-server/minecraft-patches/features/0154-Remove-stream-in-GateBehavior.patch diff --git a/leaf-server/minecraft-patches/features/0156-Remove-stream-in-matchingSlot.patch b/leaf-server/minecraft-patches/features/0155-Remove-stream-in-matchingSlot.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0156-Remove-stream-in-matchingSlot.patch rename to leaf-server/minecraft-patches/features/0155-Remove-stream-in-matchingSlot.patch diff --git a/leaf-server/minecraft-patches/features/0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch b/leaf-server/minecraft-patches/features/0156-Remove-stream-in-entity-mountedOrDismounted-changes-.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch rename to leaf-server/minecraft-patches/features/0156-Remove-stream-in-entity-mountedOrDismounted-changes-.patch index 4a7ad3f7..6bb0594b 100644 --- a/leaf-server/minecraft-patches/features/0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch +++ b/leaf-server/minecraft-patches/features/0156-Remove-stream-in-entity-mountedOrDismounted-changes-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove stream in entity mountedOrDismounted changes update diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index b3fe9ea70148cdbefbdb617abaf81fe48ee26685..d6b261f8d3fbeee771208528b3e0bd5fcd94878b 100644 +index 4859433b0a4160e7ee0af4c2e750956f6ca07649..d605c4da4475fdc47a6d0c90fbca2713fc9d8fef 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java @@ -118,7 +118,19 @@ public class ServerEntity { diff --git a/leaf-server/minecraft-patches/features/0158-Replace-Entity-active-effects-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0157-Replace-Entity-active-effects-map-with-optimized-col.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0158-Replace-Entity-active-effects-map-with-optimized-col.patch rename to leaf-server/minecraft-patches/features/0157-Replace-Entity-active-effects-map-with-optimized-col.patch index 76b8291e..c39d1693 100644 --- a/leaf-server/minecraft-patches/features/0158-Replace-Entity-active-effects-map-with-optimized-col.patch +++ b/leaf-server/minecraft-patches/features/0157-Replace-Entity-active-effects-map-with-optimized-col.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Replace Entity active effects map with optimized collection Dreeam TODO: check this diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index fdbe3d4d71ba30c8330760555e97ff436643a7a9..ba6d9a5df71e9aae9defedf5bbe12f49599123cb 100644 +index 1d60ff59942680e9993d875505db0dfb8d7a5f96..6f5b160cae3a0f95f15a38d65a9f0515c00f87ba 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -196,6 +196,10 @@ public abstract class LivingEntity extends Entity implements Attackable { - }; +@@ -208,6 +208,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin + private static final Dynamic EMPTY_BRAIN = new Dynamic<>(JavaOps.INSTANCE, Map.of("memories", Map.of())); private final AttributeMap attributes; public CombatTracker combatTracker = new CombatTracker(this); + // Need to figure out the difference of mem access pattern between hash map and obj2obj hash map (separate chaining vs open addressing) @@ -20,7 +20,7 @@ index fdbe3d4d71ba30c8330760555e97ff436643a7a9..ba6d9a5df71e9aae9defedf5bbe12f49 public final Map, MobEffectInstance> activeEffects = Maps.newHashMap(); private final Map lastEquipmentItems = Util.makeEnumMap(EquipmentSlot.class, slot -> ItemStack.EMPTY); public boolean swinging; -@@ -990,15 +994,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1015,15 +1019,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin private void updateSynchronizedMobEffectParticles() { // Leaf start - Remove stream in entity visible effects filter List list = new java.util.ArrayList<>(); diff --git a/leaf-server/minecraft-patches/features/0159-Replace-criterion-map-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0158-Replace-criterion-map-with-optimized-collection.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0159-Replace-criterion-map-with-optimized-collection.patch rename to leaf-server/minecraft-patches/features/0158-Replace-criterion-map-with-optimized-collection.patch index d04c8e32..9fc76dac 100644 --- a/leaf-server/minecraft-patches/features/0159-Replace-criterion-map-with-optimized-collection.patch +++ b/leaf-server/minecraft-patches/features/0158-Replace-criterion-map-with-optimized-collection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Replace criterion map with optimized collection diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index c7e92f0122823d9e1aa471c5c0e995d1e1d90184..10ac7393d20a0857be2bfdd856dda448699b3eff 100644 +index eee5aaca8219802a56b8ba08986da672c40dc8b4..4bf87ebb49880b8e09203a48fce6371398281561 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java @@ -60,7 +60,7 @@ public class PlayerAdvancements { diff --git a/leaf-server/minecraft-patches/features/0159-Replace-brain-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0159-Replace-brain-with-optimized-collection.patch new file mode 100644 index 00000000..62d5d611 --- /dev/null +++ b/leaf-server/minecraft-patches/features/0159-Replace-brain-with-optimized-collection.patch @@ -0,0 +1,246 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> +Date: Sat, 26 Oct 2024 00:06:04 +0800 +Subject: [PATCH] Replace brain with optimized collection + +Co-authored-by: Taiyou06 + +diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java +index 29fdf94db0308031edfe7915fc587a2aa5a1a18a..1d533dc2db5df6f31f307bc94f9f8e5784b0ab23 100644 +--- a/net/minecraft/world/entity/ai/Brain.java ++++ b/net/minecraft/world/entity/ai/Brain.java +@@ -45,14 +45,20 @@ public class Brain { + static final Logger LOGGER = LogUtils.getLogger(); + private final Supplier>> codec; + private static final int SCHEDULE_UPDATE_DELAY = 20; +- private final Map, Optional>> memories = Maps.newHashMap(); +- private final Map>, Sensor> sensors = Maps.newLinkedHashMap(); +- private final Map>>> availableBehaviorsByPriority = Maps.newTreeMap(); ++ // Leaf start - Replace brain maps with optimized collection ++ private final Map, Optional>> memories = new it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap<>(); ++ private final Map>, Sensor> sensors = new it.unimi.dsi.fastutil.objects.Reference2ReferenceArrayMap<>(); ++ private final Map>>> availableBehaviorsByPriority = new it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<>(); ++ public static final Map[] EMPTY_ARRAY = {}; ++ private Map>>[] availableBehaviorsByPriorityArray = EMPTY_ARRAY; ++ // Leaf end - Replace brain maps with optimized collection + private Schedule schedule = Schedule.EMPTY; +- private final Map, MemoryStatus>>> activityRequirements = Maps.newHashMap(); +- private final Map>> activityMemoriesToEraseWhenStopped = Maps.newHashMap(); +- private Set coreActivities = Sets.newHashSet(); +- private final Set activeActivities = Sets.newHashSet(); ++ // Leaf start - Replace brain maps with optimized collection ++ private final Map, MemoryStatus>>> activityRequirements = new org.dreeam.leaf.util.map.ActivityArrayMap<>(); ++ private final Map>> activityMemoriesToEraseWhenStopped = new org.dreeam.leaf.util.map.ActivityArrayMap<>(); ++ private Set coreActivities = new org.dreeam.leaf.util.map.ActivityBitSet(); ++ private final Set activeActivities = new org.dreeam.leaf.util.map.ActivityBitSet(); ++ // Leaf end - Replace brain maps with optimized collection + private Activity defaultActivity = Activity.IDLE; + private long lastScheduleUpdate = -9999L; + +@@ -162,6 +168,8 @@ public class Brain { + for (Brain.MemoryValue memoryValue : memoryValues) { + memoryValue.setMemoryInternal(this); + } ++ ++ ((it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap, Optional>>) this.memories).trim(); // Leaf + } + + public DataResult serializeStart(DynamicOps ops) { +@@ -178,6 +186,7 @@ public class Brain { + + public void clearMemories() { + this.memories.keySet().forEach(memoryModuleType -> this.memories.put((MemoryModuleType)memoryModuleType, Optional.empty())); ++ this.availableBehaviorsByPriorityArray = EMPTY_ARRAY; // Leaf + } + + public void eraseMemory(MemoryModuleType type) { +@@ -362,7 +371,7 @@ public class Brain { + } + + public void addActivity(Activity activity, ImmutableList>> tasks) { +- this.addActivityAndRemoveMemoriesWhenStopped(activity, tasks, ImmutableSet.of(), Sets.newHashSet()); ++ this.addActivityAndRemoveMemoriesWhenStopped(activity, tasks, ImmutableSet.of(), new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<>()); + } + + public void addActivityWithConditions( +@@ -395,8 +404,8 @@ public class Brain { + + for (Pair> pair : tasks) { + this.availableBehaviorsByPriority +- .computeIfAbsent(pair.getFirst(), integer -> Maps.newHashMap()) +- .computeIfAbsent(activity, activity1 -> Sets.newLinkedHashSet()) ++ .computeIfAbsent(pair.getFirst(), integer -> new org.dreeam.leaf.util.map.ActivityArrayMap<>()) // Leaf - Replace brain activity maps with optimized collection ++ .computeIfAbsent(activity, activity1 -> new org.dreeam.leaf.util.map.BehaviorControlArraySet<>()) // Leaf - Replace brain activity maps with optimized collection + .add((BehaviorControl)pair.getSecond()); + } + } +@@ -404,6 +413,7 @@ public class Brain { + @VisibleForTesting + public void removeAllBehaviors() { + this.availableBehaviorsByPriority.clear(); ++ this.availableBehaviorsByPriorityArray = EMPTY_ARRAY; // Leaf + } + + public boolean isActive(Activity activity) { +@@ -437,14 +447,28 @@ public class Brain { + } + + private void forgetOutdatedMemories() { ++ boolean flag = false; ++ for (var entry : this.memories.values()) { ++ if (entry.isPresent()) { ++ ExpirableValue expirableValue = entry.get(); ++ if (expirableValue.hasExpired()) { ++ flag = true; ++ } ++ expirableValue.tick(); ++ } ++ } ++ if (flag) { ++ eraseOutdatedMemories(); ++ } ++ } ++ ++ private void eraseOutdatedMemories() { + for (Entry, Optional>> entry : this.memories.entrySet()) { + if (entry.getValue().isPresent()) { +- ExpirableValue expirableValue = (ExpirableValue)entry.getValue().get(); ++ ExpirableValue expirableValue = entry.getValue().get(); + if (expirableValue.hasExpired()) { + this.eraseMemory(entry.getKey()); + } +- +- expirableValue.tick(); + } + } + } +@@ -452,34 +476,92 @@ public class Brain { + public void stopAll(ServerLevel level, E owner) { + long gameTime = owner.level().getGameTime(); + +- for (BehaviorControl behaviorControl : this.getRunningBehaviors()) { +- behaviorControl.doStop(level, owner, gameTime); ++ // Leaf start ++ if (this.availableBehaviorsByPriorityArray.length != this.availableBehaviorsByPriority.size()) { ++ this.availableBehaviorsByPriorityArray = this.availableBehaviorsByPriority.values().toArray(EMPTY_ARRAY); + } ++ for (Map>> map : availableBehaviorsByPriorityArray) { ++ var map1 = (org.dreeam.leaf.util.map.ActivityArrayMap>>) map; ++ for (int index = 0; index <= org.dreeam.leaf.util.map.ActivityArrayMap.BITS; index++) { ++ if ((map1.bitset & (1 << index)) != 0) { ++ var behaviorControls = (org.dreeam.leaf.util.map.BehaviorControlArraySet) map1.a[index]; ++ var behaviorControlsRaw = behaviorControls.raw(); ++ var behaviorControlsSize = behaviorControls.size(); ++ for (int i = 0; i < behaviorControlsSize; i++) { ++ BehaviorControl behaviorControl = (BehaviorControl) behaviorControlsRaw[i]; ++ if (behaviorControl.getStatus() == Behavior.Status.RUNNING) { ++ behaviorControl.doStop(level, owner, gameTime); ++ behaviorControls.dec(); ++ } ++ } ++ } ++ } ++ } ++ // Leaf end + } + + private void startEachNonRunningBehavior(ServerLevel level, E entity) { + long gameTime = level.getGameTime(); + +- for (Map>> map : this.availableBehaviorsByPriority.values()) { +- for (Entry>> entry : map.entrySet()) { +- Activity activity = entry.getKey(); +- if (this.activeActivities.contains(activity)) { +- for (BehaviorControl behaviorControl : entry.getValue()) { ++ // Leaf start ++ if (this.availableBehaviorsByPriorityArray.length != this.availableBehaviorsByPriority.size()) { ++ this.availableBehaviorsByPriorityArray = this.availableBehaviorsByPriority.values().toArray(EMPTY_ARRAY); ++ } ++ var aact = (org.dreeam.leaf.util.map.ActivityBitSet) this.activeActivities; ++ for (int index = 0; index <= org.dreeam.leaf.util.map.ActivityArrayMap.BITS; index++) { ++ if ((aact.bitset & (1 << index)) != 0) { ++ for (Map>> map : availableBehaviorsByPriorityArray) { ++ var map1 = ((org.dreeam.leaf.util.map.ActivityArrayMap>>) map); ++ var ele = map1.a[index]; ++ if (ele == null) { ++ continue; ++ } ++ var behaviorControls = (org.dreeam.leaf.util.map.BehaviorControlArraySet) ele; ++ var behaviorControlsRaw = behaviorControls.raw(); ++ var behaviorControlsSize = behaviorControls.size(); ++ for (int i = 0; i < behaviorControlsSize; i++) { ++ BehaviorControl behaviorControl = (BehaviorControl) behaviorControlsRaw[i]; + if (behaviorControl.getStatus() == Behavior.Status.STOPPED) { +- behaviorControl.tryStart(level, entity, gameTime); ++ if (behaviorControl.tryStart(level, entity, gameTime)) { ++ behaviorControls.inc(); ++ } + } + } + } + } + } ++ // Leaf end + } + + private void tickEachRunningBehavior(ServerLevel level, E entity) { + long gameTime = level.getGameTime(); + +- for (BehaviorControl behaviorControl : this.getRunningBehaviors()) { +- behaviorControl.tickOrStop(level, entity, gameTime); ++ // Leaf start ++ if (this.availableBehaviorsByPriorityArray.length != this.availableBehaviorsByPriority.size()) { ++ this.availableBehaviorsByPriorityArray = this.availableBehaviorsByPriority.values().toArray(new Map[0]); ++ } ++ for (Map>> map : availableBehaviorsByPriorityArray) { ++ var map1 = (org.dreeam.leaf.util.map.ActivityArrayMap>>) map; ++ for (int index = 0; index <= org.dreeam.leaf.util.map.ActivityArrayMap.BITS; index++) { ++ if ((map1.bitset & (1 << index)) != 0) { ++ var behaviorControls = (org.dreeam.leaf.util.map.BehaviorControlArraySet) map1.a[index]; ++ if (behaviorControls.running()) { ++ var behaviorControlsRaw = behaviorControls.raw(); ++ var behaviorControlsSize = behaviorControls.size(); ++ for (int i = 0; i < behaviorControlsSize; i++) { ++ BehaviorControl behaviorControl = (BehaviorControl) behaviorControlsRaw[i]; ++ if (behaviorControl.getStatus() == Behavior.Status.RUNNING) { ++ behaviorControl.tickOrStop(level, entity, gameTime); ++ if (behaviorControl.getStatus() == Behavior.Status.STOPPED) { ++ behaviorControls.dec(); ++ } ++ } ++ } ++ } ++ } ++ } + } ++ // Leaf end + } + + private boolean activityRequirementsAreMet(Activity activity) { +diff --git a/net/minecraft/world/entity/schedule/Activity.java b/net/minecraft/world/entity/schedule/Activity.java +index 5a143bb6fabba3dc4e2272afb0be636d5722ea22..7753b2b2ab00c08dc15444a1caa08faac1d82f0c 100644 +--- a/net/minecraft/world/entity/schedule/Activity.java ++++ b/net/minecraft/world/entity/schedule/Activity.java +@@ -32,10 +32,12 @@ public class Activity { + public static final Activity DIG = register("dig"); + private final String name; + private final int hashCode; ++ public final int id; // Leaf + +- private Activity(String name) { ++ private Activity(String name, int id) { // Leaf + this.name = name; + this.hashCode = name.hashCode(); ++ this.id = id; // Leaf + } + + public String getName() { +@@ -43,7 +45,7 @@ public class Activity { + } + + private static Activity register(String key) { +- return Registry.register(BuiltInRegistries.ACTIVITY, key, new Activity(key)); ++ return Registry.register(BuiltInRegistries.ACTIVITY, key, new Activity(key, BuiltInRegistries.ACTIVITY.size())); // Leaf + } + + @Override diff --git a/leaf-server/minecraft-patches/features/0161-Reduce-worldgen-allocations.patch b/leaf-server/minecraft-patches/features/0160-Reduce-worldgen-allocations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0161-Reduce-worldgen-allocations.patch rename to leaf-server/minecraft-patches/features/0160-Reduce-worldgen-allocations.patch diff --git a/leaf-server/minecraft-patches/features/0160-Replace-brain-maps-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0160-Replace-brain-maps-with-optimized-collection.patch deleted file mode 100644 index ffd21780..00000000 --- a/leaf-server/minecraft-patches/features/0160-Replace-brain-maps-with-optimized-collection.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> -Date: Sat, 26 Oct 2024 00:06:04 +0800 -Subject: [PATCH] Replace brain maps with optimized collection - - -diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java -index 29fdf94db0308031edfe7915fc587a2aa5a1a18a..4a0faaedacd7b925c5adad0280870e674cf7ab46 100644 ---- a/net/minecraft/world/entity/ai/Brain.java -+++ b/net/minecraft/world/entity/ai/Brain.java -@@ -45,14 +45,18 @@ public class Brain { - static final Logger LOGGER = LogUtils.getLogger(); - private final Supplier>> codec; - private static final int SCHEDULE_UPDATE_DELAY = 20; -- private final Map, Optional>> memories = Maps.newHashMap(); -- private final Map>, Sensor> sensors = Maps.newLinkedHashMap(); -- private final Map>>> availableBehaviorsByPriority = Maps.newTreeMap(); -+ // Leaf start - Replace brain maps with optimized collection -+ private final Map, Optional>> memories = new it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap<>(); -+ private final Map>, Sensor> sensors = new it.unimi.dsi.fastutil.objects.Reference2ReferenceLinkedOpenHashMap<>(); -+ private final Map>>> availableBehaviorsByPriority = new it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap<>(); -+ // Leaf end - Replace brain maps with optimized collection - private Schedule schedule = Schedule.EMPTY; -- private final Map, MemoryStatus>>> activityRequirements = Maps.newHashMap(); -- private final Map>> activityMemoriesToEraseWhenStopped = Maps.newHashMap(); -- private Set coreActivities = Sets.newHashSet(); -- private final Set activeActivities = Sets.newHashSet(); -+ // Leaf start - Replace brain maps with optimized collection -+ private final Map, MemoryStatus>>> activityRequirements = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<>(); -+ private final Map>> activityMemoriesToEraseWhenStopped = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<>(); -+ private Set coreActivities = new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(); -+ private final Set activeActivities = new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(); -+ // Leaf end - Replace brain maps with optimized collection - private Activity defaultActivity = Activity.IDLE; - private long lastScheduleUpdate = -9999L; - diff --git a/leaf-server/minecraft-patches/features/0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch b/leaf-server/minecraft-patches/features/0161-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch rename to leaf-server/minecraft-patches/features/0161-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch index 5651cb40..a2bb1019 100644 --- a/leaf-server/minecraft-patches/features/0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch +++ b/leaf-server/minecraft-patches/features/0161-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch @@ -23,10 +23,10 @@ See the License for the specific language governing permissions and limitations under the License. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3c14d32ec9caf3dba9d99afe86a3ca053de70958..155e2047659111f68e27d3517e5178afa233dfe4 100644 +index 1306f920b5908731d04004e1b180c3ac4ad0745d..faa135c3eb1bfc8f52c90e6f88411fdf48ed9ee1 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -325,17 +325,12 @@ public class ServerGamePacketListenerImpl +@@ -328,17 +328,12 @@ public class ServerGamePacketListenerImpl public final org.leavesmc.leaves.protocol.syncmatica.exchange.ExchangeTarget exchangeTarget; // Leaves - Syncmatica Protocol // Purpur start - AFK API @@ -48,7 +48,7 @@ index 3c14d32ec9caf3dba9d99afe86a3ca053de70958..155e2047659111f68e27d3517e5178af // Purpur end - AFK API @Override -@@ -398,7 +393,7 @@ public class ServerGamePacketListenerImpl +@@ -401,7 +396,7 @@ public class ServerGamePacketListenerImpl && Util.getMillis() - this.player.getLastActionTime() > this.server.getPlayerIdleTimeout() * 1000L * 60L && !this.player.wonGame) { // Paper - Prevent AFK kick while watching end credits // Purpur start - AFK API this.player.setAfk(true); diff --git a/leaf-server/minecraft-patches/features/0162-Do-not-place-player-if-the-server-is-full.patch b/leaf-server/minecraft-patches/features/0162-Do-not-place-player-if-the-server-is-full.patch new file mode 100644 index 00000000..f83eb8b9 --- /dev/null +++ b/leaf-server/minecraft-patches/features/0162-Do-not-place-player-if-the-server-is-full.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> +Date: Mon, 24 Jun 2024 10:49:04 +0800 +Subject: [PATCH] Do not place player if the server is full + +Fix https://github.com/PaperMC/Paper/issues/10668 + +diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java +index 70bec2fc50c1e6a928e450e617e76dd4434172f9..3cd9b0df617715d0b3e70a6096e52bb5d22ab426 100644 +--- a/net/minecraft/server/players/PlayerList.java ++++ b/net/minecraft/server/players/PlayerList.java +@@ -343,6 +343,13 @@ public abstract class PlayerList { + return; + } + // Gale end - MultiPaper - do not place player in world if kicked before being spawned in ++ // Leaf start - Do not place player if the server is full - copied from canPlayerLogin ++ if (org.dreeam.leaf.config.modules.fixes.DontPlacePlayerIfFull.enabled && this.realPlayers.size() >= this.maxPlayers && !(player.getBukkitEntity().hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player ++ connection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage))); ++ //playerconnection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); ++ return; ++ } ++ // Leaf end - Do not place player if the server is full - copied from canPlayerLogin + + org.bukkit.Location loc = ev.getSpawnLocation(); + serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); +@@ -838,7 +845,7 @@ public abstract class PlayerList { + // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) + // ? Component.translatable("multiplayer.disconnect.server_full") + // : null; +- if (this.realPlayers.size() >= this.maxPlayers && !(player.hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player ++ if (this.realPlayers.size() >= this.maxPlayers && !(player.hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player // Leaf - Do not place player if the server is full - diff on change + event.disallow(org.bukkit.event.player.PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure + } + } diff --git a/leaf-server/minecraft-patches/features/0163-Do-not-place-player-if-the-server-is-full.patch b/leaf-server/minecraft-patches/features/0163-Do-not-place-player-if-the-server-is-full.patch deleted file mode 100644 index c16a4e0f..00000000 --- a/leaf-server/minecraft-patches/features/0163-Do-not-place-player-if-the-server-is-full.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> -Date: Mon, 24 Jun 2024 10:49:04 +0800 -Subject: [PATCH] Do not place player if the server is full - -Fix https://github.com/PaperMC/Paper/issues/10668 - -diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 8b7b60e2f143dcbb44f3084c3c4d2306b9708f0d..75393b9cdd564e55ba173828c2f7b40498e8ecd7 100644 ---- a/net/minecraft/server/players/PlayerList.java -+++ b/net/minecraft/server/players/PlayerList.java -@@ -342,6 +342,13 @@ public abstract class PlayerList { - return; - } - // Gale end - MultiPaper - do not place player in world if kicked before being spawned in -+ // Leaf start - Do not place player if the server is full - copied from canPlayerLogin -+ if (org.dreeam.leaf.config.modules.fixes.DontPlacePlayerIfFull.enabled && this.realPlayers.size() >= this.maxPlayers && !(player.getBukkitEntity().hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player -+ connection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage))); -+ //playerconnection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); -+ return; -+ } -+ // Leaf end - Do not place player if the server is full - copied from canPlayerLogin - - org.bukkit.Location loc = ev.getSpawnLocation(); - serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); -@@ -835,7 +842,7 @@ public abstract class PlayerList { - // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) - // ? Component.translatable("multiplayer.disconnect.server_full") - // : null; -- if (this.realPlayers.size() >= this.maxPlayers && !(player.hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player -+ if (this.realPlayers.size() >= this.maxPlayers && !(player.hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player // Leaf - Do not place player if the server is full - diff on change - event.disallow(org.bukkit.event.player.PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure - } - } diff --git a/leaf-server/minecraft-patches/features/0164-Fix-MC-65198.patch b/leaf-server/minecraft-patches/features/0163-Fix-MC-65198.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0164-Fix-MC-65198.patch rename to leaf-server/minecraft-patches/features/0163-Fix-MC-65198.patch diff --git a/leaf-server/minecraft-patches/features/0165-Fix-MC-200418.patch b/leaf-server/minecraft-patches/features/0164-Fix-MC-200418.patch similarity index 74% rename from leaf-server/minecraft-patches/features/0165-Fix-MC-200418.patch rename to leaf-server/minecraft-patches/features/0164-Fix-MC-200418.patch index b7efec9d..8c49cbd7 100644 --- a/leaf-server/minecraft-patches/features/0165-Fix-MC-200418.patch +++ b/leaf-server/minecraft-patches/features/0164-Fix-MC-200418.patch @@ -6,16 +6,16 @@ Subject: [PATCH] Fix MC-200418 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-200418 diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index ba480249c1e8813931a668a37977347a73f3a3f5..70e68d56f2d781930d877f40818d9aeb377dc8af 100644 +index 18966860f550ad1f35ec6a03a0b78af73628b964..22c1545a0329d56e0ec41ae4da1e1922aa1f9737 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -294,6 +294,11 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -293,6 +293,11 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { if (!this.isSilent()) { level.levelEvent(null, 1027, this.blockPosition(), 0); } + // Leaf start - Fix MC-200418 -+ if (villager.isPassenger() && villager.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && villager.isBaby()) { -+ villager.removeVehicle(); ++ if (mob.isPassenger() && mob.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && mob.isBaby()) { ++ mob.removeVehicle(); + } + // Leaf end - Fix MC-200418 // CraftBukkit start diff --git a/leaf-server/minecraft-patches/features/0166-Fix-MC-119417.patch b/leaf-server/minecraft-patches/features/0165-Fix-MC-119417.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0166-Fix-MC-119417.patch rename to leaf-server/minecraft-patches/features/0165-Fix-MC-119417.patch index 70853fdc..891198f4 100644 --- a/leaf-server/minecraft-patches/features/0166-Fix-MC-119417.patch +++ b/leaf-server/minecraft-patches/features/0165-Fix-MC-119417.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-119417 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-119417 diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 034a946cd545d775188a4375a87c90d253ebdb08..18125ed336c3425f123232b405a8af9ee3a2ba7d 100644 +index b71b4db16ac8b42c0061f15db05d4315dd7fecb4..fdce25cdfdd91938a97dc381e4ada1744e64c931 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2191,6 +2191,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2294,6 +2294,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId())); if (gameMode == GameType.SPECTATOR) { this.removeEntitiesOnShoulder(); diff --git a/leaf-server/minecraft-patches/features/0167-Fix-MC-223153.patch b/leaf-server/minecraft-patches/features/0166-Fix-MC-223153.patch similarity index 84% rename from leaf-server/minecraft-patches/features/0167-Fix-MC-223153.patch rename to leaf-server/minecraft-patches/features/0166-Fix-MC-223153.patch index 903f4fe8..93580389 100644 --- a/leaf-server/minecraft-patches/features/0167-Fix-MC-223153.patch +++ b/leaf-server/minecraft-patches/features/0166-Fix-MC-223153.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-223153 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-223153 diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java -index 4941bf9df0c8ed6316572920323f7c5f6791b002..303bd27d44e4acfee49334235a6704724e3fd616 100644 +index 941c57083803d69503e83c3ccbbb2759ba3db605..57aad048034005543a72556e990b53db8deebfee 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6744,6 +6744,7 @@ public class Blocks { +@@ -6732,6 +6732,7 @@ public class Blocks { .mapColor(MapColor.COLOR_ORANGE) .instrument(NoteBlockInstrument.BASEDRUM) .requiresCorrectToolForDrops() diff --git a/leaf-server/minecraft-patches/features/0168-Configurable-player-knockback-zombie.patch b/leaf-server/minecraft-patches/features/0167-Configurable-player-knockback-zombie.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0168-Configurable-player-knockback-zombie.patch rename to leaf-server/minecraft-patches/features/0167-Configurable-player-knockback-zombie.patch index 5cb47f7f..c8ed06ae 100644 --- a/leaf-server/minecraft-patches/features/0168-Configurable-player-knockback-zombie.patch +++ b/leaf-server/minecraft-patches/features/0167-Configurable-player-knockback-zombie.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable player knockback zombie diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ba6d9a5df71e9aae9defedf5bbe12f49599123cb..4c3eadc2d8480b2a2c2c08e58620544d403d3adc 100644 +index 6f5b160cae3a0f95f15a38d65a9f0515c00f87ba..6c9ce4a979c084c9024a954d8315424cb7be27c7 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -2079,6 +2079,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2111,6 +2111,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } public void knockback(double strength, double x, double z, @Nullable Entity attacker, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause eventCause) { // Paper - knockback events @@ -17,7 +17,7 @@ index ba6d9a5df71e9aae9defedf5bbe12f49599123cb..4c3eadc2d8480b2a2c2c08e58620544d strength *= 1.0 - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE); if (true || !(strength <= 0.0)) { // CraftBukkit - Call event even when force is 0 // this.hasImpulse = true; // CraftBukkit - Move down -@@ -2109,6 +2111,20 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2141,6 +2143,20 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } } diff --git a/leaf-server/minecraft-patches/features/0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch b/leaf-server/minecraft-patches/features/0168-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch similarity index 87% rename from leaf-server/minecraft-patches/features/0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch rename to leaf-server/minecraft-patches/features/0168-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch index ebb89416..b4134699 100644 --- a/leaf-server/minecraft-patches/features/0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch +++ b/leaf-server/minecraft-patches/features/0168-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch @@ -8,10 +8,10 @@ Original project: https://github.com/PaperMC/Paper Paper pull request: https://github.com/PaperMC/Paper/pull/10990 diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index cf136bc3d0d285ebde23c6e31c002933564fdcb2..c15b6e32bd00650366dc4ecba2abeb6bfb98d638 100644 +index a6be753d1284167e090c40e6dcfbaa56b4e3d774..867353500482247bbec79f407246902c79a3d14a 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -207,6 +207,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -210,6 +210,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void inactiveTick() { super.inactiveTick(); @@ -24,10 +24,10 @@ index cf136bc3d0d285ebde23c6e31c002933564fdcb2..c15b6e32bd00650366dc4ecba2abeb6b if (this.goalSelector.inactiveTick(this.activatedPriority, true) && !isThrottled) { // Pufferfish - pass activated priroity // Pufferfish - throttle inactive goal selector ticking this.goalSelector.tick(); diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index acb0789b3e791cbb81c23efb9bbeae736db5f48c..4de268c2b563dca353748e12a0f5dc0729e6fc21 100644 +index 165d0f50e7818b6daf834507033feaa2fabcaf19..5106013430c17d4a55f666163d0cb1e4c0497302 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -374,7 +374,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -375,7 +375,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler if (this.getUnhappyCounter() > 0) { this.setUnhappyCounter(this.getUnhappyCounter() - 1); } diff --git a/leaf-server/minecraft-patches/features/0170-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch b/leaf-server/minecraft-patches/features/0169-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0170-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch rename to leaf-server/minecraft-patches/features/0169-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch index a322b137..d05b4ab1 100644 --- a/leaf-server/minecraft-patches/features/0170-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch +++ b/leaf-server/minecraft-patches/features/0169-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch @@ -12,10 +12,10 @@ before spawning, it checks isSpawnPositionOk() for the position which loads the This patch ensures the chunk at the random location is loaded before trying to spawn the reinforcement zombie in it. diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 447adc3dcfd31a6fb9e673555e9793a82f9e02d4..08cf959a0b96ec765f3405a0b0956932ee0a7d26 100644 +index 185d138f65e884eb9b3fdd753bc4e2a14a25c4b1..3c1bc0259634be5d988eae93d781c351ec6f3251 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -401,6 +401,13 @@ public class Zombie extends Monster { +@@ -400,6 +400,13 @@ public class Zombie extends Monster { int i2 = floor1 + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1); int i3 = floor2 + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1); BlockPos blockPos = new BlockPos(i1, i2, i3); diff --git a/leaf-server/minecraft-patches/features/0171-PaperPR-Fix-some-beacon-event-issues.patch b/leaf-server/minecraft-patches/features/0170-PaperPR-Fix-some-beacon-event-issues.patch similarity index 83% rename from leaf-server/minecraft-patches/features/0171-PaperPR-Fix-some-beacon-event-issues.patch rename to leaf-server/minecraft-patches/features/0170-PaperPR-Fix-some-beacon-event-issues.patch index 982c2005..3c888b06 100644 --- a/leaf-server/minecraft-patches/features/0171-PaperPR-Fix-some-beacon-event-issues.patch +++ b/leaf-server/minecraft-patches/features/0170-PaperPR-Fix-some-beacon-event-issues.patch @@ -14,10 +14,10 @@ Moves the deactivate event call into the onRemove method for the beacon block it The field I added feels a bit wrong but it works, it's to prevent the activation event being called immediately after loading, can't see any better way to differentiate between a newly placed beacon and a newly loaded one. diff --git a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92bbfeb676 100644 +index c2e15c6e1c6bfc5a9d89afc9b8aa9551bad2cc8f..bd831e116a8e394014c1a6fe3928daf3c9bdd8b5 100644 --- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -172,6 +172,8 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -173,6 +173,8 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name return VALID_EFFECTS.contains(effect) ? effect : null; } @@ -26,7 +26,7 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 public BeaconBlockEntity(BlockPos pos, BlockState blockState) { super(BlockEntityType.BEACON, pos, blockState); } -@@ -237,10 +239,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -238,10 +240,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } // Paper start - beacon activation/deactivation events @@ -44,7 +44,7 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, pos); new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent(); } -@@ -248,10 +255,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -249,10 +256,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name if (blockEntity.lastCheckY >= height) { blockEntity.lastCheckY = level.getMinY() - 1; @@ -57,7 +57,7 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 if (!flag && flag1) { playSound(level, pos, SoundEvents.BEACON_ACTIVATE); -@@ -295,10 +302,6 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -296,10 +303,6 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @Override public void setRemoved() { @@ -68,15 +68,15 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 // Paper start - fix MC-153086 if (this.levels > 0 && !this.beamSections.isEmpty()) { playSound(this.level, this.worldPosition, SoundEvents.BEACON_DEACTIVATE); -@@ -426,6 +429,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name - this.primaryPower = loadEffect(tag, "primary_effect"); - this.secondaryPower = loadEffect(tag, "secondary_effect"); - this.levels = tag.getIntOr("Levels", 0); // CraftBukkit - SPIGOT-5053, use where available +@@ -427,6 +430,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + this.primaryPower = loadEffect(input, "primary_effect"); + this.secondaryPower = loadEffect(input, "secondary_effect"); + this.levels = input.getIntOr("Levels", 0); // CraftBukkit - SPIGOT-5053, use where available + this.justLoadedAndPreviouslyActive = this.levels > 0; // Paper - this.name = parseCustomNameSafe(tag.get("CustomName"), registries); - this.lockKey = LockCode.fromTag(tag, registries); - this.effectRange = tag.getDoubleOr(PAPER_RANGE_TAG, -1); // Paper - Custom beacon ranges -@@ -497,4 +501,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + this.name = parseCustomNameSafe(input, "CustomName"); + this.lockKey = LockCode.fromTag(input); + this.effectRange = input.getDoubleOr(PAPER_RANGE_TAG, -1); // Paper - Custom beacon ranges +@@ -498,4 +502,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name super.setLevel(level); this.lastCheckY = level.getMinY() - 1; } diff --git a/leaf-server/minecraft-patches/features/0172-Dont-send-useless-entity-packets.patch b/leaf-server/minecraft-patches/features/0171-Dont-send-useless-entity-packets.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0172-Dont-send-useless-entity-packets.patch rename to leaf-server/minecraft-patches/features/0171-Dont-send-useless-entity-packets.patch index 12564389..22ac3717 100644 --- a/leaf-server/minecraft-patches/features/0172-Dont-send-useless-entity-packets.patch +++ b/leaf-server/minecraft-patches/features/0171-Dont-send-useless-entity-packets.patch @@ -9,10 +9,10 @@ Original license: MIT Original project: https://github.com/PurpurMC/Purpur diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index d6b261f8d3fbeee771208528b3e0bd5fcd94878b..1a9601aee097b6c10cf2ae1c52fddf45da85f60f 100644 +index d605c4da4475fdc47a6d0c90fbca2713fc9d8fef..add696ec1835eb161d6fc94509a2a77febd23d69 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -221,6 +221,8 @@ public class ServerEntity { +@@ -225,6 +225,8 @@ public class ServerEntity { } // Gale end - Airplane - better checking for useless move packets @@ -21,7 +21,7 @@ index d6b261f8d3fbeee771208528b3e0bd5fcd94878b..1a9601aee097b6c10cf2ae1c52fddf45 if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity)this.entity).isFallFlying()) { Vec3 deltaMovement = this.entity.getDeltaMovement(); if (deltaMovement != this.lastSentMovement) { // SparklyPaper start - skip distanceToSqr call in ServerEntity#sendChanges if the delta movement hasn't changed -@@ -304,6 +306,21 @@ public class ServerEntity { +@@ -308,6 +310,21 @@ public class ServerEntity { ); } diff --git a/leaf-server/minecraft-patches/features/0173-Multithreaded-Tracker.patch b/leaf-server/minecraft-patches/features/0172-Multithreaded-Tracker.patch similarity index 89% rename from leaf-server/minecraft-patches/features/0173-Multithreaded-Tracker.patch rename to leaf-server/minecraft-patches/features/0172-Multithreaded-Tracker.patch index 865add96..da1c1a18 100644 --- a/leaf-server/minecraft-patches/features/0173-Multithreaded-Tracker.patch +++ b/leaf-server/minecraft-patches/features/0172-Multithreaded-Tracker.patch @@ -46,10 +46,10 @@ index 1b8193587814225c2ef2c5d9e667436eb50ff6c5..4200d22606c6a3dbdf282792a4007a51 { for (int i = 0; i < this.directByChunk.length; ++i) { diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -index 02a9ef1694c796584c29430d27f0a09047368835..32608df3da169159c070f37cb55407f4f6187744 100644 +index bdc1200ef5317fdaf58973bf580b0a672aee800f..0bca3843e8568b37cda6ae312bdf4f423a0891a9 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -@@ -340,7 +340,7 @@ public final class RegionizedPlayerChunkLoader { +@@ -344,7 +344,7 @@ public final class RegionizedPlayerChunkLoader { private boolean canGenerateChunks = true; private final ArrayDeque> delayedTicketOps = new ArrayDeque<>(); @@ -71,7 +71,7 @@ index 9c0c99b936b4a82ebfe924866e53ec71f7bbe9ad..2ccff968cb2065d34fad4d27573f9e30 .add( new ClientboundUpdateAttributesPacket.AttributeSnapshot( diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index c60b9e4076450de2157c1a3cf4f98cc2c19e4e6a..38a43e143906f2727025696a2895eafa8a77deb6 100644 +index 74d11e8983f12f6f33fe2eb3016730507e1031d4..f621cfea59b6d2f2fb29333e50860584b7992c26 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java @@ -255,6 +255,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -356,7 +356,7 @@ index f106373ef3ac4a8685c2939c9e8361688a285913..51ae390c68e7a3aa193329cc3bc47ca6 public boolean visible = true; diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index 1a9601aee097b6c10cf2ae1c52fddf45da85f60f..16b2ca8c96e9561aa57e0903d1e98e6441044b6d 100644 +index add696ec1835eb161d6fc94509a2a77febd23d69..2b55ec55b0a5dacc0c658ae5359040ff529418c6 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java @@ -146,7 +146,7 @@ public class ServerEntity { @@ -368,7 +368,7 @@ index 1a9601aee097b6c10cf2ae1c52fddf45da85f60f..16b2ca8c96e9561aa57e0903d1e98e64 final ServerPlayer serverPlayer = connection.getPlayer(); // Paper savedData.tickCarriedBy(serverPlayer, item); Packet updatePacket = savedData.getUpdatePacket(mapId, serverPlayer); -@@ -468,7 +468,7 @@ public class ServerEntity { +@@ -462,7 +462,7 @@ public class ServerEntity { this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), attributesToSync)); } @@ -378,10 +378,10 @@ index 1a9601aee097b6c10cf2ae1c52fddf45da85f60f..16b2ca8c96e9561aa57e0903d1e98e64 } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 16cafa0acb7b2972ce08ab56921e73eb44eff6fa..bbccf0c8aef3792bb7b7cb0070e48bca4c274a2c 100644 +index 08d12a1acc3a672a77daa15f82392cd603c30283..c5949a0e852ca6de84e8dd12e3d4ed8527b60e25 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2505,7 +2505,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2527,7 +2527,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public LevelEntityGetter getEntities() { @@ -390,7 +390,7 @@ index 16cafa0acb7b2972ce08ab56921e73eb44eff6fa..bbccf0c8aef3792bb7b7cb0070e48bca return this.moonrise$getEntityLookup(); // Paper - rewrite chunk system } -@@ -2746,7 +2746,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2799,7 +2799,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } map.carriedByPlayers.remove(player); @@ -400,10 +400,10 @@ index 16cafa0acb7b2972ce08ab56921e73eb44eff6fa..bbccf0c8aef3792bb7b7cb0070e48bca } } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 155e2047659111f68e27d3517e5178afa233dfe4..c91348eea1350728d8f6de7b8c3613cb44b5cdec 100644 +index faa135c3eb1bfc8f52c90e6f88411fdf48ed9ee1..0dec7852a4f225b9e9e94debf9259faea625028f 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1881,7 +1881,7 @@ public class ServerGamePacketListenerImpl +@@ -1914,7 +1914,7 @@ public class ServerGamePacketListenerImpl } public void internalTeleport(PositionMoveRotation posMoveRotation, Set relatives) { @@ -413,10 +413,10 @@ index 155e2047659111f68e27d3517e5178afa233dfe4..c91348eea1350728d8f6de7b8c3613cb if (this.player.isRemoved()) { LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 4c3eadc2d8480b2a2c2c08e58620544d403d3adc..68241d1d488bc2848e3c0d167270c1788e573c37 100644 +index 6c9ce4a979c084c9024a954d8315424cb7be27c7..19881624b91f44c9332ad4ba147a66837864da06 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1317,13 +1317,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1342,13 +1342,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } private void refreshDirtyAttributes() { @@ -456,10 +456,10 @@ index f8419dde44ebc7324e783f8bee42132d5ec973c3..406767c60ec1a324faaf5d3658b16164 public double getDefaultValue() { diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93fae0c2aec 100644 +index 42ad600c6a5cb20e1d820f169f6a1a17ef3a5195..7f8eb388308806008805970d4d8ed329440380ee 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -@@ -26,8 +26,24 @@ public class AttributeInstance { +@@ -22,8 +22,24 @@ public class AttributeInstance { private final Map> modifiersByOperation = Maps.newEnumMap( AttributeModifier.Operation.class ); @@ -486,7 +486,7 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93f private double baseValue; private boolean dirty = true; private double cachedValue; -@@ -56,7 +72,13 @@ public class AttributeInstance { +@@ -52,7 +68,13 @@ public class AttributeInstance { @VisibleForTesting Map getModifiers(AttributeModifier.Operation operation) { @@ -501,7 +501,7 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93f } public Set getModifiers() { -@@ -144,8 +166,12 @@ public class AttributeInstance { +@@ -140,8 +162,12 @@ public class AttributeInstance { public double getValue() { if (this.dirty) { @@ -515,25 +515,25 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93f } return this.cachedValue; -@@ -192,7 +218,15 @@ public class AttributeInstance { - compoundTag.store("id", TYPE_CODEC, this.attribute); - compoundTag.putDouble("base", this.baseValue); - if (!this.permanentModifiers.isEmpty()) { -- compoundTag.store("modifiers", AttributeModifier.CODEC.listOf(), List.copyOf(this.permanentModifiers.values())); -+ // Leaf start - Multithreaded tracker -+ if (org.dreeam.leaf.config.modules.async.MultithreadedTracker.enabled) { -+ synchronized (this) { -+ compoundTag.store("modifiers", AttributeModifier.CODEC.listOf(), List.copyOf(this.permanentModifiers.values())); -+ } -+ } else { -+ compoundTag.store("modifiers", AttributeModifier.CODEC.listOf(), List.copyOf(this.permanentModifiers.values())); -+ } -+ // Leaf end - Multithreaded tracker - } +@@ -184,7 +210,15 @@ public class AttributeInstance { + } - return compoundTag; + public AttributeInstance.Packed pack() { +- return new AttributeInstance.Packed(this.attribute, this.baseValue, List.copyOf(this.permanentModifiers.values())); ++ // Leaf start - Multithreaded tracker ++ if (org.dreeam.leaf.config.modules.async.MultithreadedTracker.enabled) { ++ synchronized (this) { ++ return new AttributeInstance.Packed(this.attribute, this.baseValue, List.copyOf(this.permanentModifiers.values())); ++ } ++ } else { ++ return new AttributeInstance.Packed(this.attribute, this.baseValue, List.copyOf(this.permanentModifiers.values())); ++ } ++ // Leaf end - Multithreaded tracker + } + + public void apply(AttributeInstance.Packed instance) { diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index 909c9b5b82f1a41087a594fe5b5c021feb22f5e3..bd3a9adb61be55f216199572612027643e05dab7 100644 +index 0ac398b8b10aae5e67a797b2991c66874003f282..d62c2644847173de8e11296508f111e786a95091 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java @@ -15,9 +15,11 @@ import net.minecraft.resources.ResourceLocation; @@ -631,29 +631,6 @@ index 24710041ccbc70e5506d8d89ae34f0141977f209..05de8a77b389691dd6986f36b4cb8cc0 AttributeInstance attributeInstance = this.instances.get(attribute); if (attributeInstance == null) { return null; -diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java -index 36e3937c9e09852937c94c268c877a15337835c5..8aedc3ca463745fe32cac977208b23dc0b8e73b6 100644 ---- a/net/minecraft/world/entity/item/PrimedTnt.java -+++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -145,12 +145,14 @@ public class PrimedTnt extends Entity implements TraceableEntity { - net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket velocityPacket = new net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket(this); - net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket positionPacket = net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket.teleport(this.getId(), net.minecraft.world.entity.PositionMoveRotation.of(this), java.util.Set.of(), this.onGround); - -- ete.seenBy.stream() -- .filter(viewer -> (viewer.getPlayer().getX() - this.getX()) * (viewer.getPlayer().getY() - this.getY()) * (viewer.getPlayer().getZ() - this.getZ()) < 16 * 16) -- .forEach(viewer -> { -+ // Leaf start - Multithreaded tracker -+ for (var viewer : ete.seenBy()) { -+ if ((viewer.getPlayer().getX() - this.getX()) * (viewer.getPlayer().getY() - this.getY()) * (viewer.getPlayer().getZ() - this.getZ()) < 16 * 16) { - viewer.send(velocityPacket); - viewer.send(positionPacket); -- }); -+ } -+ } -+ // Leaf end - Multithreaded tracker - } - } - // Paper end - Option to prevent TNT from moving in water diff --git a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java index 325ec57df2885f5e81b8a6b61e3a9fed9484b30f..abc5c097861d0decf49d0d3970ab48f1cf8b1cf1 100644 --- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java @@ -681,7 +658,7 @@ index 325ec57df2885f5e81b8a6b61e3a9fed9484b30f..abc5c097861d0decf49d0d3970ab48f1 @Override diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 7bbeed6c998c91e68376d3f17a510d68e3cd0b27..d62ff9ebd4b55e1a9a0b51e84be868d844e5a954 100644 +index bf01c9d54248ceb8f97cf1e1c0e4234a338cb8ce..d049af4f129f6ac2d53f10c7a811c989d1f3edc0 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -211,6 +211,7 @@ public class MapItemSavedData extends SavedData { diff --git a/leaf-server/minecraft-patches/features/0174-Nitori-Async-playerdata-saving.patch b/leaf-server/minecraft-patches/features/0173-Nitori-Async-playerdata-saving.patch similarity index 81% rename from leaf-server/minecraft-patches/features/0174-Nitori-Async-playerdata-saving.patch rename to leaf-server/minecraft-patches/features/0173-Nitori-Async-playerdata-saving.patch index 9ea6c372..e87a9cdc 100644 --- a/leaf-server/minecraft-patches/features/0174-Nitori-Async-playerdata-saving.patch +++ b/leaf-server/minecraft-patches/features/0173-Nitori-Async-playerdata-saving.patch @@ -7,7 +7,7 @@ Original license: GPL v3 Original project: https://github.com/Gensokyo-Reimagined/Nitori diff --git a/net/minecraft/world/level/storage/LevelStorageSource.java b/net/minecraft/world/level/storage/LevelStorageSource.java -index 8104f71c30c1fa46c83acdf0b2e58483df9d89cc..169b4544ab3d0e8515a2d7020a23ae0e2e0c952d 100644 +index 3b40822ea6ec9783fe3cb8eaba069a8d626d8382..0098ff448d2981723701765b063f103ac88ba1a2 100644 --- a/net/minecraft/world/level/storage/LevelStorageSource.java +++ b/net/minecraft/world/level/storage/LevelStorageSource.java @@ -521,15 +521,26 @@ public class LevelStorageSource { @@ -44,10 +44,10 @@ index 8104f71c30c1fa46c83acdf0b2e58483df9d89cc..169b4544ab3d0e8515a2d7020a23ae0e public Optional getIconFile() { diff --git a/net/minecraft/world/level/storage/PlayerDataStorage.java b/net/minecraft/world/level/storage/PlayerDataStorage.java -index ab9282c04c1996b037567d07f95e2b150bcfcd38..7a39ea109dee258e7fb83982572ee18731b5446f 100644 +index fe44d8d17d2622b3d6021c11579af85ef96737bb..45da3bace1262a18c55c13ee72a08c72fc5ba7c0 100644 --- a/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -23,6 +23,7 @@ public class PlayerDataStorage { +@@ -24,6 +24,7 @@ public class PlayerDataStorage { private final File playerDir; protected final DataFixer fixerUpper; private static final DateTimeFormatter FORMATTER = FileNameDateFormatter.create(); @@ -55,23 +55,25 @@ index ab9282c04c1996b037567d07f95e2b150bcfcd38..7a39ea109dee258e7fb83982572ee187 public PlayerDataStorage(LevelStorageSource.LevelStorageAccess levelStorageAccess, DataFixer fixerUpper) { this.fixerUpper = fixerUpper; -@@ -32,19 +33,82 @@ public class PlayerDataStorage { +@@ -33,21 +34,84 @@ public class PlayerDataStorage { public void save(Player player) { if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot + // Leaf start - Async playerdata saving + CompoundTag compoundTag; - try { -- CompoundTag compoundTag = player.saveWithoutId(new CompoundTag()); + try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(player.problemPath(), LOGGER)) { + TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector, player.registryAccess()); + player.saveWithoutId(tagValueOutput); - Path path = this.playerDir.toPath(); - Path path1 = Files.createTempFile(path, player.getStringUUID() + "-", ".dat"); +- CompoundTag compoundTag = tagValueOutput.buildResult(); - NbtIo.writeCompressed(compoundTag, path1); - Path path2 = path.resolve(player.getStringUUID() + ".dat"); - Path path3 = path.resolve(player.getStringUUID() + ".dat_old"); - Util.safeReplaceFile(path2, path1, path3); -- } catch (Exception var7) { -- LOGGER.warn("Failed to save player data for {}", player.getScoreboardName(), var7); // Paper - Print exception -+ compoundTag = player.saveWithoutId(new CompoundTag()); +- } catch (Exception var11) { +- LOGGER.warn("Failed to save player data for {}", player.getScoreboardName(), var11); // Paper - Print exception ++ compoundTag = tagValueOutput.buildResult(); + } catch (Exception exception) { + LOGGER.warn("Failed to encode player data for {}", player.getScoreboardName(), exception); + return; @@ -147,52 +149,51 @@ index ab9282c04c1996b037567d07f95e2b150bcfcd38..7a39ea109dee258e7fb83982572ee187 private void backup(String name, String stringUuid, String suffix) { // CraftBukkit Path path = this.playerDir.toPath(); Path path1 = path.resolve(stringUuid + suffix); // CraftBukkit -@@ -58,7 +122,13 @@ public class PlayerDataStorage { +@@ -61,7 +125,13 @@ public class PlayerDataStorage { } } - private Optional load(String name, String stringUuid, String suffix) { // CraftBukkit + // Leaf start - Async playerdata saving + private Optional load(String name, String stringUuid, String suffix) { -+ return load(name, stringUuid, suffix, java.util.UUID.fromString(stringUuid)); ++ return load(name, stringUuid, java.util.UUID.fromString(stringUuid), suffix); + } -+ private Optional load(String name, String stringUuid, String suffix, java.util.UUID playerUuid) { // CraftBukkit ++ private Optional load(String name, String stringUuid, java.util.UUID playerUuid, String suffix) { // CraftBukkit + lockFor(playerUuid, name); + // Leaf end - Async playerdata saving File file = new File(this.playerDir, stringUuid + suffix); // CraftBukkit // Spigot start boolean usingWrongFile = false; -@@ -89,7 +159,7 @@ public class PlayerDataStorage { +@@ -92,7 +162,7 @@ public class PlayerDataStorage { - public Optional load(Player player) { + public Optional load(Player player, ProblemReporter problemReporter) { // CraftBukkit start -- return this.load(player.getName().getString(), player.getStringUUID()).map((tag) -> { -+ return this.load(player.getName().getString(), player.getStringUUID(), player.getUUID()).map((tag) -> { // Leaf - Async playerdata saving +- return this.load(player.getName().getString(), player.getStringUUID(), problemReporter).map((tag) -> { ++ return this.load(player.getName().getString(), player.getStringUUID(), player.getUUID(), problemReporter).map((tag) -> { // Leaf - Async playerdata saving if (player instanceof net.minecraft.server.level.ServerPlayer serverPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer craftPlayer = serverPlayer.getBukkitEntity(); // Only update first played if it is older than the one we have -@@ -104,20 +174,25 @@ public class PlayerDataStorage { +@@ -108,19 +178,24 @@ public class PlayerDataStorage { }); } + // Leaf start - Async playerdata saving - public Optional load(String name, String uuid) { -+ return this.load(name, uuid, java.util.UUID.fromString(uuid)); + public Optional load(String name, String uuid, ProblemReporter problemReporter) { ++ return this.load(name, uuid, java.util.UUID.fromString(uuid), problemReporter); + } -+ public Optional load(String name, String uuid, java.util.UUID playerUuid) { ++ public Optional load(String name, String uuid, java.util.UUID playerUuid, ProblemReporter problemReporter) { // CraftBukkit end - Optional optional = this.load(name, uuid, ".dat"); // CraftBukkit -+ Optional optional = this.load(name, uuid, ".dat", playerUuid); // CraftBukkit ++ Optional optional = this.load(name, uuid, playerUuid, ".dat"); // CraftBukkit if (optional.isEmpty()) { this.backup(name, uuid, ".dat"); // CraftBukkit } - return optional.or(() -> this.load(name, uuid, ".dat_old")).map(compoundTag -> { // CraftBukkit -+ return optional.or(() -> this.load(name, uuid, ".dat_old", playerUuid)).map(compoundTag -> { // CraftBukkit ++ return optional.or(() -> this.load(name, uuid, playerUuid, ".dat_old")).map(compoundTag -> { // CraftBukkit int dataVersion = NbtUtils.getDataVersion(compoundTag, -1); - compoundTag = DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, compoundTag, dataVersion); - // player.load(compoundTag); // CraftBukkit - handled above - return compoundTag; + compoundTag = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.PLAYER, compoundTag, dataVersion, ca.spottedleaf.dataconverter.minecraft.util.Version.getCurrentVersion()); // Paper - rewrite data conversion system + return compoundTag; // CraftBukkit - handled above }); } + // Leaf end - Async playerdata saving diff --git a/leaf-server/minecraft-patches/features/0175-Optimize-nearby-alive-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0174-Optimize-nearby-alive-players-for-spawning.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0175-Optimize-nearby-alive-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0174-Optimize-nearby-alive-players-for-spawning.patch index 58fbf9db..1a656f78 100644 --- a/leaf-server/minecraft-patches/features/0175-Optimize-nearby-alive-players-for-spawning.patch +++ b/leaf-server/minecraft-patches/features/0174-Optimize-nearby-alive-players-for-spawning.patch @@ -7,7 +7,7 @@ Use SpottedLeaf's nearby players system to avoid iterating over all online playe and reduce the cost on predicate test diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java -index 0c1953754220ff72e18f0396134507d93ba7b1b8..51813495cd745c3011534fb75f337305401b1201 100644 +index 1842cbe25cc0f9be937caf0a78e915bd3d6ea1e5..a6a216c598978f719851856e4ea61e757ce47d7e 100644 --- a/net/minecraft/world/entity/EntitySelector.java +++ b/net/minecraft/world/entity/EntitySelector.java @@ -32,7 +32,7 @@ public final class EntitySelector { @@ -20,10 +20,10 @@ index 0c1953754220ff72e18f0396134507d93ba7b1b8..51813495cd745c3011534fb75f337305 // Paper end - Affects Spawning API diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 08cf959a0b96ec765f3405a0b0956932ee0a7d26..2fbd167126e6eb5aaf27de77f32e274c8a51df16 100644 +index 3c1bc0259634be5d988eae93d781c351ec6f3251..5563720a6d92cad974632bdc97bb35c15310483c 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -411,7 +411,7 @@ public class Zombie extends Monster { +@@ -410,7 +410,7 @@ public class Zombie extends Monster { if (SpawnPlacements.isSpawnPositionOk(type, level, blockPos) && SpawnPlacements.checkSpawnRules(type, level, EntitySpawnReason.REINFORCEMENT, blockPos, level.random)) { zombie.setPos(i1, i2, i3); @@ -33,10 +33,10 @@ index 08cf959a0b96ec765f3405a0b0956932ee0a7d26..2fbd167126e6eb5aaf27de77f32e274c && level.noCollision(zombie) && (zombie.canSpawnInLiquids() || !level.containsAnyLiquid(zombie.getBoundingBox()))) { diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java -index 0babc951d9fed6d32d3dba549cc5ced4dc6b0588..9fa9d84033c28071120e8a1c796ace4f9a45d4c5 100644 +index 41ba9f234e840fadee3c8a52ba9655b97a8b7381..b23283779c85c0afb230872b2794640fd9719ec2 100644 --- a/net/minecraft/world/level/BaseSpawner.java +++ b/net/minecraft/world/level/BaseSpawner.java -@@ -55,7 +55,7 @@ public abstract class BaseSpawner { +@@ -62,7 +62,7 @@ public abstract class BaseSpawner { public boolean isNearPlayer(Level level, BlockPos pos) { if (level.purpurConfig.spawnerDeactivateByRedstone && level.hasNeighborSignal(pos)) return false; // Purpur - Redstone deactivates spawners @@ -46,7 +46,7 @@ index 0babc951d9fed6d32d3dba549cc5ced4dc6b0588..9fa9d84033c28071120e8a1c796ace4f public void clientTick(Level level, BlockPos pos) { diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java -index 7719bc8ff1fbbc67cdf15e1fec28dc9233cea207..670860df81a3abfc1b8b53be505fce0ee32ee2c4 100644 +index 452b6df03152dbd2311774bf4872983d3df92665..6a7d99c172c2f6fc30a4ffcb3cd7bfad92e27adc 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java @@ -112,6 +112,89 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst diff --git a/leaf-server/minecraft-patches/features/0176-Cache-blockstate-cache-array.patch b/leaf-server/minecraft-patches/features/0175-Cache-blockstate-cache-array.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0176-Cache-blockstate-cache-array.patch rename to leaf-server/minecraft-patches/features/0175-Cache-blockstate-cache-array.patch diff --git a/leaf-server/minecraft-patches/features/0177-Asynchronous-locator.patch b/leaf-server/minecraft-patches/features/0176-Asynchronous-locator.patch similarity index 87% rename from leaf-server/minecraft-patches/features/0177-Asynchronous-locator.patch rename to leaf-server/minecraft-patches/features/0176-Asynchronous-locator.patch index 07c84259..9daee4e7 100644 --- a/leaf-server/minecraft-patches/features/0177-Asynchronous-locator.patch +++ b/leaf-server/minecraft-patches/features/0176-Asynchronous-locator.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/thebrightspark/AsyncLocator diff --git a/net/minecraft/server/commands/LocateCommand.java b/net/minecraft/server/commands/LocateCommand.java -index 2723d5377567241921fef61952e474c1c0ee9bbf..548a33b857aef542279255368031a095037b76bb 100644 +index a734b2597c3491db35d9660e169f8e8b6320900b..5274f09b0abf148aea1c0baa39edbfdac1acc4f5 100644 --- a/net/minecraft/server/commands/LocateCommand.java +++ b/net/minecraft/server/commands/LocateCommand.java -@@ -109,6 +109,34 @@ public class LocateCommand { +@@ -106,6 +106,34 @@ public class LocateCommand { BlockPos blockPos = BlockPos.containing(source.getPosition()); ServerLevel level = source.getLevel(); Stopwatch stopwatch = Stopwatch.createStarted(Util.TICKER); @@ -46,10 +46,10 @@ index 2723d5377567241921fef61952e474c1c0ee9bbf..548a33b857aef542279255368031a095 stopwatch.stop(); if (pair == null) { diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 6d5a15122079f2d1568ceb7086db21ad454f58e6..ecab2befa1f2f993ea4b4d088529745c2a37b73d 100644 +index eaaa66c4d86d4ebda0acf8f1dbe8ecb55aa28285..8f41326fda8c5f9f6926038508be6c6529b051bc 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -848,14 +848,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -852,14 +852,25 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @Override public boolean pollTask() { @@ -80,10 +80,10 @@ index 6d5a15122079f2d1568ceb7086db21ad454f58e6..ecab2befa1f2f993ea4b4d088529745c } } diff --git a/net/minecraft/world/entity/animal/Dolphin.java b/net/minecraft/world/entity/animal/Dolphin.java -index 87ba416479df56bad5d13c01e96e92e45b7802a3..2508645b62e7f935dee00fe87b3a6446dbd22cf2 100644 +index 23696a5e2871ea07f34d4b4f6a20e2896ac3f5bd..c4fda92e078c9ba745b2548ecaaffffff97fb0fd 100644 --- a/net/minecraft/world/entity/animal/Dolphin.java +++ b/net/minecraft/world/entity/animal/Dolphin.java -@@ -486,6 +486,10 @@ public class Dolphin extends AgeableWaterCreature { +@@ -487,6 +487,10 @@ public class Dolphin extends AgeableWaterCreature { static class DolphinSwimToTreasureGoal extends Goal { private final Dolphin dolphin; private boolean stuck; @@ -94,7 +94,7 @@ index 87ba416479df56bad5d13c01e96e92e45b7802a3..2508645b62e7f935dee00fe87b3a6446 DolphinSwimToTreasureGoal(Dolphin dolphin) { this.dolphin = dolphin; -@@ -505,6 +509,11 @@ public class Dolphin extends AgeableWaterCreature { +@@ -506,6 +510,11 @@ public class Dolphin extends AgeableWaterCreature { @Override public boolean canContinueToUse() { @@ -106,7 +106,7 @@ index 87ba416479df56bad5d13c01e96e92e45b7802a3..2508645b62e7f935dee00fe87b3a6446 BlockPos blockPos = this.dolphin.treasurePos; return blockPos != null && !BlockPos.containing(blockPos.getX(), this.dolphin.getY(), blockPos.getZ()).closerToCenterThan(this.dolphin.position(), 4.0) -@@ -519,6 +528,22 @@ public class Dolphin extends AgeableWaterCreature { +@@ -520,6 +529,22 @@ public class Dolphin extends AgeableWaterCreature { this.stuck = false; this.dolphin.getNavigation().stop(); BlockPos blockPos = this.dolphin.blockPosition(); @@ -129,7 +129,7 @@ index 87ba416479df56bad5d13c01e96e92e45b7802a3..2508645b62e7f935dee00fe87b3a6446 BlockPos blockPos1 = serverLevel.findNearestMapStructure(StructureTags.DOLPHIN_LOCATED, blockPos, 50, false); if (blockPos1 != null) { this.dolphin.treasurePos = blockPos1; -@@ -531,6 +556,12 @@ public class Dolphin extends AgeableWaterCreature { +@@ -532,6 +557,12 @@ public class Dolphin extends AgeableWaterCreature { @Override public void stop() { @@ -142,7 +142,7 @@ index 87ba416479df56bad5d13c01e96e92e45b7802a3..2508645b62e7f935dee00fe87b3a6446 BlockPos blockPos = this.dolphin.treasurePos; if (blockPos == null || BlockPos.containing(blockPos.getX(), this.dolphin.getY(), blockPos.getZ()).closerToCenterThan(this.dolphin.position(), 4.0) -@@ -541,6 +572,11 @@ public class Dolphin extends AgeableWaterCreature { +@@ -542,6 +573,11 @@ public class Dolphin extends AgeableWaterCreature { @Override public void tick() { @@ -155,18 +155,18 @@ index 87ba416479df56bad5d13c01e96e92e45b7802a3..2508645b62e7f935dee00fe87b3a6446 Level level = this.dolphin.level(); if (this.dolphin.closeToNextPos() || this.dolphin.getNavigation().isDone()) { diff --git a/net/minecraft/world/entity/projectile/EyeOfEnder.java b/net/minecraft/world/entity/projectile/EyeOfEnder.java -index 59941c605085d93357211939114ecf1b88aef05d..74ffcc5417dd20635a52a3e799436eaf18076a0e 100644 +index 2bb3c5018be0c669da4c28a34ce2f2e124547691..2c34e956e8a3263bb05ae2810a8578696f739263 100644 --- a/net/minecraft/world/entity/projectile/EyeOfEnder.java +++ b/net/minecraft/world/entity/projectile/EyeOfEnder.java -@@ -29,6 +29,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { - public double tz; +@@ -28,6 +28,7 @@ public class EyeOfEnder extends Entity implements ItemSupplier { + public Vec3 target; public int life; public boolean surviveAfterDeath; + public boolean asyncLocator$locateTaskOngoing = false; // Leaf - Asynchronous locator public EyeOfEnder(EntityType entityType, Level level) { super(entityType, level); -@@ -116,6 +117,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { +@@ -95,6 +96,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier { @Override public void tick() { super.tick(); @@ -175,14 +175,14 @@ index 59941c605085d93357211939114ecf1b88aef05d..74ffcc5417dd20635a52a3e799436eaf + return; + } + // Leaf end - Asynchronous locator - Vec3 deltaMovement = this.getDeltaMovement(); - double d = this.getX() + deltaMovement.x; - double d1 = this.getY() + deltaMovement.y; + Vec3 vec3 = this.position().add(this.getDeltaMovement()); + if (!this.level().isClientSide() && this.target != null) { + this.setDeltaMovement(updateDeltaMovement(this.getDeltaMovement(), vec3, this.target)); diff --git a/net/minecraft/world/item/EnderEyeItem.java b/net/minecraft/world/item/EnderEyeItem.java -index 68f33de233b716055f791fd87fe3be981580375c..bd60cc8f7e37cba981792412a8ce7f71ea8b33f5 100644 +index 51e0985bde9cf6ac2f4264d21edec3d1623a2d0d..ca2b493e4032208311c857db799632ac3d3ab077 100644 --- a/net/minecraft/world/item/EnderEyeItem.java +++ b/net/minecraft/world/item/EnderEyeItem.java -@@ -105,14 +105,47 @@ public class EnderEyeItem extends Item { +@@ -106,14 +106,46 @@ public class EnderEyeItem extends Item { } else { player.startUsingItem(hand); if (level instanceof ServerLevel serverLevel) { @@ -215,7 +215,7 @@ index 68f33de233b716055f791fd87fe3be981580375c..bd60cc8f7e37cba981792412a8ce7f71 + ).thenOnServerThread(pos -> { + eyeOfEnder.asyncLocator$locateTaskOngoing = false; + if (pos != null) { -+ eyeOfEnder.signalTo(pos); ++ eyeOfEnder.signalTo(Vec3.atLowerCornerOf(pos)); + CriteriaTriggers.USED_ENDER_EYE.trigger((ServerPlayer) player, pos); + player.awardStat(Stats.ITEM_USED.get(this)); + } else { @@ -225,14 +225,13 @@ index 68f33de233b716055f791fd87fe3be981580375c..bd60cc8f7e37cba981792412a8ce7f71 + }); + } + // Leaf end - Asynchronous locator -+ eyeOfEnder.setItem(itemInHand); -- eyeOfEnder.signalTo(blockPos); -+ if (!isAsyncLocatorEnabled) eyeOfEnder.signalTo(blockPos); // Leaf - Asynchronous locator +- eyeOfEnder.signalTo(Vec3.atLowerCornerOf(blockPos)); ++ if (!isAsyncLocatorEnabled) eyeOfEnder.signalTo(Vec3.atLowerCornerOf(blockPos)); // Leaf - Asynchronous locator level.gameEvent(GameEvent.PROJECTILE_SHOOT, eyeOfEnder.position(), GameEvent.Context.of(player)); // CraftBukkit start if (!level.addFreshEntity(eyeOfEnder)) { -@@ -126,7 +159,7 @@ public class EnderEyeItem extends Item { +@@ -127,7 +159,7 @@ public class EnderEyeItem extends Item { float f = Mth.lerp(level.random.nextFloat(), 0.33F, 0.5F); level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_EYE_LAUNCH, SoundSource.NEUTRAL, 1.0F, f); itemInHand.consume(1, player); diff --git a/leaf-server/minecraft-patches/features/0178-Smart-sort-entities-in-NearestLivingEntitySensor.patch b/leaf-server/minecraft-patches/features/0177-Smart-sort-entities-in-NearestLivingEntitySensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0178-Smart-sort-entities-in-NearestLivingEntitySensor.patch rename to leaf-server/minecraft-patches/features/0177-Smart-sort-entities-in-NearestLivingEntitySensor.patch diff --git a/leaf-server/minecraft-patches/features/0179-Further-reduce-memory-footprint-of-CompoundTag.patch b/leaf-server/minecraft-patches/features/0178-Further-reduce-memory-footprint-of-CompoundTag.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0179-Further-reduce-memory-footprint-of-CompoundTag.patch rename to leaf-server/minecraft-patches/features/0178-Further-reduce-memory-footprint-of-CompoundTag.patch diff --git a/leaf-server/minecraft-patches/features/0180-Optimize-Entity-distanceToSqr.patch b/leaf-server/minecraft-patches/features/0179-Optimize-Entity-distanceToSqr.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0180-Optimize-Entity-distanceToSqr.patch rename to leaf-server/minecraft-patches/features/0179-Optimize-Entity-distanceToSqr.patch index aacea3d9..1d659cca 100644 --- a/leaf-server/minecraft-patches/features/0180-Optimize-Entity-distanceToSqr.patch +++ b/leaf-server/minecraft-patches/features/0179-Optimize-Entity-distanceToSqr.patch @@ -8,10 +8,10 @@ avoids multiple casting in Entity#distanceTo, using Math#sqrt directly instead o these methods more able to be inlined by the JIT compiler. diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index ddaaf29305a9cdb6dcccd38d4ec37fac6f0a1a51..a3299cf2f1ac3e8794303b92a3662d3002846e96 100644 +index 574be7359a2ad62c95a42c46c7a0f3c7a42eb44e..23b5695bf27663bbf1f2e3fd2010c0722ad425b0 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -2190,31 +2190,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2260,31 +2260,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return new Vec3(this.xOld, this.yOld, this.zOld); } @@ -43,7 +43,7 @@ index ddaaf29305a9cdb6dcccd38d4ec37fac6f0a1a51..a3299cf2f1ac3e8794303b92a3662d30 public void playerTouch(Player player) { } -@@ -5269,4 +5244,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5510,4 +5485,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } // Purpur end - Ridables diff --git a/leaf-server/minecraft-patches/features/0181-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch b/leaf-server/minecraft-patches/features/0180-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0181-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch rename to leaf-server/minecraft-patches/features/0180-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch index e83ddd93..e54c7b33 100644 --- a/leaf-server/minecraft-patches/features/0181-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch +++ b/leaf-server/minecraft-patches/features/0180-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch @@ -9,10 +9,10 @@ Original project: https://github.com/starlis/empirecraft Also see Leaf's EMC-Don-t-use-snapshots-for-acquiring-blockstate diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java -index d7a08a4ecac2bb4f5626fb53e27f8d50b6936f1c..129af0e69a3ec9525756b6825b795e4441de66c9 100644 +index a5ade8268a74738170caf519e7e45e13862bc39d..92e57b14d54a3830bc99fde6e1c231a09dcdc215 100644 --- a/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -363,7 +363,7 @@ public abstract class BlockEntity { +@@ -386,7 +386,7 @@ public abstract class BlockEntity { // CraftBukkit start - add method public org.bukkit.inventory.InventoryHolder getOwner() { diff --git a/leaf-server/minecraft-patches/features/0182-Cache-tile-entity-position.patch b/leaf-server/minecraft-patches/features/0181-Cache-tile-entity-position.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0182-Cache-tile-entity-position.patch rename to leaf-server/minecraft-patches/features/0181-Cache-tile-entity-position.patch index 6c41c0d8..88cc339d 100644 --- a/leaf-server/minecraft-patches/features/0182-Cache-tile-entity-position.patch +++ b/leaf-server/minecraft-patches/features/0181-Cache-tile-entity-position.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Cache tile entity position Dreeam TODO: Check if there is a way to cache isRemoved without problem diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 800fc055024c176d1830e1d2686f5d96131c8712..5325989f46bd288c5a6f1362ec17d3354d55abfd 100644 +index 27aa58ab47e7a7b0edddd1c483dc9165696ebf11..65442f9ab1528fd1b736963bc51f21fd6a0781a0 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -940,10 +940,12 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -947,10 +947,12 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p private final T blockEntity; private final BlockEntityTicker ticker; private boolean loggedInvalidBlockState; @@ -22,7 +22,7 @@ index 800fc055024c176d1830e1d2686f5d96131c8712..5325989f46bd288c5a6f1362ec17d335 } @Override -@@ -984,7 +986,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -991,7 +993,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Override public BlockPos getPos() { @@ -31,7 +31,7 @@ index 800fc055024c176d1830e1d2686f5d96131c8712..5325989f46bd288c5a6f1362ec17d335 } @Override -@@ -1011,13 +1013,16 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1018,13 +1020,16 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p static class RebindableTickingBlockEntityWrapper implements TickingBlockEntity { private TickingBlockEntity ticker; @@ -48,7 +48,7 @@ index 800fc055024c176d1830e1d2686f5d96131c8712..5325989f46bd288c5a6f1362ec17d335 } @Override -@@ -1032,7 +1037,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1039,7 +1044,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Override public BlockPos getPos() { diff --git a/leaf-server/minecraft-patches/features/0183-TT20-Lag-compensation.patch b/leaf-server/minecraft-patches/features/0182-TT20-Lag-compensation.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0183-TT20-Lag-compensation.patch rename to leaf-server/minecraft-patches/features/0182-TT20-Lag-compensation.patch index 66923298..d028da02 100644 --- a/leaf-server/minecraft-patches/features/0183-TT20-Lag-compensation.patch +++ b/leaf-server/minecraft-patches/features/0182-TT20-Lag-compensation.patch @@ -7,10 +7,10 @@ Original license: AGPL-3.0 Original project: https://github.com/snackbag/TT20 diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 7f6dac89c98132645799b7976b972bf43f475fe8..4bf840705bec251aa7e5595fa16bf8e1a9a7d2e9 100644 +index 5251e0b274ab5c182f89e52013a542c2b8f30304..07c9a7105de7111de73b6a786a860f8676015897 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1539,6 +1539,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop getPlayersByChunk(final int chunkX, final int chunkZ, final NearbyMapType type) { diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java -index f473999938840562b1007a789600342e5796a123..ea4010df54dbd17cdae22d671ea1e4bd7b685b3e 100644 +index 6ce4a98e4d3b633e3c87944c23b6b3f0ff58f159..0f5966932c4211922eccac09ab164fcb69dad582 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java -@@ -540,7 +540,7 @@ public final class ChunkHolderManager { +@@ -542,7 +542,7 @@ public final class ChunkHolderManager { public boolean addTicketAtLevel(final TicketType type, final ChunkPos chunkPos, final int level, final T identifier) { @@ -43,7 +43,7 @@ index f473999938840562b1007a789600342e5796a123..ea4010df54dbd17cdae22d671ea1e4bd } public boolean addTicketAtLevel(final TicketType type, final int chunkX, final int chunkZ, final int level, -@@ -687,7 +687,7 @@ public final class ChunkHolderManager { +@@ -689,7 +689,7 @@ public final class ChunkHolderManager { } public boolean removeTicketAtLevel(final TicketType type, final ChunkPos chunkPos, final int level, final T identifier) { @@ -52,7 +52,7 @@ index f473999938840562b1007a789600342e5796a123..ea4010df54dbd17cdae22d671ea1e4bd } public boolean removeTicketAtLevel(final TicketType type, final int chunkX, final int chunkZ, final int level, final T identifier) { -@@ -1309,7 +1309,7 @@ public final class ChunkHolderManager { +@@ -1330,7 +1330,7 @@ public final class ChunkHolderManager { } public static TicketOperation addOp(final ChunkPos chunk, final TicketType type, final int ticketLevel, final T identifier) { @@ -61,7 +61,7 @@ index f473999938840562b1007a789600342e5796a123..ea4010df54dbd17cdae22d671ea1e4bd } public static TicketOperation addOp(final int chunkX, final int chunkZ, final TicketType type, final int ticketLevel, final T identifier) { -@@ -1321,7 +1321,7 @@ public final class ChunkHolderManager { +@@ -1342,7 +1342,7 @@ public final class ChunkHolderManager { } public static TicketOperation removeOp(final ChunkPos chunk, final TicketType type, final int ticketLevel, final T identifier) { @@ -97,10 +97,10 @@ index fd3d0f6cb53bc8b6186f0d86575f21007b2c20ed..cddeeab73e7b981701a42c5aad6b4777 // Paper end - rewrite chunk system } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index bbccf0c8aef3792bb7b7cb0070e48bca4c274a2c..ccd6f16e244745ee0702504dbea710485037a3e3 100644 +index c5949a0e852ca6de84e8dd12e3d4ed8527b60e25..0f311e603c8df175576a33d5d20369cbcda2be55 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -504,7 +504,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -507,7 +507,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public final void moonrise$markChunkForPlayerTicking(final LevelChunk chunk) { final ChunkPos pos = chunk.getPos(); @@ -109,7 +109,7 @@ index bbccf0c8aef3792bb7b7cb0070e48bca4c274a2c..ccd6f16e244745ee0702504dbea71048 return; } -@@ -2571,7 +2571,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2610,7 +2610,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public boolean areEntitiesActuallyLoadedAndTicking(ChunkPos chunkPos) { // Paper start - rewrite chunk system @@ -118,7 +118,7 @@ index bbccf0c8aef3792bb7b7cb0070e48bca4c274a2c..ccd6f16e244745ee0702504dbea71048 return chunkHolder != null && chunkHolder.isEntityTickingReady(); // Paper end - rewrite chunk system } -@@ -2586,7 +2586,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2625,7 +2625,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public boolean canSpawnEntitiesInChunk(ChunkPos chunkPos) { // Paper start - rewrite chunk system @@ -128,7 +128,7 @@ index bbccf0c8aef3792bb7b7cb0070e48bca4c274a2c..ccd6f16e244745ee0702504dbea71048 // Paper end - rewrite chunk system } diff --git a/net/minecraft/world/level/ChunkPos.java b/net/minecraft/world/level/ChunkPos.java -index 6e2b2d258e47dcca30a5ad9f4f492598f2bc21fb..f9af074e833a6dab96414750314a27b35ec07bfc 100644 +index 6e2b2d258e47dcca30a5ad9f4f492598f2bc21fb..b48f429320db9f440f65b5032a952d9b050af323 100644 --- a/net/minecraft/world/level/ChunkPos.java +++ b/net/minecraft/world/level/ChunkPos.java @@ -54,19 +54,19 @@ public class ChunkPos { @@ -154,7 +154,7 @@ index 6e2b2d258e47dcca30a5ad9f4f492598f2bc21fb..f9af074e833a6dab96414750314a27b3 } public static ChunkPos minFromRegion(int chunkX, int chunkZ) { -@@ -82,7 +82,7 @@ public class ChunkPos { +@@ -82,11 +82,11 @@ public class ChunkPos { } public static long asLong(int x, int z) { @@ -163,3 +163,8 @@ index 6e2b2d258e47dcca30a5ad9f4f492598f2bc21fb..f9af074e833a6dab96414750314a27b3 } public static long asLong(BlockPos pos) { +- return asLong(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())); ++ return ((pos.getX() >> 4) & 4294967295L) | (((pos.getZ() >> 4) & 4294967295L) << 32); // Leaf - Cache chunk key - diff on change - inline + } + + public static int getX(long chunkAsLong) { diff --git a/leaf-server/minecraft-patches/features/0191-Cache-random-tick-block-status.patch b/leaf-server/minecraft-patches/features/0190-Cache-random-tick-block-status.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0191-Cache-random-tick-block-status.patch rename to leaf-server/minecraft-patches/features/0190-Cache-random-tick-block-status.patch diff --git a/leaf-server/minecraft-patches/features/0192-Cache-part-of-canHoldFluid-result.patch b/leaf-server/minecraft-patches/features/0191-Cache-part-of-canHoldFluid-result.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0192-Cache-part-of-canHoldFluid-result.patch rename to leaf-server/minecraft-patches/features/0191-Cache-part-of-canHoldFluid-result.patch diff --git a/leaf-server/minecraft-patches/features/0193-Configurable-tripwire-dupe.patch b/leaf-server/minecraft-patches/features/0192-Configurable-tripwire-dupe.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0193-Configurable-tripwire-dupe.patch rename to leaf-server/minecraft-patches/features/0192-Configurable-tripwire-dupe.patch diff --git a/leaf-server/minecraft-patches/features/0194-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch b/leaf-server/minecraft-patches/features/0193-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0194-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch rename to leaf-server/minecraft-patches/features/0193-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch index d3103b26..c7fc751c 100644 --- a/leaf-server/minecraft-patches/features/0194-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch +++ b/leaf-server/minecraft-patches/features/0193-PaperPR-Fix-MC-117075-Block-Entities-Unload-Lag-Spik.patch @@ -12,7 +12,7 @@ We replaced the `blockEntityTickers` list with a custom list based on fastutil's This is WAY FASTER than using `removeAll` with a list of entries to be removed, because we don't need to calculate the identity of each block entity to be removed, and we can jump directly to where the search should begin, giving a performance boost for small removals (because we don't need to loop thru the entire list to find what element should be removed) and a performance boost for big removals (no need to calculate the identity of each block entity). diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index f145453f70a219c1be33b241309ae2ab22a8004b..d56464dc0cb5efaeaf285c11b88fe8d7e2333b36 100644 +index 8ebfb2f5cf439190ea9bd4ad81d737fbcd4514c2..ca39e3bd93f896d5c7b1fc3b9264f64555be5d50 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -104,7 +104,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @@ -24,7 +24,7 @@ index f145453f70a219c1be33b241309ae2ab22a8004b..d56464dc0cb5efaeaf285c11b88fe8d7 protected final NeighborUpdater neighborUpdater; private final List pendingBlockEntityTickers = Lists.newArrayList(); private boolean tickingBlockEntities; -@@ -1506,13 +1506,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1507,13 +1507,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl boolean runsNormally = this.tickRateManager().runsNormally(); int tickedEntities = 0; // Paper - rewrite chunk system @@ -39,7 +39,7 @@ index f145453f70a219c1be33b241309ae2ab22a8004b..d56464dc0cb5efaeaf285c11b88fe8d7 } else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) { tickingBlockEntity.tick(); // Paper start - rewrite chunk system -@@ -1522,7 +1520,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1523,7 +1521,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl // Paper end - rewrite chunk system } } diff --git a/leaf-server/minecraft-patches/features/0195-Sepals-Rearrange-the-attackable-conditions.patch b/leaf-server/minecraft-patches/features/0194-Sepals-Rearrange-the-attackable-conditions.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0195-Sepals-Rearrange-the-attackable-conditions.patch rename to leaf-server/minecraft-patches/features/0194-Sepals-Rearrange-the-attackable-conditions.patch diff --git a/leaf-server/minecraft-patches/features/0196-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch b/leaf-server/minecraft-patches/features/0195-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0196-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch rename to leaf-server/minecraft-patches/features/0195-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch index abe673e6..3ff105ab 100644 --- a/leaf-server/minecraft-patches/features/0196-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch +++ b/leaf-server/minecraft-patches/features/0195-SparklyPaper-Skip-dirty-stats-copy-when-requesting-p.patch @@ -6,10 +6,10 @@ Subject: [PATCH] SparklyPaper: Skip dirty stats copy when requesting player diff --git a/net/minecraft/stats/ServerStatsCounter.java b/net/minecraft/stats/ServerStatsCounter.java -index dfaead7716ac718bcdbf4c3021aed1b57676af50..d04de9dc0a9a47e6c17f1000844bdee49e41035f 100644 +index 195ff539c9cb4b2a0640555fc4b59df39e06c90d..8a927cb4327f5fdfe06b595095d840e789141733 100644 --- a/net/minecraft/stats/ServerStatsCounter.java +++ b/net/minecraft/stats/ServerStatsCounter.java -@@ -100,11 +100,15 @@ public class ServerStatsCounter extends StatsCounter { +@@ -98,11 +98,15 @@ public class ServerStatsCounter extends StatsCounter { this.dirty.add(stat); } @@ -25,7 +25,7 @@ index dfaead7716ac718bcdbf4c3021aed1b57676af50..d04de9dc0a9a47e6c17f1000844bdee4 public void parseLocal(DataFixer fixerUpper, String json) { try { -@@ -146,10 +150,12 @@ public class ServerStatsCounter extends StatsCounter { +@@ -141,10 +145,12 @@ public class ServerStatsCounter extends StatsCounter { public void sendStats(ServerPlayer player) { Object2IntMap> map = new Object2IntOpenHashMap<>(); diff --git a/leaf-server/minecraft-patches/features/0197-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch b/leaf-server/minecraft-patches/features/0196-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0197-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch rename to leaf-server/minecraft-patches/features/0196-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch index d546f3a3..b4425c2f 100644 --- a/leaf-server/minecraft-patches/features/0197-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch +++ b/leaf-server/minecraft-patches/features/0196-SparklyPaper-Reset-dirty-flag-when-loading-maps-from.patch @@ -9,7 +9,7 @@ By default, the server will start rewriting all map datas to the disk after load This also slows down world saving a lot if you have a lot of maps diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index d62ff9ebd4b55e1a9a0b51e84be868d844e5a954..8abf2160ae5df851e218f78ce1bfb8350df2bc28 100644 +index d049af4f129f6ac2d53f10c7a811c989d1f3edc0..81c30f4a4f411ccedf74e589294a5d279bf51663 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -160,6 +160,7 @@ public class MapItemSavedData extends SavedData { diff --git a/leaf-server/minecraft-patches/features/0198-Optimize-checking-nearby-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0197-Optimize-checking-nearby-players-for-spawning.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0198-Optimize-checking-nearby-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0197-Optimize-checking-nearby-players-for-spawning.patch index 125cae28..c6fa9a34 100644 --- a/leaf-server/minecraft-patches/features/0198-Optimize-checking-nearby-players-for-spawning.patch +++ b/leaf-server/minecraft-patches/features/0197-Optimize-checking-nearby-players-for-spawning.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize checking nearby players for spawning diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index 38a43e143906f2727025696a2895eafa8a77deb6..083b49c8fbdbde96b5be3e5531c21b2c96371b60 100644 +index f621cfea59b6d2f2fb29333e50860584b7992c26..79674f4bd7a12c42dec19a4175012d7a2dc88b84 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java @@ -773,7 +773,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/leaf-server/minecraft-patches/features/0199-Cache-supporting-block-check.patch b/leaf-server/minecraft-patches/features/0198-Cache-supporting-block-check.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0199-Cache-supporting-block-check.patch rename to leaf-server/minecraft-patches/features/0198-Cache-supporting-block-check.patch index 19ebdb9d..0b1921fe 100644 --- a/leaf-server/minecraft-patches/features/0199-Cache-supporting-block-check.patch +++ b/leaf-server/minecraft-patches/features/0198-Cache-supporting-block-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache supporting block check diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index a3299cf2f1ac3e8794303b92a3662d3002846e96..4cb3e182702d8fd69f880d00fa0c228cb1302ea0 100644 +index 23b5695bf27663bbf1f2e3fd2010c0722ad425b0..fea6b829474e4fafbb9986a0c4fd73ae8fae1e09 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1082,12 +1082,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1104,12 +1104,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.mainSupportingBlockPos.isPresent() && this.mainSupportingBlockPos.get().equals(pos); } @@ -45,7 +45,7 @@ index a3299cf2f1ac3e8794303b92a3662d3002846e96..4cb3e182702d8fd69f880d00fa0c228c this.mainSupportingBlockPos = optional; } else if (movement != null) { AABB aabb1 = aabb.move(-movement.x, 0.0, -movement.z); -@@ -1104,6 +1128,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1126,6 +1150,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } diff --git a/leaf-server/minecraft-patches/features/0200-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch b/leaf-server/minecraft-patches/features/0199-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0200-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch rename to leaf-server/minecraft-patches/features/0199-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch diff --git a/leaf-server/minecraft-patches/features/0202-Remove-stream-in-villagers.patch b/leaf-server/minecraft-patches/features/0200-Remove-stream-in-villagers.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0202-Remove-stream-in-villagers.patch rename to leaf-server/minecraft-patches/features/0200-Remove-stream-in-villagers.patch index 8176e74c..5813f2a4 100644 --- a/leaf-server/minecraft-patches/features/0202-Remove-stream-in-villagers.patch +++ b/leaf-server/minecraft-patches/features/0200-Remove-stream-in-villagers.patch @@ -41,10 +41,10 @@ index 72cca4897f9697573fd6987a5f0d2df52761b8c3..04eea77cf84aaeb781608e48f2aa32f3 private static void throwHalfStack(Villager villager, Set stack, LivingEntity entity) { diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index 4de268c2b563dca353748e12a0f5dc0729e6fc21..5cc4b2a0d10b25c57c582772ac6757442780afb0 100644 +index 5106013430c17d4a55f666163d0cb1e4c0497302..377e98469328f08db751c0f6a6f434b03f63c225 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -972,7 +972,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -974,7 +974,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler private int countFoodPointsInInventory() { SimpleContainer inventory = this.getInventory(); diff --git a/leaf-server/minecraft-patches/features/0203-Optimize-baby-villager-sensor.patch b/leaf-server/minecraft-patches/features/0201-Optimize-baby-villager-sensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0203-Optimize-baby-villager-sensor.patch rename to leaf-server/minecraft-patches/features/0201-Optimize-baby-villager-sensor.patch diff --git a/leaf-server/minecraft-patches/features/0201-Replace-brain-activity-maps-with-optimized-collectio.patch b/leaf-server/minecraft-patches/features/0201-Replace-brain-activity-maps-with-optimized-collectio.patch deleted file mode 100644 index 1bea3231..00000000 --- a/leaf-server/minecraft-patches/features/0201-Replace-brain-activity-maps-with-optimized-collectio.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Taiyou06 -Date: Sat, 8 Feb 2025 20:45:14 +0100 -Subject: [PATCH] Replace brain activity maps with optimized collection - - -diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java -index 4a0faaedacd7b925c5adad0280870e674cf7ab46..655c3028440e62bcc01d8f1b3e808fd68484128e 100644 ---- a/net/minecraft/world/entity/ai/Brain.java -+++ b/net/minecraft/world/entity/ai/Brain.java -@@ -399,8 +399,8 @@ public class Brain { - - for (Pair> pair : tasks) { - this.availableBehaviorsByPriority -- .computeIfAbsent(pair.getFirst(), integer -> Maps.newHashMap()) -- .computeIfAbsent(activity, activity1 -> Sets.newLinkedHashSet()) -+ .computeIfAbsent(pair.getFirst(), integer -> new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<>()) // Leaf - Replace brain activity maps with optimized collection -+ .computeIfAbsent(activity, activity1 -> new it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet<>()) // Leaf - Replace brain activity maps with optimized collection - .add((BehaviorControl)pair.getSecond()); - } - } diff --git a/leaf-server/minecraft-patches/features/0204-Only-player-pushable.patch b/leaf-server/minecraft-patches/features/0202-Only-player-pushable.patch similarity index 89% rename from leaf-server/minecraft-patches/features/0204-Only-player-pushable.patch rename to leaf-server/minecraft-patches/features/0202-Only-player-pushable.patch index 3b48cc2a..ce5730d6 100644 --- a/leaf-server/minecraft-patches/features/0204-Only-player-pushable.patch +++ b/leaf-server/minecraft-patches/features/0202-Only-player-pushable.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only player pushable Useful for extreme cases like massive entities collide together in a small area diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index b3e9ad0669bb4b91d5d991f106b225e914a4e68f..d19d253ce100aee5e2a12eeb4ea50065760ed702 100644 +index 4a06812757ab46a975f182d8ada03e19802e7e5f..e04a84d7fd2185013695e66647ec6faab35423af 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -3630,7 +3630,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3682,7 +3682,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.checkAutoSpinAttack(boundingBox, this.getBoundingBox()); } @@ -18,7 +18,7 @@ index b3e9ad0669bb4b91d5d991f106b225e914a4e68f..d19d253ce100aee5e2a12eeb4ea50065 // Paper start - Add EntityMoveEvent // Purpur start - Ridables if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) { -@@ -3773,7 +3773,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3829,7 +3829,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return; } // Paper end - don't run getEntities if we're not going to use its result @@ -32,7 +32,7 @@ index b3e9ad0669bb4b91d5d991f106b225e914a4e68f..d19d253ce100aee5e2a12eeb4ea50065 if (!pushableEntities.isEmpty()) { if (this.level() instanceof ServerLevel serverLevel) { // Paper - don't run getEntities if we're not going to use its result; moved up -@@ -3807,6 +3812,44 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3863,6 +3868,44 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } } @@ -78,10 +78,10 @@ index b3e9ad0669bb4b91d5d991f106b225e914a4e68f..d19d253ce100aee5e2a12eeb4ea50065 AABB aabb = boundingBoxBeforeSpin.minmax(boundingBoxAfterSpin); List entities = this.level().getEntities(this, aabb); diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java -index 0417175c7beabbca53cd080d158001eabe3941f0..2bfc578b7080b93e99daa45905e1890d3f7c5cbc 100644 +index 83fdd22eeb141079e05018ebf5cef70e7eb78726..4432d4cc842dc4c2a27002f7a2754f419c6bf5b8 100644 --- a/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -247,7 +247,7 @@ public class ArmorStand extends LivingEntity { +@@ -205,7 +205,7 @@ public class ArmorStand extends LivingEntity { @Override protected void pushEntities() { diff --git a/leaf-server/minecraft-patches/features/0205-Remove-iterators-from-Inventory.patch b/leaf-server/minecraft-patches/features/0203-Remove-iterators-from-Inventory.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0205-Remove-iterators-from-Inventory.patch rename to leaf-server/minecraft-patches/features/0203-Remove-iterators-from-Inventory.patch index 11230c02..7163c77a 100644 --- a/leaf-server/minecraft-patches/features/0205-Remove-iterators-from-Inventory.patch +++ b/leaf-server/minecraft-patches/features/0203-Remove-iterators-from-Inventory.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove iterators from Inventory diff --git a/net/minecraft/world/entity/player/Inventory.java b/net/minecraft/world/entity/player/Inventory.java -index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..a36d5f486e4b936e9107aa0dce263ad8afc30373 100644 +index a6bb436dc80daf6901dc027a6011ead4b3ed27e2..b835f8e8caf44e6782b22a76910b26e6f29cb985 100644 --- a/net/minecraft/world/entity/player/Inventory.java +++ b/net/minecraft/world/entity/player/Inventory.java -@@ -439,13 +439,15 @@ public class Inventory implements Container, Nameable { +@@ -456,13 +456,15 @@ public class Inventory implements Container, Nameable { } } @@ -25,7 +25,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..a36d5f486e4b936e9107aa0dce263ad8 } @Override -@@ -504,17 +506,20 @@ public class Inventory implements Container, Nameable { +@@ -515,17 +517,20 @@ public class Inventory implements Container, Nameable { @Override public boolean isEmpty() { @@ -48,7 +48,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..a36d5f486e4b936e9107aa0dce263ad8 return true; } -@@ -561,31 +566,58 @@ public class Inventory implements Container, Nameable { +@@ -572,31 +577,58 @@ public class Inventory implements Container, Nameable { } public boolean contains(ItemStack stack) { @@ -110,7 +110,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..a36d5f486e4b936e9107aa0dce263ad8 return false; } -@@ -605,9 +637,12 @@ public class Inventory implements Container, Nameable { +@@ -616,9 +648,12 @@ public class Inventory implements Container, Nameable { } public void fillStackedContents(StackedItemContents contents) { diff --git a/leaf-server/minecraft-patches/features/0206-Cache-eligible-players-for-despawn-checks.patch b/leaf-server/minecraft-patches/features/0204-Cache-eligible-players-for-despawn-checks.patch similarity index 88% rename from leaf-server/minecraft-patches/features/0206-Cache-eligible-players-for-despawn-checks.patch rename to leaf-server/minecraft-patches/features/0204-Cache-eligible-players-for-despawn-checks.patch index 2285bceb..227ba4e5 100644 --- a/leaf-server/minecraft-patches/features/0206-Cache-eligible-players-for-despawn-checks.patch +++ b/leaf-server/minecraft-patches/features/0204-Cache-eligible-players-for-despawn-checks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache eligible players for despawn checks diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index ccd6f16e244745ee0702504dbea710485037a3e3..2ecb73fc7b6754ade93bf16b48c623e6b3a955a9 100644 +index 0f311e603c8df175576a33d5d20369cbcda2be55..3a31f9132a7271ea476cc85c5a10ea7f327256bf 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -725,6 +725,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -729,6 +729,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe return this.structureManager; } @@ -17,7 +17,7 @@ index ccd6f16e244745ee0702504dbea710485037a3e3..2ecb73fc7b6754ade93bf16b48c623e6 public void tick(BooleanSupplier hasTimeLeft) { this.handlingTick = true; TickRateManager tickRateManager = this.tickRateManager(); -@@ -792,6 +794,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -796,6 +798,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } io.papermc.paper.entity.activation.ActivationRange.activateEntities(this); // Paper - EAR @@ -38,10 +38,10 @@ index ccd6f16e244745ee0702504dbea710485037a3e3..2ecb73fc7b6754ade93bf16b48c623e6 .forEach( entity -> { diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 18125ed336c3425f123232b405a8af9ee3a2ba7d..d507544efafe74ecaffd6a063eff152d349ec76a 100644 +index fdce25cdfdd91938a97dc381e4ada1744e64c931..4c1786201a4044db61e99c148fca4714e2b172ad 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -1518,6 +1518,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1613,6 +1613,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.containerMenu.broadcastChanges(); } @@ -56,10 +56,10 @@ index 18125ed336c3425f123232b405a8af9ee3a2ba7d..d507544efafe74ecaffd6a063eff152d private Either getBedResult(BlockPos at, Direction direction) { if (this.isSleeping() || !this.isAlive()) { diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index c15b6e32bd00650366dc4ecba2abeb6bfb98d638..81bd431e641be474f7a43a78df083756de1798de 100644 +index 867353500482247bbec79f407246902c79a3d14a..4a1a336914eff8a178dcd992bd1bfea25a8be76b 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -705,7 +705,24 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -722,7 +722,24 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) { this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) { diff --git a/leaf-server/minecraft-patches/features/0207-Slightly-optimise-getNearestPlayer.patch b/leaf-server/minecraft-patches/features/0205-Slightly-optimise-getNearestPlayer.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0207-Slightly-optimise-getNearestPlayer.patch rename to leaf-server/minecraft-patches/features/0205-Slightly-optimise-getNearestPlayer.patch index 4733c36c..e274a966 100644 --- a/leaf-server/minecraft-patches/features/0207-Slightly-optimise-getNearestPlayer.patch +++ b/leaf-server/minecraft-patches/features/0205-Slightly-optimise-getNearestPlayer.patch @@ -20,7 +20,7 @@ One-time operation: Convert distance to squared distance Total operations: ~3 × n (in the no-predicate case) or ~4 × n (with predicate) diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java -index 670860df81a3abfc1b8b53be505fce0ee32ee2c4..308e00947da3fe4888fb1b1b9fa11ac5da46663b 100644 +index 6a7d99c172c2f6fc30a4ffcb3cd7bfad92e27adc..aa1a7fe56388bc103958bce0af43dd41c3d43b04 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java @@ -201,23 +201,43 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst diff --git a/leaf-server/minecraft-patches/features/0208-Bulk-writes-to-writeLongArray-during-chunk-loading.patch b/leaf-server/minecraft-patches/features/0206-Bulk-writes-to-writeLongArray-during-chunk-loading.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0208-Bulk-writes-to-writeLongArray-during-chunk-loading.patch rename to leaf-server/minecraft-patches/features/0206-Bulk-writes-to-writeLongArray-during-chunk-loading.patch index 1328c2dc..07c293c0 100644 --- a/leaf-server/minecraft-patches/features/0208-Bulk-writes-to-writeLongArray-during-chunk-loading.patch +++ b/leaf-server/minecraft-patches/features/0206-Bulk-writes-to-writeLongArray-during-chunk-loading.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Bulk writes to writeLongArray during chunk loading diff --git a/net/minecraft/network/FriendlyByteBuf.java b/net/minecraft/network/FriendlyByteBuf.java -index 76576f2fd8b267d96186ab337bf4e41520e3cd18..8cfe865c0e1ef097846113342660fe26ecc20783 100644 +index 8817aee7eb61e130aacc4f0df980036b92500ad1..a2b2f6f9ea9e3f0802512c62c0e44875816fb748 100644 --- a/net/minecraft/network/FriendlyByteBuf.java +++ b/net/minecraft/network/FriendlyByteBuf.java -@@ -360,6 +360,50 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -377,6 +377,50 @@ public class FriendlyByteBuf extends ByteBuf { } } diff --git a/leaf-server/minecraft-patches/features/0209-Improve-sorting-in-SortedArraySet.patch b/leaf-server/minecraft-patches/features/0207-Improve-sorting-in-SortedArraySet.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0209-Improve-sorting-in-SortedArraySet.patch rename to leaf-server/minecraft-patches/features/0207-Improve-sorting-in-SortedArraySet.patch diff --git a/leaf-server/minecraft-patches/features/0210-Make-removeIf-slightly-faster.patch b/leaf-server/minecraft-patches/features/0208-Make-removeIf-slightly-faster.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0210-Make-removeIf-slightly-faster.patch rename to leaf-server/minecraft-patches/features/0208-Make-removeIf-slightly-faster.patch diff --git a/leaf-server/minecraft-patches/features/0211-Optimize-LinearPalette.patch b/leaf-server/minecraft-patches/features/0209-Optimize-LinearPalette.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0211-Optimize-LinearPalette.patch rename to leaf-server/minecraft-patches/features/0209-Optimize-LinearPalette.patch diff --git a/leaf-server/minecraft-patches/features/0212-Slightly-optimized-VarInt-write.patch b/leaf-server/minecraft-patches/features/0210-Slightly-optimized-VarInt-write.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0212-Slightly-optimized-VarInt-write.patch rename to leaf-server/minecraft-patches/features/0210-Slightly-optimized-VarInt-write.patch diff --git a/leaf-server/minecraft-patches/features/0213-Rewrite-ClientboundLightUpdatePacketData.patch b/leaf-server/minecraft-patches/features/0211-Rewrite-ClientboundLightUpdatePacketData.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0213-Rewrite-ClientboundLightUpdatePacketData.patch rename to leaf-server/minecraft-patches/features/0211-Rewrite-ClientboundLightUpdatePacketData.patch diff --git a/leaf-server/minecraft-patches/features/0214-Async-chunk-sending.patch b/leaf-server/minecraft-patches/features/0212-Async-chunk-sending.patch similarity index 89% rename from leaf-server/minecraft-patches/features/0214-Async-chunk-sending.patch rename to leaf-server/minecraft-patches/features/0212-Async-chunk-sending.patch index 15822eaf..b4d3f210 100644 --- a/leaf-server/minecraft-patches/features/0214-Async-chunk-sending.patch +++ b/leaf-server/minecraft-patches/features/0212-Async-chunk-sending.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Async chunk sending diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -index 32608df3da169159c070f37cb55407f4f6187744..fc3901acdfcdad85fbd435ca21869388a90b2207 100644 +index 0bca3843e8568b37cda6ae312bdf4f423a0891a9..98054ab2be3fecc5f6a111a11cfe94f1a10419c1 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -@@ -436,7 +436,15 @@ public final class RegionizedPlayerChunkLoader { +@@ -440,7 +440,15 @@ public final class RegionizedPlayerChunkLoader { // Note: drop isAlive() check so that chunks properly unload client-side when the player dies ((ChunkSystemChunkHolder)((ChunkSystemServerLevel)this.world).moonrise$getChunkTaskScheduler().chunkHolderManager .getChunkHolder(chunkX, chunkZ).vanillaChunkHolder).moonrise$removeReceivedChunk(this.player); @@ -26,10 +26,10 @@ index 32608df3da169159c070f37cb55407f4f6187744..fc3901acdfcdad85fbd435ca21869388 if (io.papermc.paper.event.packet.PlayerChunkUnloadEvent.getHandlerList().getRegisteredListeners().length > 0) { new io.papermc.paper.event.packet.PlayerChunkUnloadEvent(player.getBukkitEntity().getWorld().getChunkAt(new ChunkPos(chunkX, chunkZ).longKey), player.getBukkitEntity()).callEvent(); diff --git a/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -index 526c117e0d53ad527eb610c79cdc46ec16b18c0c..9e5edbb05900fdaa8b9deed0fc65e9ca31fe6d61 100644 +index 9f6d7c5dc0e591488a8a3763d8a1f1b3671d5299..8af4c964ce67373f9b911ce13164f48c29a07d85 100644 --- a/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +++ b/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -@@ -75,6 +75,45 @@ public class ClientboundLevelChunkPacketData { +@@ -75,6 +75,52 @@ public class ClientboundLevelChunkPacketData { } } @@ -38,8 +38,15 @@ index 526c117e0d53ad527eb610c79cdc46ec16b18c0c..9e5edbb05900fdaa8b9deed0fc65e9ca + this.heightmaps = heightmaps; + + if (Thread.currentThread() instanceof org.dreeam.leaf.async.chunk.AsyncChunkSendThread) { -+ ByteBuf buffer = Unpooled.buffer(calculateChunkSize(levelChunk)); ++ int size = calculateChunkSize(levelChunk); ++ ByteBuf buffer = Unpooled.buffer(size); + extractChunkData(new FriendlyByteBuf(buffer), levelChunk, chunkPacketInfo); ++ // make sure all sections is latest ++ while (size != buffer.writerIndex()) { ++ buffer.writerIndex(0); ++ size = calculateChunkSize(levelChunk); ++ extractChunkData(new FriendlyByteBuf(buffer), levelChunk, chunkPacketInfo); ++ } + byte[] array = it.unimi.dsi.fastutil.bytes.ByteArrays.setLength(buffer.array(), buffer.writerIndex()); + if (chunkPacketInfo != null) { + chunkPacketInfo.setBuffer(array); @@ -75,6 +82,14 @@ index 526c117e0d53ad527eb610c79cdc46ec16b18c0c..9e5edbb05900fdaa8b9deed0fc65e9ca public ClientboundLevelChunkPacketData(RegistryFriendlyByteBuf buffer, int x, int z) { this.heightmaps = HEIGHTMAPS_STREAM_CODEC.decode(buffer); int varInt = buffer.readVarInt(); +@@ -123,6 +169,7 @@ public class ClientboundLevelChunkPacketData { + // Paper end - Anti-Xray - Add chunk packet info + } + ++ if (Thread.currentThread() instanceof org.dreeam.leaf.async.chunk.AsyncChunkSendThread) return; // Leaf - Async chunk sending + if (buffer.writerIndex() != buffer.capacity()) { + throw new IllegalStateException("Didn't fill chunk buffer: expected " + buffer.capacity() + " bytes, got " + buffer.writerIndex()); + } diff --git a/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java b/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java index 8578d1f78ddd1bb75f3230f04bfaa35af9f5f822..d8e938abf5123b092cec80feb6468e3d91ae823e 100644 --- a/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java @@ -98,7 +113,7 @@ index 8578d1f78ddd1bb75f3230f04bfaa35af9f5f822..d8e938abf5123b092cec80feb6468e3d private ClientboundLevelChunkWithLightPacket(RegistryFriendlyByteBuf buffer) { this.x = buffer.readInt(); diff --git a/net/minecraft/server/network/PlayerChunkSender.java b/net/minecraft/server/network/PlayerChunkSender.java -index 14878690a88fd4de3e2c127086607e6c819c636c..62e1dabd84b80d5e2e4a8fcb308934dce2d8c74b 100644 +index 0376a10ee0544b13e8fd629a7b13f78811e57a30..aa6b900347635857b84460fa8435b81f794f0747 100644 --- a/net/minecraft/server/network/PlayerChunkSender.java +++ b/net/minecraft/server/network/PlayerChunkSender.java @@ -64,13 +64,29 @@ public class PlayerChunkSender { diff --git a/leaf-server/minecraft-patches/features/0213-Spawner-Configurations.patch b/leaf-server/minecraft-patches/features/0213-Spawner-Configurations.patch new file mode 100644 index 00000000..2a03607b --- /dev/null +++ b/leaf-server/minecraft-patches/features/0213-Spawner-Configurations.patch @@ -0,0 +1,171 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Taiyou06 +Date: Sun, 9 Mar 2025 00:36:26 +0100 +Subject: [PATCH] Spawner Configurations + + +diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java +index b23283779c85c0afb230872b2794640fd9719ec2..bf4289420b1f433c07c0c5244d58a0e39d7839c0 100644 +--- a/net/minecraft/world/level/BaseSpawner.java ++++ b/net/minecraft/world/level/BaseSpawner.java +@@ -62,6 +62,12 @@ public abstract class BaseSpawner { + + public boolean isNearPlayer(Level level, BlockPos pos) { + if (level.purpurConfig.spawnerDeactivateByRedstone && level.hasNeighborSignal(pos)) return false; // Purpur - Redstone deactivates spawners ++ // Leaf start - Spawner Configurations ++ // Skip player proximity check if disabled in config ++ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && !org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.checkForNearbyPlayers) { ++ return true; // Always act as if players are nearby ++ } ++ // Leaf end - Spawner Configurations + return level.hasNearbyAlivePlayerThatAffectsSpawningForSpawner(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, this.requiredPlayerRange); // Paper - Affects Spawning API // Leaf - Optimize nearby alive players for spawning + } + +@@ -84,6 +90,20 @@ public abstract class BaseSpawner { + } + } + ++ // Leaf start - Spawner Configurations ++ private int maxAllowedLight(EntityType entityType) { ++ if (entityType.getCategory().isFriendly()) { ++ return 15; // No light restriction for passive mobs ++ } else if (entityType == EntityType.SPIDER || entityType == EntityType.CAVE_SPIDER) { ++ return 7; // Spiders can spawn in light level 7 or lower ++ } else if (entityType == EntityType.ENDERMAN) { ++ return 7; // Endermen can spawn in light level 7 or lower ++ } ++ ++ return 0; // Complete darkness for other hostile mobs ++ } ++ // Leaf end - Spawner Configurations ++ + public void serverTick(ServerLevel serverLevel, BlockPos pos) { + if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick + // Paper start - Configurable mob spawner tick rate +@@ -91,6 +111,15 @@ public abstract class BaseSpawner { + tickDelay = serverLevel.paperConfig().tickRates.mobSpawner; + if (tickDelay == -1) { return; } // If disabled + // Paper end - Configurable mob spawner tick rate ++ ++ // Leaf start - Spawner Configurations ++ // Apply custom min/max spawn delays if enabled ++ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled) { ++ this.minSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.minSpawnDelay; ++ this.maxSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.maxSpawnDelay; ++ } ++ // Leaf end - Spawner Configurations ++ + if (this.isNearPlayer(serverLevel, pos)) { + if (this.spawnDelay < -tickDelay) { // Paper - Configurable mob spawner tick rate + this.delay(serverLevel, pos); +@@ -120,20 +149,50 @@ public abstract class BaseSpawner { + pos.getZ() + (random.nextDouble() - random.nextDouble()) * this.spawnRange + 0.5 + ) + ); +- if (serverLevel.noCollision(optional.get().getSpawnAABB(vec3.x, vec3.y, vec3.z))) { ++ // Leaf start - Spawner Configurations ++ // Skip collision check if block checks are disabled ++ boolean skipBlockChecks = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && ++ !org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.spawnerBlockChecks; ++ if (skipBlockChecks || serverLevel.noCollision(optional.get().getSpawnAABB(vec3.x, vec3.y, vec3.z))) { ++ // 'skipBlockChecks' is true if SpawnerSettings.spawnerBlockChecks is false. ++ // It means we skip physical block checks like collision and custom rule isValidPosition. ++ + BlockPos blockPos = BlockPos.containing(vec3); ++ ++ // Add light level check if enabled ++ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && ++ org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.lightLevelCheck) { ++ int lightLevel = serverLevel.getMaxLocalRawBrightness(blockPos); ++ if (lightLevel > maxAllowedLight(optional.get())) { ++ continue; ++ } ++ } ++ ++ // Add water check if enabled ++ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && ++ org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.waterPreventSpawnCheck && ++ serverLevel.getBlockState(blockPos).getFluidState().is(net.minecraft.tags.FluidTags.WATER)) { ++ continue; ++ } ++ ++ // Determine if mob-specific spawn rules (like block types, biome requirements) should be skipped ++ boolean skipMobSpecificRules = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && ++ org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.ignoreSpawnRules; ++ // Leaf end - Spawner Configurations + if (nextSpawnData.getCustomSpawnRules().isPresent()) { + if (!optional.get().getCategory().isFriendly() && serverLevel.getDifficulty() == Difficulty.PEACEFUL) { + continue; + } + + SpawnData.CustomSpawnRules customSpawnRules = nextSpawnData.getCustomSpawnRules().get(); +- if (!customSpawnRules.isValidPosition(blockPos, serverLevel)) { ++ // customSpawnRules.isValidPosition is controlled by spawnerBlockChecks (via !skipBlockChecks) ++ if (!skipBlockChecks && !customSpawnRules.isValidPosition(blockPos, serverLevel)) { // Leaf - Spawner Configurations + continue; + } +- } else if (!SpawnPlacements.checkSpawnRules( ++ } else if (!skipMobSpecificRules && !SpawnPlacements.checkSpawnRules( // Leaf - Spawner Configurations + optional.get(), serverLevel, EntitySpawnReason.SPAWNER, blockPos, serverLevel.getRandom() + )) { ++ // If not skipping mob-specific rules AND standard spawn rules fail, continue. + continue; + } + +@@ -161,6 +220,7 @@ public abstract class BaseSpawner { + return; + } + ++ if (!org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled || org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.spawnerMaxNearbyCheck) { // Leaf - Spawner Configurations - Skip max nearby entity check if disabled + int size = serverLevel.getEntities( + EntityTypeTest.forExactClass(entity.getClass()), + new AABB(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1).inflate(this.spawnRange), +@@ -171,12 +231,29 @@ public abstract class BaseSpawner { + this.delay(serverLevel, pos); + return; + } ++ } // Leaf - Spawner Configurations + + entity.preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; preserve entity motion from tag + entity.snapTo(entity.getX(), entity.getY(), entity.getZ(), random.nextFloat() * 360.0F, 0.0F); + if (entity instanceof Mob mob) { +- if (nextSpawnData.getCustomSpawnRules().isEmpty() && !mob.checkSpawnRules(serverLevel, EntitySpawnReason.SPAWNER) +- || !mob.checkSpawnObstruction(serverLevel)) { ++ // Leaf start - Spawner Configurations ++ // mob.checkSpawnRules is controlled by ignoreSpawnRules (via !skipMobSpecificRules) ++ // mob.checkSpawnObstruction is controlled by spawnerBlockChecks (via !skipBlockChecks) ++ ++ boolean mobSpecificRulesFailed = false; ++ if (nextSpawnData.getCustomSpawnRules().isEmpty() && !skipMobSpecificRules) { ++ if (!mob.checkSpawnRules(serverLevel, EntitySpawnReason.SPAWNER)) { ++ mobSpecificRulesFailed = true; ++ } ++ } ++ ++ boolean obstructionFailed = false; ++ if (!skipBlockChecks && !mob.checkSpawnObstruction(serverLevel)) { // If not skipping physical checks and obstruction fails ++ obstructionFailed = true; ++ } ++ ++ if (mobSpecificRulesFailed || obstructionFailed) { ++ // Leaf end - Spawner Configurations + continue; + } + +@@ -244,10 +321,16 @@ public abstract class BaseSpawner { + input.read("SpawnData", SpawnData.CODEC).ifPresent(spawnData -> this.setNextSpawnData(level, pos, spawnData)); + this.spawnPotentials = input.read("SpawnPotentials", SpawnData.LIST_CODEC) + .orElseGet(() -> WeightedList.of(this.nextSpawnData != null ? this.nextSpawnData : new SpawnData())); ++ // Leaf start - Spawner Configurations ++ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled) { ++ this.minSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.minSpawnDelay; ++ this.maxSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.maxSpawnDelay; ++ } else { + // Paper start - use int if set + this.minSpawnDelay = input.getIntOr("Paper.MinSpawnDelay", input.getIntOr("MinSpawnDelay", 200)); + this.maxSpawnDelay = input.getIntOr("Paper.MaxSpawnDelay", input.getIntOr("MaxSpawnDelay", 800)); + // Paper end - use int if set ++ } // Leaf end - Spawner Configurations + this.spawnCount = input.getIntOr("SpawnCount", 4); + this.maxNearbyEntities = input.getIntOr("MaxNearbyEntities", 6); + this.requiredPlayerRange = input.getIntOr("RequiredPlayerRange", 16); diff --git a/leaf-server/minecraft-patches/features/0216-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/minecraft-patches/features/0214-SparklyPaper-Parallel-world-ticking.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0216-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/minecraft-patches/features/0214-SparklyPaper-Parallel-world-ticking.patch index 35f9222d..4aca18e5 100644 --- a/leaf-server/minecraft-patches/features/0216-SparklyPaper-Parallel-world-ticking.patch +++ b/leaf-server/minecraft-patches/features/0214-SparklyPaper-Parallel-world-ticking.patch @@ -5,20 +5,22 @@ Subject: [PATCH] SparklyPaper: Parallel world ticking Original project: https://github.com/SparklyPower/SparklyPaper +Commit: 589225495e566c60feb907a3571c1ccba855b6ed + diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java -index ea4010df54dbd17cdae22d671ea1e4bd7b685b3e..8d53cb917e9f623a67aba066c6a21f278f1f0967 100644 +index 0f5966932c4211922eccac09ab164fcb69dad582..36ce2be30478d734d8326eeeb004ba7dc61e0642 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java -@@ -1116,7 +1116,7 @@ public final class ChunkHolderManager { +@@ -1142,7 +1142,7 @@ public final class ChunkHolderManager { if (changedFullStatus.isEmpty()) { return; } - if (!TickThread.isTickThread()) { + if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled && !TickThread.isTickThreadFor(world) || !TickThread.isTickThread()) { // SparklyPaper - parallel world ticking // Leaf - SparklyPaper - parallel world ticking mod (make configurable) - this.taskScheduler.scheduleChunkTask(() -> { - final ArrayDeque pendingFullLoadUpdate = ChunkHolderManager.this.pendingFullLoadUpdate; - for (int i = 0, len = changedFullStatus.size(); i < len; ++i) { -@@ -1142,7 +1142,12 @@ public final class ChunkHolderManager { + // These will be handled on the next ServerChunkCache$MainThreadExecutor#pollTask, as it runs the distance manager update + // which will invoke processTicketUpdates + this.offThreadPendingFullLoadUpdate.addAll(changedFullStatus); +@@ -1163,7 +1163,12 @@ public final class ChunkHolderManager { // note: never call while inside the chunk system, this will absolutely break everything public void processUnloads() { @@ -32,15 +34,15 @@ index ea4010df54dbd17cdae22d671ea1e4bd7b685b3e..8d53cb917e9f623a67aba066c6a21f27 if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) { throw new IllegalStateException("Cannot unload chunks recursively"); -@@ -1424,7 +1429,7 @@ public final class ChunkHolderManager { - - List changedFullStatus = null; - +@@ -1429,7 +1434,7 @@ public final class ChunkHolderManager { + if (BLOCK_TICKET_UPDATES.get() == Boolean.TRUE) { + throw new IllegalStateException("Cannot update ticket level while unloading chunks or updating entity manager"); + } - final boolean isTickThread = TickThread.isTickThread(); + final boolean isTickThread = org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled && TickThread.isTickThreadFor(world) || TickThread.isTickThread(); // SparklyPaper - parallel world ticking // Leaf - SparklyPaper - parallel world ticking mod (make configurable) - boolean ret = false; - final boolean canProcessFullUpdates = processFullUpdates & isTickThread; + if (!PlatformHooks.get().allowAsyncTicketUpdates() && isTickThread) { + TickThread.ensureTickThread("Cannot asynchronously process ticket updates"); diff --git a/io/papermc/paper/redstone/RedstoneWireTurbo.java b/io/papermc/paper/redstone/RedstoneWireTurbo.java index ff747a1ecdf3c888bca0d69de4f85dcd810b6139..b288d57d9f7bd0ccf1877cf9920bd67288ff22f7 100644 --- a/io/papermc/paper/redstone/RedstoneWireTurbo.java @@ -80,18 +82,18 @@ index 582e012222123e5001c34153f2ee1ab1d08935fd..c0bce2293d07ca58cc5bc9e036ab8dca List states = new java.util.ArrayList<>(level.capturedBlockStates.values()); level.capturedBlockStates.clear(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 4bf840705bec251aa7e5595fa16bf8e1a9a7d2e9..543bdb926426bfd5be01d0c23e8c9e274b94485c 100644 +index 07c9a7105de7111de73b6a786a860f8676015897..15bf079e1d634505c78f345dbef06c2c19eee393 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -290,6 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run (concurrent because plugins may schedule tasks async) + public java.util.concurrent.Semaphore serverLevelTickingSemaphore = null; // SparklyPaper - parallel world ticking public static S spin(Function threadFunction) { - AtomicReference atomicReference = new AtomicReference<>(); -@@ -321,24 +322,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop serverPlayer1.connection.suspendFlushing()); this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit -@@ -1726,28 +1757,50 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> oldLevels = this.levels; Map, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels); newLevels.remove(level.dimension()); @@ -252,7 +254,7 @@ index 4bf840705bec251aa7e5595fa16bf8e1a9a7d2e9..543bdb926426bfd5be01d0c23e8c9e27 } // CraftBukkit end diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff3a994f91 100644 +index 4bf87ebb49880b8e09203a48fce6371398281561..27bbe0c43dd9b7f8bf932a6b4825ce2cb1996d48 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java @@ -53,8 +53,11 @@ public class PlayerAdvancements { @@ -277,7 +279,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff this.isFirstPacket = true; this.lastSelectedTab = null; this.tree = manager.tree(); -@@ -151,7 +155,7 @@ public class PlayerAdvancements { +@@ -150,7 +154,7 @@ public class PlayerAdvancements { if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.ignoredAdvancements) LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", path, this.playerSavePath); // Gale - Purpur - do not log ignored advancements } else { this.startProgress(advancementHolder, progress); @@ -286,7 +288,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff this.markForVisibilityUpdate(advancementHolder); } }); -@@ -183,10 +187,12 @@ public class PlayerAdvancements { +@@ -182,10 +186,12 @@ public class PlayerAdvancements { return false; } // Paper end - Add PlayerAdvancementCriterionGrantEvent @@ -303,7 +305,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff // Paper start - Add Adventure message to PlayerAdvancementDoneEvent final net.kyori.adventure.text.Component message = advancement.value().display().flatMap(info -> { return java.util.Optional.ofNullable( -@@ -220,12 +226,14 @@ public class PlayerAdvancements { +@@ -219,12 +225,14 @@ public class PlayerAdvancements { AdvancementProgress orStartProgress = this.getOrStartProgress(advancement); boolean isDone = orStartProgress.isDone(); if (orStartProgress.revokeProgress(criterionKey)) { @@ -321,7 +323,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff this.markForVisibilityUpdate(advancement); } -@@ -271,7 +279,10 @@ public class PlayerAdvancements { +@@ -270,7 +278,10 @@ public class PlayerAdvancements { } public void flushDirty(ServerPlayer player, boolean showAdvancements) { @@ -333,7 +335,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff Map map = new HashMap<>(); Set set = new java.util.TreeSet<>(java.util.Comparator.comparing(adv -> adv.id().toString())); // Paper - Changed from HashSet to TreeSet ordered alphabetically. Set set1 = new HashSet<>(); -@@ -279,16 +290,24 @@ public class PlayerAdvancements { +@@ -278,16 +289,24 @@ public class PlayerAdvancements { for (AdvancementNode advancementNode : this.rootsToUpdate) { this.updateTreeVisibility(advancementNode, set, set1); } @@ -362,7 +364,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff if (!map.isEmpty() || !set.isEmpty() || !set1.isEmpty()) { player.connection.send(new ClientboundUpdateAdvancementsPacket(this.isFirstPacket, set, set1, map, showAdvancements)); } -@@ -331,10 +350,13 @@ public class PlayerAdvancements { +@@ -330,10 +349,13 @@ public class PlayerAdvancements { AdvancementHolder advancementHolder = node.holder(); if (visible) { if (this.visible.add(advancementHolder)) { @@ -379,7 +381,7 @@ index 10ac7393d20a0857be2bfdd856dda448699b3eff..53d081aceaa602cdc77018b434edc6ff } else if (this.visible.remove(advancementHolder)) { idOutput.add(advancementHolder.id()); diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 54910c2e1d6e6bb556e536fda060bd09402e04e8..72e871b8c7fee9b5cbd567e03baee80ee4b9c82e 100644 +index 77f11179836636424927843f5f10c3fd23d2b2d4..9b8d119116b0c3a51d3fe2ff7efb33cc39627cc4 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -198,6 +198,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -396,7 +398,7 @@ index 54910c2e1d6e6bb556e536fda060bd09402e04e8..72e871b8c7fee9b5cbd567e03baee80e // Gale start - Pufferfish - SIMD support diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index ecab2befa1f2f993ea4b4d088529745c2a37b73d..fc86e900e41305287a6cc6d766184c6e28d6189b 100644 +index 8f41326fda8c5f9f6926038508be6c6529b051bc..46e171ca454253c32e22c0c18587e9a7ba19f331 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -175,7 +175,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -409,19 +411,19 @@ index ecab2befa1f2f993ea4b4d088529745c2a37b73d..fc86e900e41305287a6cc6d766184c6e } } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e053787d0 100644 +index 3a31f9132a7271ea476cc85c5a10ea7f327256bf..58ec5cfb21d4834c3aaa74f76ca8a536eb86c30c 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -178,7 +178,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -180,7 +180,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private final MinecraftServer server; public final net.minecraft.world.level.storage.PrimaryLevelData serverLevelData; // CraftBukkit - type private int lastSpawnChunkRadius; - final EntityTickList entityTickList = new EntityTickList(); + final EntityTickList entityTickList = new EntityTickList(this); // SparklyPaper - parallel world ticking + private final ServerWaypointManager waypointManager; // Paper - rewrite chunk system private final GameEventDispatcher gameEventDispatcher; - public boolean noSave; -@@ -204,6 +204,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -207,6 +207,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private double preciseTime; // Purpur - Configurable daylight cycle private boolean forceTime; // Purpur - Configurable daylight cycle private final RandomSequences randomSequences; @@ -431,7 +433,16 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e // CraftBukkit start public final LevelStorageSource.LevelStorageAccess levelStorageAccess; -@@ -693,8 +696,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -679,7 +682,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe + this.sleepStatus = new SleepStatus(); + this.gameEventDispatcher = new GameEventDispatcher(this); + this.randomSequences = Objects.requireNonNullElseGet(randomSequences, () -> this.getDataStorage().computeIfAbsent(RandomSequences.TYPE)); +- this.waypointManager = new ServerWaypointManager(); ++ this.waypointManager = new ServerWaypointManager(this); // SparklyPaper - parallel world ticking + // Paper start - rewrite chunk system + this.moonrise$setEntityLookup(new ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup((ServerLevel)(Object)this, ((ServerLevel)(Object)this).new EntityCallbacks())); + this.chunkTaskScheduler = new ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler((ServerLevel)(Object)this); +@@ -697,8 +700,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle this.realPlayers = Lists.newArrayList(); // Leaves - skip @@ -458,7 +469,7 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e // Paper start @Override public boolean hasChunk(int chunkX, int chunkZ) { -@@ -727,8 +748,112 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -731,8 +752,112 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public Player[] eligibleDespawnCheckingPlayerCache = new Player[0]; // Leaf - Cache eligible players for despawn checks @@ -571,7 +582,7 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e TickRateManager tickRateManager = this.tickRateManager(); boolean runsNormally = tickRateManager.runsNormally(); if (runsNormally) { -@@ -736,6 +861,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -740,6 +865,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.advanceWeatherCycle(); } @@ -586,7 +597,7 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); if (this.purpurConfig.playersSkipNight && this.sleepStatus.areEnoughSleeping(_int) && this.sleepStatus.areEnoughDeepSleeping(_int, this.players)) { // Purpur - Config for skipping night // Paper start - create time skip event - move up calculations -@@ -1309,9 +1442,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1317,9 +1450,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe fluidState.tick(this, pos, blockState); } // Paper start - rewrite chunk system @@ -601,7 +612,7 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e // Paper end - rewrite chunk system } -@@ -1322,9 +1458,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1330,9 +1466,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe blockState.tick(this, pos, this.random); } // Paper start - rewrite chunk system @@ -616,7 +627,7 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e // Paper end - rewrite chunk system } -@@ -1575,6 +1714,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1597,6 +1736,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } private void addPlayer(ServerPlayer player) { @@ -625,7 +636,7 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e Entity entity = this.getEntity(player.getUUID()); if (entity != null) { LOGGER.warn("Force-added player with duplicate UUID {}", player.getUUID()); -@@ -1587,7 +1728,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1609,7 +1750,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // CraftBukkit start private boolean addEntity(Entity entity, @Nullable org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { @@ -640,18 +651,27 @@ index 2ecb73fc7b6754ade93bf16b48c623e6b3a955a9..85bfc91ff163a2a564b7b610e27ff90e // Paper start - extra debug info if (entity.valid) { diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index d507544efafe74ecaffd6a063eff152d349ec76a..bc955da0dff79262dace84d255f27b3271a91ca5 100644 +index 4c1786201a4044db61e99c148fca4714e2b172ad..163ac7b4b6fefb0c4594548dfffc0ea6f24f0765 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -456,6 +456,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -467,6 +467,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return this.viewDistanceHolder; } // Paper end - rewrite chunk system -+ public boolean hasTickedAtLeastOnceInNewWorld = false; // SparklyPaper - parallel world ticking (fixes bug in DreamResourceReset where the inventory is opened AFTER the player has changed worlds, if you click with the quick tp torch in a chest, because the inventory is opened AFTER the player has teleported) ++ + // Paper start - improve keepalives + public long lastKeepAliveTx = System.nanoTime(); + public static final record KeepAliveResponse(long txTimeNS, long rxTimeNS) { +@@ -532,6 +533,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + } + // Paper end - improve keepalives ++ public boolean hasTickedAtLeastOnceInNewWorld = false; // SparklyPaper - parallel world ticking (fixes bug in DreamResourceReset where the inventory is opened AFTER the player has changed worlds, if you click with the quick tp torch in a chest, because the inventory is opened AFTER the player has teleported) ++ public ServerPlayer(MinecraftServer server, ServerLevel level, GameProfile gameProfile, ClientInformation clientInformation) { - super(level, level.getSharedSpawnPos(), level.getSharedSpawnAngle(), gameProfile); -@@ -749,6 +750,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + super(level, gameProfile); + this.textFilter = server.createTextFilterForPlayer(this); +@@ -818,6 +821,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void tick() { @@ -659,16 +679,16 @@ index d507544efafe74ecaffd6a063eff152d349ec76a..bc955da0dff79262dace84d255f27b32 // CraftBukkit start if (this.joining) { this.joining = false; -@@ -1398,6 +1400,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1494,6 +1498,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc teleportTransition.postTeleportTransition().onTransition(this); return this; } else { + if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled) // Leaf - SparklyPaper - parallel world ticking mod (make configurable) -+ ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot change dimension of a player off-main, from world " + serverLevel().getWorld().getName() + " to world " + level.getWorld().getName()); // SparklyPaper - parallel world ticking (additional concurrency issues logs) ++ ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot change dimension of a player off-main, from world " + serverLevel.getWorld().getName() + " to world " + level.getWorld().getName()); // SparklyPaper - parallel world ticking (additional concurrency issues logs) // CraftBukkit start /* this.isChangingDimension = true; -@@ -1747,6 +1751,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1847,6 +1853,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return OptionalInt.empty(); } else { // CraftBukkit start @@ -681,7 +701,7 @@ index d507544efafe74ecaffd6a063eff152d349ec76a..bc955da0dff79262dace84d255f27b32 this.containerMenu = abstractContainerMenu; // Moved up if (!this.isImmobile()) this.connection -@@ -1811,6 +1821,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1911,6 +1923,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc } @Override public void closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) { @@ -694,10 +714,10 @@ index d507544efafe74ecaffd6a063eff152d349ec76a..bc955da0dff79262dace84d255f27b32 // Paper end - Inventory close reason this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId)); diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 75393b9cdd564e55ba173828c2f7b40498e8ecd7..96202ffdb73cb9d8c63351b4538c64645b91d21c 100644 +index 3cd9b0df617715d0b3e70a6096e52bb5d22ab426..f1002643589f67adce26667b1750a1296c1fb67d 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -252,6 +252,8 @@ public abstract class PlayerList { +@@ -251,6 +251,8 @@ public abstract class PlayerList { // Leaves end - replay mod api public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) { @@ -706,7 +726,7 @@ index 75393b9cdd564e55ba173828c2f7b40498e8ecd7..96202ffdb73cb9d8c63351b4538c6464 player.isRealPlayer = true; // Paper player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed GameProfile gameProfile = player.getGameProfile(); -@@ -892,6 +894,15 @@ public abstract class PlayerList { +@@ -888,6 +890,15 @@ public abstract class PlayerList { } public ServerPlayer respawn(ServerPlayer player, boolean keepInventory, Entity.RemovalReason reason, @Nullable org.bukkit.event.player.PlayerRespawnEvent.RespawnReason eventReason, @Nullable org.bukkit.Location location) { @@ -722,7 +742,7 @@ index 75393b9cdd564e55ba173828c2f7b40498e8ecd7..96202ffdb73cb9d8c63351b4538c6464 player.stopRiding(); // CraftBukkit this.players.remove(player); this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot -@@ -903,6 +914,7 @@ public abstract class PlayerList { +@@ -899,6 +910,7 @@ public abstract class PlayerList { ServerPlayer serverPlayer = player; Level fromWorld = player.level(); player.wonGame = false; @@ -730,11 +750,104 @@ index 75393b9cdd564e55ba173828c2f7b40498e8ecd7..96202ffdb73cb9d8c63351b4538c6464 // CraftBukkit end serverPlayer.connection = player.connection; serverPlayer.restoreFrom(player, keepInventory); +diff --git a/net/minecraft/server/waypoints/ServerWaypointManager.java b/net/minecraft/server/waypoints/ServerWaypointManager.java +index f9e7532f86122a379692561a639a209a126e8bba..fab317d6c9a1c914f19bae11846cb5761bbee76e 100644 +--- a/net/minecraft/server/waypoints/ServerWaypointManager.java ++++ b/net/minecraft/server/waypoints/ServerWaypointManager.java +@@ -20,8 +20,17 @@ public class ServerWaypointManager implements WaypointManager players = new HashSet<>(); + private final Table connections = HashBasedTable.create(); + ++ // SparklyPaper start - parallel world ticking ++ private final net.minecraft.server.level.ServerLevel level; ++ public ServerWaypointManager(net.minecraft.server.level.ServerLevel level) { ++ this.level = level; ++ } ++ // SparklyPaper end - parallel world ticking ++ + @Override + public void trackWaypoint(WaypointTransmitter waypoint) { ++ if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled) // Leaf - SparklyPaper - parallel world ticking mod (make configurable) ++ ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(this.level, "Cannot track waypoints off-main"); // SparklyPaper - parallel world ticking + this.waypoints.add(waypoint); + + for (ServerPlayer serverPlayer : this.players) { +@@ -31,6 +40,8 @@ public class ServerWaypointManager implements WaypointManager map = Tables.transpose(this.connections).row(waypoint); + SetView set = Sets.difference(this.players, map.keySet()); +@@ -47,12 +58,16 @@ public class ServerWaypointManager implements WaypointManager connection.disconnect()); + Tables.transpose(this.connections).row(waypoint).clear(); + this.waypoints.remove(waypoint); + } + + public void addPlayer(ServerPlayer player) { ++ if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled) // Leaf - SparklyPaper - parallel world ticking mod (make configurable) ++ ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(this.level, "Cannot add player to waypoints off-main"); // SparklyPaper - parallel world ticking + this.players.add(player); + + for (WaypointTransmitter waypointTransmitter : this.waypoints) { +@@ -65,6 +80,8 @@ public class ServerWaypointManager implements WaypointManager map = this.connections.row(player); + SetView set = Sets.difference(this.waypoints, map.keySet()); + +@@ -78,6 +95,8 @@ public class ServerWaypointManager implements WaypointManager { + connection.disconnect(); + return true; +@@ -87,6 +106,8 @@ public class ServerWaypointManager implements WaypointManager { +@@ -122,6 +145,8 @@ public class ServerWaypointManager implements WaypointManager passengers = this.getPassengers(); List list = new ArrayList<>(passengers.size()); this.ejectPassengers(); @@ -905,10 +1018,10 @@ index 3614551856c594f3c0cfee984fcf03fad672b007..f4577f908ca9f279b72d89e5b0822d34 }); entity.getBrain().eraseMemory(MemoryModuleType.POTENTIAL_JOB_SITE); diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index 5cc4b2a0d10b25c57c582772ac6757442780afb0..92895a38c5ef7962db83e085a99c0b3766052541 100644 +index 377e98469328f08db751c0f6a6f434b03f63c225..743c0c956ddd9e35d3c9c7b45fa8d36490d648dd 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -795,13 +795,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -797,13 +797,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler this.brain.getMemory(moduleType).ifPresent(pos -> { ServerLevel level = server.getLevel(pos.dimension()); if (level != null) { @@ -938,10 +1051,10 @@ index 5cc4b2a0d10b25c57c582772ac6757442780afb0..92895a38c5ef7962db83e085a99c0b37 }); } diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..a3ee65c9b7544b791f11c0c475ec9e0390be95a7 100644 +index 2258736e6f9f52efe5bd353b8949a7a0b9a4fdb8..aa71eca6cd69cfa79b84cb181c25c4be8e4511b2 100644 --- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -@@ -122,8 +122,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -119,8 +119,10 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { Vec3 vec3 = this.oldPosition(); if (owner instanceof ServerPlayer serverPlayer) { if (serverPlayer.connection.isAcceptingMessages()) { @@ -953,19 +1066,18 @@ index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..a3ee65c9b7544b791f11c0c475ec9e03 if (serverPlayer1 == null) { this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.HIT); return; -@@ -152,10 +154,17 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -149,10 +151,16 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { if (serverPlayer1 != null) { serverPlayer1.resetFallDistance(); serverPlayer1.resetCurrentImpulseContext(); -- serverPlayer1.hurtServer(serverPlayer.serverLevel(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage -+ serverPlayer1.hurtServer(taskServerPlayer.serverLevel(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage +- serverPlayer1.hurtServer(serverPlayer.level(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage ++ serverPlayer1.hurtServer(taskServerPlayer.level(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage } this.playSound(serverLevel, vec3); + }; + if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled) -+ serverPlayer.getBukkitEntity().taskScheduler.schedule(teleportPlayerCrossDimensionTask, entity -> { -+ }, 0); ++ serverPlayer.getBukkitEntity().taskScheduler.schedule(teleportPlayerCrossDimensionTask, entity -> {}, 0); + else + teleportPlayerCrossDimensionTask.accept(serverPlayer); + // Leaf end - SparklyPaper - parallel world ticking mod (handling for pearl teleportation cross-dimension) @@ -973,7 +1085,7 @@ index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..a3ee65c9b7544b791f11c0c475ec9e03 } else { Entity entity = owner.teleport( diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java -index c4721eb0efe34f5e313bc890b4e960144eca4fe1..9dd3187fd968ab95e9d55b4c8cc74e782cc0f241 100644 +index 1f601781643945920c7522b9c6100d0a37ad535d..f32148322f56f766108c6958124731a885c3bbc7 100644 --- a/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -96,8 +96,14 @@ public abstract class AbstractContainerMenu { @@ -992,10 +1104,10 @@ index c4721eb0efe34f5e313bc890b4e960144eca4fe1..9dd3187fd968ab95e9d55b4c8cc74e78 this.containerId = containerId; } diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 07f1b27116baf2a06e6cd4eeaa8639e166fb362d..1a5f65a32882aa43828305113f35a9cdb0bdb870 100644 +index 793c0a380b84d246db748be7e8807f1c0fa92d65..7cf8894b1fd6283567dca0b7d0b945b2fbae1b8c 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -406,8 +406,8 @@ public final class ItemStack implements DataComponentHolder { +@@ -398,8 +398,8 @@ public final class ItemStack implements DataComponentHolder { if (interactionResult.consumesAction() && serverLevel.captureTreeGeneration && !serverLevel.capturedBlockStates.isEmpty()) { serverLevel.captureTreeGeneration = false; org.bukkit.Location location = org.bukkit.craftbukkit.util.CraftLocation.toBukkit(clickedPos, serverLevel.getWorld()); @@ -1007,18 +1119,18 @@ index 07f1b27116baf2a06e6cd4eeaa8639e166fb362d..1a5f65a32882aa43828305113f35a9cd serverLevel.capturedBlockStates.clear(); org.bukkit.event.world.StructureGrowEvent structureEvent = null; diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 22da84734462d09a55bc599db4374e1e4f4d6bd2..c8219508cf94da71143b8672661592c66b341782 100644 +index ca39e3bd93f896d5c7b1fc3b9264f64555be5d50..54f03ad9b7f62bf717f32376e81a49bbf600385c 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -164,6 +164,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl - } +@@ -165,6 +165,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl // Gale end - Gale configuration + public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur - Purpur config files + public io.papermc.paper.redstone.RedstoneWireTurbo turbo = new io.papermc.paper.redstone.RedstoneWireTurbo((net.minecraft.world.level.block.RedStoneWireBlock) net.minecraft.world.level.block.Blocks.REDSTONE_WIRE); // SparklyPaper - parallel world ticking (moved to world) - public static @Nullable BlockPos lastPhysicsProblem; // Spigot private int tileTickPosition; -@@ -1136,6 +1137,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl + public final Map explosionDensityCache = new java.util.HashMap<>(); // Paper - Optimize explosions +@@ -1137,6 +1138,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @Override public boolean setBlock(BlockPos pos, BlockState state, int flags, int recursionLeft) { @@ -1027,7 +1139,7 @@ index 22da84734462d09a55bc599db4374e1e4f4d6bd2..c8219508cf94da71143b8672661592c6 // CraftBukkit start - tree generation if (this.captureTreeGeneration) { // Paper start - Protect Bedrock and End Portal/Frames from being destroyed -@@ -1514,9 +1517,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1515,9 +1518,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl } else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) { tickingBlockEntity.tick(); // Paper start - rewrite chunk system @@ -1042,7 +1154,7 @@ index 22da84734462d09a55bc599db4374e1e4f4d6bd2..c8219508cf94da71143b8672661592c6 // Paper end - rewrite chunk system } } -@@ -1537,7 +1543,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1538,7 +1544,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Gale - Airplane - remove lambda from ticking guard - diff on change ServerLevel#tick // Paper end - Prevent block entity and entity crashes } @@ -1052,16 +1164,16 @@ index 22da84734462d09a55bc599db4374e1e4f4d6bd2..c8219508cf94da71143b8672661592c6 } // Paper start - Option to prevent armor stands from doing entity lookups -@@ -1680,6 +1687,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl - +@@ -1675,6 +1682,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @Nullable - public BlockEntity getBlockEntity(BlockPos pos, boolean validate) { + @Override + public BlockEntity getBlockEntity(BlockPos pos) { + if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled) // Leaf start - SparklyPaper - parallel world ticking mod (make configurable) + ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThreadOrAsyncThread((ServerLevel) this, "Cannot read world asynchronously"); // SparklyPaper - parallel world ticking // Paper start - Perf: Optimize capturedTileEntities lookup net.minecraft.world.level.block.entity.BlockEntity blockEntity; if (!this.capturedTileEntities.isEmpty() && (blockEntity = this.capturedTileEntities.get(pos)) != null) { -@@ -1697,6 +1706,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1691,6 +1700,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl } public void setBlockEntity(BlockEntity blockEntity) { @@ -1070,7 +1182,7 @@ index 22da84734462d09a55bc599db4374e1e4f4d6bd2..c8219508cf94da71143b8672661592c6 BlockPos blockPos = blockEntity.getBlockPos(); if (!this.isOutsideBuildHeight(blockPos)) { // CraftBukkit start -@@ -1781,6 +1792,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1775,6 +1786,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @Override public List getEntities(@Nullable Entity entity, AABB boundingBox, Predicate predicate) { @@ -1079,7 +1191,7 @@ index 22da84734462d09a55bc599db4374e1e4f4d6bd2..c8219508cf94da71143b8672661592c6 List list = Lists.newArrayList(); // Paper start - rewrite chunk system -@@ -2099,8 +2112,15 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -2097,8 +2110,15 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl public abstract RecipeAccess recipeAccess(); public BlockPos getBlockRandomPos(int x, int y, int z, int yMask) { @@ -1292,15 +1404,15 @@ index a22cb810622e0ae97bc2a0d6390d026d9482b783..3e7478e959da3a0191de6c76b80cbb9b } if (event == null || !event.isCancelled()) { diff --git a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -index c63370fd458fb4f7190b79b1a8174fcc92d88f9c..5d3d3db955927647f5498eac0d67d3198b27f8cd 100644 +index 5a094257a31f0500278a706a418e1697f8810ffb..dd1343cd1e7fe007ddf47d654653eb2fbf91bcdf 100644 --- a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -@@ -79,6 +79,12 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co +@@ -76,6 +76,12 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co } public static boolean canUnlock(Player player, LockCode code, Component displayName, @Nullable BlockEntity blockEntity) { + // SparklyPaper - parallel world ticking (see: PARALLEL_NOTES.md - Opening an inventory after a world switch) -+ if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled && player instanceof net.minecraft.server.level.ServerPlayer serverPlayer && blockEntity != null && blockEntity.getLevel() != serverPlayer.serverLevel()) { // Leaf - SparklyPaper - parallel world ticking mod (make configurable) ++ if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled && player instanceof net.minecraft.server.level.ServerPlayer serverPlayer && blockEntity != null && blockEntity.getLevel() != serverPlayer.level()) { // Leaf - SparklyPaper - parallel world ticking mod (make configurable) + net.minecraft.server.MinecraftServer.LOGGER.warn("Player " + serverPlayer.getScoreboardName() + " (" + serverPlayer.getStringUUID() + ") attempted to open a BlockEntity @ " + blockEntity.getLevel().getWorld().getName() + " " + blockEntity.getBlockPos().getX() + ", " + blockEntity.getBlockPos().getY() + ", " + blockEntity.getBlockPos().getZ() + " while they were in a different world " + serverPlayer.level().getWorld().getName() + " than the block themselves!"); + return false; + } @@ -1309,7 +1421,7 @@ index c63370fd458fb4f7190b79b1a8174fcc92d88f9c..5d3d3db955927647f5498eac0d67d319 final org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(blockEntity.getLevel(), blockEntity.getBlockPos()); net.kyori.adventure.text.Component lockedMessage = net.kyori.adventure.text.Component.translatable("container.isLocked", io.papermc.paper.adventure.PaperAdventure.asAdventure(displayName)); diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java -index 440d70811d96f97d3463c6aff131cbc5bd588254..a3178392325ca186f1c68143df7d1f499f6e762c 100644 +index 83c811eb5e493fa6630f16c206787f227fde089b..30f73951d7fe69be0f094a70d4e28f08f715fbc0 100644 --- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java @@ -43,9 +43,9 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi @@ -1410,10 +1522,10 @@ index d23f255de9208f42125fa358a9e8194c984fe4d3..c3acc0a875c0bf697b6b101051d80b34 // CraftBukkit end } diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 5325989f46bd288c5a6f1362ec17d3354d55abfd..8d8d909c4b9496ae6f44ba34203ee40433d37f8c 100644 +index 65442f9ab1528fd1b736963bc51f21fd6a0781a0..7538f9c84e8463502f4fa1b4a84a4ac84a11e87d 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -399,6 +399,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -401,6 +401,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Nullable @Override public BlockState setBlockState(BlockPos pos, BlockState state, int flags) { diff --git a/leaf-server/minecraft-patches/features/0217-SparklyPaper-Track-each-world-MSPT.patch b/leaf-server/minecraft-patches/features/0215-SparklyPaper-Track-each-world-MSPT.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0217-SparklyPaper-Track-each-world-MSPT.patch rename to leaf-server/minecraft-patches/features/0215-SparklyPaper-Track-each-world-MSPT.patch index 494958da..79d935f4 100644 --- a/leaf-server/minecraft-patches/features/0217-SparklyPaper-Track-each-world-MSPT.patch +++ b/leaf-server/minecraft-patches/features/0215-SparklyPaper-Track-each-world-MSPT.patch @@ -6,10 +6,10 @@ Subject: [PATCH] SparklyPaper: Track each world MSPT Original project: https://github.com/SparklyPower/SparklyPaper diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 543bdb926426bfd5be01d0c23e8c9e274b94485c..9933a60db91d68f76df33ccddea0852fd59b8983 100644 +index 15bf079e1d634505c78f345dbef06c2c19eee393..2b28518b6ec9d260a80abc7e0e5e867a5fed9e7c 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1682,7 +1682,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Sun, 9 Mar 2025 00:36:26 +0100 -Subject: [PATCH] Spawner Configurations - - -diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java -index 9fa9d84033c28071120e8a1c796ace4f9a45d4c5..dc1d0c8a5b26142eeb8b9c167cef8d3ddcc1ad55 100644 ---- a/net/minecraft/world/level/BaseSpawner.java -+++ b/net/minecraft/world/level/BaseSpawner.java -@@ -55,6 +55,12 @@ public abstract class BaseSpawner { - - public boolean isNearPlayer(Level level, BlockPos pos) { - if (level.purpurConfig.spawnerDeactivateByRedstone && level.hasNeighborSignal(pos)) return false; // Purpur - Redstone deactivates spawners -+ // Leaf start - Spawner Configurations -+ // Skip player proximity check if disabled in config -+ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && !org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.checkForNearbyPlayers) { -+ return true; // Always act as if players are nearby -+ } -+ // Leaf end - Spawner Configurations - return level.hasNearbyAlivePlayerThatAffectsSpawningForSpawner(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, this.requiredPlayerRange); // Paper - Affects Spawning API // Leaf - Optimize nearby alive players for spawning - } - -@@ -77,6 +83,20 @@ public abstract class BaseSpawner { - } - } - -+ // Leaf start - Spawner Configurations -+ private int maxAllowedLight(EntityType entityType) { -+ if (entityType.getCategory().isFriendly()) { -+ return 15; // No light restriction for passive mobs -+ } else if (entityType == EntityType.SPIDER || entityType == EntityType.CAVE_SPIDER) { -+ return 7; // Spiders can spawn in light level 7 or lower -+ } else if (entityType == EntityType.ENDERMAN) { -+ return 7; // Endermen can spawn in light level 7 or lower -+ } -+ -+ return 0; // Complete darkness for other hostile mobs -+ } -+ // Leaf end - Spawner Configurations -+ - public void serverTick(ServerLevel serverLevel, BlockPos pos) { - if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick - // Paper start - Configurable mob spawner tick rate -@@ -84,6 +104,15 @@ public abstract class BaseSpawner { - tickDelay = serverLevel.paperConfig().tickRates.mobSpawner; - if (tickDelay == -1) { return; } // If disabled - // Paper end - Configurable mob spawner tick rate -+ -+ // Leaf start - Spawner Configurations -+ // Apply custom min/max spawn delays if enabled -+ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled) { -+ this.minSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.minSpawnDelay; -+ this.maxSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.maxSpawnDelay; -+ } -+ // Leaf end - Spawner Configurations -+ - if (this.isNearPlayer(serverLevel, pos)) { - if (this.spawnDelay < -tickDelay) { // Paper - Configurable mob spawner tick rate - this.delay(serverLevel, pos); -@@ -112,18 +141,48 @@ public abstract class BaseSpawner { - pos.getZ() + (random.nextDouble() - random.nextDouble()) * this.spawnRange + 0.5 - ) - ); -- if (serverLevel.noCollision(optional.get().getSpawnAABB(vec3.x, vec3.y, vec3.z))) { -+ // Leaf start - Spawner Configurations -+ // Skip collision check if block checks are disabled -+ boolean skipBlockChecks = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && -+ !org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.spawnerBlockChecks; -+ if (skipBlockChecks || serverLevel.noCollision(optional.get().getSpawnAABB(vec3.x, vec3.y, vec3.z))) { -+ // 'skipBlockChecks' is true if SpawnerSettings.spawnerBlockChecks is false. -+ // It means we skip physical block checks like collision and custom rule isValidPosition. -+ - BlockPos blockPos = BlockPos.containing(vec3); -+ -+ // Add light level check if enabled -+ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && -+ org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.lightLevelCheck) { -+ int lightLevel = serverLevel.getMaxLocalRawBrightness(blockPos); -+ if (lightLevel > maxAllowedLight(optional.get())) { -+ continue; -+ } -+ } -+ -+ // Add water check if enabled -+ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && -+ org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.waterPreventSpawnCheck && -+ serverLevel.getBlockState(blockPos).getFluidState().is(net.minecraft.tags.FluidTags.WATER)) { -+ continue; -+ } -+ -+ // Determine if mob-specific spawn rules (like block types, biome requirements) should be skipped -+ boolean skipMobSpecificRules = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled && -+ org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.ignoreSpawnRules; -+ // Leaf end - Spawner Configurations - if (nextSpawnData.getCustomSpawnRules().isPresent()) { - if (!optional.get().getCategory().isFriendly() && serverLevel.getDifficulty() == Difficulty.PEACEFUL) { - continue; - } - - SpawnData.CustomSpawnRules customSpawnRules = nextSpawnData.getCustomSpawnRules().get(); -- if (!customSpawnRules.isValidPosition(blockPos, serverLevel)) { -+ // customSpawnRules.isValidPosition is controlled by spawnerBlockChecks (via !skipBlockChecks) -+ if (!skipBlockChecks && !customSpawnRules.isValidPosition(blockPos, serverLevel)) { // Leaf - Spawner Configurations - continue; - } -- } else if (!SpawnPlacements.checkSpawnRules(optional.get(), serverLevel, EntitySpawnReason.SPAWNER, blockPos, serverLevel.getRandom())) { -+ } else if (!skipMobSpecificRules && !SpawnPlacements.checkSpawnRules(optional.get(), serverLevel, EntitySpawnReason.SPAWNER, blockPos, serverLevel.getRandom())) { -+ // If not skipping mob-specific rules AND standard spawn rules fail, continue. - continue; - } - -@@ -151,6 +210,7 @@ public abstract class BaseSpawner { - return; - } - -+ if (!org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled || org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.spawnerMaxNearbyCheck) { // Leaf - Spawner Configurations - Skip max nearby entity check if disabled - int size = serverLevel.getEntities( - EntityTypeTest.forExactClass(entity.getClass()), - new AABB(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1).inflate(this.spawnRange), -@@ -161,12 +221,29 @@ public abstract class BaseSpawner { - this.delay(serverLevel, pos); - return; - } -+ } // Leaf - Spawner Configurations - - entity.preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; preserve entity motion from tag - entity.snapTo(entity.getX(), entity.getY(), entity.getZ(), random.nextFloat() * 360.0F, 0.0F); - if (entity instanceof Mob mob) { -- if (nextSpawnData.getCustomSpawnRules().isEmpty() && !mob.checkSpawnRules(serverLevel, EntitySpawnReason.SPAWNER) -- || !mob.checkSpawnObstruction(serverLevel)) { -+ // Leaf start - Spawner Configurations -+ // mob.checkSpawnRules is controlled by ignoreSpawnRules (via !skipMobSpecificRules) -+ // mob.checkSpawnObstruction is controlled by spawnerBlockChecks (via !skipBlockChecks) -+ -+ boolean mobSpecificRulesFailed = false; -+ if (nextSpawnData.getCustomSpawnRules().isEmpty() && !skipMobSpecificRules) { -+ if (!mob.checkSpawnRules(serverLevel, EntitySpawnReason.SPAWNER)) { -+ mobSpecificRulesFailed = true; -+ } -+ } -+ -+ boolean obstructionFailed = false; -+ if (!skipBlockChecks && !mob.checkSpawnObstruction(serverLevel)) { // If not skipping physical checks and obstruction fails -+ obstructionFailed = true; -+ } -+ -+ if (mobSpecificRulesFailed || obstructionFailed) { -+ // Leaf end - Spawner Configurations - continue; - } - -@@ -231,10 +308,16 @@ public abstract class BaseSpawner { - tag.read("SpawnData", SpawnData.CODEC).ifPresent(spawnData -> this.setNextSpawnData(level, pos, spawnData)); - this.spawnPotentials = tag.read("SpawnPotentials", SpawnData.LIST_CODEC) - .orElseGet(() -> WeightedList.of(this.nextSpawnData != null ? this.nextSpawnData : new SpawnData())); -+ // Leaf start - Spawner Configurations -+ if (org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.enabled) { -+ this.minSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.minSpawnDelay; -+ this.maxSpawnDelay = org.dreeam.leaf.config.modules.gameplay.SpawnerSettings.maxSpawnDelay; -+ } else { - // Paper start - use int if set - this.minSpawnDelay = tag.getIntOr("Paper.MinSpawnDelay", tag.getIntOr("MinSpawnDelay", 200)); - this.maxSpawnDelay = tag.getIntOr("Paper.MaxSpawnDelay", tag.getIntOr("MaxSpawnDelay", 800)); - // Paper end - use int if set -+ } // Leaf end - Spawner Configurations - this.spawnCount = tag.getIntOr("SpawnCount", 4); - this.maxNearbyEntities = tag.getIntOr("MaxNearbyEntities", 6); - this.requiredPlayerRange = tag.getIntOr("RequiredPlayerRange", 16); diff --git a/leaf-server/minecraft-patches/features/0218-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch b/leaf-server/minecraft-patches/features/0216-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0218-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch rename to leaf-server/minecraft-patches/features/0216-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch index dd2b674d..3983b986 100644 --- a/leaf-server/minecraft-patches/features/0218-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch +++ b/leaf-server/minecraft-patches/features/0216-PaperPR-Fix-cancelled-Projectile-Events-still-consum.patch @@ -230,7 +230,7 @@ index fb5077450aa9f7b7a03dd20c27a68dfdaab5ef06..f37fd3b9ab725e5b8eb7fccf9b35bbc0 player.getInventory().removeItem(ammo); } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index c8219508cf94da71143b8672661592c66b341782..6278fe737a555f47625098828a03952cf9b859a7 100644 +index 54f03ad9b7f62bf717f32376e81a49bbf600385c..a2abfc5db556bc9a80098a675545f67907a8886b 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -171,6 +171,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0219-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch b/leaf-server/minecraft-patches/features/0217-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0219-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch rename to leaf-server/minecraft-patches/features/0217-Optimize-SetLookAndInteract-and-NearestVisibleLiving.patch diff --git a/leaf-server/minecraft-patches/features/0220-Remove-streams-on-InsideBrownianWalk.patch b/leaf-server/minecraft-patches/features/0218-Remove-streams-on-InsideBrownianWalk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0220-Remove-streams-on-InsideBrownianWalk.patch rename to leaf-server/minecraft-patches/features/0218-Remove-streams-on-InsideBrownianWalk.patch diff --git a/leaf-server/minecraft-patches/features/0221-Use-BFS-on-getSlopeDistance.patch b/leaf-server/minecraft-patches/features/0219-Use-BFS-on-getSlopeDistance.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0221-Use-BFS-on-getSlopeDistance.patch rename to leaf-server/minecraft-patches/features/0219-Use-BFS-on-getSlopeDistance.patch index 51b26527..4e11cba9 100644 --- a/leaf-server/minecraft-patches/features/0221-Use-BFS-on-getSlopeDistance.patch +++ b/leaf-server/minecraft-patches/features/0219-Use-BFS-on-getSlopeDistance.patch @@ -9,10 +9,10 @@ Leaf: ~48ms (-36%) This should help drastically on the farms that use actively changing fluids. diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index f4b9d0bcf305d99d39e530c3369faaec60bbc5a8..a311f81b7f34f2c988ebcd792ca87dfd7b175f96 100644 +index 1b0bd86212e7ff0b8a80a524250b69bd68a9c685..d3b711d4aa5c54c05310a2089a8c371fc2c2acdf 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1441,6 +1441,10 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1449,6 +1449,10 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.emptyTime = 0; } diff --git a/leaf-server/minecraft-patches/features/0222-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/minecraft-patches/features/0220-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0222-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/minecraft-patches/features/0220-Paper-PR-Throttle-failed-spawn-attempts.patch index 744ad650..157501bb 100644 --- a/leaf-server/minecraft-patches/features/0222-Paper-PR-Throttle-failed-spawn-attempts.patch +++ b/leaf-server/minecraft-patches/features/0220-Paper-PR-Throttle-failed-spawn-attempts.patch @@ -163,10 +163,10 @@ index 345d4b80bd4383e0fb66d744d87bc8ef4100fd32..a2da4fce50f31d56036d04041c4f80ed private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel level, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double distance) { diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java -index 6683df8d0f5a61ab094393f761a3d3a22d6e0455..4fd9313ce2c87383685d80e2533b93d5b85a9f41 100644 +index 686c031ec73acc80683aaa39a78fe9221f0215a6..d7dbe7d24a6697be6b5db729f940b16b74838d11 100644 --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -91,6 +91,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -92,6 +92,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh private boolean slimeChunk; private boolean hasComputedSlimeChunk; // Leaf end - Matter - Secure Seed @@ -175,10 +175,10 @@ index 6683df8d0f5a61ab094393f761a3d3a22d6e0455..4fd9313ce2c87383685d80e2533b93d5 // Paper start - rewrite chunk system private volatile ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles; diff --git a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java -index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a9fb028ea 100644 +index e04d3479383cd480cf35ed7ac3c82e7f6fb69e28..ab1fc7ca0639f9e71933f623258bb8d123988262 100644 --- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java +++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java -@@ -92,6 +92,7 @@ public record SerializableChunkData( +@@ -94,6 +94,7 @@ public record SerializableChunkData( List blockEntities, CompoundTag structureData , @Nullable net.minecraft.nbt.Tag persistentDataContainer // CraftBukkit - persistentDataContainer @@ -186,7 +186,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a ) { public static final Codec> BLOCK_STATE_CODEC = PalettedContainer.codecRW( Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), null // Paper - Anti-Xray -@@ -188,6 +189,19 @@ public record SerializableChunkData( +@@ -190,6 +191,19 @@ public record SerializableChunkData( lists[i] = list2; } @@ -206,7 +206,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a List list3 = tag.getList("entities").stream().flatMap(ListTag::compoundStream).toList(); List list4 = tag.getList("block_entities").stream().flatMap(ListTag::compoundStream).toList(); CompoundTag compoundOrEmpty = tag.getCompoundOrEmpty("structures"); -@@ -268,6 +282,7 @@ public record SerializableChunkData( +@@ -270,6 +284,7 @@ public record SerializableChunkData( list4, compoundOrEmpty , tag.get("ChunkBukkitValues") // CraftBukkit - ChunkBukkitValues @@ -214,7 +214,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a ); } } -@@ -424,6 +439,15 @@ public record SerializableChunkData( +@@ -426,6 +441,15 @@ public record SerializableChunkData( chunkAccess.addPackedPostProcess(this.postProcessingSections[i], i); } @@ -230,7 +230,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a if (chunkType == ChunkType.LEVELCHUNK) { return this.loadStarlightLightData(level, new ImposterProtoChunk((LevelChunk)chunkAccess, false)); // Paper - starlight } else { -@@ -554,6 +578,7 @@ public record SerializableChunkData( +@@ -556,6 +580,7 @@ public record SerializableChunkData( persistentDataContainer = chunk.persistentDataContainer.toTagCompound(); } // CraftBukkit end @@ -238,7 +238,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a return new SerializableChunkData( level.registryAccess().lookupOrThrow(Registries.BIOME), pos, -@@ -574,6 +599,7 @@ public record SerializableChunkData( +@@ -576,6 +601,7 @@ public record SerializableChunkData( list1, compoundTag , persistentDataContainer // CraftBukkit - persistentDataContainer @@ -246,7 +246,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a ); } } -@@ -658,6 +684,21 @@ public record SerializableChunkData( +@@ -660,6 +686,21 @@ public record SerializableChunkData( compoundTag.put("ChunkBukkitValues", this.persistentDataContainer); } // CraftBukkit end @@ -268,7 +268,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..ccec1b847ba1a3667206cbeac4ed541a // Paper start - starlight if (this.lightCorrect && !this.chunkStatus.isBefore(net.minecraft.world.level.chunk.status.ChunkStatus.LIGHT)) { // clobber vanilla value to force vanilla to relight -@@ -865,4 +906,50 @@ public record SerializableChunkData( +@@ -875,4 +916,50 @@ public record SerializableChunkData( } // Paper end - starlight - convert from record } diff --git a/leaf-server/minecraft-patches/features/0223-Improve-BlockEntity-ticking-isRemoved-check.patch b/leaf-server/minecraft-patches/features/0221-Improve-BlockEntity-ticking-isRemoved-check.patch similarity index 91% rename from leaf-server/minecraft-patches/features/0223-Improve-BlockEntity-ticking-isRemoved-check.patch rename to leaf-server/minecraft-patches/features/0221-Improve-BlockEntity-ticking-isRemoved-check.patch index dab2825c..dc43aefe 100644 --- a/leaf-server/minecraft-patches/features/0223-Improve-BlockEntity-ticking-isRemoved-check.patch +++ b/leaf-server/minecraft-patches/features/0221-Improve-BlockEntity-ticking-isRemoved-check.patch @@ -10,10 +10,10 @@ Leaf (After): ~628ms (-96%) This should help for massive hopper chains or hopper matrix. diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 8d8d909c4b9496ae6f44ba34203ee40433d37f8c..e82e55ec400c5e338502ed7ce433372a88d4acff 100644 +index 7538f9c84e8463502f4fa1b4a84a4ac84a11e87d..514a918fff9bf60293fbfa6def4a2f9fead30825 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1016,15 +1016,29 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1023,15 +1023,29 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p static class RebindableTickingBlockEntityWrapper implements TickingBlockEntity { private TickingBlockEntity ticker; private BlockPos cachedPos; // Leaf - Cache tile entity position @@ -43,7 +43,7 @@ index 8d8d909c4b9496ae6f44ba34203ee40433d37f8c..e82e55ec400c5e338502ed7ce433372a } @Override -@@ -1034,6 +1048,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -1041,6 +1055,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Override public boolean isRemoved() { diff --git a/leaf-server/minecraft-patches/features/0224-Raytrace-AntiXray-SDK-integration.patch b/leaf-server/minecraft-patches/features/0222-Raytrace-AntiXray-SDK-integration.patch similarity index 90% rename from leaf-server/minecraft-patches/features/0224-Raytrace-AntiXray-SDK-integration.patch rename to leaf-server/minecraft-patches/features/0222-Raytrace-AntiXray-SDK-integration.patch index c4648270..bdd1e616 100644 --- a/leaf-server/minecraft-patches/features/0224-Raytrace-AntiXray-SDK-integration.patch +++ b/leaf-server/minecraft-patches/features/0222-Raytrace-AntiXray-SDK-integration.patch @@ -8,7 +8,7 @@ Integrated with Imanity Software's Raytrace AntiXray for better performance Original project: https://github.com/Imanity-Software/raytrace-antixray-spigot-sdk diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java -index 3a596650feb96123c5684bb5065e20c5b005c0b9..f7a05fd098ef7b303254cd410414d50d68225395 100644 +index c4a4f08272b34f72dea4feaaeb66d153b2aab8c8..be5da5a81246b4f4abe19f7c0cf68990d6bdf5bd 100644 --- a/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/net/minecraft/server/level/ServerPlayerGameMode.java @@ -296,6 +296,12 @@ public class ServerPlayerGameMode { @@ -25,10 +25,10 @@ index 3a596650feb96123c5684bb5065e20c5b005c0b9..f7a05fd098ef7b303254cd410414d50d } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 6278fe737a555f47625098828a03952cf9b859a7..4158bbe0740fe2971a9e857cb4cad08ee465576a 100644 +index a2abfc5db556bc9a80098a675545f67907a8886b..523b068b99236845e2b87361f72494582e6dd894 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -1177,6 +1177,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1178,6 +1178,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl snapshot.setFlags(flags); // Paper - always set the flag of the most recent call to mitigate issues with multiple update at the same pos with different flags } BlockState blockState = chunkAt.setBlockState(pos, state, flags); diff --git a/leaf-server/minecraft-patches/features/0225-Optimize-addOrUpdateTransientModifier.patch b/leaf-server/minecraft-patches/features/0223-Optimize-addOrUpdateTransientModifier.patch similarity index 89% rename from leaf-server/minecraft-patches/features/0225-Optimize-addOrUpdateTransientModifier.patch rename to leaf-server/minecraft-patches/features/0223-Optimize-addOrUpdateTransientModifier.patch index c96f2425..8826d718 100644 --- a/leaf-server/minecraft-patches/features/0225-Optimize-addOrUpdateTransientModifier.patch +++ b/leaf-server/minecraft-patches/features/0223-Optimize-addOrUpdateTransientModifier.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize addOrUpdateTransientModifier diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -index 9f09d78a7dac12c7f1b06029d32ad93fae0c2aec..2af5cd6f2b9541cb28075fda014350235a4f72c7 100644 +index 7f8eb388308806008805970d4d8ed329440380ee..7f1b670eab23c02fb0f27cfa5ca0d0113794c8eb 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -@@ -109,8 +109,13 @@ public class AttributeInstance { +@@ -105,8 +105,13 @@ public class AttributeInstance { } public void addOrUpdateTransientModifier(AttributeModifier modifier) { diff --git a/leaf-server/minecraft-patches/features/0226-Optimize-ContextMap.create.patch b/leaf-server/minecraft-patches/features/0224-Optimize-ContextMap.create.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0226-Optimize-ContextMap.create.patch rename to leaf-server/minecraft-patches/features/0224-Optimize-ContextMap.create.patch diff --git a/leaf-server/minecraft-patches/features/0227-Micro-optimizations-for-random-tick.patch b/leaf-server/minecraft-patches/features/0225-Micro-optimizations-for-random-tick.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0227-Micro-optimizations-for-random-tick.patch rename to leaf-server/minecraft-patches/features/0225-Micro-optimizations-for-random-tick.patch index 742d9423..fc044571 100644 --- a/leaf-server/minecraft-patches/features/0227-Micro-optimizations-for-random-tick.patch +++ b/leaf-server/minecraft-patches/features/0225-Micro-optimizations-for-random-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Micro optimizations for random tick diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index a311f81b7f34f2c988ebcd792ca87dfd7b175f96..4948557d2faef1dff664cd18df7af4564a0431ff 100644 +index d3b711d4aa5c54c05310a2089a8c371fc2c2acdf..478e8fa7955b3a084a7b519c0b4cddb399f72758 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1044,7 +1044,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1048,7 +1048,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Paper start - optimise random ticking private void optimiseRandomTick(final LevelChunk chunk, final int tickSpeed) { final LevelChunkSection[] sections = chunk.getSections(); @@ -17,7 +17,7 @@ index a311f81b7f34f2c988ebcd792ca87dfd7b175f96..4948557d2faef1dff664cd18df7af456 final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Leaf - Faster random generator - upcasting final boolean doubleTickFluids = !ca.spottedleaf.moonrise.common.PlatformHooks.get().configFixMC224294(); -@@ -1053,41 +1053,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1057,41 +1057,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe final int offsetZ = cpos.z << 4; for (int sectionIndex = 0, sectionsLen = sections.length; sectionIndex < sectionsLen; sectionIndex++) { diff --git a/leaf-server/minecraft-patches/features/0228-Remove-streams-on-updateConnectedPlayersWithinRange.patch b/leaf-server/minecraft-patches/features/0226-Remove-streams-on-updateConnectedPlayersWithinRange.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0228-Remove-streams-on-updateConnectedPlayersWithinRange.patch rename to leaf-server/minecraft-patches/features/0226-Remove-streams-on-updateConnectedPlayersWithinRange.patch diff --git a/leaf-server/minecraft-patches/features/0229-Remove-streams-on-PlayerDetector.patch b/leaf-server/minecraft-patches/features/0227-Remove-streams-on-PlayerDetector.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0229-Remove-streams-on-PlayerDetector.patch rename to leaf-server/minecraft-patches/features/0227-Remove-streams-on-PlayerDetector.patch diff --git a/leaf-server/minecraft-patches/features/0230-Use-direct-iteration-on-Sensing.tick.patch b/leaf-server/minecraft-patches/features/0228-Use-direct-iteration-on-Sensing.tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0230-Use-direct-iteration-on-Sensing.tick.patch rename to leaf-server/minecraft-patches/features/0228-Use-direct-iteration-on-Sensing.tick.patch diff --git a/leaf-server/minecraft-patches/features/0231-Optimise-non-flush-packet-sending.patch b/leaf-server/minecraft-patches/features/0229-Optimise-non-flush-packet-sending.patch similarity index 83% rename from leaf-server/minecraft-patches/features/0231-Optimise-non-flush-packet-sending.patch rename to leaf-server/minecraft-patches/features/0229-Optimise-non-flush-packet-sending.patch index 137d91b4..aebd9f16 100644 --- a/leaf-server/minecraft-patches/features/0231-Optimise-non-flush-packet-sending.patch +++ b/leaf-server/minecraft-patches/features/0229-Optimise-non-flush-packet-sending.patch @@ -26,7 +26,7 @@ Locally this patch drops the entity tracker tick by a full 1.5x. Co-authored-by: Quang Tran <3d7777456@gmail.com> diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java -index 00a82873d226f113278632a53c0faca420dd67d4..f3e9de8716f5e1a72ec465ee897c8f0413f7b1c3 100644 +index 1014ab2aeb5e496124c99c938538e88d75561cd5..2fda4bf1aeecba183ba6301f83f582ae34f5a3da 100644 --- a/net/minecraft/network/Connection.java +++ b/net/minecraft/network/Connection.java @@ -147,6 +147,7 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -45,15 +45,15 @@ index 00a82873d226f113278632a53c0faca420dd67d4..f3e9de8716f5e1a72ec465ee897c8f04 this.address = this.channel.remoteAddress(); this.preparing = false; // Spigot if (this.delayedDisconnect != null) { -@@ -476,6 +478,11 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -472,6 +474,11 @@ public class Connection extends SimpleChannelInboundHandler> { if (this.channel.eventLoop().inEventLoop()) { - this.doSendPacket(packet, sendListener, flush); + this.doSendPacket(packet, channelFutureListener, flag); } else { + // Paper start - optimise packets that are not flushed -+ if (!flush && org.dreeam.leaf.config.modules.network.OptimizeNonFlushPacketSending.enabled) { -+ this.eventLoop.lazyExecute(() -> this.doSendPacket(packet, sendListener, flush)); ++ if (!flag && org.dreeam.leaf.config.modules.network.OptimizeNonFlushPacketSending.enabled) { ++ this.eventLoop.lazyExecute(() -> this.doSendPacket(packet, channelFutureListener, flag)); + } else -+ // Paper end - optimise packets that are not flushed - this.channel.eventLoop().execute(() -> this.doSendPacket(packet, sendListener, flush)); ++ // Paper end - optimise packets that are not flushed + this.channel.eventLoop().execute(() -> this.doSendPacket(packet, channelFutureListener, flag)); } } diff --git a/leaf-server/minecraft-patches/features/0232-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch b/leaf-server/minecraft-patches/features/0230-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch similarity index 91% rename from leaf-server/minecraft-patches/features/0232-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch rename to leaf-server/minecraft-patches/features/0230-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch index 3166646e..455bea9b 100644 --- a/leaf-server/minecraft-patches/features/0232-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch +++ b/leaf-server/minecraft-patches/features/0230-Prevent-double-chunk-retrieving-in-entity-fluid-push.patch @@ -11,10 +11,10 @@ As part of: Airplane (https://github.com/TECHNOVE/Airplane) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 757ac420fb46042e707d05c343d8fa71e086c634..8618a9221bb4feb459ed50c20c9dc5edb6308aec 100644 +index 8e4b092fb5f93cee60fc08ba08db143f2e5ab383..9a13cf8460472b8d3968cd8269a2b63d0b49f1a9 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4610,10 +4610,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4813,10 +4813,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { @@ -26,7 +26,7 @@ index 757ac420fb46042e707d05c343d8fa71e086c634..8618a9221bb4feb459ed50c20c9dc5ed final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3); final Level world = this.level; -@@ -4649,7 +4646,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4852,7 +4849,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) { for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) { diff --git a/leaf-server/minecraft-patches/features/0233-Null-handling-on-MultifaceSpreader.patch b/leaf-server/minecraft-patches/features/0231-Null-handling-on-MultifaceSpreader.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0233-Null-handling-on-MultifaceSpreader.patch rename to leaf-server/minecraft-patches/features/0231-Null-handling-on-MultifaceSpreader.patch diff --git a/leaf-server/minecraft-patches/features/0234-More-virtual-threads.patch b/leaf-server/minecraft-patches/features/0232-More-virtual-threads.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0234-More-virtual-threads.patch rename to leaf-server/minecraft-patches/features/0232-More-virtual-threads.patch index 1c54f63f..e2c47abf 100644 --- a/leaf-server/minecraft-patches/features/0234-More-virtual-threads.patch +++ b/leaf-server/minecraft-patches/features/0232-More-virtual-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More virtual threads diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java -index 9918572306e983281d05c6d28c8a5d843348ad2d..2491ca5bcabcf8ae99ef990eed4e1fd94f799991 100644 +index 82ee6c27ebc2718ad88b640775d949ec6d7cfed2..1f4208388a923f9a1667dc13d937955ac233d88e 100644 --- a/net/minecraft/Util.java +++ b/net/minecraft/Util.java @@ -98,7 +98,8 @@ public class Util { diff --git a/leaf-server/minecraft-patches/features/0235-Async-target-finding.patch b/leaf-server/minecraft-patches/features/0233-Async-target-finding.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0235-Async-target-finding.patch rename to leaf-server/minecraft-patches/features/0233-Async-target-finding.patch index fa2ed4f9..c66b91d7 100644 --- a/leaf-server/minecraft-patches/features/0235-Async-target-finding.patch +++ b/leaf-server/minecraft-patches/features/0233-Async-target-finding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Async target finding diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -index 7b686d834e4eb36be5758b0e0a846a70d1e2294b..956d48fb7146b9eb2a5b5b4e23a83f60d0e40b4c 100644 +index fee4a7452178c274eb835d758b718d8e874d79d0..9a2539e1fe2cee30066634ef47a991fa5837a5e4 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -@@ -40,8 +40,10 @@ public final class ChunkEntitySlices { +@@ -49,8 +49,10 @@ public final class ChunkEntitySlices { private final EntityCollectionBySection allEntities; private final EntityCollectionBySection hardCollidingEntities; @@ -21,7 +21,7 @@ index 7b686d834e4eb36be5758b0e0a846a70d1e2294b..956d48fb7146b9eb2a5b5b4e23a83f60 private final EntityList entities = new EntityList(); public FullChunkStatus status; -@@ -67,9 +69,15 @@ public final class ChunkEntitySlices { +@@ -76,9 +78,15 @@ public final class ChunkEntitySlices { this.allEntities = new EntityCollectionBySection(this); this.hardCollidingEntities = new EntityCollectionBySection(this); @@ -40,7 +40,7 @@ index 7b686d834e4eb36be5758b0e0a846a70d1e2294b..956d48fb7146b9eb2a5b5b4e23a83f60 this.status = status; this.chunkData = chunkData; } -@@ -248,14 +256,26 @@ public final class ChunkEntitySlices { +@@ -270,14 +278,26 @@ public final class ChunkEntitySlices { this.hardCollidingEntities.addEntity(entity, sectionIndex); } @@ -72,7 +72,7 @@ index 7b686d834e4eb36be5758b0e0a846a70d1e2294b..956d48fb7146b9eb2a5b5b4e23a83f60 EntityCollectionBySection byType = this.entitiesByType.get(entity.getType()); if (byType != null) { -@@ -282,14 +302,27 @@ public final class ChunkEntitySlices { +@@ -304,14 +324,27 @@ public final class ChunkEntitySlices { this.hardCollidingEntities.removeEntity(entity, sectionIndex); } @@ -106,19 +106,19 @@ index 7b686d834e4eb36be5758b0e0a846a70d1e2294b..956d48fb7146b9eb2a5b5b4e23a83f60 final EntityCollectionBySection byType = this.entitiesByType.get(entity.getType()); byType.removeEntity(entity, sectionIndex); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 9933a60db91d68f76df33ccddea0852fd59b8983..14c4dfb497ab050adfffebb8d75e6fe89c38effc 100644 +index 2b28518b6ec9d260a80abc7e0e5e867a5fed9e7c..42dbd6d9e82130cfc5ae4669c460373631061451 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -291,6 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run (concurrent because plugins may schedule tasks async) public java.util.concurrent.Semaphore serverLevelTickingSemaphore = null; // SparklyPaper - parallel world ticking + @Nullable public org.dreeam.leaf.async.ai.AsyncGoalThread asyncGoalThread; // Leaf - Async target finding public static S spin(Function threadFunction) { - AtomicReference atomicReference = new AtomicReference<>(); + ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 72e871b8c7fee9b5cbd567e03baee80ee4b9c82e..574765713c194a6cf3eb7c125e78ed77c82aba2e 100644 +index 9b8d119116b0c3a51d3fe2ff7efb33cc39627cc4..436e73086678e4afbf94f1b7bca9b0c74266f762 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -204,6 +204,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -134,10 +134,10 @@ index 72e871b8c7fee9b5cbd567e03baee80ee4b9c82e..574765713c194a6cf3eb7c125e78ed77 // Gale start - Pufferfish - SIMD support diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 4948557d2faef1dff664cd18df7af4564a0431ff..224a032e8992f104ad9380182ed67c316c93274e 100644 +index 478e8fa7955b3a084a7b519c0b4cddb399f72758..fc61a7083232148397a0b330ce2a4d70ba38543d 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -173,7 +173,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -175,7 +175,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private static final Logger LOGGER = LogUtils.getLogger(); private static final int EMPTY_TIME_NO_TICK = 300; private static final int MAX_SCHEDULED_TICKS_PER_TICK = 65536; @@ -155,7 +155,7 @@ index 4948557d2faef1dff664cd18df7af4564a0431ff..224a032e8992f104ad9380182ed67c31 public final ServerChunkCache chunkSource; private final MinecraftServer server; public final net.minecraft.world.level.storage.PrimaryLevelData serverLevelData; // CraftBukkit - type -@@ -216,6 +225,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -219,6 +228,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current) public boolean hasRidableMoveEvent = false; // Purpur - Ridables final List realPlayers; // Leaves - skip @@ -163,7 +163,7 @@ index 4948557d2faef1dff664cd18df7af4564a0431ff..224a032e8992f104ad9380182ed67c31 @Override public @Nullable LevelChunk getChunkIfLoaded(int x, int z) { -@@ -703,6 +713,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -707,6 +717,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle this.realPlayers = Lists.newArrayList(); // Leaves - skip this.tickExecutor = java.util.concurrent.Executors.newSingleThreadExecutor(new org.dreeam.leaf.async.world.SparklyPaperServerLevelTickExecutorThreadFactory(getWorld().getName())); // SparklyPaper - parallel world ticking @@ -178,11 +178,11 @@ index 4948557d2faef1dff664cd18df7af4564a0431ff..224a032e8992f104ad9380182ed67c31 // Leaf start - SparklyPaper - parallel world ticking - Shutdown handling for async reads diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 81bd431e641be474f7a43a78df083756de1798de..5b56a0b81c822ff1c96e31992f305403fab7fc35 100644 +index 4a1a336914eff8a178dcd992bd1bfea25a8be76b..7e3b35df01b63735fd4d5202788477a1342708a5 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -135,6 +135,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab - private float restrictRadius = -1.0F; +@@ -138,6 +138,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + private int homeRadius = -1; public boolean aware = true; // CraftBukkit public int ticksSinceLastInteraction; // Purpur - Entity lifespan + // Leaf start - Async target finding @@ -194,7 +194,7 @@ index 81bd431e641be474f7a43a78df083756de1798de..5b56a0b81c822ff1c96e31992f305403 protected Mob(EntityType entityType, Level level) { super(entityType, level); -@@ -219,6 +225,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -222,6 +228,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab if (this.targetSelector.inactiveTick(this.activatedPriority, true)) { // Pufferfish - pass activated priority this.targetSelector.tick(); } @@ -206,7 +206,7 @@ index 81bd431e641be474f7a43a78df083756de1798de..5b56a0b81c822ff1c96e31992f305403 } // Paper end -@@ -776,6 +787,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -793,6 +804,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab if (this.goalSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking this.goalSelector.tick(); } @@ -581,10 +581,10 @@ index 3093f03d4f298bf39fec8bad2b6c22518774aea8..4eec8eda6ea1698529e0392bc75c07be } else { this.parent = animal; diff --git a/net/minecraft/world/entity/ai/goal/GoalSelector.java b/net/minecraft/world/entity/ai/goal/GoalSelector.java -index e82e32407cec6109b9c3b0106295217f4a3f4aa2..127609e53f566413f93b983719604858802d8a6d 100644 +index 55f1c138039b80894f655d180192f5cb95e32778..1afc0a13ff7f64e453b272c1d94b7e4c80cc22dd 100644 --- a/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -26,13 +26,23 @@ public class GoalSelector { +@@ -25,12 +25,22 @@ public class GoalSelector { private final ca.spottedleaf.moonrise.common.set.OptimizedSmallEnumSet goalTypes = new ca.spottedleaf.moonrise.common.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from GoalSelector private int curRate; // Paper - EAR 2 @@ -601,14 +601,13 @@ index e82e32407cec6109b9c3b0106295217f4a3f4aa2..127609e53f566413f93b983719604858 + availableGoalsDirty = true; // Leaf - Async target finding } - @VisibleForTesting public void removeAllGoals(Predicate filter) { this.availableGoals.removeIf(wrappedGoal -> filter.test(wrappedGoal.getGoal())); + availableGoalsDirty = true; // Leaf - Async target finding } // Paper start - EAR 2 -@@ -63,18 +73,19 @@ public class GoalSelector { +@@ -61,18 +71,19 @@ public class GoalSelector { } this.availableGoals.removeIf(wrappedGoal1 -> wrappedGoal1.getGoal() == goal); @@ -630,7 +629,7 @@ index e82e32407cec6109b9c3b0106295217f4a3f4aa2..127609e53f566413f93b983719604858 flagIterator ^= ca.spottedleaf.concurrentutil.util.IntegerUtil.getTrailingBit(flagIterator); // Paper end - Perf: optimize goal types if (!flag.getOrDefault(flag1, NO_GOAL).canBeReplacedBy(goal)) { -@@ -85,7 +96,136 @@ public class GoalSelector { +@@ -83,7 +94,136 @@ public class GoalSelector { return true; } @@ -767,7 +766,7 @@ index e82e32407cec6109b9c3b0106295217f4a3f4aa2..127609e53f566413f93b983719604858 for (WrappedGoal wrappedGoal : this.availableGoals) { if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams wrappedGoal.stop(); -@@ -116,6 +256,24 @@ public class GoalSelector { +@@ -114,6 +254,24 @@ public class GoalSelector { } public void tickRunningGoals(boolean tickAllRunning) { @@ -1003,7 +1002,7 @@ index 6463c3c9b08d6058f2843c225b08a40fc30a960b..126bd98bc5980a2f1177bd7c74918b86 @Override public boolean canContinueToUse() { diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index 3f080b15543bf8c5fa0774b62d7f12e13b82511a..89851bac25a4a1d3c499ba379bdadd357e079ea8 100644 +index f15da598cb1d7872fafb8b173e5134b9667c9a9f..d84b7b797e526670ddbabecc3ff773e589489f7e 100644 --- a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -41,14 +41,73 @@ public abstract class MoveToBlockGoal extends Goal { @@ -1014,7 +1013,7 @@ index 3f080b15543bf8c5fa0774b62d7f12e13b82511a..89851bac25a4a1d3c499ba379bdadd35 + protected boolean poll() { + if (!(this.mob.getGoalCtx().result() instanceof BlockPos blockPos1)) return false; + if (!this.mob.level().hasChunkAt(blockPos1) -+ || !this.mob.isWithinRestriction(blockPos1) ++ || !this.mob.isWithinHome(blockPos1) + || !this.isValidTarget(this.mob.level(), blockPos1)) { + return false; + } @@ -1044,9 +1043,9 @@ index 3f080b15543bf8c5fa0774b62d7f12e13b82511a..89851bac25a4a1d3c499ba379bdadd35 + final int searchRange = this.searchRange; + final int verticalSearchRange = this.verticalSearchRange; + final BlockPos blockPos = mob.blockPosition(); -+ final float restrictRadius = mob.getRestrictRadius(); -+ final BlockPos restrictCenter = mob.getRestrictCenter(); -+ ctx.wake = () -> findNearestBlockAsync(ty, toRemove, mob, serverLevel, verticalSearchStart, searchRange, verticalSearchRange, blockPos, restrictRadius, restrictCenter); ++ final float homeRadius = mob.getHomeRadius(); ++ final BlockPos homePos = mob.getHomePosition(); ++ ctx.wake = () -> findNearestBlockAsync(ty, toRemove, mob, serverLevel, verticalSearchStart, searchRange, verticalSearchRange, blockPos, homeRadius, homePos); + return false; + } + @@ -1095,8 +1094,8 @@ index 3f080b15543bf8c5fa0774b62d7f12e13b82511a..89851bac25a4a1d3c499ba379bdadd35 + final int searchRange, + final int verticalSearchRange, + final BlockPos blockPos, -+ final float restrictRadius, -+ final BlockPos restrictCenter ++ final float homeRadius, ++ final BlockPos homePos + ) { + BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); + for (int i2 = verticalSearchStart; i2 <= verticalSearchRange; i2 = i2 > 0 ? -i2 : 1 - i2) { @@ -1105,7 +1104,7 @@ index 3f080b15543bf8c5fa0774b62d7f12e13b82511a..89851bac25a4a1d3c499ba379bdadd35 + for (int i5 = i4 < i3 && i4 > -i3 ? i3 : 0; i5 <= i3; i5 = i5 > 0 ? -i5 : 1 - i5) { + mutableBlockPos.setWithOffset(blockPos, i4, i2 - 1, i5); + if (!serverLevel.hasChunkAt(mutableBlockPos)) continue; -+ if (isWithinRestriction(restrictRadius, restrictCenter, mutableBlockPos) ++ if (isWithinHome(homeRadius, homePos, mutableBlockPos) + && isValidTargetAsync(ty, toRemove, mob, serverLevel, mutableBlockPos)) { + return mutableBlockPos.immutable(); + } @@ -1116,8 +1115,8 @@ index 3f080b15543bf8c5fa0774b62d7f12e13b82511a..89851bac25a4a1d3c499ba379bdadd35 + return null; + } + -+ private static boolean isWithinRestriction(float restrictRadius, BlockPos restrictCenter, BlockPos pos) { -+ return restrictRadius == -1.0F || restrictCenter.distSqr(pos) < restrictRadius * restrictRadius; ++ private static boolean isWithinHome(float homeRadius, BlockPos homePos, BlockPos pos) { ++ return homeRadius == -1.0F || homePos.distSqr(pos) < homeRadius * homeRadius; + } + // Leaf end - Async target finding + @@ -1295,10 +1294,10 @@ index 16ec032d84f128fc44a836843fafef303f52b699..e3bb4c5850e25405a243aaf57e2e8b1c + // Leaf end - Async target finding } diff --git a/net/minecraft/world/entity/ai/goal/TemptGoal.java b/net/minecraft/world/entity/ai/goal/TemptGoal.java -index f88f618d34fb343b31de3af1a875d6633703df71..4725e5da804e6a796611c8203d08bc171ef1c344 100644 +index a805c9426630c2c46db9d0dd536f1d16769395d3..66445cf3aa824a1294959eb3ae41a1807bb18f42 100644 --- a/net/minecraft/world/entity/ai/goal/TemptGoal.java +++ b/net/minecraft/world/entity/ai/goal/TemptGoal.java -@@ -36,14 +36,43 @@ public class TemptGoal extends Goal { +@@ -49,14 +49,43 @@ public class TemptGoal extends Goal { this.targetingConditions = TEMPT_TARGETING.copy().selector((entity, level) -> this.shouldFollow(entity)); } @@ -1723,10 +1722,10 @@ index 002d3c0d8b1107a275020d5c582c37e9a5c536ee..6fa0b8defbd1d06b3bf5d9b32ffd08f3 // Gale start - Petal - reduce line of sight cache lookups - merge sets int cached = this.seen.get(id); diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java -index ff20a6e9745c7724dfae41d5868912c8cc19eb8e..3cc611051b67672d139652bd004e7b4c1ef40cc6 100644 +index 8964bb5098c0dc36741af3656af6bc0b5b463abe..a22ccaab0f4d6e3a69080b56f8042010403378cf 100644 --- a/net/minecraft/world/entity/animal/Fox.java +++ b/net/minecraft/world/entity/animal/Fox.java -@@ -870,6 +870,11 @@ public class Fox extends Animal { +@@ -867,6 +867,11 @@ public class Fox extends Animal { return false; } else { ServerLevel serverLevel = getServerLevel(Fox.this.level()); @@ -1738,7 +1737,7 @@ index ff20a6e9745c7724dfae41d5868912c8cc19eb8e..3cc611051b67672d139652bd004e7b4c for (EntityReference entityReference : Fox.this.getTrustedEntities().toList()) { LivingEntity livingEntity = entityReference.getEntity(serverLevel, LivingEntity.class); -@@ -877,7 +882,7 @@ public class Fox extends Animal { +@@ -874,7 +879,7 @@ public class Fox extends Animal { this.trustedLastHurt = livingEntity; this.trustedLastHurtBy = livingEntity.getLastHurtByMob(); int lastHurtByMobTimestamp = livingEntity.getLastHurtByMobTimestamp(); @@ -1747,7 +1746,7 @@ index ff20a6e9745c7724dfae41d5868912c8cc19eb8e..3cc611051b67672d139652bd004e7b4c } } -@@ -1056,7 +1061,7 @@ public class Fox extends Animal { +@@ -1053,7 +1058,7 @@ public class Fox extends Animal { @Override protected boolean isValidTarget(LevelReader level, BlockPos pos) { BlockState blockState = level.getBlockState(pos); @@ -1756,7 +1755,7 @@ index ff20a6e9745c7724dfae41d5868912c8cc19eb8e..3cc611051b67672d139652bd004e7b4c } @Override -@@ -1120,6 +1125,13 @@ public class Fox extends Animal { +@@ -1117,6 +1122,13 @@ public class Fox extends Animal { Fox.this.setSitting(false); super.start(); } @@ -1771,10 +1770,10 @@ index ff20a6e9745c7724dfae41d5868912c8cc19eb8e..3cc611051b67672d139652bd004e7b4c class FoxFloatGoal extends FloatGoal { diff --git a/net/minecraft/world/entity/animal/Panda.java b/net/minecraft/world/entity/animal/Panda.java -index 99d99d59ec0eb13dc40bc88bd70ad884bb9e2859..ab1377cd82186389743107dad7117b7e24dd2d6b 100644 +index 02bfa88568e635770675ea9173f2cf3ca21457fa..8b37cbae45916227b99c7dae4da5f0c0e3144619 100644 --- a/net/minecraft/world/entity/animal/Panda.java +++ b/net/minecraft/world/entity/animal/Panda.java -@@ -988,9 +988,18 @@ public class Panda extends Animal { +@@ -989,9 +989,18 @@ public class Panda extends Animal { @Override public boolean canUse() { @@ -1794,10 +1793,10 @@ index 99d99d59ec0eb13dc40bc88bd70ad884bb9e2859..ab1377cd82186389743107dad7117b7e ServerLevel serverLevel = getServerLevel(this.mob); if (this.lookAtType == Player.class) { diff --git a/net/minecraft/world/entity/animal/Rabbit.java b/net/minecraft/world/entity/animal/Rabbit.java -index fd8026cf1d884e95e8260ad52d4e0bbad20b0fdf..0286ea5ca5dec0f54a3d45d729beff427ac48e71 100644 +index 1af1b33702296f9aa74c33436ea2904c5e5ae43d..da19a60713ef159b86f98e1e718a1776493cdec6 100644 --- a/net/minecraft/world/entity/animal/Rabbit.java +++ b/net/minecraft/world/entity/animal/Rabbit.java -@@ -669,7 +669,13 @@ public class Rabbit extends Animal { +@@ -670,7 +670,13 @@ public class Rabbit extends Animal { this.wantsToRaid = this.rabbit.wantsMoreFood(); } @@ -1812,7 +1811,7 @@ index fd8026cf1d884e95e8260ad52d4e0bbad20b0fdf..0286ea5ca5dec0f54a3d45d729beff42 } @Override -@@ -712,7 +718,7 @@ public class Rabbit extends Animal { +@@ -713,7 +719,7 @@ public class Rabbit extends Animal { @Override protected boolean isValidTarget(LevelReader level, BlockPos pos) { BlockState blockState = level.getBlockState(pos); @@ -1821,7 +1820,7 @@ index fd8026cf1d884e95e8260ad52d4e0bbad20b0fdf..0286ea5ca5dec0f54a3d45d729beff42 blockState = level.getBlockState(pos.above()); if (blockState.getBlock() instanceof CarrotBlock && ((CarrotBlock)blockState.getBlock()).isMaxAge(blockState)) { this.canRaid = true; -@@ -722,6 +728,13 @@ public class Rabbit extends Animal { +@@ -723,6 +729,13 @@ public class Rabbit extends Animal { return false; } @@ -1836,10 +1835,10 @@ index fd8026cf1d884e95e8260ad52d4e0bbad20b0fdf..0286ea5ca5dec0f54a3d45d729beff42 public static enum Variant implements StringRepresentable { diff --git a/net/minecraft/world/entity/animal/Turtle.java b/net/minecraft/world/entity/animal/Turtle.java -index c84f63f064a7769761f75cdedaceacde858b9b4e..376e58e9997c6700f6a6b74325ae31396ff21be6 100644 +index 9bdc1f10e3b40672449ad166f130ecabdacc75d3..98131b65eaaa5e20b8f4e8d022141140b70521ca 100644 --- a/net/minecraft/world/entity/animal/Turtle.java +++ b/net/minecraft/world/entity/animal/Turtle.java -@@ -482,8 +482,15 @@ public class Turtle extends Animal { +@@ -483,8 +483,15 @@ public class Turtle extends Animal { @Override protected boolean isValidTarget(LevelReader level, BlockPos pos) { @@ -1856,7 +1855,7 @@ index c84f63f064a7769761f75cdedaceacde858b9b4e..376e58e9997c6700f6a6b74325ae3139 } static class TurtleLayEggGoal extends MoveToBlockGoal { -@@ -537,8 +544,15 @@ public class Turtle extends Animal { +@@ -538,8 +545,15 @@ public class Turtle extends Animal { @Override protected boolean isValidTarget(LevelReader level, BlockPos pos) { @@ -1874,10 +1873,10 @@ index c84f63f064a7769761f75cdedaceacde858b9b4e..376e58e9997c6700f6a6b74325ae3139 static class TurtleMoveControl extends org.purpurmc.purpur.controller.MoveControllerWASD { // Purpur - Ridables diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java -index 936ee9e80239ad965be75ceeb38d5248243e9c4e..1a8cc61a67f92429ac49dc581b1c7f8e83389344 100644 +index 7e7cb9db1c84bdb173b444bec90663a93fb3b549..96016902084a94a98c850579ec7714264a23b781 100644 --- a/net/minecraft/world/entity/animal/wolf/Wolf.java +++ b/net/minecraft/world/entity/animal/wolf/Wolf.java -@@ -723,7 +723,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { +@@ -710,7 +710,7 @@ public class Wolf extends TamableAnimal implements NeutralMob { @Override public boolean isFood(ItemStack stack) { @@ -1887,10 +1886,10 @@ index 936ee9e80239ad965be75ceeb38d5248243e9c4e..1a8cc61a67f92429ac49dc581b1c7f8e @Override diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index 2e04078664cd723e3e0c80565e4b6e6416b13901..12dce38c2377c1cea4cb33ac9f1fa2f204b6e12b 100644 +index 7ff380212ce5e56e0e58e5f52f8c75bda5061ef0..c21519490433dfb2da3435afe757df01747c98e5 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -397,7 +397,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -392,7 +392,7 @@ public class Drowned extends Zombie implements RangedAttackMob { @Override protected boolean isValidTarget(LevelReader level, BlockPos pos) { BlockPos blockPos = pos.above(); @@ -1899,7 +1898,7 @@ index 2e04078664cd723e3e0c80565e4b6e6416b13901..12dce38c2377c1cea4cb33ac9f1fa2f2 } @Override -@@ -411,6 +411,13 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -405,6 +405,13 @@ public class Drowned extends Zombie implements RangedAttackMob { public void stop() { super.stop(); } @@ -1914,10 +1913,10 @@ index 2e04078664cd723e3e0c80565e4b6e6416b13901..12dce38c2377c1cea4cb33ac9f1fa2f2 static class DrownedGoToWaterGoal extends Goal { diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java -index 16886178079a096329d06f40d502012b6fa473e0..4299a1c4121e90118b26d19424d3075050cf4cb0 100644 +index 58887b2cc931892f96793edd7a7d1db22cb8686c..573986e139321cd8389440ac2a9a50f806b4ed8c 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -592,10 +592,34 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -588,10 +588,34 @@ public class EnderMan extends Monster implements NeutralMob { @Override public boolean canUse() { @@ -1974,10 +1973,10 @@ index e1717b5c854aa81fdd7b7e715d7c3498d9f86072..727effd31644432f9da04ee4e3aaa41c static class StriderPathNavigation extends GroundPathNavigation { diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 4158bbe0740fe2971a9e857cb4cad08ee465576a..48ea77151695eb6958bfd31bac99a9f1c050b240 100644 +index 523b068b99236845e2b87361f72494582e6dd894..9b4e6fdbedfa378ea436cdd5f1a36e2b3d94be17 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -1799,9 +1799,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1793,9 +1793,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @Override public List getEntities(@Nullable Entity entity, AABB boundingBox, Predicate predicate) { diff --git a/leaf-server/minecraft-patches/features/0236-Optimize-ThreadedTicketLevelPropagator.patch b/leaf-server/minecraft-patches/features/0234-Optimize-ThreadedTicketLevelPropagator.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0236-Optimize-ThreadedTicketLevelPropagator.patch rename to leaf-server/minecraft-patches/features/0234-Optimize-ThreadedTicketLevelPropagator.patch diff --git a/leaf-server/minecraft-patches/features/0237-Optimise-MobEffectUtil-getDigSpeedAmplification.patch b/leaf-server/minecraft-patches/features/0235-Optimise-MobEffectUtil-getDigSpeedAmplification.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0237-Optimise-MobEffectUtil-getDigSpeedAmplification.patch rename to leaf-server/minecraft-patches/features/0235-Optimise-MobEffectUtil-getDigSpeedAmplification.patch diff --git a/leaf-server/minecraft-patches/features/0238-Optimise-chunkUnloads.patch b/leaf-server/minecraft-patches/features/0236-Optimise-chunkUnloads.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0238-Optimise-chunkUnloads.patch rename to leaf-server/minecraft-patches/features/0236-Optimise-chunkUnloads.patch index 8534a264..04eb6097 100644 --- a/leaf-server/minecraft-patches/features/0238-Optimise-chunkUnloads.patch +++ b/leaf-server/minecraft-patches/features/0236-Optimise-chunkUnloads.patch @@ -159,7 +159,7 @@ index 4ca68a903e67606fc4ef0bfa9862a73797121c8b..bed3a64388bb43e47c2ba4e67f7dde5b public static final class SaveState { diff --git a/net/minecraft/world/level/chunk/LevelChunkSection.java b/net/minecraft/world/level/chunk/LevelChunkSection.java -index 1cc33a038060aaf5258ee4f1deb19b4a1be59a29..a14247b043715de50b253ab1f10a9244003f8797 100644 +index 4d06df242ab73411bdefc4770e131b27a6ea668a..fb936344ba363490f2255682678f08e219fdec3d 100644 --- a/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -24,6 +24,7 @@ public class LevelChunkSection implements ca.spottedleaf.moonrise.patches.block_ @@ -212,10 +212,10 @@ index 1cc33a038060aaf5258ee4f1deb19b4a1be59a29..a14247b043715de50b253ab1f10a9244 } } diff --git a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java -index ccec1b847ba1a3667206cbeac4ed541a9fb028ea..5c2d29e749fdd317f231489401601c82191552bf 100644 +index ab1fc7ca0639f9e71933f623258bb8d123988262..781f9470dc0115a464ce4711aecafb0f11a016b7 100644 --- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java +++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java -@@ -493,14 +493,16 @@ public record SerializableChunkData( +@@ -495,14 +495,16 @@ public record SerializableChunkData( throw new IllegalArgumentException("Chunk can't be serialized: " + chunk); } else { ChunkPos pos = chunk.getPos(); @@ -235,7 +235,7 @@ index ccec1b847ba1a3667206cbeac4ed541a9fb028ea..5c2d29e749fdd317f231489401601c82 final LevelChunkSection[] chunkSections = chunk.getSections(); final ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles = ((ca.spottedleaf.moonrise.patches.starlight.chunk.StarlightChunk)chunk).starlight$getBlockNibbles(); -@@ -518,10 +520,20 @@ public record SerializableChunkData( +@@ -520,10 +522,20 @@ public record SerializableChunkData( continue; } @@ -259,7 +259,7 @@ index ccec1b847ba1a3667206cbeac4ed541a9fb028ea..5c2d29e749fdd317f231489401601c82 ); if (blockNibble != null) { -@@ -532,12 +544,16 @@ public record SerializableChunkData( +@@ -534,12 +546,16 @@ public record SerializableChunkData( ((ca.spottedleaf.moonrise.patches.starlight.storage.StarlightSectionData)(Object)sectionData).starlight$setSkyLightState(skyNibble.state); } @@ -278,7 +278,7 @@ index ccec1b847ba1a3667206cbeac4ed541a9fb028ea..5c2d29e749fdd317f231489401601c82 for (BlockPos blockPos : chunk.getBlockEntitiesPos()) { CompoundTag blockEntityNbtForSaving = chunk.getBlockEntityNbtForSaving(blockPos, level.registryAccess()); if (blockEntityNbtForSaving != null) { -@@ -545,15 +561,27 @@ public record SerializableChunkData( +@@ -547,15 +563,27 @@ public record SerializableChunkData( } } @@ -308,7 +308,7 @@ index ccec1b847ba1a3667206cbeac4ed541a9fb028ea..5c2d29e749fdd317f231489401601c82 } Map map = new EnumMap<>(Heightmap.Types.class); -@@ -561,14 +589,26 @@ public record SerializableChunkData( +@@ -563,14 +591,26 @@ public record SerializableChunkData( for (Entry entry : chunk.getHeightmaps()) { if (chunk.getPersistedStatus().heightmapsAfter().contains(entry.getKey())) { long[] rawData = entry.getValue().getRawData(); diff --git a/leaf-server/minecraft-patches/features/0239-Optimize-BlockEntityType-isValid.patch b/leaf-server/minecraft-patches/features/0237-Optimize-BlockEntityType-isValid.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0239-Optimize-BlockEntityType-isValid.patch rename to leaf-server/minecraft-patches/features/0237-Optimize-BlockEntityType-isValid.patch diff --git a/leaf-server/minecraft-patches/features/0240-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch b/leaf-server/minecraft-patches/features/0238-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch similarity index 76% rename from leaf-server/minecraft-patches/features/0240-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch rename to leaf-server/minecraft-patches/features/0238-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch index 0bd1b382..af317f89 100644 --- a/leaf-server/minecraft-patches/features/0240-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch +++ b/leaf-server/minecraft-patches/features/0238-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch @@ -15,25 +15,25 @@ The delay is currently set to 2 seconds, however, we may want to adjust this bef fixes Paper#9581 diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -index 3a78e7512772fd3f7cf8f221e3a72474def14bea..ba52af914e9e231caa0ac50562e9a6925908c615 100644 +index 98054ab2be3fecc5f6a111a11cfe94f1a10419c1..d144a4db620dfdd0dcc803d05b37ad3c32732cf0 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java @@ -48,6 +48,7 @@ public final class RegionizedPlayerChunkLoader { public static final TicketType PLAYER_TICKET = ChunkSystemTicketType.create("chunk_system:player_ticket", Long::compareTo); - public static final TicketType PLAYER_TICKET_DELAYED = ChunkSystemTicketType.create("chunk_system:player_ticket_delayed", Long::compareTo, 5L * 20L); + public static final TicketType PLAYER_TICKET_DELAYED = ChunkSystemTicketType.create("chunk_system:player_ticket_delayed", Long::compareTo, 1L); + public static final TicketType PLAYER_JOIN = ChunkSystemTicketType.create("chunk_system:player_join", (a, b) -> 0, 5 * 20); // Paper - Add ticket on player join to avoid chunk load-unload-load cycle public static final int GENERATED_TICKET_LEVEL = ChunkHolderManager.FULL_LOADED_TICKET_LEVEL; public static final int LOADED_TICKET_LEVEL = ChunkTaskScheduler.getTicketLevel(ChunkStatus.EMPTY); diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 96202ffdb73cb9d8c63351b4538c64645b91d21c..65857e4799186b7166fb0023694dc2749a492546 100644 +index f1002643589f67adce26667b1750a1296c1fb67d..1a03bf5184b1b85d4cea97dc73795e8725bf2613 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -434,6 +434,13 @@ public abstract class PlayerList { - // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below - // Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks - player.supressTrackerForLogin = true; +@@ -435,6 +435,13 @@ public abstract class PlayerList { + // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below + // Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks + player.supressTrackerForLogin = true; + // Paper start - Add ticket on player join to avoid chunk load-unload-load cycle + serverLevel.moonrise$getChunkTaskScheduler().chunkHolderManager.addTicketAtLevel( + ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PLAYER_JOIN, @@ -41,6 +41,6 @@ index 96202ffdb73cb9d8c63351b4538c64645b91d21c..65857e4799186b7166fb0023694dc274 + ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.TICK_TICKET_LEVEL, + net.minecraft.util.Unit.INSTANCE); + // Paper end - Add ticket on player join to avoid chunk load-unload-load cycle - serverLevel.addNewPlayer(player); - this.server.getCustomBossEvents().onPlayerConnect(player); // see commented out section below serverLevel.addPlayerJoin(player); - // Paper end - Fire PlayerJoinEvent when Player is actually ready + serverLevel.addNewPlayer(player); + this.server.getCustomBossEvents().onPlayerConnect(player); // see commented out section below serverLevel.addPlayerJoin(player); + // Paper end - Fire PlayerJoinEvent when Player is actually ready diff --git a/leaf-server/minecraft-patches/features/0242-Sakura-copy-EntityList-implementation-to-BasicEntity.patch b/leaf-server/minecraft-patches/features/0239-Sakura-copy-EntityList-implementation-to-BasicEntity.patch similarity index 90% rename from leaf-server/minecraft-patches/features/0242-Sakura-copy-EntityList-implementation-to-BasicEntity.patch rename to leaf-server/minecraft-patches/features/0239-Sakura-copy-EntityList-implementation-to-BasicEntity.patch index c8647889..21faa1dd 100644 --- a/leaf-server/minecraft-patches/features/0242-Sakura-copy-EntityList-implementation-to-BasicEntity.patch +++ b/leaf-server/minecraft-patches/features/0239-Sakura-copy-EntityList-implementation-to-BasicEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Sakura: copy EntityList implementation to BasicEntityList diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -index 956d48fb7146b9eb2a5b5b4e23a83f60d0e40b4c..5847cbe6229f217d0361eda0950668bd0e9573f4 100644 +index 9a2539e1fe2cee30066634ef47a991fa5837a5e4..5ebc1b2cf186b512da5b62fedba16b612f2fa6ed 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -@@ -415,6 +415,13 @@ public final class ChunkEntitySlices { +@@ -437,6 +437,13 @@ public final class ChunkEntitySlices { private E[] storage; private int size; @@ -22,7 +22,7 @@ index 956d48fb7146b9eb2a5b5b4e23a83f60d0e40b4c..5847cbe6229f217d0361eda0950668bd public BasicEntityList() { this(0); -@@ -435,6 +442,7 @@ public final class ChunkEntitySlices { +@@ -457,6 +464,7 @@ public final class ChunkEntitySlices { private void resize() { if (this.storage == me.titaniumtown.ArrayConstants.emptyEntityArray) { // Gale - JettPack - reduce array allocations this.storage = (E[])new Entity[DEFAULT_CAPACITY]; @@ -30,7 +30,7 @@ index 956d48fb7146b9eb2a5b5b4e23a83f60d0e40b4c..5847cbe6229f217d0361eda0950668bd } else { this.storage = Arrays.copyOf(this.storage, this.storage.length * 2); } -@@ -448,6 +456,7 @@ public final class ChunkEntitySlices { +@@ -470,6 +478,7 @@ public final class ChunkEntitySlices { } else { this.storage[idx] = entity; } @@ -38,7 +38,7 @@ index 956d48fb7146b9eb2a5b5b4e23a83f60d0e40b4c..5847cbe6229f217d0361eda0950668bd } public int indexOf(final E entity) { -@@ -463,24 +472,32 @@ public final class ChunkEntitySlices { +@@ -485,24 +494,32 @@ public final class ChunkEntitySlices { } public boolean remove(final E entity) { diff --git a/leaf-server/minecraft-patches/features/0243-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0240-Protocol-Core.patch similarity index 84% rename from leaf-server/minecraft-patches/features/0243-Protocol-Core.patch rename to leaf-server/minecraft-patches/features/0240-Protocol-Core.patch index 76cb2ca5..541e4333 100644 --- a/leaf-server/minecraft-patches/features/0243-Protocol-Core.patch +++ b/leaf-server/minecraft-patches/features/0240-Protocol-Core.patch @@ -22,10 +22,10 @@ index 56fd1ed7ccaf96e7eedea60fbdbf7f934939d563..d2f522ea6d0a209496848af073c9af1c } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 14c4dfb497ab050adfffebb8d75e6fe89c38effc..54f5336b5bb56cb9dfda2b75fff07bae0b27cfd3 100644 +index 42dbd6d9e82130cfc5ae4669c460373631061451..b3356ad173027afafba931f31952c5b5ddc57891 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1820,6 +1820,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> { @@ -69,7 +69,7 @@ index f3e9de8716f5e1a72ec465ee897c8f0413f7b1c3..3dce0665e7438d2994a86450e31fb2a1 if (this.packetListener != null) { throw new IllegalStateException("Listener already set"); diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java -index 2e9eb04c7c4342393c05339906c267bca9ff29b1..53b9daa909c2b89046d5af515e17afe09ea7015a 100644 +index b57f4e2528d73c3ba949cb7e5dce73871049968c..6b6a51af0198db0e157ee4cf5bd6b7751b69d3e5 100644 --- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java @@ -140,11 +140,34 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis diff --git a/leaf-server/minecraft-patches/features/0246-Optimize-BlockEntities-tickersInLevel.patch b/leaf-server/minecraft-patches/features/0243-Optimize-BlockEntities-tickersInLevel.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0246-Optimize-BlockEntities-tickersInLevel.patch rename to leaf-server/minecraft-patches/features/0243-Optimize-BlockEntities-tickersInLevel.patch index 392b7f90..7be8c9c7 100644 --- a/leaf-server/minecraft-patches/features/0246-Optimize-BlockEntities-tickersInLevel.patch +++ b/leaf-server/minecraft-patches/features/0243-Optimize-BlockEntities-tickersInLevel.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize BlockEntities tickersInLevel diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index e82e55ec400c5e338502ed7ce433372a88d4acff..31f19dfe16e270b55f3b44754c97ed8d9fa422cf 100644 +index 514a918fff9bf60293fbfa6def4a2f9fead30825..a3674ddb883eecb255279375a5e2eece7e016c0f 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -73,7 +73,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -75,7 +75,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p return ""; } }; diff --git a/leaf-server/minecraft-patches/features/0247-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch b/leaf-server/minecraft-patches/features/0244-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0247-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch rename to leaf-server/minecraft-patches/features/0244-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch index 63661e87..c5b04dab 100644 --- a/leaf-server/minecraft-patches/features/0247-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch +++ b/leaf-server/minecraft-patches/features/0244-Pluto-Check-if-the-cactus-can-even-survive-being-pla.patch @@ -18,7 +18,7 @@ Setting the gamerule "doTileDrop" to false was to simulate a server that has chu Note: This might increase the item output of a cacti farm, though in theory it should act the same as vanilla. diff --git a/net/minecraft/world/level/block/CactusBlock.java b/net/minecraft/world/level/block/CactusBlock.java -index 0f8cfa5423cd1813c655237aa544dad2dc56ba4d..246193cc914f88cba2eb5959bd3fd8e56e7ebc61 100644 +index 2e79ce7e02aaa4abcef1507bba71e0305b6c696f..292260b769956f25c280e4a767382823ba500b58 100644 --- a/net/minecraft/world/level/block/CactusBlock.java +++ b/net/minecraft/world/level/block/CactusBlock.java @@ -52,25 +52,46 @@ public class CactusBlock extends Block implements BonemealableBlock { // Purpur diff --git a/leaf-server/minecraft-patches/features/0248-Flush-location-while-knockback.patch b/leaf-server/minecraft-patches/features/0245-Flush-location-while-knockback.patch similarity index 92% rename from leaf-server/minecraft-patches/features/0248-Flush-location-while-knockback.patch rename to leaf-server/minecraft-patches/features/0245-Flush-location-while-knockback.patch index ca560e24..1e3f1108 100644 --- a/leaf-server/minecraft-patches/features/0248-Flush-location-while-knockback.patch +++ b/leaf-server/minecraft-patches/features/0245-Flush-location-while-knockback.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Flush location while knockback diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 4217131b5f7aa985d5af452554849847a36ce9ce..d1b7fffc20ccd00bcc82f830a1f53a85fd86658a 100644 +index 78dc237d5de38cff9f013d36da9bbb16104dec96..2dcc4446f898124dfc9134f9fae892167256d724 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -1352,6 +1352,13 @@ public abstract class Player extends LivingEntity { +@@ -1363,6 +1363,13 @@ public abstract class Player extends LivingEntity { } if (!cancelled) { @@ -22,7 +22,7 @@ index 4217131b5f7aa985d5af452554849847a36ce9ce..d1b7fffc20ccd00bcc82f830a1f53a85 ((ServerPlayer)target).connection.send(new ClientboundSetEntityMotionPacket(target)); target.hurtMarked = false; target.setDeltaMovement(deltaMovement); -@@ -1420,6 +1427,12 @@ public abstract class Player extends LivingEntity { +@@ -1431,6 +1438,12 @@ public abstract class Player extends LivingEntity { } this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value diff --git a/leaf-server/minecraft-patches/features/0249-Only-tick-items-at-hand.patch b/leaf-server/minecraft-patches/features/0246-Only-tick-items-at-hand.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0249-Only-tick-items-at-hand.patch rename to leaf-server/minecraft-patches/features/0246-Only-tick-items-at-hand.patch index 51a0d8d8..8444eb7e 100644 --- a/leaf-server/minecraft-patches/features/0249-Only-tick-items-at-hand.patch +++ b/leaf-server/minecraft-patches/features/0246-Only-tick-items-at-hand.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Only tick items at hand diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 7abc297d91d6e1b21b855424b345dba4f4df37b6..0c81dca5905c2d4c166661dc3473b0c1e9aa5265 100644 +index 479884c829a7550d39508bf37a2551f2ef52fcd1..6d8c500839062ca0cad2ffc58dad0de1626c0eb9 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -834,12 +834,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -914,12 +914,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc super.tick(); } @@ -29,10 +29,10 @@ index 7abc297d91d6e1b21b855424b345dba4f4df37b6..0c81dca5905c2d4c166661dc3473b0c1 if (this.getHealth() != this.lastSentHealth || this.lastSentFood != this.foodData.getFoodLevel() diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index d1b7fffc20ccd00bcc82f830a1f53a85fd86658a..688a63644a66c0cd3f08deb3786d756c310c079c 100644 +index 2dcc4446f898124dfc9134f9fae892167256d724..34fefafa3d3ed9a336dd57c51d6549b470c22b3a 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -639,7 +639,14 @@ public abstract class Player extends LivingEntity { +@@ -648,7 +648,14 @@ public abstract class Player extends LivingEntity { } this.tickRegeneration(); diff --git a/leaf-server/minecraft-patches/features/0250-Smart-sort-items-in-NearestItemSensor.patch b/leaf-server/minecraft-patches/features/0247-Smart-sort-items-in-NearestItemSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0250-Smart-sort-items-in-NearestItemSensor.patch rename to leaf-server/minecraft-patches/features/0247-Smart-sort-items-in-NearestItemSensor.patch diff --git a/leaf-server/minecraft-patches/features/0251-Optimise-player-movement-checks.patch b/leaf-server/minecraft-patches/features/0248-Optimise-player-movement-checks.patch similarity index 84% rename from leaf-server/minecraft-patches/features/0251-Optimise-player-movement-checks.patch rename to leaf-server/minecraft-patches/features/0248-Optimise-player-movement-checks.patch index 11b4e010..e3746135 100644 --- a/leaf-server/minecraft-patches/features/0251-Optimise-player-movement-checks.patch +++ b/leaf-server/minecraft-patches/features/0248-Optimise-player-movement-checks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimise player movement checks diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 9305f790bd80df1d7d14065e6ad621ec9c2e1a49..3bba6cd29f85bec2e98ce97313f1158e2836c6b9 100644 +index 9a13cf8460472b8d3968cd8269a2b63d0b49f1a9..5f82c902c9229e8bbba5dc74a89ff4a27e7649fc 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1194,7 +1194,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1216,7 +1216,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper end diff --git a/leaf-server/minecraft-patches/features/0252-Remove-streams-in-MobSensor.patch b/leaf-server/minecraft-patches/features/0249-Remove-streams-in-MobSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0252-Remove-streams-in-MobSensor.patch rename to leaf-server/minecraft-patches/features/0249-Remove-streams-in-MobSensor.patch diff --git a/leaf-server/minecraft-patches/features/0253-Remove-streams-in-TemptingSensor.patch b/leaf-server/minecraft-patches/features/0250-Remove-streams-in-TemptingSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0253-Remove-streams-in-TemptingSensor.patch rename to leaf-server/minecraft-patches/features/0250-Remove-streams-in-TemptingSensor.patch diff --git a/leaf-server/minecraft-patches/features/0254-Use-HashedList-on-WeightedList.patch b/leaf-server/minecraft-patches/features/0251-Use-HashedList-on-WeightedList.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0254-Use-HashedList-on-WeightedList.patch rename to leaf-server/minecraft-patches/features/0251-Use-HashedList-on-WeightedList.patch diff --git a/leaf-server/minecraft-patches/features/0255-Add-configurable-death-item-drop-knockback-settings.patch b/leaf-server/minecraft-patches/features/0252-Add-configurable-death-item-drop-knockback-settings.patch similarity index 87% rename from leaf-server/minecraft-patches/features/0255-Add-configurable-death-item-drop-knockback-settings.patch rename to leaf-server/minecraft-patches/features/0252-Add-configurable-death-item-drop-knockback-settings.patch index ad499e0e..a5afe3e4 100644 --- a/leaf-server/minecraft-patches/features/0255-Add-configurable-death-item-drop-knockback-settings.patch +++ b/leaf-server/minecraft-patches/features/0252-Add-configurable-death-item-drop-knockback-settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable death item drop knockback settings diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 0c81dca5905c2d4c166661dc3473b0c1e9aa5265..373059fcccdab0a918aa1d1a4a613fb62fef8a18 100644 +index 6d8c500839062ca0cad2ffc58dad0de1626c0eb9..cc015575efcb0c3d56d33510a1f43f40996eab1a 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -1053,7 +1053,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1133,7 +1133,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc if (!keepInventory) { for (ItemStack item : this.getInventory().getContents()) { if (!item.isEmpty() && !EnchantmentHelper.has(item, net.minecraft.world.item.enchantment.EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) { @@ -18,10 +18,10 @@ index 0c81dca5905c2d4c166661dc3473b0c1e9aa5265..373059fcccdab0a918aa1d1a4a613fb6 } } diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index d19d253ce100aee5e2a12eeb4ea50065760ed702..ae4d93515a28fb97e7abdfc06ce9ae31ec986fa8 100644 +index e04a84d7fd2185013695e66647ec6faab35423af..f95792b8642dc86a4d88e1d756de65d6cae2fa98 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -4083,9 +4083,9 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4139,9 +4139,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } if (randomizeMotion) { diff --git a/leaf-server/minecraft-patches/features/0256-Optimize-getScaledTrackingDistance.patch b/leaf-server/minecraft-patches/features/0253-Optimize-getScaledTrackingDistance.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0256-Optimize-getScaledTrackingDistance.patch rename to leaf-server/minecraft-patches/features/0253-Optimize-getScaledTrackingDistance.patch index 42e7cc0f..0ff8c0dd 100644 --- a/leaf-server/minecraft-patches/features/0256-Optimize-getScaledTrackingDistance.patch +++ b/leaf-server/minecraft-patches/features/0253-Optimize-getScaledTrackingDistance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize getScaledTrackingDistance diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 574765713c194a6cf3eb7c125e78ed77c82aba2e..980d18434a79d1ff5e16b71aeaf34b486e665f9d 100644 +index 436e73086678e4afbf94f1b7bca9b0c74266f762..168fc4fea371dfe9ea1ffca3c9f290ba3547f0b9 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -786,7 +786,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -783,7 +783,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @Override public int getScaledTrackingDistance(int trackingDistance) { diff --git a/leaf-server/minecraft-patches/features/0257-Optimize-SynchedEntityData-packDirty.patch b/leaf-server/minecraft-patches/features/0254-Optimize-SynchedEntityData-packDirty.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0257-Optimize-SynchedEntityData-packDirty.patch rename to leaf-server/minecraft-patches/features/0254-Optimize-SynchedEntityData-packDirty.patch diff --git a/leaf-server/minecraft-patches/features/0258-Optimize-isEyeInFluid.patch b/leaf-server/minecraft-patches/features/0255-Optimize-isEyeInFluid.patch similarity index 88% rename from leaf-server/minecraft-patches/features/0258-Optimize-isEyeInFluid.patch rename to leaf-server/minecraft-patches/features/0255-Optimize-isEyeInFluid.patch index c6465db7..b2cd7da4 100644 --- a/leaf-server/minecraft-patches/features/0258-Optimize-isEyeInFluid.patch +++ b/leaf-server/minecraft-patches/features/0255-Optimize-isEyeInFluid.patch @@ -79,10 +79,10 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..fd2f79d976c9587b00380f8b8f784b32 public String toString() { return "Reference{" + this.key + "=" + this.value + "}"; diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 373059fcccdab0a918aa1d1a4a613fb62fef8a18..7d0a1181ac64eabd54395cff8e1b9356d4998482 100644 +index cc015575efcb0c3d56d33510a1f43f40996eab1a..672301fcfe89dda6fb20bc0cd18d18fc26cd2efa 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -1877,7 +1877,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1979,7 +1979,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.awardStat(Stats.SWIM_ONE_CM, rounded); this.causeFoodExhaustion(this.level().spigotConfig.swimMultiplier * (float) rounded * 0.01F, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.SWIM); // CraftBukkit - EntityExhaustionEvent // Spigot } @@ -92,10 +92,10 @@ index 373059fcccdab0a918aa1d1a4a613fb62fef8a18..7d0a1181ac64eabd54395cff8e1b9356 if (rounded > 0) { this.awardStat(Stats.WALK_UNDER_WATER_ONE_CM, rounded); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 3bba6cd29f85bec2e98ce97313f1158e2836c6b9..069a3a46bf2f699210234a4096642d1b6e82b5f1 100644 +index 5f82c902c9229e8bbba5dc74a89ff4a27e7649fc..eff20b8de6bddfeec4f25e6381bf914bca38e1c6 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -268,7 +268,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -288,7 +288,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public boolean wasTouchingWater; protected Object2DoubleMap> fluidHeight = new Object2DoubleArrayMap<>(2); protected boolean wasEyeInWater; @@ -111,7 +111,7 @@ index 3bba6cd29f85bec2e98ce97313f1158e2836c6b9..069a3a46bf2f699210234a4096642d1b public int invulnerableTime; protected boolean firstTick = true; protected final SynchedEntityData entityData; -@@ -2014,8 +2021,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2070,8 +2077,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } private void updateFluidOnEyes() { @@ -122,7 +122,7 @@ index 3bba6cd29f85bec2e98ce97313f1158e2836c6b9..069a3a46bf2f699210234a4096642d1b double eyeY = this.getEyeY(); if (!( this.getVehicle() instanceof AbstractBoat abstractBoat -@@ -2027,7 +2034,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2083,7 +2090,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess FluidState fluidState = this.level().getFluidState(blockPos); double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos); if (d > eyeY) { @@ -134,7 +134,7 @@ index 3bba6cd29f85bec2e98ce97313f1158e2836c6b9..069a3a46bf2f699210234a4096642d1b } } } -@@ -2107,9 +2117,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2163,9 +2173,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -162,10 +162,10 @@ index 3bba6cd29f85bec2e98ce97313f1158e2836c6b9..069a3a46bf2f699210234a4096642d1b public boolean isInLava() { return !this.firstTick && this.fluidHeight.getDouble(FluidTags.LAVA) > 0.0; diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java -index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..c31d79b7391723eb8bc682594ff187be5701ff08 100644 +index c8354d46ed909090f7c15f396863bf7d73afcefa..3ee788b172240ccf38cb31385dff13364ccc4142 100644 --- a/net/minecraft/world/entity/ExperienceOrb.java +++ b/net/minecraft/world/entity/ExperienceOrb.java -@@ -127,7 +127,7 @@ public class ExperienceOrb extends Entity { +@@ -153,7 +153,7 @@ public class ExperienceOrb extends Entity { } else { super.tick(); boolean flag = !this.level().noCollision(this.getBoundingBox()); @@ -175,10 +175,10 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..c31d79b7391723eb8bc682594ff187be } else if (!flag) { this.applyGravity(); diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ae4d93515a28fb97e7abdfc06ce9ae31ec986fa8..00fb32361c9c24da5fed823391add6cb408cc1d4 100644 +index f95792b8642dc86a4d88e1d756de65d6cae2fa98..be8cc4aceafc183808a6d0f7278ef8378c4265e0 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -449,7 +449,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -463,7 +463,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } } @@ -188,10 +188,10 @@ index ae4d93515a28fb97e7abdfc06ce9ae31ec986fa8..00fb32361c9c24da5fed823391add6cb boolean flag1 = !this.canBreatheUnderwater() && !MobEffectUtil.hasWaterBreathing(this) diff --git a/net/minecraft/world/entity/animal/AbstractFish.java b/net/minecraft/world/entity/animal/AbstractFish.java -index 2cf95769ec3a1662443ea31e1bc2ba01cb7b523e..55dcc7f84453cf82279b0e0e1aa7a2924042d1f7 100644 +index 0002e39e2670ad92849ccc0aada163b174fe1ec2..36b787f5cf4f30589d8b78f86b58553895a1ae51 100644 --- a/net/minecraft/world/entity/animal/AbstractFish.java +++ b/net/minecraft/world/entity/animal/AbstractFish.java -@@ -180,7 +180,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { +@@ -182,7 +182,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable { @Override public void vanillaTick() { // Purpur - Ridables @@ -201,10 +201,10 @@ index 2cf95769ec3a1662443ea31e1bc2ba01cb7b523e..55dcc7f84453cf82279b0e0e1aa7a292 } diff --git a/net/minecraft/world/entity/animal/horse/SkeletonHorse.java b/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -index b02ca00ff18484947aa2f4ff90ab9dda2196a679..38967590d0117b5c5bc09f2e24ceea4e38b786f4 100644 +index f6ab6ecc10486694d77905239a82bda4dec94936..8550a8758b1b26e0ddd9ed7f6ae0f167e23d96fe 100644 --- a/net/minecraft/world/entity/animal/horse/SkeletonHorse.java +++ b/net/minecraft/world/entity/animal/horse/SkeletonHorse.java -@@ -110,7 +110,7 @@ public class SkeletonHorse extends AbstractHorse { +@@ -111,7 +111,7 @@ public class SkeletonHorse extends AbstractHorse { @Override public SoundEvent getAmbientSound() { @@ -240,10 +240,10 @@ index 4b253ae8149f5d9505c5140a00a96d8c8850b1c4..bfb0e3381abb93bea1079fb0d476cf85 } else if (this.random.nextFloat() < 0.15F && (this.isOnFire() || this.getLastDamageSource() != null && this.getLastDamageSource().is(DamageTypeTags.IS_FIRE)) diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 2fbd167126e6eb5aaf27de77f32e274c8a51df16..cdc0faa192d82a3b17591d6ec65d30f665e01be2 100644 +index 5563720a6d92cad974632bdc97bb35c15310483c..b65dfebab222d2fbc4b68367bbe722447d85d5fa 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -287,7 +287,7 @@ public class Zombie extends Monster { +@@ -286,7 +286,7 @@ public class Zombie extends Monster { this.doUnderWaterConversion(); } } else if (this.convertsInWater()) { @@ -253,10 +253,10 @@ index 2fbd167126e6eb5aaf27de77f32e274c8a51df16..cdc0faa192d82a3b17591d6ec65d30f6 if (this.inWaterTime >= 600) { this.startUnderWaterConversion(300); diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 688a63644a66c0cd3f08deb3786d756c310c079c..dfb47fd001c98312f18a4c7202be90dcc5dfe07f 100644 +index 34fefafa3d3ed9a336dd57c51d6549b470c22b3a..4dca1f9ac2ee2cd8ff4df64fe46fb8da047dbf80 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -389,7 +389,7 @@ public abstract class Player extends LivingEntity { +@@ -398,7 +398,7 @@ public abstract class Player extends LivingEntity { this.lastItemInMainHand = mainHandItem.copy(); } @@ -265,7 +265,7 @@ index 688a63644a66c0cd3f08deb3786d756c310c079c..dfb47fd001c98312f18a4c7202be90dc this.turtleHelmetTick(); } -@@ -429,8 +429,7 @@ public abstract class Player extends LivingEntity { +@@ -438,8 +438,7 @@ public abstract class Player extends LivingEntity { } protected boolean updateIsUnderwater() { @@ -275,7 +275,7 @@ index 688a63644a66c0cd3f08deb3786d756c310c079c..dfb47fd001c98312f18a4c7202be90dc } @Override -@@ -836,7 +835,7 @@ public abstract class Player extends LivingEntity { +@@ -845,7 +844,7 @@ public abstract class Player extends LivingEntity { } destroySpeed *= (float)this.getAttributeValue(Attributes.BLOCK_BREAK_SPEED); @@ -285,10 +285,10 @@ index 688a63644a66c0cd3f08deb3786d756c310c079c..dfb47fd001c98312f18a4c7202be90dc } diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java -index 4f61c17e0a4a82773834bc21e00cac6eb75f794e..1d7cf1cec77a3916429e9be4a76e0bce523b728f 100644 +index d947801b616af5b5dcdcc8bb70b36f97d6a69fdd..678badf7622b81e94c973bed2082fbfafa596b24 100644 --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java -@@ -790,7 +790,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { +@@ -793,7 +793,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable { @Override protected boolean canAddPassenger(Entity passenger) { diff --git a/leaf-server/minecraft-patches/features/0259-Cache-block-path-type.patch b/leaf-server/minecraft-patches/features/0256-Cache-block-path-type.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0259-Cache-block-path-type.patch rename to leaf-server/minecraft-patches/features/0256-Cache-block-path-type.patch index a5d2807e..fcc752be 100644 --- a/leaf-server/minecraft-patches/features/0259-Cache-block-path-type.patch +++ b/leaf-server/minecraft-patches/features/0256-Cache-block-path-type.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache block path type diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 980d18434a79d1ff5e16b71aeaf34b486e665f9d..97b84b658b27c338696641557d55eb9b7665199a 100644 +index 168fc4fea371dfe9ea1ffca3c9f290ba3547f0b9..463a9d9b15301e7139bd36435214662aa3ccf63d 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -366,6 +366,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -17,10 +17,10 @@ index 980d18434a79d1ff5e16b71aeaf34b486e665f9d..97b84b658b27c338696641557d55eb9b if (org.purpurmc.purpur.PurpurConfig.beeCountPayload) org.purpurmc.purpur.task.BeehiveTask.instance().register(); // Purpur - Give bee counts in beehives to Purpur clients diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java -index 303bd27d44e4acfee49334235a6704724e3fd616..d001d0859c9508eb06f05010ab1cb8069f9b87cf 100644 +index 57aad048034005543a72556e990b53db8deebfee..6e6ee6f25f7cab0a6235d9e583ed5c01bca30edd 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -7078,4 +7078,14 @@ public class Blocks { +@@ -7066,4 +7066,14 @@ public class Blocks { } } } diff --git a/leaf-server/minecraft-patches/features/0260-optimize-getEntityStatus.patch b/leaf-server/minecraft-patches/features/0257-optimize-getEntityStatus.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0260-optimize-getEntityStatus.patch rename to leaf-server/minecraft-patches/features/0257-optimize-getEntityStatus.patch diff --git a/leaf-server/minecraft-patches/features/0261-Rail-Optimization-optimized-PoweredRailBlock-logic.patch b/leaf-server/minecraft-patches/features/0258-Rail-Optimization-optimized-PoweredRailBlock-logic.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0261-Rail-Optimization-optimized-PoweredRailBlock-logic.patch rename to leaf-server/minecraft-patches/features/0258-Rail-Optimization-optimized-PoweredRailBlock-logic.patch index 090c228b..f2518787 100644 --- a/leaf-server/minecraft-patches/features/0261-Rail-Optimization-optimized-PoweredRailBlock-logic.patch +++ b/leaf-server/minecraft-patches/features/0258-Rail-Optimization-optimized-PoweredRailBlock-logic.patch @@ -12,7 +12,7 @@ powered rail logic from a single rail instead of each block iterating separately expensive but also completely unnecessary and with a lot of massive overhead diff --git a/net/minecraft/world/level/block/PoweredRailBlock.java b/net/minecraft/world/level/block/PoweredRailBlock.java -index a2202d2b4352be07b2445064339c61ba6a2521c7..abf0ffa3540963f591f428876c0c671517594c89 100644 +index ebc0df13fc204472742a611b25f1ffd34478b042..1e2f6ef1db365747621d9814ffe3d63fe3e143d8 100644 --- a/net/minecraft/world/level/block/PoweredRailBlock.java +++ b/net/minecraft/world/level/block/PoweredRailBlock.java @@ -122,6 +122,12 @@ public class PoweredRailBlock extends BaseRailBlock { diff --git a/leaf-server/minecraft-patches/features/0262-optimise-ChunkGenerator-getMobsAt.patch b/leaf-server/minecraft-patches/features/0259-optimise-ChunkGenerator-getMobsAt.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0262-optimise-ChunkGenerator-getMobsAt.patch rename to leaf-server/minecraft-patches/features/0259-optimise-ChunkGenerator-getMobsAt.patch diff --git a/leaf-server/minecraft-patches/features/0263-cache-getBiome.patch b/leaf-server/minecraft-patches/features/0260-cache-getBiome.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0263-cache-getBiome.patch rename to leaf-server/minecraft-patches/features/0260-cache-getBiome.patch diff --git a/leaf-server/minecraft-patches/features/0264-optimize-mob-spawning.patch b/leaf-server/minecraft-patches/features/0261-optimize-mob-spawning.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0264-optimize-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0261-optimize-mob-spawning.patch index 5578e8f4..396722c2 100644 --- a/leaf-server/minecraft-patches/features/0264-optimize-mob-spawning.patch +++ b/leaf-server/minecraft-patches/features/0261-optimize-mob-spawning.patch @@ -14,7 +14,7 @@ Generally faster than the non-async approach iterate over all entities, get their chunk, and increment the count diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index 083b49c8fbdbde96b5be3e5531c21b2c96371b60..ca707979e221ea0500efad42350994b90aac3d52 100644 +index 79674f4bd7a12c42dec19a4175012d7a2dc88b84..0a97a491737807d59815b75635fa3d8c94901ba8 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java @@ -287,6 +287,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -26,7 +26,7 @@ index 083b49c8fbdbde96b5be3e5531c21b2c96371b60..ca707979e221ea0500efad42350994b9 } // Paper end - Optional per player mob spawns diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59d14c2528 100644 +index 46e171ca454253c32e22c0c18587e9a7ba19f331..1c7e2e5124c7d4c1b86039b0327bfd92c49df9b1 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -70,11 +70,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -43,7 +43,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 // Paper start public final ca.spottedleaf.concurrentutil.map.ConcurrentLong2ReferenceChainedHashTable fullChunks = new ca.spottedleaf.concurrentutil.map.ConcurrentLong2ReferenceChainedHashTable<>(); public int getFullChunksCount() { -@@ -497,6 +497,23 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -498,6 +498,23 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } private void tickChunks() { @@ -67,7 +67,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 long gameTime = this.level.getGameTime(); long l = gameTime - this.lastInhabitedUpdate; this.lastInhabitedUpdate = gameTime; -@@ -510,8 +527,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -511,8 +528,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } // Pufferfish start - optimize mob spawning @@ -78,7 +78,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 // Paper start - per player mob spawning backoff for (int ii = 0; ii < ServerPlayer.MOBCATEGORY_TOTAL_ENUMS; ii++) { player.mobCounts[ii] = 0; -@@ -523,14 +540,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -524,14 +541,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon player.mobBackoffCounts[ii] = newBackoff; } // Paper end - per player mob spawning backoff @@ -95,7 +95,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.Iterator objectiterator = level.entityTickList.entities.iterator(ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet.ITERATOR_FLAG_SEE_ADDITIONS); try { -@@ -541,10 +558,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -542,10 +559,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon new LocalMobCapCalculator(chunkMap) : null; // This ensures the caps are properly enforced by using the correct calculator @@ -108,7 +108,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 mobCapCalculator, // This is the key fix - was previously null level.paperConfig().entities.spawning.perPlayerMobSpawns ); -@@ -609,6 +626,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -610,6 +627,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon chunkRange = Math.min(chunkRange, 8); entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange); entityPlayer.playerNaturallySpawnedEvent.callEvent(); @@ -116,7 +116,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 } // Paper end - PlayerNaturallySpawnCreaturesEvent boolean flag = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit -@@ -620,16 +638,40 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -621,16 +639,40 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon List list = this.spawningChunks; try { @@ -162,7 +162,7 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 list.clear(); } -@@ -647,7 +689,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -648,7 +690,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } if (!spawnCategories.isEmpty()) { @@ -172,10 +172,10 @@ index fc86e900e41305287a6cc6d766184c6e28d6189b..56516dd07433161f5afd448aaf535c59 } } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 224a032e8992f104ad9380182ed67c316c93274e..983b03c9cf1c91e9954da0ed8be99c2dfaa5a9c6 100644 +index fc61a7083232148397a0b330ce2a4d70ba38543d..d319e4d7e12c4bae63893ad25dcdc3ed59c88d97 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1110,6 +1110,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1114,6 +1114,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.simpleRandom.nextInt(16); } // Gale - Airplane - optimize random calls in chunk ticking diff --git a/leaf-server/minecraft-patches/features/0265-optimize-structure-map.patch b/leaf-server/minecraft-patches/features/0262-optimize-structure-map.patch similarity index 89% rename from leaf-server/minecraft-patches/features/0265-optimize-structure-map.patch rename to leaf-server/minecraft-patches/features/0262-optimize-structure-map.patch index ee709fcd..bd2e07e9 100644 --- a/leaf-server/minecraft-patches/features/0265-optimize-structure-map.patch +++ b/leaf-server/minecraft-patches/features/0262-optimize-structure-map.patch @@ -5,10 +5,10 @@ Subject: [PATCH] optimize structure map diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java -index 4fd9313ce2c87383685d80e2533b93d5b85a9f41..c9655ab6faf33fca2971629cd819f66da7024240 100644 +index d7dbe7d24a6697be6b5db729f940b16b74838d11..a294e64df092e29aec79429031afce4c97ec28d0 100644 --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -76,8 +76,8 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -77,8 +77,8 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh protected BlendingData blendingData; public final Map heightmaps = Maps.newEnumMap(Heightmap.Types.class); // Paper - rewrite chunk system @@ -19,7 +19,7 @@ index 4fd9313ce2c87383685d80e2533b93d5b85a9f41..c9655ab6faf33fca2971629cd819f66d protected final Map pendingBlockEntities = Maps.newHashMap(); public final Map blockEntities = new Object2ObjectOpenHashMap<>(); protected final LevelHeightAccessor levelHeightAccessor; -@@ -303,7 +303,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -304,7 +304,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh } public Map getAllStarts() { @@ -28,7 +28,7 @@ index 4fd9313ce2c87383685d80e2533b93d5b85a9f41..c9655ab6faf33fca2971629cd819f66d } public void setAllStarts(Map structureStarts) { -@@ -319,13 +319,13 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -320,13 +320,13 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh @Override public void addReferenceForStructure(Structure structure, long reference) { diff --git a/leaf-server/minecraft-patches/features/0266-throttle-mob-spawning.patch b/leaf-server/minecraft-patches/features/0263-throttle-mob-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0266-throttle-mob-spawning.patch rename to leaf-server/minecraft-patches/features/0263-throttle-mob-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0267-Add-BlockExplosionHitEvent.patch b/leaf-server/minecraft-patches/features/0264-Add-BlockExplosionHitEvent.patch similarity index 89% rename from leaf-server/minecraft-patches/features/0267-Add-BlockExplosionHitEvent.patch rename to leaf-server/minecraft-patches/features/0264-Add-BlockExplosionHitEvent.patch index 4788ce7b..8aac99f2 100644 --- a/leaf-server/minecraft-patches/features/0267-Add-BlockExplosionHitEvent.patch +++ b/leaf-server/minecraft-patches/features/0264-Add-BlockExplosionHitEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockExplosionHitEvent diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java -index 619d00f79276665777f3a58dec7a5f353bd7d660..33cd3a7755ada2fb632cfc97a80c8a9000ab0bd9 100644 +index 1669c21534a453c9cf16b992df7a6bf276dea887..1039cf820ecac54e290dc5dfe7f714bf2b9d2bdd 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java -@@ -612,9 +612,13 @@ public class ServerExplosion implements Explosion { +@@ -615,9 +615,13 @@ public class ServerExplosion implements Explosion { } // CraftBukkit end diff --git a/leaf-server/minecraft-patches/features/0268-Old-Blast-Protection-explosion-knockback.patch b/leaf-server/minecraft-patches/features/0265-Old-Blast-Protection-explosion-knockback.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0268-Old-Blast-Protection-explosion-knockback.patch rename to leaf-server/minecraft-patches/features/0265-Old-Blast-Protection-explosion-knockback.patch index db33c1a2..1e48dea0 100644 --- a/leaf-server/minecraft-patches/features/0268-Old-Blast-Protection-explosion-knockback.patch +++ b/leaf-server/minecraft-patches/features/0265-Old-Blast-Protection-explosion-knockback.patch @@ -17,10 +17,10 @@ index dbf31389f0e9796c80afbffddf6a20cbaf184e6e..f1b456bf96e4764fd202f5575bbfa586 public static final StringRepresentable.EnumCodec CODEC = StringRepresentable.fromEnum(() -> VALUES_ARRAY); // Gale end - JettPack - reduce array allocations diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java -index 33cd3a7755ada2fb632cfc97a80c8a9000ab0bd9..c67a9aa4431134ea25baf83a3ca9a646c8d8140d 100644 +index 1039cf820ecac54e290dc5dfe7f714bf2b9d2bdd..7426a7f4bf17277b0355185b58973140dab3c7b9 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java -@@ -529,7 +529,7 @@ public class ServerExplosion implements Explosion { +@@ -532,7 +532,7 @@ public class ServerExplosion implements Explosion { double d4 = (1.0 - d) * f1 * knockbackMultiplier; double d5; if (entity instanceof LivingEntity livingEntity) { @@ -29,7 +29,7 @@ index 33cd3a7755ada2fb632cfc97a80c8a9000ab0bd9..c67a9aa4431134ea25baf83a3ca9a646 } else { d5 = d4; } -@@ -558,6 +558,49 @@ public class ServerExplosion implements Explosion { +@@ -561,6 +561,49 @@ public class ServerExplosion implements Explosion { } } diff --git a/leaf-server/minecraft-patches/features/0269-Use-UUID-for-cure-reputation.patch b/leaf-server/minecraft-patches/features/0266-Use-UUID-for-cure-reputation.patch similarity index 75% rename from leaf-server/minecraft-patches/features/0269-Use-UUID-for-cure-reputation.patch rename to leaf-server/minecraft-patches/features/0266-Use-UUID-for-cure-reputation.patch index e9fead9f..96ebf276 100644 --- a/leaf-server/minecraft-patches/features/0269-Use-UUID-for-cure-reputation.patch +++ b/leaf-server/minecraft-patches/features/0266-Use-UUID-for-cure-reputation.patch @@ -6,26 +6,26 @@ Subject: [PATCH] Use UUID for cure reputation Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-247647 diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index 70e68d56f2d781930d877f40818d9aeb377dc8af..2afe1c0a7670b52cf4ae13949b4f8c67449b6490 100644 +index 22c1545a0329d56e0ec41ae4da1e1922aa1f9737..e89e4c26c40cbb3ef002022f22886d5faa7869fd 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -284,9 +284,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - villager.refreshBrain(level); +@@ -283,9 +283,10 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + mob.refreshBrain(level); if (this.conversionStarter != null) { Player playerByUuid = level.getGlobalPlayerByUUID(this.conversionStarter); // Paper - check global player list where appropriate -+ villager.onReputationEventFromUUID(ReputationEventType.ZOMBIE_VILLAGER_CURED, this.conversionStarter); // Leaf - Use UUID for cure reputation ++ mob.onReputationEventFromUUID(ReputationEventType.ZOMBIE_VILLAGER_CURED, this.conversionStarter); // Leaf - Use UUID for cure reputation if (playerByUuid instanceof ServerPlayer) { - CriteriaTriggers.CURED_ZOMBIE_VILLAGER.trigger((ServerPlayer)playerByUuid, this, villager); -- level.onReputationEvent(ReputationEventType.ZOMBIE_VILLAGER_CURED, playerByUuid, villager); -+ //level.onReputationEvent(ReputationEventType.ZOMBIE_VILLAGER_CURED, playerByUuid, villager); // Leaf - Use UUID for cure reputation - move up + CriteriaTriggers.CURED_ZOMBIE_VILLAGER.trigger((ServerPlayer)playerByUuid, this, mob); +- level.onReputationEvent(ReputationEventType.ZOMBIE_VILLAGER_CURED, playerByUuid, mob); ++ //level.onReputationEvent(ReputationEventType.ZOMBIE_VILLAGER_CURED, playerByUuid, mob); // Leaf - Use UUID for cure reputation - move up } } diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index 92895a38c5ef7962db83e085a99c0b3766052541..bac09fcb62226c05f419abd63acb9191de9ec7f0 100644 +index 743c0c956ddd9e35d3c9c7b45fa8d36490d648dd..c029256175b27bb5f0d30e3fa7371f04c2069fd6 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -1093,6 +1093,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -1095,6 +1095,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } } diff --git a/leaf-server/minecraft-patches/features/0273-Fix-crash-during-parsing-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0267-Fix-crash-during-parsing-unknown-command-message.patch similarity index 88% rename from leaf-server/minecraft-patches/features/0273-Fix-crash-during-parsing-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0267-Fix-crash-during-parsing-unknown-command-message.patch index 217ae4ac..4acd9e3e 100644 --- a/leaf-server/minecraft-patches/features/0273-Fix-crash-during-parsing-unknown-command-message.patch +++ b/leaf-server/minecraft-patches/features/0267-Fix-crash-during-parsing-unknown-command-message.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix crash during parsing unknown command message Use direct impl for unknown commands message parse to prevent crash diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index 1e84f726f23877ed4be1aa901d7df0b11aa95552..30c3b7306611c52753af355e55464c0fa19511e0 100644 +index d201c3965d5a55de740175c140bc7ee411f1be78..38e3c638c8df954f62e8405883bf7a78b19691c3 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -669,7 +669,7 @@ public class Commands { +@@ -654,7 +654,7 @@ public class Commands { net.kyori.adventure.text.Component detailComponent = null; if (rawMessage.contains("")) { @@ -18,9 +18,9 @@ index 1e84f726f23877ed4be1aa901d7df0b11aa95552..30c3b7306611c52753af355e55464c0f } final String input = commandSyntaxException.getInput(); -@@ -712,7 +712,7 @@ public class Commands { +@@ -697,7 +697,7 @@ public class Commands { private static net.kyori.adventure.text.Component getVanillaUnknownCommandMessage( - net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException var7, String label + net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException var7, String command ) { - builder.color(net.kyori.adventure.text.format.NamedTextColor.RED).append(io.papermc.paper.command.brigadier.MessageComponentSerializer.message().deserialize(var7.getRawMessage())); + builder.color(net.kyori.adventure.text.format.NamedTextColor.RED).append(io.papermc.paper.adventure.PaperAdventure.asAdventure(ComponentUtils.fromMessage(var7.getRawMessage()))); // Leaf - Fix crash during parsing unknown command message diff --git a/leaf-server/minecraft-patches/features/0275-optimize-random-tick.patch b/leaf-server/minecraft-patches/features/0268-optimize-random-tick.patch similarity index 86% rename from leaf-server/minecraft-patches/features/0275-optimize-random-tick.patch rename to leaf-server/minecraft-patches/features/0268-optimize-random-tick.patch index 54adb079..968d128b 100644 --- a/leaf-server/minecraft-patches/features/0275-optimize-random-tick.patch +++ b/leaf-server/minecraft-patches/features/0268-optimize-random-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] optimize random tick diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 56516dd07433161f5afd448aaf535c59d14c2528..9992eeda9535e6304e7019e7eb7e5c1458ddd89e 100644 +index 1c7e2e5124c7d4c1b86039b0327bfd92c49df9b1..976fcc96f8f0a10338c5b98bd3908e6def217676 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -675,7 +675,13 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -676,7 +676,13 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon list.clear(); } @@ -24,10 +24,10 @@ index 56516dd07433161f5afd448aaf535c59d14c2528..9992eeda9535e6304e7019e7eb7e5c14 this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 983b03c9cf1c91e9954da0ed8be99c2dfaa5a9c6..4bd5e0268d52d63e160ccfe3d1509bbda421bc0f 100644 +index d319e4d7e12c4bae63893ad25dcdc3ed59c88d97..08c6f93bcc028c876e17870681382aa9fa2ba3ee 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1111,6 +1111,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1115,6 +1115,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.simpleRandom.nextInt(16); } // Gale - Airplane - optimize random calls in chunk ticking public final org.dreeam.leaf.world.NatureSpawnChunkMap natureSpawnChunkMap = new org.dreeam.leaf.world.NatureSpawnChunkMap(); // Leaf - optimize mob spawning @@ -36,10 +36,10 @@ index 983b03c9cf1c91e9954da0ed8be99c2dfaa5a9c6..4bd5e0268d52d63e160ccfe3d1509bbd final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Paper - optimise random ticking // Leaf - Faster random generator - upcasting ChunkPos pos = chunk.getPos(); diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 31f19dfe16e270b55f3b44754c97ed8d9fa422cf..174da710d2b86de98cbf6499d4a954f9476a225a 100644 +index a3674ddb883eecb255279375a5e2eece7e016c0f..c3ecdd80efad340c9fa0ea6913db9a3362b53ad4 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -150,6 +150,10 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -152,6 +152,10 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } // Gale end - Airplane - optimize random calls in chunk ticking - instead of using a random every time the chunk is ticked, define when lightning strikes preemptively @@ -50,7 +50,7 @@ index 31f19dfe16e270b55f3b44754c97ed8d9fa422cf..174da710d2b86de98cbf6499d4a954f9 public LevelChunk(Level level, ChunkPos pos) { this(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, null, null, null); } -@@ -414,6 +418,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -416,6 +420,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p if (blockState == state) { return null; } else { diff --git a/leaf-server/minecraft-patches/features/0276-do-not-log-invalid-flatten-text-component-parse.patch b/leaf-server/minecraft-patches/features/0269-do-not-log-invalid-flatten-text-component-parse.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0276-do-not-log-invalid-flatten-text-component-parse.patch rename to leaf-server/minecraft-patches/features/0269-do-not-log-invalid-flatten-text-component-parse.patch diff --git a/leaf-server/minecraft-patches/features/0277-Fast-BiomeManager-seed-obfuscation.patch b/leaf-server/minecraft-patches/features/0270-Fast-BiomeManager-seed-obfuscation.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0277-Fast-BiomeManager-seed-obfuscation.patch rename to leaf-server/minecraft-patches/features/0270-Fast-BiomeManager-seed-obfuscation.patch index b37a8b58..01aa376d 100644 --- a/leaf-server/minecraft-patches/features/0277-Fast-BiomeManager-seed-obfuscation.patch +++ b/leaf-server/minecraft-patches/features/0270-Fast-BiomeManager-seed-obfuscation.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fast BiomeManager seed obfuscation Pretty tiny optimization, but better than nothing diff --git a/net/minecraft/world/level/biome/BiomeManager.java b/net/minecraft/world/level/biome/BiomeManager.java -index 00122472991ba0c1a0ea77053aad71cdfa92a7bd..2d3cfa8659d882585b9e698ac8edf5c704623b95 100644 +index bda44479d1537d9fa2d23f519049aeb96685fbe6..effe0bac502c72d9555509944001e16afa811962 100644 --- a/net/minecraft/world/level/biome/BiomeManager.java +++ b/net/minecraft/world/level/biome/BiomeManager.java @@ -34,9 +34,18 @@ public class BiomeManager { diff --git a/leaf-server/minecraft-patches/features/0278-Paw-optimization.patch b/leaf-server/minecraft-patches/features/0271-Paw-optimization.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0278-Paw-optimization.patch rename to leaf-server/minecraft-patches/features/0271-Paw-optimization.patch index 874b98df..a5949d54 100644 --- a/leaf-server/minecraft-patches/features/0278-Paw-optimization.patch +++ b/leaf-server/minecraft-patches/features/0271-Paw-optimization.patch @@ -11,7 +11,7 @@ Some random optimizations - Secret patches (WIP) diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java -index 2491ca5bcabcf8ae99ef990eed4e1fd94f799991..0a5e4eadde52e368842d958b166e0070cf1d9345 100644 +index 1f4208388a923f9a1667dc13d937955ac233d88e..6e3bd3944b56010c3eabcdcd11424518bbb980fa 100644 --- a/net/minecraft/Util.java +++ b/net/minecraft/Util.java @@ -96,7 +96,7 @@ public class Util { @@ -33,10 +33,10 @@ index 2491ca5bcabcf8ae99ef990eed4e1fd94f799991..0a5e4eadde52e368842d958b166e0070 public static void shutdownExecutors() { diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java -index 3dce0665e7438d2994a86450e31fb2a10431df9b..f9634a821fbfaf31a66e0e25973794149b1a5239 100644 +index df012a4c67d474125fafa01b1677d9220fc817ae..7992df93f4eebb9ca41b9bca2784aec718d4efb8 100644 --- a/net/minecraft/network/Connection.java +++ b/net/minecraft/network/Connection.java -@@ -654,13 +654,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -644,13 +644,7 @@ public class Connection extends SimpleChannelInboundHandler> { if (!(this.packetListener instanceof net.minecraft.server.network.ServerLoginPacketListenerImpl loginPacketListener) || loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.VERIFYING || Connection.joinAttemptsThisTick++ < MAX_PER_TICK) { @@ -100,10 +100,10 @@ index 4535858701b2bb232b9d2feb2af6551526232ddc..e65c62dbe4c1560ae153e4c4344e9194 - // Paper end - detailed watchdog information } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 4bd5e0268d52d63e160ccfe3d1509bbda421bc0f..36138a2fc86f5e0fe0ea3d40061c54f8a6096c4d 100644 +index c49d2f7314a35763831285d7d46d34dade2f0085..79f2b26bc466238ec83cd049f38d257b0000028d 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1510,13 +1510,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1518,13 +1518,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Paper end - log detailed entity tick information public void tickNonPassenger(Entity entity) { @@ -117,7 +117,7 @@ index 4bd5e0268d52d63e160ccfe3d1509bbda421bc0f..36138a2fc86f5e0fe0ea3d40061c54f8 entity.setOldPosAndRot(); entity.tickCount++; entity.totalEntityAge++; // Paper - age-like counter for all entities -@@ -1529,13 +1523,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1537,13 +1531,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe for (Entity entity1 : entity.getPassengers()) { this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2 } @@ -132,10 +132,10 @@ index 4bd5e0268d52d63e160ccfe3d1509bbda421bc0f..36138a2fc86f5e0fe0ea3d40061c54f8 private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2 diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 069a3a46bf2f699210234a4096642d1b6e82b5f1..616a8959bbdea5919fca34f54f2678a4d2f744ab 100644 +index eff20b8de6bddfeec4f25e6381bf914bca38e1c6..5ee9394fd35a9f61e6a54126ed2c567dff19c05b 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1148,16 +1148,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1170,16 +1170,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.onGround; } @@ -152,7 +152,7 @@ index 069a3a46bf2f699210234a4096642d1b6e82b5f1..616a8959bbdea5919fca34f54f2678a4 public void move(MoverType type, Vec3 movement) { // Gale start - VMP - skip entity move if movement is zero if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) { -@@ -1165,16 +1155,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1187,16 +1177,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Gale end - VMP - skip entity move if movement is zero final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity @@ -169,7 +169,7 @@ index 069a3a46bf2f699210234a4096642d1b6e82b5f1..616a8959bbdea5919fca34f54f2678a4 if (this.noPhysics) { this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z); } else { -@@ -1308,13 +1289,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1320,13 +1301,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Gale end - skip negligible planar movement multiplication } } @@ -183,7 +183,7 @@ index 069a3a46bf2f699210234a4096642d1b6e82b5f1..616a8959bbdea5919fca34f54f2678a4 } private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) { -@@ -4857,9 +4831,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5046,9 +5020,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void setDeltaMovement(Vec3 deltaMovement) { @@ -193,9 +193,9 @@ index 069a3a46bf2f699210234a4096642d1b6e82b5f1..616a8959bbdea5919fca34f54f2678a4 } public void addDeltaMovement(Vec3 addend) { -@@ -4967,9 +4939,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5146,9 +5118,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } - // Paper end - Fix MC-4 + // Paper end - Block invalid positions and bounding box if (this.position.x != x || this.position.y != y || this.position.z != z) { - synchronized (this.posLock) { // Paper - detailed watchdog information this.position = new Vec3(x, y, z); diff --git a/leaf-server/minecraft-patches/features/0274-Paper-Rewrite-dataconverter-system.patch b/leaf-server/minecraft-patches/features/0274-Paper-Rewrite-dataconverter-system.patch deleted file mode 100644 index f551542d..00000000 --- a/leaf-server/minecraft-patches/features/0274-Paper-Rewrite-dataconverter-system.patch +++ /dev/null @@ -1,32603 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Sat, 19 Jun 2021 10:43:01 -0700 -Subject: [PATCH] Paper: Rewrite dataconverter system - -Original license: GPLv3 -Original project: https://github.com/PaperMC/Paper - -Please see https://github.com/PaperMC/DataConverter -for details. - -diff --git a/ca/spottedleaf/dataconverter/converters/DataConverter.java b/ca/spottedleaf/dataconverter/converters/DataConverter.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1863c606be715683d53863a0c9293525d199c9cf ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/converters/DataConverter.java -@@ -0,0 +1,54 @@ -+package ca.spottedleaf.dataconverter.converters; -+ -+import java.util.Comparator; -+ -+public abstract class DataConverter { -+ -+ public static final Comparator> LOWEST_VERSION_COMPARATOR = (x, y) -> { -+ return Long.compare(x.getEncodedVersion(), y.getEncodedVersion()); -+ }; -+ -+ protected final int toVersion; -+ protected final int versionStep; -+ -+ public DataConverter(final int toVersion) { -+ this.toVersion = toVersion; -+ this.versionStep = 0; -+ } -+ -+ public DataConverter(final int toVersion, final int versionStep) { -+ this.toVersion = toVersion; -+ this.versionStep = versionStep; -+ } -+ -+ public final int getToVersion() { -+ return this.toVersion; -+ } -+ -+ public final int getVersionStep() { -+ return this.versionStep; -+ } -+ -+ public final long getEncodedVersion() { -+ return encodeVersions(this.toVersion, this.versionStep); -+ } -+ -+ public abstract R convert(final T data, final long sourceVersion, final long toVersion); -+ -+ // step must be in the lower bits, so that encodeVersions(version, step) < encodeVersions(version, step + 1) -+ public static long encodeVersions(final int version, final int step) { -+ return ((long)version << 32) | (step & 0xFFFFFFFFL); -+ } -+ -+ public static int getVersion(final long encoded) { -+ return (int)(encoded >>> 32); -+ } -+ -+ public static int getStep(final long encoded) { -+ return (int)encoded; -+ } -+ -+ public static String encodedToString(final long encoded) { -+ return getVersion(encoded) + "." + getStep(encoded); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/converters/datatypes/DataHook.java b/ca/spottedleaf/dataconverter/converters/datatypes/DataHook.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0b92c5c66ad3a5198873f98287a5ced71c231d09 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/converters/datatypes/DataHook.java -@@ -0,0 +1,9 @@ -+package ca.spottedleaf.dataconverter.converters.datatypes; -+ -+public interface DataHook { -+ -+ public R preHook(final T data, final long fromVersion, final long toVersion); -+ -+ public R postHook(final T data, final long fromVersion, final long toVersion); -+ -+} -diff --git a/ca/spottedleaf/dataconverter/converters/datatypes/DataType.java b/ca/spottedleaf/dataconverter/converters/datatypes/DataType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..52f2a3131f314e723a31194c517e7756983482b9 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/converters/datatypes/DataType.java -@@ -0,0 +1,15 @@ -+package ca.spottedleaf.dataconverter.converters.datatypes; -+ -+public abstract class DataType { -+ -+ public final R convertOrOriginal(final T data, final long fromVersion, final long toVersion) { -+ final R replaced = this.convert(data, fromVersion, toVersion); -+ if (replaced != null) { -+ return replaced; -+ } -+ return (R)data; -+ } -+ -+ public abstract R convert(final T data, final long fromVersion, final long toVersion); -+ -+} -diff --git a/ca/spottedleaf/dataconverter/converters/datatypes/DataWalker.java b/ca/spottedleaf/dataconverter/converters/datatypes/DataWalker.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a57dd1e28fd7a1e7d832833f820186dacac407d4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/converters/datatypes/DataWalker.java -@@ -0,0 +1,15 @@ -+package ca.spottedleaf.dataconverter.converters.datatypes; -+ -+public interface DataWalker { -+ -+ public static final DataWalker NO_OP = (final Object data, final long fromVersion, final long toVersion) -> { -+ return null; -+ }; -+ -+ public static DataWalker noOp() { -+ return (DataWalker)NO_OP; -+ } -+ -+ public T walk(final T data, final long fromVersion, final long toVersion); -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/MCDataConverter.java b/ca/spottedleaf/dataconverter/minecraft/MCDataConverter.java -new file mode 100644 -index 0000000000000000000000000000000000000000..515f6691c72ffa82ac8b92646768be7a17931efb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/MCDataConverter.java -@@ -0,0 +1,86 @@ -+package ca.spottedleaf.dataconverter.minecraft; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCDataType; -+import ca.spottedleaf.dataconverter.minecraft.versions.V99; -+import ca.spottedleaf.dataconverter.types.json.JsonMapType; -+import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; -+import com.google.gson.JsonObject; -+import it.unimi.dsi.fastutil.longs.LongArrayList; -+import net.minecraft.nbt.CompoundTag; -+ -+public final class MCDataConverter { -+ -+ private static final LongArrayList BREAKPOINTS = MCVersionRegistry.getBreakpoints(); -+ -+ public static T copy(final T type) { -+ if (type instanceof CompoundTag) { -+ return (T)((CompoundTag)type).copy(); -+ } else if (type instanceof JsonObject) { -+ return (T)((JsonObject)type).deepCopy(); -+ } -+ -+ return type; -+ } -+ -+ public static CompoundTag convertTag(final MCDataType type, final CompoundTag data, final int fromVersion, final int toVersion) { -+ final NBTMapType wrapped = new NBTMapType(data); -+ -+ final NBTMapType replaced = (NBTMapType)convert(type, wrapped, fromVersion, toVersion); -+ -+ return replaced == null ? wrapped.getTag() : replaced.getTag(); -+ } -+ -+ public static JsonObject convertJson(final MCDataType type, final JsonObject data, final boolean compressed, final int fromVersion, final int toVersion) { -+ final JsonMapType wrapped = new JsonMapType(data, compressed); -+ -+ final JsonMapType replaced = (JsonMapType)convert(type, wrapped, fromVersion, toVersion); -+ -+ return replaced == null ? wrapped.getJson() : replaced.getJson(); -+ } -+ -+ public static R convert(final DataType type, final T data, final int fromVersion, final int toVersion) { -+ return convertWithSubVersion( -+ type, data, -+ DataConverter.encodeVersions(Math.max(fromVersion, V99.VERSION), Integer.MAX_VALUE), -+ DataConverter.encodeVersions(toVersion, Integer.MAX_VALUE) -+ ); -+ } -+ -+ public static R convertWithSubVersion(final DataType type, final T data, final long fromVersion, final long toVersion) { -+ Object ret = data; -+ -+ long currentVersion = fromVersion; -+ -+ for (int i = 0, len = BREAKPOINTS.size(); i < len; ++i) { -+ final long breakpoint = BREAKPOINTS.getLong(i); -+ -+ if (currentVersion >= breakpoint) { -+ continue; -+ } -+ -+ final Object converted = type.convert((T)ret, currentVersion, Math.min(toVersion, breakpoint - 1L)); -+ if (converted != null) { -+ ret = converted; -+ } -+ -+ currentVersion = Math.min(toVersion, breakpoint - 1L); -+ -+ if (currentVersion == toVersion) { -+ break; -+ } -+ } -+ -+ if (currentVersion != toVersion) { -+ final Object converted = type.convert((T)ret, currentVersion, toVersion); -+ if (converted != null) { -+ ret = converted; -+ } -+ } -+ -+ return (R)ret; -+ } -+ -+ private MCDataConverter() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java b/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d8662b811b47787f12ebf53e410dc4fa7fad0e10 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java -@@ -0,0 +1,487 @@ -+package ca.spottedleaf.dataconverter.minecraft; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.versions.V4290; -+import com.mojang.logging.LogUtils; -+import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap; -+import it.unimi.dsi.fastutil.ints.IntArrayList; -+import it.unimi.dsi.fastutil.ints.IntLinkedOpenHashSet; -+import it.unimi.dsi.fastutil.ints.IntRBTreeSet; -+import it.unimi.dsi.fastutil.longs.LongArrayList; -+import it.unimi.dsi.fastutil.longs.LongComparator; -+import it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet; -+import org.slf4j.Logger; -+import java.lang.reflect.Field; -+import java.util.Arrays; -+import java.util.Locale; -+ -+public final class MCVersionRegistry { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final Int2ObjectLinkedOpenHashMap VERSION_NAMES = new Int2ObjectLinkedOpenHashMap<>(); -+ private static final IntArrayList VERSION_LIST; -+ private static final LongArrayList DATA_VERSION_LIST; -+ -+ private static final IntArrayList DATACONVERTER_VERSIONS_LIST; -+ private static final IntLinkedOpenHashSet DATACONVERTER_VERSIONS_MAJOR = new IntLinkedOpenHashSet(); -+ private static final LongLinkedOpenHashSet DATACONVERTER_VERSIONS = new LongLinkedOpenHashSet(); -+ private static final Int2ObjectLinkedOpenHashMap SUBVERSIONS = new Int2ObjectLinkedOpenHashMap<>(); -+ private static final LongArrayList BREAKPOINTS = new LongArrayList(); -+ static { -+ // Note: Some of these are nameless. -+ // Unless a data version is specified here, it will NOT have converters ran for it. Please add them on update! -+ final int[] converterVersions = new int[] { -+ 99, -+ 100, -+ 101, -+ 102, -+ 105, -+ 106, -+ 107, -+ 108, -+ 109, -+ 110, -+ 111, -+ 113, -+ 135, -+ 143, -+ 147, -+ 165, -+ 501, -+ 502, -+ 505, -+ 700, -+ 701, -+ 702, -+ 703, -+ 704, -+ 705, -+ 804, -+ 806, -+ 808, -+ 808, -+ 813, -+ 816, -+ 820, -+ 1022, -+ 1125, -+ 1344, -+ 1446, -+ 1450, -+ 1451, -+ 1451, -+ 1451, -+ 1451, -+ 1451, -+ 1451, -+ 1451, -+ 1451, -+ 1451, -+ 1456, -+ 1458, -+ 1460, -+ 1466, -+ 1470, -+ 1474, -+ 1475, -+ 1480, -+ 1481, -+ 1483, -+ 1484, -+ 1486, -+ 1487, -+ 1488, -+ 1490, -+ 1492, -+ 1494, -+ 1496, -+ 1500, -+ 1501, -+ 1502, -+ 1506, -+ 1510, -+ 1514, -+ 1515, -+ 1624, -+ 1800, -+ 1801, -+ 1802, -+ 1803, -+ 1904, -+ 1905, -+ 1906, -+ 1909, -+ 1911, -+ 1914, -+ 1917, -+ 1918, -+ 1920, -+ 1925, -+ 1928, -+ 1929, -+ 1931, -+ 1936, -+ 1946, -+ 1948, -+ 1953, -+ 1955, -+ 1961, -+ 1963, -+ 2100, -+ 2202, -+ 2209, -+ 2211, -+ 2218, -+ 2501, -+ 2502, -+ 2503, -+ 2505, -+ 2508, -+ 2509, -+ 2511, -+ 2514, -+ 2516, -+ 2518, -+ 2519, -+ 2522, -+ 2523, -+ 2527, -+ 2528, -+ 2529, -+ 2531, -+ 2533, -+ 2535, -+ 2537, -+ 2538, -+ 2550, -+ 2551, -+ 2552, -+ 2553, -+ 2558, -+ 2568, -+ 2671, -+ 2679, -+ 2680, -+ 2684, -+ 2686, -+ 2688, -+ 2690, -+ 2691, -+ 2693, -+ 2696, -+ 2700, -+ 2701, -+ 2702, -+ 2704, -+ 2707, -+ 2710, -+ 2717, -+ 2825, -+ 2831, -+ 2832, -+ 2833, -+ 2838, -+ 2841, -+ 2842, -+ 2843, -+ 2846, -+ 2852, -+ 2967, -+ 2970, -+ 3077, -+ 3078, -+ 3081, -+ 3082, -+ 3083, -+ 3084, -+ 3086, -+ 3087, -+ 3088, -+ 3090, -+ 3093, -+ 3094, -+ 3097, -+ 3108, -+ 3201, -+ 3203, -+ 3204, -+ 3209, -+ 3214, -+ 3319, -+ 3322, -+ 3438, -+ 3439, -+ 3440, -+ 3441, -+ 3447, -+ 3448, -+ 3450, -+ 3451, -+ 3459, -+ 3564, -+ 3565, -+ 3566, -+ 3568, -+ 3683, -+ 3685, -+ 3692, -+ 3800, -+ 3803, -+ 3807, -+ 3808, -+ 3809, -+ 3812, -+ 3813, -+ 3814, -+ 3818, -+ 3820, -+ 3825, -+ 3828, -+ 3833, -+ 3939, -+ 3943, -+ 3945, -+ 4054, -+ 4055, -+ 4057, -+ 4059, -+ 4061, -+ 4064, -+ 4067, -+ 4068, -+ 4081, -+ 4173, -+ 4175, -+ 4176, -+ 4180, -+ 4181, -+ 4185, -+ 4187, -+ 4290, -+ 4291, -+ 4292, -+ 4293, -+ 4294, -+ 4295, -+ 4296, -+ 4297, -+ 4299, -+ 4300, -+ 4301, -+ 4302, -+ 4303, -+ 4305, -+ 4306, -+ 4307, -+ 4309, -+ 4311, -+ 4312, -+ 4314, -+ //4420, -+ //4424, -+ // All up to 1.21.6 -+ }; -+ Arrays.sort(converterVersions); -+ -+ DATACONVERTER_VERSIONS_MAJOR.addAll(DATACONVERTER_VERSIONS_LIST = new IntArrayList(converterVersions)); -+ -+ // add sub versions -+ registerSubVersion(MCVersions.V16W38A + 1, 1); -+ -+ registerSubVersion(MCVersions.V17W47A, 1); -+ registerSubVersion(MCVersions.V17W47A, 2); -+ registerSubVersion(MCVersions.V17W47A, 3); -+ registerSubVersion(MCVersions.V17W47A, 4); -+ registerSubVersion(MCVersions.V17W47A, 5); -+ registerSubVersion(MCVersions.V17W47A, 6); -+ registerSubVersion(MCVersions.V17W47A, 7); -+ -+ registerSubVersion(MCVersions.V24W04A + 1, 1); -+ registerSubVersion(MCVersions.V24W04A + 2, 1); -+ registerSubVersion(MCVersions.V24W04A + 2, 2); -+ -+ registerSubVersion(MCVersions.V24W07A + 1, 1); -+ registerSubVersion(MCVersions.V24W07A + 1, 2); -+ registerSubVersion(MCVersions.V24W07A + 1, 4); -+ registerSubVersion(MCVersions.V24W07A + 1, 5); -+ registerSubVersion(MCVersions.V24W07A + 1, 6); -+ -+ registerSubVersion(V4290.VERSION, 1); -+ -+ // register breakpoints here -+ // for all major releases after 1.16, add them. this reduces the work required to determine if a breakpoint -+ // is needed for new converters -+ -+ // Too much changed in this version. -+ registerBreakpoint(MCVersions.V17W47A); -+ registerBreakpointAfter(MCVersions.V17W47A, Integer.MAX_VALUE); -+ -+ // final release of major version -+ registerBreakpointAfter(MCVersions.V1_17_1, Integer.MAX_VALUE); -+ -+ // final release of major version -+ registerBreakpointAfter(MCVersions.V1_18_2, Integer.MAX_VALUE); -+ -+ // final release of major version -+ registerBreakpointAfter(MCVersions.V1_19_4, Integer.MAX_VALUE); -+ -+ // Too much changed in this version. -+ registerBreakpoint(MCVersions.V24W07A + 1, 5); -+ registerBreakpointAfter(MCVersions.V24W07A + 1, Integer.MAX_VALUE); -+ -+ // final release of major version -+ registerBreakpointAfter(MCVersions.V1_20_6, Integer.MAX_VALUE); -+ -+ // There is a read of entity sub data in V4299 (salmon) which was written to after V1_20_6 -+ // There is also a sub type read in V4290 as it reads and converts all data within a text component -+ registerBreakpointAfter(V4290.VERSION); -+ } -+ -+ static { -+ final Field[] fields = MCVersions.class.getDeclaredFields(); -+ for (final Field field : fields) { -+ final String name = field.getName(); -+ final int value; -+ try { -+ value = field.getInt(null); -+ } catch (final Exception ex) { -+ throw new RuntimeException(ex); -+ } -+ -+ // Mojang registered 15w33a and 15w33b under the same id. -+ // Mojang registered 1.21.5-pre2 and 1.21.5-pre3 under the same id. -+ if (VERSION_NAMES.containsKey(value) && value != MCVersions.V15W33B && value != MCVersions.V1_21_5_PRE3) { -+ LOGGER.warn("Error registering version \"" + name + "\", version number '" + value + "' is already associated with \"" + VERSION_NAMES.get(value) + "\""); -+ } -+ -+ VERSION_NAMES.put(value, name.substring(1).replace("_PRE", "-PRE").replace("_RC", "-RC").replace('_', '.').toLowerCase(Locale.ROOT)); -+ } -+ -+ for (final int version : DATACONVERTER_VERSIONS_MAJOR) { -+ if (VERSION_NAMES.containsKey(version)) { -+ continue; -+ } -+ -+ // find closest greatest version above this one -+ int closest = Integer.MAX_VALUE; -+ String closestName = null; -+ for (final int v : VERSION_NAMES.keySet()) { -+ if (v > version && v < closest) { -+ closest = v; -+ closestName = VERSION_NAMES.get(v); -+ } -+ } -+ -+ if (closestName == null) { -+ VERSION_NAMES.put(version, "unregistered_v" + version); -+ } else { -+ VERSION_NAMES.put(version, closestName + "-dev" + (closest - version)); -+ } -+ } -+ -+ // Explicit override for V99, as 99 is very special. -+ VERSION_NAMES.put(99, "pre_converter"); -+ -+ VERSION_LIST = new IntArrayList(new IntRBTreeSet(VERSION_NAMES.keySet())); -+ -+ DATA_VERSION_LIST = new LongArrayList(); -+ for (final int version : VERSION_LIST) { -+ DATA_VERSION_LIST.add(DataConverter.encodeVersions(version, 0)); -+ -+ final IntArrayList subVersions = SUBVERSIONS.get(version); -+ if (subVersions == null) { -+ continue; -+ } -+ -+ for (final int step : subVersions) { -+ DATA_VERSION_LIST.add(DataConverter.encodeVersions(version, step)); -+ } -+ } -+ -+ DATA_VERSION_LIST.sort((LongComparator)null); -+ -+ for (final int version : DATACONVERTER_VERSIONS_MAJOR) { -+ DATACONVERTER_VERSIONS.add(DataConverter.encodeVersions(version, 0)); -+ -+ final IntArrayList subVersions = SUBVERSIONS.get(version); -+ if (subVersions == null) { -+ continue; -+ } -+ -+ for (final int step : subVersions) { -+ DATACONVERTER_VERSIONS.add(DataConverter.encodeVersions(version, step)); -+ } -+ } -+ } -+ -+ private static void registerSubVersion(final int version, final int step) { -+ if (DATA_VERSION_LIST != null) { -+ throw new IllegalStateException("Added too late!"); -+ } -+ SUBVERSIONS.computeIfAbsent(version, (final int keyInMap) -> { -+ return new IntArrayList(); -+ }).add(step); -+ } -+ -+ private static void registerBreakpointBefore(final int version) { -+ registerBreakpointBefore(version, 0); -+ } -+ -+ private static void registerBreakpointBefore(final int version, final int step) { -+ BREAKPOINTS.add(DataConverter.encodeVersions(version, step) - 1L); -+ } -+ -+ private static void registerBreakpoint(final int version) { -+ registerBreakpoint(version, 0); -+ } -+ -+ private static void registerBreakpoint(final int version, final int step) { -+ BREAKPOINTS.add(DataConverter.encodeVersions(version, step)); -+ } -+ -+ private static void registerBreakpointAfter(final int version) { -+ registerBreakpointAfter(version, 0); -+ } -+ -+ private static void registerBreakpointAfter(final int version, final int step) { -+ BREAKPOINTS.add(DataConverter.encodeVersions(version, step) + 1L); -+ } -+ -+ // returns only versions that have dataconverters -+ public static boolean hasDataConverters(final int version) { -+ return DATACONVERTER_VERSIONS_MAJOR.contains(version); -+ } -+ -+ public String getVersionName(final int version) { -+ return VERSION_NAMES.get(version); -+ } -+ -+ public boolean isRegisteredVersion(final int version) { -+ return VERSION_NAMES.containsKey(version); -+ } -+ -+ public static IntArrayList getVersionList() { -+ return VERSION_LIST; -+ } -+ -+ public static LongArrayList getDataVersionList() { -+ return DATA_VERSION_LIST; -+ } -+ -+ public static int getMaxVersion() { -+ return VERSION_LIST.getInt(VERSION_LIST.size() - 1); -+ } -+ -+ public static LongArrayList getBreakpoints() { -+ return BREAKPOINTS; -+ } -+ -+ public static void checkVersion(final long version) { -+ if (!DATACONVERTER_VERSIONS.contains(version)) { -+ throw new IllegalStateException("Version " + DataConverter.encodedToString(version) + " is not registered to have dataconverters, yet has a dataconverter"); -+ } -+ } -+ -+ private MCVersionRegistry() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/MCVersions.java b/ca/spottedleaf/dataconverter/minecraft/MCVersions.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f54d93488ce8d6161bc69735fe4be9c54c374424 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/MCVersions.java -@@ -0,0 +1,599 @@ -+package ca.spottedleaf.dataconverter.minecraft; -+ -+@SuppressWarnings("unused") -+public final class MCVersions { -+ -+ /* https://minecraft.wiki/w/Data_version */ -+ -+ public static final int V15W32A = 100; -+ public static final int V15W32B = 103; -+ public static final int V15W32C = 104; -+ public static final int V15W33A = 111; -+ public static final int V15W33B = 111; -+ public static final int V15W33C = 112; -+ public static final int V15W34A = 114; -+ public static final int V15W34B = 115; -+ public static final int V15W34C = 116; -+ public static final int V15W34D = 117; -+ public static final int V15W35A = 118; -+ public static final int V15W35B = 119; -+ public static final int V15W35C = 120; -+ public static final int V15W35D = 121; -+ public static final int V15W35E = 122; -+ public static final int V15W36A = 123; -+ public static final int V15W36B = 124; -+ public static final int V15W36C = 125; -+ public static final int V15W36D = 126; -+ public static final int V15W37A = 127; -+ public static final int V15W38A = 128; -+ public static final int V15W38B = 129; -+ public static final int V15W39A = 130; -+ public static final int V15W39B = 131; -+ public static final int V15W39C = 132; -+ public static final int V15W40A = 133; -+ public static final int V15W40B = 134; -+ public static final int V15W41A = 136; -+ public static final int V15W41B = 137; -+ public static final int V15W42A = 138; -+ public static final int V15W43A = 139; -+ public static final int V15W43B = 140; -+ public static final int V15W43C = 141; -+ public static final int V15W44A = 142; -+ public static final int V15W44B = 143; -+ public static final int V15W45A = 145; -+ public static final int V15W46A = 146; -+ public static final int V15W47A = 148; -+ public static final int V15W47B = 149; -+ public static final int V15W47C = 150; -+ public static final int V15W49A = 151; -+ public static final int V15W49B = 152; -+ public static final int V15W50A = 153; -+ public static final int V15W51A = 154; -+ public static final int V15W51B = 155; -+ public static final int V16W02A = 156; -+ public static final int V16W03A = 157; -+ public static final int V16W04A = 158; -+ public static final int V16W05A = 159; -+ public static final int V16W05B = 160; -+ public static final int V16W06A = 161; -+ public static final int V16W07A = 162; -+ public static final int V16W07B = 163; -+ public static final int V1_9_PRE1 = 164; -+ public static final int V1_9_PRE2 = 165; -+ public static final int V1_9_PRE3 = 167; -+ public static final int V1_9_PRE4 = 168; -+ public static final int V1_9 = 169; -+ public static final int V1_9_1_PRE1 = 170; -+ public static final int V1_9_1_PRE2 = 171; -+ public static final int V1_9_1_PRE3 = 172; -+ public static final int V1_9_1 = 175; -+ public static final int V1_9_2 = 176; -+ public static final int V16W14A = 177; -+ public static final int V16W15A = 178; -+ public static final int V16W15B = 179; -+ public static final int V1_9_3_PRE1 = 180; -+ public static final int V1_9_3_PRE2 = 181; -+ public static final int V1_9_3_PRE3 = 182; -+ public static final int V1_9_3 = 183; -+ public static final int V1_9_4 = 184; -+ public static final int V16W20A = 501; -+ public static final int V16W21A = 503; -+ public static final int V16W21B = 504; -+ public static final int V1_10_PRE1 = 506; -+ public static final int V1_10_PRE2 = 507; -+ public static final int V1_10 = 510; -+ public static final int V1_10_1 = 511; -+ public static final int V1_10_2 = 512; -+ public static final int V16W32A = 800; -+ public static final int V16W32B = 801; -+ public static final int V16W33A = 802; -+ public static final int V16W35A = 803; -+ public static final int V16W36A = 805; -+ public static final int V16W38A = 807; -+ public static final int V16W39A = 809; -+ public static final int V16W39B = 811; -+ public static final int V16W39C = 812; -+ public static final int V16W40A = 813; -+ public static final int V16W41A = 814; -+ public static final int V16W42A = 815; -+ public static final int V16W43A = 816; -+ public static final int V16W44A = 817; -+ public static final int V1_11_PRE1 = 818; -+ public static final int V1_11 = 819; -+ public static final int V16W50A = 920; -+ public static final int V1_11_1 = 921; -+ public static final int V1_11_2 = 922; -+ public static final int V17W06A = 1022; -+ public static final int V17W13A = 1122; -+ public static final int V17W13B = 1123; -+ public static final int V17W14A = 1124; -+ public static final int V17W15A = 1125; -+ public static final int V17W16A = 1126; -+ public static final int V17W16B = 1127; -+ public static final int V17W17A = 1128; -+ public static final int V17W17B = 1129; -+ public static final int V17W18A = 1130; -+ public static final int V17W18B = 1131; -+ public static final int V1_12_PRE1 = 1132; -+ public static final int V1_12_PRE2 = 1133; -+ public static final int V1_12_PRE3 = 1134; -+ public static final int V1_12_PRE4 = 1135; -+ public static final int V1_12_PRE5 = 1136; -+ public static final int V1_12_PRE6 = 1137; -+ public static final int V1_12_PRE7 = 1138; -+ public static final int V1_12 = 1139; -+ public static final int V17W31A = 1239; -+ public static final int V1_12_1_PRE1 = 1240; -+ public static final int V1_12_1 = 1241; -+ public static final int V1_12_2_PRE1 = 1341; -+ public static final int V1_12_2_PRE2 = 1342; -+ public static final int V1_12_2 = 1343; -+ public static final int V17W43A = 1444; -+ public static final int V17W43B = 1445; -+ public static final int V17W45A = 1447; -+ public static final int V17W45B = 1448; -+ public static final int V17W46A = 1449; -+ public static final int V17W47A = 1451; -+ public static final int V17W47B = 1452; -+ public static final int V17W48A = 1453; -+ public static final int V17W49A = 1454; -+ public static final int V17W49B = 1455; -+ public static final int V17W50A = 1457; -+ public static final int V18W01A = 1459; -+ public static final int V18W02A = 1461; -+ public static final int V18W03A = 1462; -+ public static final int V18W03B = 1463; -+ public static final int V18W05A = 1464; -+ public static final int V18W06A = 1466; -+ public static final int V18W07A = 1467; -+ public static final int V18W07B = 1468; -+ public static final int V18W07C = 1469; -+ public static final int V18W08A = 1470; -+ public static final int V18W08B = 1471; -+ public static final int V18W09A = 1472; -+ public static final int V18W10A = 1473; -+ public static final int V18W10B = 1474; -+ public static final int V18W10C = 1476; -+ public static final int V18W10D = 1477; -+ public static final int V18W11A = 1478; -+ public static final int V18W14A = 1479; -+ public static final int V18W14B = 1481; -+ public static final int V18W15A = 1482; -+ public static final int V18W16A = 1483; -+ public static final int V18W19A = 1484; -+ public static final int V18W19B = 1485; -+ public static final int V18W20A = 1489; -+ public static final int V18W20B = 1491; -+ public static final int V18W20C = 1493; -+ public static final int V18W21A = 1495; -+ public static final int V18W21B = 1496; -+ public static final int V18W22A = 1497; -+ public static final int V18W22B = 1498; -+ public static final int V18W22C = 1499; -+ public static final int V1_13_PRE1 = 1501; -+ public static final int V1_13_PRE2 = 1502; -+ public static final int V1_13_PRE3 = 1503; -+ public static final int V1_13_PRE4 = 1504; -+ public static final int V1_13_PRE5 = 1511; -+ public static final int V1_13_PRE6 = 1512; -+ public static final int V1_13_PRE7 = 1513; -+ public static final int V1_13_PRE8 = 1516; -+ public static final int V1_13_PRE9 = 1517; -+ public static final int V1_13_PRE10 = 1518; -+ public static final int V1_13 = 1519; -+ public static final int V18W30A = 1620; -+ public static final int V18W30B = 1621; -+ public static final int V18W31A = 1622; -+ public static final int V18W32A = 1623; -+ public static final int V18W33A = 1625; -+ public static final int V1_13_1_PRE1 = 1626; -+ public static final int V1_13_1_PRE2 = 1627; -+ public static final int V1_13_1 = 1628; -+ public static final int V1_13_2_PRE1 = 1629; -+ public static final int V1_13_2_PRE2 = 1630; -+ public static final int V1_13_2 = 1631; -+ public static final int V18W43A = 1901; -+ public static final int V18W43B = 1902; -+ public static final int V18W43C = 1903; -+ public static final int V18W44A = 1907; -+ public static final int V18W45A = 1908; -+ public static final int V18W46A = 1910; -+ public static final int V18W47A = 1912; -+ public static final int V18W47B = 1913; -+ public static final int V18W48A = 1914; -+ public static final int V18W48B = 1915; -+ public static final int V18W49A = 1916; -+ public static final int V18W50A = 1919; -+ public static final int V19W02A = 1921; -+ public static final int V19W03A = 1922; -+ public static final int V19W03B = 1923; -+ public static final int V19W03C = 1924; -+ public static final int V19W04A = 1926; -+ public static final int V19W04B = 1927; -+ public static final int V19W05A = 1930; -+ public static final int V19W06A = 1931; -+ public static final int V19W07A = 1932; -+ public static final int V19W08A = 1933; -+ public static final int V19W08B = 1934; -+ public static final int V19W09A = 1935; -+ public static final int V19W11A = 1937; -+ public static final int V19W11B = 1938; -+ public static final int V19W12A = 1940; -+ public static final int V19W12B = 1941; -+ public static final int V19W13A = 1942; -+ public static final int V19W13B = 1943; -+ public static final int V19W14A = 1944; -+ public static final int V19W14B = 1945; -+ public static final int V1_14_PRE1 = 1947; -+ public static final int V1_14_PRE2 = 1948; -+ public static final int V1_14_PRE3 = 1949; -+ public static final int V1_14_PRE4 = 1950; -+ public static final int V1_14_PRE5 = 1951; -+ public static final int V1_14 = 1952; -+ public static final int V1_14_1_PRE1 = 1955; -+ public static final int V1_14_1_PRE2 = 1956; -+ public static final int V1_14_1 = 1957; -+ public static final int V1_14_2_PRE1 = 1958; -+ public static final int V1_14_2_PRE2 = 1959; -+ public static final int V1_14_2_PRE3 = 1960; -+ public static final int V1_14_2_PRE4 = 1962; -+ public static final int V1_14_2 = 1963; -+ public static final int V1_14_3_PRE1 = 1964; -+ public static final int V1_14_3_PRE2 = 1965; -+ public static final int V1_14_3_PRE3 = 1966; -+ public static final int V1_14_3_PRE4 = 1967; -+ public static final int V1_14_3 = 1968; -+ public static final int V1_14_4_PRE1 = 1969; -+ public static final int V1_14_4_PRE2 = 1970; -+ public static final int V1_14_4_PRE3 = 1971; -+ public static final int V1_14_4_PRE4 = 1972; -+ public static final int V1_14_4_PRE5 = 1973; -+ public static final int V1_14_4_PRE6 = 1974; -+ public static final int V1_14_4_PRE7 = 1975; -+ public static final int V1_14_4 = 1976; -+ public static final int V19W34A = 2200; -+ public static final int V19W35A = 2201; -+ public static final int V19W36A = 2203; -+ public static final int V19W37A = 2204; -+ public static final int V19W38A = 2205; -+ public static final int V19W38B = 2206; -+ public static final int V19W39A = 2207; -+ public static final int V19W40A = 2208; -+ public static final int V19W41A = 2210; -+ public static final int V19W42A = 2212; -+ public static final int V19W44A = 2213; -+ public static final int V19W45A = 2214; -+ public static final int V19W45B = 2215; -+ public static final int V19W46A = 2216; -+ public static final int V19W46B = 2217; -+ public static final int V1_15_PRE1 = 2218; -+ public static final int V1_15_PRE2 = 2219; -+ public static final int V1_15_PRE3 = 2220; -+ public static final int V1_15_PRE4 = 2221; -+ public static final int V1_15_PRE5 = 2222; -+ public static final int V1_15_PRE6 = 2223; -+ public static final int V1_15_PRE7 = 2224; -+ public static final int V1_15 = 2225; -+ public static final int V1_15_1_PRE1 = 2226; -+ public static final int V1_15_1 = 2227; -+ public static final int V1_15_2_PRE1 = 2228; -+ public static final int V1_15_2_PRE2 = 2229; -+ public static final int V1_15_2 = 2230; -+ public static final int V20W06A = 2504; -+ public static final int V20W07A = 2506; -+ public static final int V20W08A = 2507; -+ public static final int V20W09A = 2510; -+ public static final int V20W10A = 2512; -+ public static final int V20W11A = 2513; -+ public static final int V20W12A = 2515; -+ public static final int V20W13A = 2520; -+ public static final int V20W13B = 2521; -+ public static final int V20W14A = 2524; -+ public static final int V20W15A = 2525; -+ public static final int V20W16A = 2526; -+ public static final int V20W17A = 2529; -+ public static final int V20W18A = 2532; -+ public static final int V20W19A = 2534; -+ public static final int V20W20A = 2536; -+ public static final int V20W20B = 2537; -+ public static final int V20W21A = 2554; -+ public static final int V20W22A = 2555; -+ public static final int V1_16_PRE1 = 2556; -+ public static final int V1_16_PRE2 = 2557; -+ public static final int V1_16_PRE3 = 2559; -+ public static final int V1_16_PRE4 = 2560; -+ public static final int V1_16_PRE5 = 2561; -+ public static final int V1_16_PRE6 = 2562; -+ public static final int V1_16_PRE7 = 2563; -+ public static final int V1_16_PRE8 = 2564; -+ public static final int V1_16_RC1 = 2565; -+ public static final int V1_16 = 2566; -+ public static final int V1_16_1 = 2567; -+ public static final int V20W27A = 2569; -+ public static final int V20W28A = 2570; -+ public static final int V20W29A = 2571; -+ public static final int V20W30A = 2572; -+ public static final int V1_16_2_PRE1 = 2573; -+ public static final int V1_16_2_PRE2 = 2574; -+ public static final int V1_16_2_PRE3 = 2575; -+ public static final int V1_16_2_RC1 = 2576; -+ public static final int V1_16_2_RC2 = 2577; -+ public static final int V1_16_2 = 2578; -+ public static final int V1_16_3_RC1 = 2579; -+ public static final int V1_16_3 = 2580; -+ public static final int V1_16_4_PRE1 = 2581; -+ public static final int V1_16_4_PRE2 = 2582; -+ public static final int V1_16_4_RC1 = 2583; -+ public static final int V1_16_4 = 2584; -+ public static final int V1_16_5_RC1 = 2585; -+ public static final int V1_16_5 = 2586; -+ public static final int V20W45A = 2681; -+ public static final int V20W46A = 2682; -+ public static final int V20W48A = 2683; -+ public static final int V20W49A = 2685; -+ public static final int V20W51A = 2687; -+ public static final int V21W03A = 2689; -+ public static final int V21W05A = 2690; -+ public static final int V21W05B = 2692; -+ public static final int V21W06A = 2694; -+ public static final int V21W07A = 2695; -+ public static final int V21W08A = 2697; -+ public static final int V21W08B = 2698; -+ public static final int V21W10A = 2699; -+ public static final int V21W11A = 2703; -+ public static final int V21W13A = 2705; -+ public static final int V21W14A = 2706; -+ public static final int V21W15A = 2709; -+ public static final int V21W16A = 2711; -+ public static final int V21W17A = 2712; -+ public static final int V21W18A = 2713; -+ public static final int V21W19A = 2714; -+ public static final int V21W20A = 2715; -+ public static final int V1_17_PRE1 = 2716; -+ public static final int V1_17_PRE2 = 2718; -+ public static final int V1_17_PRE3 = 2719; -+ public static final int V1_17_PRE4 = 2720; -+ public static final int V1_17_PRE5 = 2721; -+ public static final int V1_17_RC1 = 2722; -+ public static final int V1_17_RC2 = 2723; -+ public static final int V1_17 = 2724; -+ public static final int V1_17_1_PRE1 = 2725; -+ public static final int V1_17_1_PRE2 = 2726; -+ public static final int V1_17_1_PRE3 = 2727; -+ public static final int V1_17_1_RC1 = 2728; -+ public static final int V1_17_1_RC2 = 2729; -+ public static final int V1_17_1 = 2730; -+ public static final int V21W37A = 2834; -+ public static final int V21W38A = 2835; -+ public static final int V21W39A = 2836; -+ public static final int V21W40A = 2838; -+ public static final int V21W41A = 2839; -+ public static final int V21W42A = 2840; -+ public static final int V21W43A = 2844; -+ public static final int V21W44A = 2845; -+ public static final int V1_18_PRE1 = 2847; -+ public static final int V1_18_PRE2 = 2848; -+ public static final int V1_18_PRE3 = 2849; -+ public static final int V1_18_PRE4 = 2850; -+ public static final int V1_18_PRE5 = 2851; -+ public static final int V1_18_PRE6 = 2853; -+ public static final int V1_18_PRE7 = 2854; -+ public static final int V1_18_PRE8 = 2855; -+ public static final int V1_18_RC1 = 2856; -+ public static final int V1_18_RC2 = 2857; -+ public static final int V1_18_RC3 = 2858; -+ public static final int V1_18_RC4 = 2859; -+ public static final int V1_18 = 2860; -+ public static final int V1_18_1_PRE1 = 2861; -+ public static final int V1_18_1_RC1 = 2862; -+ public static final int V1_18_1_RC2 = 2863; -+ public static final int V1_18_1_RC3 = 2864; -+ public static final int V1_18_1 = 2865; -+ public static final int V22W03A = 2966; -+ public static final int V22W05A = 2967; -+ public static final int V22W06A = 2968; -+ public static final int V22W07A = 2969; -+ public static final int V1_18_2_PRE1 = 2971; -+ public static final int V1_18_2_PRE2 = 2972; -+ public static final int V1_18_2_PRE3 = 2973; -+ public static final int V1_18_2_RC1 = 2974; -+ public static final int V1_18_2 = 2975; -+ public static final int V22W11A = 3080; -+ public static final int V22W12A = 3082; -+ public static final int V22W13A = 3085; -+ public static final int V22W14A = 3088; -+ public static final int V22W15A = 3089; -+ public static final int V22W16A = 3091; -+ public static final int V22W16B = 3092; -+ public static final int V22W17A = 3093; -+ public static final int V22W18A = 3095; -+ public static final int V22W19A = 3096; -+ public static final int V1_19_PRE1 = 3098; -+ public static final int V1_19_PRE2 = 3099; -+ public static final int V1_19_PRE3 = 3100; -+ public static final int V1_19_PRE4 = 3101; -+ public static final int V1_19_PRE5 = 3102; -+ public static final int V1_19_RC1 = 3103; -+ public static final int V1_19_RC2 = 3104; -+ public static final int V1_19 = 3105; -+ public static final int V22W24A = 3106; -+ public static final int V1_19_1_PRE1 = 3107; -+ public static final int V1_19_1_RC1 = 3109; -+ public static final int V1_19_1_PRE2 = 3110; -+ public static final int V1_19_1_PRE3 = 3111; -+ public static final int V1_19_1_PRE4 = 3112; -+ public static final int V1_19_1_PRE5 = 3113; -+ public static final int V1_19_1_PRE6 = 3114; -+ public static final int V1_19_1_RC2 = 3115; -+ public static final int V1_19_1_RC3 = 3116; -+ public static final int V1_19_1 = 3117; -+ public static final int V1_19_2_RC1 = 3118; -+ public static final int V1_19_2_RC2 = 3119; -+ public static final int V1_19_2 = 3120; -+ public static final int V22W42A = 3205; -+ public static final int V22W43A = 3206; -+ public static final int V22W44A = 3207; -+ public static final int V22W45A = 3208; -+ public static final int V22W46A = 3210; -+ public static final int V1_19_3_PRE1 = 3211; -+ public static final int V1_19_3_PRE2 = 3212; -+ public static final int V1_19_3_PRE3 = 3213; -+ public static final int V1_19_3_RC1 = 3215; -+ public static final int V1_19_3 = 3218; -+ public static final int V23W03A = 3320; -+ public static final int V23W04A = 3321; -+ public static final int V23W05A = 3323; -+ public static final int V23W06A = 3326; -+ public static final int V23W07A = 3329; -+ public static final int V1_19_4_PRE1 = 3330; -+ public static final int V1_19_4_PRE2 = 3331; -+ public static final int V1_19_4_PRE3 = 3332; -+ public static final int V1_19_4_PRE4 = 3333; -+ public static final int V1_19_4_RC1 = 3334; -+ public static final int V1_19_4_RC2 = 3335; -+ public static final int V1_19_4_RC3 = 3336; -+ public static final int V1_19_4 = 3337; -+ public static final int V23W12A = 3442; -+ public static final int V23W13A = 3443; -+ public static final int V23W14A = 3445; -+ public static final int V23W16A = 3449; -+ public static final int V23W17A = 3452; -+ public static final int V23W19A = 3453; -+ public static final int V1_20_PRE1 = 3454; -+ public static final int V1_20_PRE2 = 3455; -+ public static final int V1_20_PRE3 = 3456; -+ public static final int V1_20_PRE4 = 3457; -+ public static final int V1_20_PRE5 = 3458; -+ public static final int V1_20_PRE6 = 3460; -+ public static final int V1_20_PRE7 = 3461; -+ public static final int V1_20_RC1 = 3462; -+ public static final int V1_20 = 3463; -+ public static final int V1_20_1_RC1 = 3464; -+ public static final int V1_20_1 = 3465; -+ public static final int V23W31A = 3567; -+ public static final int V23W32A = 3569; -+ public static final int V23W33A = 3570; -+ public static final int V23W35A = 3571; -+ public static final int V1_20_2_PRE1 = 3572; -+ public static final int V1_20_2_PRE2 = 3573; -+ public static final int V1_20_2_PRE3 = 3574; -+ public static final int V1_20_2_PRE4 = 3575; -+ public static final int V1_20_2_RC1 = 3576; -+ public static final int V1_20_2_RC2 = 3577; -+ public static final int V1_20_2 = 3578; -+ public static final int V23W40A = 3679; -+ public static final int V23W41A = 3681; -+ public static final int V23W42A = 3684; -+ public static final int V23W43A = 3686; -+ public static final int V23W43B = 3687; -+ public static final int V23W44A = 3688; -+ public static final int V23W45A = 3690; -+ public static final int V23W46A = 3691; -+ public static final int V1_20_3_PRE1 = 3693; -+ public static final int V1_20_3_PRE2 = 3694; -+ public static final int V1_20_3_PRE3 = 3695; -+ public static final int V1_20_3_PRE4 = 3696; -+ public static final int V1_20_3_RC1 = 3697; -+ public static final int V1_20_3 = 3698; -+ public static final int V1_20_4_RC1 = 3699; -+ public static final int V1_20_4 = 3700; -+ public static final int V23W51A = 3801; -+ public static final int V23W51B = 3802; -+ public static final int V24W03A = 3804; -+ public static final int V24W03B = 3805; -+ public static final int V24W04A = 3806; -+ public static final int V24W05A = 3809; -+ public static final int V24W05B = 3811; -+ public static final int V24W06A = 3815; -+ public static final int V24W07A = 3817; -+ public static final int V24W09A = 3819; -+ public static final int V24W10A = 3821; -+ public static final int V24W11A = 3823; -+ public static final int V24W12A = 3824; -+ public static final int V24W13A = 3826; -+ public static final int V24W14A = 3827; -+ public static final int V1_20_5_PRE1 = 3829; -+ public static final int V1_20_5_PRE2 = 3830; -+ public static final int V1_20_5_PRE3 = 3831; -+ public static final int V1_20_5_PRE4 = 3832; -+ public static final int V1_20_5_RC1 = 3834; -+ public static final int V1_20_5_RC2 = 3835; -+ public static final int V1_20_5_RC3 = 3836; -+ public static final int V1_20_5 = 3837; -+ public static final int V1_20_6_RC1 = 3838; -+ public static final int V1_20_6 = 3839; -+ public static final int V24W18A = 3940; -+ public static final int V24W19A = 3941; -+ public static final int V24W19B = 3942; -+ public static final int V24W20A = 3944; -+ public static final int V24W21A = 3946; -+ public static final int V24W21B = 3947; -+ public static final int V1_21_PRE1 = 3948; -+ public static final int V1_21_PRE2 = 3949; -+ public static final int V1_21_PRE3 = 3950; -+ public static final int V1_21_PRE4 = 3951; -+ public static final int V1_21_RC1 = 3952; -+ public static final int V1_21 = 3953; -+ public static final int V1_21_RC = 3954; -+ public static final int V1_21_1 = 3955; -+ public static final int V24W33A = 4058; -+ public static final int V24W34A = 4060; -+ public static final int V24W35A = 4062; -+ public static final int V24W36A = 4063; -+ public static final int V24W37A = 4065; -+ public static final int V24W38A = 4066; -+ public static final int V24W39A = 4069; -+ public static final int V24W40A = 4072; -+ public static final int V1_21_2_PRE1 = 4073; -+ public static final int V1_21_2_PRE2 = 4074; -+ public static final int V1_21_2_PRE3 = 4075; -+ public static final int V1_21_2_PRE4 = 4076; -+ public static final int V1_21_2_PRE5 = 4077; -+ public static final int V1_21_2_RC1 = 4078; -+ public static final int V1_21_2_RC2 = 4079; -+ public static final int V1_21_2 = 4080; -+ public static final int V1_21_3 = 4082; -+ public static final int V24W44A = 4174; -+ public static final int V24W45A = 4177; -+ public static final int V24W46A = 4178; -+ public static final int V1_21_4_PRE1 = 4179; -+ public static final int V1_21_4_PRE2 = 4182; -+ public static final int V1_21_4_PRE3 = 4183; -+ public static final int V1_21_4_RC1 = 4184; -+ public static final int V1_21_4_RC2 = 4186; -+ public static final int V1_21_4_RC3 = 4188; -+ public static final int V1_21_4 = 4189; -+ public static final int V25W02A = 4298; -+ public static final int V25W03A = 4304; -+ public static final int V25W04A = 4308; -+ public static final int V25W05A = 4310; -+ public static final int V25W06A = 4313; -+ public static final int V25W07A = 4315; -+ public static final int V25W08A = 4316; -+ public static final int V25W09A = 4317; -+ public static final int V25W09B = 4318; -+ public static final int V25W10A = 4319; -+ public static final int V1_21_5_PRE1 = 4320; -+ public static final int V1_21_5_PRE2 = 4321; -+ public static final int V1_21_5_PRE3 = 4321; -+ public static final int V1_21_5_RC1 = 4323; -+ public static final int V1_21_5_RC2 = 4324; -+ public static final int V1_21_5 = 4325; -+ /* -+ public static final int V25W15A = 4422; -+ public static final int V25W16A = 4423; -+ public static final int V25W17A = 4425; -+ public static final int V25W18A = 4426; -+ public static final int V25W19A = 4427; -+ public static final int V25W20A = 4428; -+ public static final int V25W21A = 4429; -+ public static final int V1_21_6_PRE1 = 4430; -+ public static final int V1_21_6_PRE2 = 4431; -+ public static final int V1_21_6_PRE3 = 4432; -+ public static final int V1_21_6_PRE4 = 4433; -+ public static final int V1_21_6_RC1 = 4434; -+ public static final int V1_21_6 = 4435; -+ */ -+ -+ private MCVersions() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9022385edc8dd887780aa0881741d6d042fe2bc4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.advancements; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.ArrayList; -+import java.util.function.Function; -+ -+public final class ConverterAbstractAdvancementsRename { -+ -+ private ConverterAbstractAdvancementsRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ MCTypeRegistry.ADVANCEMENTS.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameKeys(data, renamer); -+ return null; -+ } -+ }); -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterCriteriaRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterCriteriaRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..72d0d70b5ade04469aaecbf454b37a2643923a97 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterCriteriaRename.java -@@ -0,0 +1,42 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.advancements; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.function.Function; -+ -+public final class ConverterCriteriaRename extends DataConverter { -+ -+ public final String path; -+ public final Function conversion; -+ -+ public ConverterCriteriaRename(final int toVersion, final String path, final Function conversion) { -+ super(toVersion); -+ this.path = path; -+ this.conversion = conversion; -+ } -+ -+ public ConverterCriteriaRename(final int toVersion, final int versionStep, final String path, final Function conversion) { -+ super(toVersion, versionStep); -+ this.path = path; -+ this.conversion = conversion; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType advancement = data.getMap(this.path); -+ if (advancement == null) { -+ return null; -+ } -+ -+ final MapType criteria = advancement.getMap("criteria"); -+ if (criteria == null) { -+ return null; -+ } -+ -+ RenameHelper.renameKeys(criteria, this.conversion); -+ -+ return null; -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterAbstractAttributesRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterAbstractAttributesRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..75efa3e470e3d386f993064b3af7f67d82ca4b50 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterAbstractAttributesRename.java -@@ -0,0 +1,60 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.attributes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractAttributesRename { -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int versionStep, final Function renamer) { -+ MCTypeRegistry.DATA_COMPONENTS.addStructureConverter(new DataConverter<>(version, versionStep) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType attributeModifiers = data.getMap("minecraft:attribute_modifiers"); -+ if (attributeModifiers == null) { -+ return null; -+ } -+ -+ final ListType modifiers = attributeModifiers.getList("modifiers", ObjectType.MAP); -+ if (modifiers == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = modifiers.size(); i < len; ++i) { -+ RenameHelper.renameString(modifiers.getMap(i), "type", renamer); -+ } -+ -+ return null; -+ } -+ }); -+ -+ final DataConverter entityConverter = new DataConverter<>(version, versionStep) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType modifiers = data.getList("attributes", ObjectType.MAP); -+ if (modifiers == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = modifiers.size(); i < len; ++i) { -+ RenameHelper.renameString(modifiers.getMap(i), "id", renamer); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(entityConverter); -+ MCTypeRegistry.PLAYER.addStructureConverter(entityConverter); -+ } -+ -+ private ConverterAbstractAttributesRename() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterAbstractOldAttributesRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterAbstractOldAttributesRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1a6d02df13f3461402fed429f7fbdb5acee877c4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterAbstractOldAttributesRename.java -@@ -0,0 +1,57 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.attributes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractOldAttributesRename { -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int versionStep, final Function renamer) { -+ final DataConverter entityConverter = new DataConverter<>(version, versionStep) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType attributes = data.getList("Attributes", ObjectType.MAP); -+ -+ if (attributes == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ RenameHelper.renameString(attributes.getMap(i), "Name", renamer); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(entityConverter); -+ MCTypeRegistry.PLAYER.addStructureConverter(entityConverter); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(version, versionStep) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType attributes = data.getList("AttributeModifiers", ObjectType.MAP); -+ -+ if (attributes == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ RenameHelper.renameString(attributes.getMap(i), "AttributeName", renamer); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private ConverterAbstractOldAttributesRename() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterEntityAttributesBaseValueUpdater.java b/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterEntityAttributesBaseValueUpdater.java -new file mode 100644 -index 0000000000000000000000000000000000000000..071272260593f834b03b195a1e4c71c81a051be5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/attributes/ConverterEntityAttributesBaseValueUpdater.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.attributes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import java.util.function.DoubleUnaryOperator; -+ -+public final class ConverterEntityAttributesBaseValueUpdater extends DataConverter { -+ -+ private final String targetId; -+ private final DoubleUnaryOperator updater; -+ -+ public ConverterEntityAttributesBaseValueUpdater(final int toVersion, final String targetId, final DoubleUnaryOperator updater) { -+ this(toVersion, 0, targetId, updater); -+ } -+ -+ public ConverterEntityAttributesBaseValueUpdater(final int toVersion, final int versionStep, final String targetId, -+ final DoubleUnaryOperator updater) { -+ super(toVersion, versionStep); -+ this.targetId = targetId; -+ this.updater = updater; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType modifiers = data.getList("attributes", ObjectType.MAP); -+ if (modifiers == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = modifiers.size(); i < len; ++i) { -+ final MapType modifier = modifiers.getMap(i); -+ -+ if (!this.targetId.equals(NamespaceUtil.correctNamespace(modifier.getString("id", "")))) { -+ continue; -+ } -+ -+ modifier.setDouble("base", this.updater.applyAsDouble(modifier.getDouble("base", 0.0))); -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/blockname/ConverterAbstractBlockRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/blockname/ConverterAbstractBlockRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..316bc54366bb1ba2273e52dc52aaef6c8e43a2c3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/blockname/ConverterAbstractBlockRename.java -@@ -0,0 +1,64 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.blockname; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractBlockRename { -+ -+ private ConverterAbstractBlockRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ ConverterAbstractStringValueTypeRename.register(version, subVersion, MCTypeRegistry.BLOCK_NAME, renamer); -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String name = data.getString("Name"); -+ if (name != null) { -+ final String converted = renamer.apply(name); -+ if (converted != null) { -+ data.setString("Name", converted); -+ } -+ } -+ return null; -+ } -+ }); -+ MCTypeRegistry.FLAT_BLOCK_STATE.addConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ if (!(data instanceof String string)) { -+ return null; -+ } -+ -+ if (string.isEmpty()) { -+ return null; -+ } -+ -+ final int nbtStart1 = string.indexOf('['); -+ final int nbtStart2 = string.indexOf('{'); -+ int stateNameEnd = string.length(); -+ if (nbtStart1 > 0) { -+ stateNameEnd = nbtStart1; -+ } -+ -+ if (nbtStart2 > 0) { -+ stateNameEnd = Math.min(stateNameEnd, nbtStart2); -+ } -+ -+ final String blockStateName = string.substring(0, stateNameEnd); -+ final String converted = renamer.apply(blockStateName); -+ if (converted == null) { -+ return null; -+ } -+ -+ return converted.concat(string.substring(stateNameEnd)); -+ } -+ }); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterAddBlendingData.java b/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterAddBlendingData.java -new file mode 100644 -index 0000000000000000000000000000000000000000..038f19b72870aee2b94e6691c03074e464e7d253 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterAddBlendingData.java -@@ -0,0 +1,65 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.chunk; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import java.util.Arrays; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class ConverterAddBlendingData extends DataConverter { -+ -+ private static final Set STATUSES_TO_SKIP_BLENDING = new HashSet<>( -+ Arrays.asList( -+ "minecraft:empty", -+ "minecraft:structure_starts", -+ "minecraft:structure_references", -+ "minecraft:biomes" -+ ) -+ ); -+ -+ public ConverterAddBlendingData(final int toVersion) { -+ super(toVersion); -+ } -+ -+ public ConverterAddBlendingData(final int toVersion, final int versionStep) { -+ super(toVersion, versionStep); -+ } -+ -+ private static MapType createBlendingData(final int height, final int minY) { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setInt("min_section", minY >> 4); -+ ret.setInt("max_section", (minY + height) >> 4); -+ -+ return ret; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.remove("blending_data"); -+ final MapType context = data.getMap("__context"); -+ if (!"minecraft:overworld".equals(context == null ? null : context.getString("dimension"))) { -+ return null; -+ } -+ -+ final String status = NamespaceUtil.correctNamespace(data.getString("Status")); -+ if (status == null) { -+ return null; -+ } -+ -+ final MapType belowZeroRetrogen = data.getMap("below_zero_retrogen"); -+ -+ if (!STATUSES_TO_SKIP_BLENDING.contains(status)) { -+ data.setMap("blending_data", createBlendingData(384, -64)); -+ } else if (belowZeroRetrogen != null) { -+ final String realStatus = NamespaceUtil.correctNamespace(belowZeroRetrogen.getString("target_status", "empty")); -+ if (!STATUSES_TO_SKIP_BLENDING.contains(realStatus)) { -+ data.setMap("blending_data", createBlendingData(256, 0)); -+ } -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterFlattenChunk.java b/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterFlattenChunk.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ed7468f57047ad4ec7bf58680871848efe350182 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterFlattenChunk.java -@@ -0,0 +1,1016 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.chunk; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperBlockFlatteningV1450; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperItemNameV102; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.mojang.datafixers.DataFixUtils; -+import com.mojang.logging.LogUtils; -+import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap; -+import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+import it.unimi.dsi.fastutil.ints.IntArrayList; -+import it.unimi.dsi.fastutil.ints.IntIterator; -+import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap; -+import net.minecraft.util.datafix.PackedBitStorage; -+import org.slf4j.Logger; -+import java.util.Arrays; -+import java.util.BitSet; -+import java.util.HashMap; -+import java.util.Iterator; -+import java.util.Map; -+import java.util.Objects; -+ -+import static it.unimi.dsi.fastutil.HashCommon.arraySize; -+ -+public final class ConverterFlattenChunk extends DataConverter { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ static final BitSet VIRTUAL_SET = new BitSet(256); -+ static final BitSet IDS_NEEDING_FIX_SET = new BitSet(256); -+ -+ static { -+ IDS_NEEDING_FIX_SET.set(2); -+ IDS_NEEDING_FIX_SET.set(3); -+ IDS_NEEDING_FIX_SET.set(110); -+ IDS_NEEDING_FIX_SET.set(140); -+ IDS_NEEDING_FIX_SET.set(144); -+ IDS_NEEDING_FIX_SET.set(25); -+ IDS_NEEDING_FIX_SET.set(86); -+ IDS_NEEDING_FIX_SET.set(26); -+ IDS_NEEDING_FIX_SET.set(176); -+ IDS_NEEDING_FIX_SET.set(177); -+ IDS_NEEDING_FIX_SET.set(175); -+ IDS_NEEDING_FIX_SET.set(64); -+ IDS_NEEDING_FIX_SET.set(71); -+ IDS_NEEDING_FIX_SET.set(193); -+ IDS_NEEDING_FIX_SET.set(194); -+ IDS_NEEDING_FIX_SET.set(195); -+ IDS_NEEDING_FIX_SET.set(196); -+ IDS_NEEDING_FIX_SET.set(197); -+ -+ VIRTUAL_SET.set(54); -+ VIRTUAL_SET.set(146); -+ VIRTUAL_SET.set(25); -+ VIRTUAL_SET.set(26); -+ VIRTUAL_SET.set(51); -+ VIRTUAL_SET.set(53); -+ VIRTUAL_SET.set(67); -+ VIRTUAL_SET.set(108); -+ VIRTUAL_SET.set(109); -+ VIRTUAL_SET.set(114); -+ VIRTUAL_SET.set(128); -+ VIRTUAL_SET.set(134); -+ VIRTUAL_SET.set(135); -+ VIRTUAL_SET.set(136); -+ VIRTUAL_SET.set(156); -+ VIRTUAL_SET.set(163); -+ VIRTUAL_SET.set(164); -+ VIRTUAL_SET.set(180); -+ VIRTUAL_SET.set(203); -+ VIRTUAL_SET.set(55); -+ VIRTUAL_SET.set(85); -+ VIRTUAL_SET.set(113); -+ VIRTUAL_SET.set(188); -+ VIRTUAL_SET.set(189); -+ VIRTUAL_SET.set(190); -+ VIRTUAL_SET.set(191); -+ VIRTUAL_SET.set(192); -+ VIRTUAL_SET.set(93); -+ VIRTUAL_SET.set(94); -+ VIRTUAL_SET.set(101); -+ VIRTUAL_SET.set(102); -+ VIRTUAL_SET.set(160); -+ VIRTUAL_SET.set(106); -+ VIRTUAL_SET.set(107); -+ VIRTUAL_SET.set(183); -+ VIRTUAL_SET.set(184); -+ VIRTUAL_SET.set(185); -+ VIRTUAL_SET.set(186); -+ VIRTUAL_SET.set(187); -+ VIRTUAL_SET.set(132); -+ VIRTUAL_SET.set(139); -+ VIRTUAL_SET.set(199); -+ } -+ -+ static final boolean[] VIRTUAL = toBooleanArray(VIRTUAL_SET); -+ static final boolean[] IDS_NEEDING_FIX = toBooleanArray(IDS_NEEDING_FIX_SET); -+ -+ private static boolean[] toBooleanArray(final BitSet set) { -+ final boolean[] ret = new boolean[4096]; -+ for (int i = 0; i < 4096; ++i) { -+ ret[i] = set.get(i); -+ } -+ -+ return ret; -+ } -+ -+ static final MapType PUMPKIN = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:pumpkin'}"); -+ static final MapType SNOWY_PODZOL = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:podzol',Properties:{snowy:'true'}}"); -+ static final MapType SNOWY_GRASS = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:grass_block',Properties:{snowy:'true'}}"); -+ static final MapType SNOWY_MYCELIUM = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:mycelium',Properties:{snowy:'true'}}"); -+ static final MapType UPPER_SUNFLOWER = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:sunflower',Properties:{half:'upper'}}"); -+ static final MapType UPPER_LILAC = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:lilac',Properties:{half:'upper'}}"); -+ static final MapType UPPER_TALL_GRASS = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:tall_grass',Properties:{half:'upper'}}"); -+ static final MapType UPPER_LARGE_FERN = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:large_fern',Properties:{half:'upper'}}"); -+ static final MapType UPPER_ROSE_BUSH = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:rose_bush',Properties:{half:'upper'}}"); -+ static final MapType UPPER_PEONY = HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:peony',Properties:{half:'upper'}}"); -+ -+ static final Map FLOWER_POT_MAP = new HashMap<>(); -+ static { -+ FLOWER_POT_MAP.put("minecraft:air0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:flower_pot'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_poppy'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower1", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_blue_orchid'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower2", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_allium'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower3", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_azure_bluet'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower4", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_red_tulip'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower5", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_orange_tulip'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower6", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_white_tulip'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower7", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_pink_tulip'}")); -+ FLOWER_POT_MAP.put("minecraft:red_flower8", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_oxeye_daisy'}")); -+ FLOWER_POT_MAP.put("minecraft:yellow_flower0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_dandelion'}")); -+ FLOWER_POT_MAP.put("minecraft:sapling0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_oak_sapling'}")); -+ FLOWER_POT_MAP.put("minecraft:sapling1", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_spruce_sapling'}")); -+ FLOWER_POT_MAP.put("minecraft:sapling2", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_birch_sapling'}")); -+ FLOWER_POT_MAP.put("minecraft:sapling3", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_jungle_sapling'}")); -+ FLOWER_POT_MAP.put("minecraft:sapling4", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_acacia_sapling'}")); -+ FLOWER_POT_MAP.put("minecraft:sapling5", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_dark_oak_sapling'}")); -+ FLOWER_POT_MAP.put("minecraft:red_mushroom0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_red_mushroom'}")); -+ FLOWER_POT_MAP.put("minecraft:brown_mushroom0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_brown_mushroom'}")); -+ FLOWER_POT_MAP.put("minecraft:deadbush0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_dead_bush'}")); -+ FLOWER_POT_MAP.put("minecraft:tallgrass2", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_fern'}")); -+ FLOWER_POT_MAP.put("minecraft:cactus0", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:potted_cactus'}")); // we change default to empty -+ } -+ -+ static final Map SKULL_MAP = new HashMap<>(); -+ static { -+ mapSkull(SKULL_MAP, 0, "skeleton", "skull"); -+ mapSkull(SKULL_MAP, 1, "wither_skeleton", "skull"); -+ mapSkull(SKULL_MAP, 2, "zombie", "head"); -+ mapSkull(SKULL_MAP, 3, "player", "head"); -+ mapSkull(SKULL_MAP, 4, "creeper", "head"); -+ mapSkull(SKULL_MAP, 5, "dragon", "head"); -+ }; -+ -+ private static void mapSkull(final Map into, final int oldId, final String newId, final String skullType) { -+ into.put(oldId + "north", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + newId + "_wall_" + skullType + "',Properties:{facing:'north'}}")); -+ into.put(oldId + "east", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + newId + "_wall_" + skullType + "',Properties:{facing:'east'}}")); -+ into.put(oldId + "south", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + newId + "_wall_" + skullType + "',Properties:{facing:'south'}}")); -+ into.put(oldId + "west", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + newId + "_wall_" + skullType + "',Properties:{facing:'west'}}")); -+ -+ for (int rotation = 0; rotation < 16; ++rotation) { -+ into.put(oldId + "" + rotation, -+ HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + newId + "_" + skullType + "',Properties:{rotation:'" + rotation + "'}}")); -+ } -+ } -+ -+ static final Map DOOR_MAP = new HashMap<>(); -+ static { -+ mapDoor(DOOR_MAP, "oak_door", 1024); -+ mapDoor(DOOR_MAP, "iron_door", 1136); -+ mapDoor(DOOR_MAP, "spruce_door", 3088); -+ mapDoor(DOOR_MAP, "birch_door", 3104); -+ mapDoor(DOOR_MAP, "jungle_door", 3120); -+ mapDoor(DOOR_MAP, "acacia_door", 3136); -+ mapDoor(DOOR_MAP, "dark_oak_door", 3152); -+ }; -+ -+ private static void mapDoor(final Map into, final String type, final int oldId) { -+ into.put("minecraft:" + type + "eastlowerleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "eastlowerleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "eastlowerlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "eastlowerlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "eastlowerrightfalsefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId))); -+ into.put("minecraft:" + type + "eastlowerrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "eastlowerrighttruefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 4))); -+ into.put("minecraft:" + type + "eastlowerrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "eastupperleftfalsefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 8))); -+ into.put("minecraft:" + type + "eastupperleftfalsetrue", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 10))); -+ into.put("minecraft:" + type + "eastupperlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "eastupperlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "eastupperrightfalsefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 9))); -+ into.put("minecraft:" + type + "eastupperrightfalsetrue", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 11))); -+ into.put("minecraft:" + type + "eastupperrighttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "eastupperrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "northlowerleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "northlowerleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "northlowerlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "northlowerlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "northlowerrightfalsefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 3))); -+ into.put("minecraft:" + type + "northlowerrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "northlowerrighttruefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 7))); -+ into.put("minecraft:" + type + "northlowerrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "northupperleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "northupperleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "northupperlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "northupperlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "northupperrightfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "northupperrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "northupperrighttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "northupperrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "southlowerleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "southlowerleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "southlowerlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "southlowerlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "southlowerrightfalsefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 1))); -+ into.put("minecraft:" + type + "southlowerrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "southlowerrighttruefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 5))); -+ into.put("minecraft:" + type + "southlowerrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "southupperleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "southupperleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "southupperlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "southupperlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "southupperrightfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "southupperrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "southupperrighttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "southupperrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "westlowerleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "westlowerleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "westlowerlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "westlowerlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "westlowerrightfalsefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 2))); -+ into.put("minecraft:" + type + "westlowerrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "westlowerrighttruefalse", Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(oldId + 6))); -+ into.put("minecraft:" + type + "westlowerrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "westupperleftfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "westupperleftfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "westupperlefttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "westupperlefttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}")); -+ into.put("minecraft:" + type + "westupperrightfalsefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}")); -+ into.put("minecraft:" + type + "westupperrightfalsetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}")); -+ into.put("minecraft:" + type + "westupperrighttruefalse", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}")); -+ into.put("minecraft:" + type + "westupperrighttruetrue", HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + type + "',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}")); -+ } -+ -+ static final Map NOTE_BLOCK_MAP = new HashMap<>(); -+ static { -+ for(int note = 0; note < 26; ++note) { -+ NOTE_BLOCK_MAP.put("true" + note, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:note_block',Properties:{powered:'true',note:'" + note + "'}}")); -+ NOTE_BLOCK_MAP.put("false" + note, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:note_block',Properties:{powered:'false',note:'" + note + "'}}")); -+ } -+ } -+ -+ static final Int2ObjectOpenHashMap DYE_COLOR_MAP = new Int2ObjectOpenHashMap<>(); -+ static { -+ DYE_COLOR_MAP.put(0, "white"); -+ DYE_COLOR_MAP.put(1, "orange"); -+ DYE_COLOR_MAP.put(2, "magenta"); -+ DYE_COLOR_MAP.put(3, "light_blue"); -+ DYE_COLOR_MAP.put(4, "yellow"); -+ DYE_COLOR_MAP.put(5, "lime"); -+ DYE_COLOR_MAP.put(6, "pink"); -+ DYE_COLOR_MAP.put(7, "gray"); -+ DYE_COLOR_MAP.put(8, "light_gray"); -+ DYE_COLOR_MAP.put(9, "cyan"); -+ DYE_COLOR_MAP.put(10, "purple"); -+ DYE_COLOR_MAP.put(11, "blue"); -+ DYE_COLOR_MAP.put(12, "brown"); -+ DYE_COLOR_MAP.put(13, "green"); -+ DYE_COLOR_MAP.put(14, "red"); -+ DYE_COLOR_MAP.put(15, "black"); -+ } -+ -+ static final Map BED_BLOCK_MAP = new HashMap<>(); -+ -+ static { -+ for (final Int2ObjectMap.Entry entry : DYE_COLOR_MAP.int2ObjectEntrySet()) { -+ if (!Objects.equals(entry.getValue(), "red")) { -+ addBeds(BED_BLOCK_MAP, entry.getIntKey(), entry.getValue()); -+ } -+ } -+ } -+ -+ private static void addBeds(final Map into, final int colourId, final String colourName) { -+ into.put("southfalsefoot" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'south',occupied:'false',part:'foot'}}")); -+ into.put("westfalsefoot" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'west',occupied:'false',part:'foot'}}")); -+ into.put("northfalsefoot" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'north',occupied:'false',part:'foot'}}")); -+ into.put("eastfalsefoot" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'east',occupied:'false',part:'foot'}}")); -+ into.put("southfalsehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'south',occupied:'false',part:'head'}}")); -+ into.put("westfalsehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'west',occupied:'false',part:'head'}}")); -+ into.put("northfalsehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'north',occupied:'false',part:'head'}}")); -+ into.put("eastfalsehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'east',occupied:'false',part:'head'}}")); -+ into.put("southtruehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'south',occupied:'true',part:'head'}}")); -+ into.put("westtruehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'west',occupied:'true',part:'head'}}")); -+ into.put("northtruehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'north',occupied:'true',part:'head'}}")); -+ into.put("easttruehead" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_bed',Properties:{facing:'east',occupied:'true',part:'head'}}")); -+ } -+ -+ static final Map BANNER_BLOCK_MAP = new HashMap<>(); -+ -+ static { -+ for (final Int2ObjectMap.Entry entry : DYE_COLOR_MAP.int2ObjectEntrySet()) { -+ if (!Objects.equals(entry.getValue(), "white")) { -+ addBanners(BANNER_BLOCK_MAP, 15 - entry.getIntKey(), entry.getValue()); -+ } -+ } -+ } -+ -+ private static void addBanners(final Map into, final int colourId, final String colourName) { -+ for(int rotation = 0; rotation < 16; ++rotation) { -+ into.put("" + rotation + "_" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_banner',Properties:{rotation:'" + rotation + "'}}")); -+ } -+ -+ into.put("north_" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_wall_banner',Properties:{facing:'north'}}")); -+ into.put("south_" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_wall_banner',Properties:{facing:'south'}}")); -+ into.put("west_" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_wall_banner',Properties:{facing:'west'}}")); -+ into.put("east_" + colourId, HelperBlockFlatteningV1450.parseTag("{Name:'minecraft:" + colourName + "_wall_banner',Properties:{facing:'east'}}")); -+ } -+ -+ static final MapType AIR = Objects.requireNonNull(HelperBlockFlatteningV1450.getNBTForId(0)); -+ -+ public ConverterFlattenChunk() { -+ super(MCVersions.V17W47A, 1); -+ } -+ -+ static String getName(final MapType blockState) { -+ return blockState.getString("Name"); -+ } -+ -+ static String getProperty(final MapType blockState, final String propertyName) { -+ final MapType properties = blockState.getMap("Properties"); -+ if (properties == null) { -+ return ""; -+ } -+ -+ return properties.getString(propertyName, ""); -+ } -+ -+ static int getSideMask(final boolean noLeft, final boolean noRight, final boolean noBack, final boolean noForward) { -+ if (noBack) { -+ if (noRight) { -+ return 2; -+ } else if (noLeft) { -+ return 128; -+ } else { -+ return 1; -+ } -+ } else if (noForward) { -+ if (noLeft) { -+ return 32; -+ } else if (noRight) { -+ return 8; -+ } else { -+ return 16; -+ } -+ } else if (noRight) { -+ return 4; -+ } else if (noLeft) { -+ return 64; -+ } else { -+ return 0; -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ if (!level.hasKey("Sections", ObjectType.LIST)) { -+ return null; -+ } -+ -+ data.setMap("Level", new UpgradeChunk(level).writeBackToLevel()); -+ -+ return null; -+ } -+ -+ static enum Direction { -+ DOWN(AxisDirection.NEGATIVE, Axis.Y), -+ UP(AxisDirection.POSITIVE, Axis.Y), -+ NORTH(AxisDirection.NEGATIVE, Axis.Z), -+ SOUTH(AxisDirection.POSITIVE, Axis.Z), -+ WEST(AxisDirection.NEGATIVE, Axis.X), -+ EAST(AxisDirection.POSITIVE, Axis.X); -+ -+ private final Axis axis; -+ private final AxisDirection axisDirection; -+ -+ private Direction(final AxisDirection axisDirection, final Axis axis) { -+ this.axis = axis; -+ this.axisDirection = axisDirection; -+ } -+ -+ public AxisDirection getAxisDirection() { -+ return this.axisDirection; -+ } -+ -+ public Axis getAxis() { -+ return this.axis; -+ } -+ -+ public static enum AxisDirection { -+ POSITIVE(1), -+ NEGATIVE(-1); -+ -+ private final int step; -+ -+ private AxisDirection(final int step) { -+ this.step = step; -+ } -+ -+ public int getStep() { -+ return this.step; -+ } -+ } -+ -+ public static enum Axis { -+ X, Y, Z; -+ } -+ } -+ -+ static class DataLayer { -+ private final byte[] data; -+ -+ public DataLayer() { -+ this.data = new byte[2048]; -+ } -+ -+ public DataLayer(final byte[] data) { -+ this.data = data; -+ if (data.length != 2048) { -+ throw new IllegalArgumentException("ChunkNibbleArrays should be 2048 bytes not: " + data.length); -+ } -+ } -+ -+ public static DataLayer getOrNull(final byte[] data) { -+ return data == null ? null : new DataLayer(data); -+ } -+ -+ public static DataLayer getOrCreate(final byte[] data) { -+ return data == null ? new DataLayer() : new DataLayer(data); -+ } -+ -+ public int get(final int index) { -+ final byte value = this.data[index >>> 1]; -+ -+ // if we are an even index, we want lower 4 bits -+ // if we are an odd index, we want upper 4 bits -+ return ((value >>> ((index & 1) << 2)) & 0xF); -+ } -+ -+ public int get(final int x, final int y, final int z) { -+ final int index = y << 8 | z << 4 | x; -+ final byte value = this.data[index >>> 1]; -+ -+ // if we are an even index, we want lower 4 bits -+ // if we are an odd index, we want upper 4 bits -+ return ((value >>> ((index & 1) << 2)) & 0xF); -+ } -+ } -+ -+ static final class UpgradeChunk { -+ int sides; -+ -+ final Section[] sections = new Section[16]; -+ final MapType level; -+ final int blockX; -+ final int blockZ; -+ final Int2ObjectLinkedOpenHashMap tileEntities = new Int2ObjectLinkedOpenHashMap<>(16); -+ -+ public UpgradeChunk(final MapType level) { -+ this.level = level; -+ this.blockX = level.getInt("xPos") << 4; -+ this.blockZ = level.getInt("zPos") << 4; -+ -+ final ListType tileEntities = level.getList("TileEntities", ObjectType.MAP); -+ if (tileEntities != null) { -+ for (int i = 0, len = tileEntities.size(); i < len; ++i) { -+ final MapType tileEntity = tileEntities.getMap(i); -+ -+ final int x = (tileEntity.getInt("x") - this.blockX) & 15; -+ final int y = tileEntity.getInt("y"); -+ final int z = (tileEntity.getInt("z") - this.blockZ) & 15; -+ final int index = (y << 8) | (z << 4) | x; -+ if (this.tileEntities.put(index, tileEntity) != null) { -+ LOGGER.warn("In chunk: {}x{} found a duplicate block entity at position (ConverterFlattenChunk): [{}, {}, {}]", this.blockX, this.blockZ, x, y, z); -+ } -+ } -+ } -+ -+ final boolean convertedFromAlphaFormat = level.getBoolean("convertedFromAlphaFormat"); -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType sectionData = sections.getMap(i); -+ final Section section = new Section(sectionData); -+ -+ if (section.y < 0 || section.y > 15) { -+ LOGGER.warn("In chunk: {}x{} found an invalid chunk section y (ConverterFlattenChunk): {}", this.blockX, this.blockZ, section.y); -+ continue; -+ } -+ -+ if (this.sections[section.y] != null) { -+ LOGGER.warn("In chunk: {}x{} found a duplicate chunk section (ConverterFlattenChunk): {}", this.blockX, this.blockZ, section.y); -+ } -+ -+ this.sides = section.upgrade(this.sides); -+ this.sections[section.y] = section; -+ } -+ } -+ -+ for (final Section section : this.sections) { -+ if (section == null) { -+ continue; -+ } -+ -+ final int yIndex = section.y << (8 + 4); -+ -+ for (final Iterator> iterator = section.toFix.int2ObjectEntrySet().fastIterator(); iterator.hasNext();) { -+ final Int2ObjectMap.Entry fixEntry = iterator.next(); -+ final IntIterator positionIterator = fixEntry.getValue().iterator(); -+ switch (fixEntry.getIntKey()) { -+ case 2: { // grass block -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType blockState = this.getBlock(position); -+ if (!"minecraft:grass_block".equals(getName(blockState))) { -+ continue; -+ } -+ -+ final String blockAbove = getName(getBlock(relative(position, Direction.UP))); -+ if ("minecraft:snow".equals(blockAbove) || "minecraft:snow_layer".equals(blockAbove)) { -+ this.setBlock(position, SNOWY_GRASS); -+ } -+ } -+ break; -+ } -+ case 3: { // dirt -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType blockState = this.getBlock(position); -+ if (!"minecraft:podzol".equals(getName(blockState))) { -+ continue; -+ } -+ -+ final String blockAbove = getName(getBlock(relative(position, Direction.UP))); -+ if ("minecraft:snow".equals(blockAbove) || "minecraft:snow_layer".equals(blockAbove)) { -+ this.setBlock(position, SNOWY_PODZOL); -+ } -+ } -+ break; -+ } -+ case 25: { // note block -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType tile = this.removeBlockEntity(position); -+ if (tile != null) { -+ final String state = Boolean.toString(tile.getBoolean("powered")) + (byte) Math.min(Math.max(tile.getInt("note"), 0), 24); -+ this.setBlock(position, NOTE_BLOCK_MAP.getOrDefault(state, NOTE_BLOCK_MAP.get("false0"))); -+ } -+ } -+ break; -+ } -+ case 26: { // bed -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType tile = this.getBlockEntity(position); -+ -+ if (tile == null) { -+ continue; -+ } -+ -+ final MapType blockState = this.getBlock(position); -+ -+ final int colour = tile.getInt("color"); -+ if (colour != 14 && colour >= 0 && colour < 16) { -+ final String state = getProperty(blockState, "facing") + getProperty(blockState, "occupied") + getProperty(blockState, "part") + colour; -+ -+ final MapType update = BED_BLOCK_MAP.get(state); -+ if (update != null) { -+ this.setBlock(position, update); -+ } -+ } -+ } -+ break; -+ } -+ case 64: // oak door -+ case 71: // iron door -+ case 193: // spruce door -+ case 194: // birch door -+ case 195: // jungle door -+ case 196: // acacia door -+ case 197: { // dark oak door -+ // aka the door updater -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType blockState = this.getBlock(position); -+ if (!getName(blockState).endsWith("_door")) { -+ continue; -+ } -+ -+ if (!"lower".equals(getProperty(blockState, "half"))) { -+ continue; -+ } -+ -+ final int positionAbove = relative(position, Direction.UP); -+ final MapType blockStateAbove = this.getBlock(positionAbove); -+ -+ final String name = getName(blockState); -+ if (name.equals(getName(blockStateAbove))) { -+ final String facingBelow = getProperty(blockState, "facing"); -+ final String openBelow = getProperty(blockState, "open"); -+ final String hingeAbove = convertedFromAlphaFormat ? "left" : getProperty(blockStateAbove, "hinge"); -+ final String poweredAbove = convertedFromAlphaFormat ? "false" : getProperty(blockStateAbove, "powered"); -+ -+ this.setBlock(position, DOOR_MAP.get(name + facingBelow + "lower" + hingeAbove + openBelow + poweredAbove)); -+ this.setBlock(positionAbove, DOOR_MAP.get(name + facingBelow + "upper" + hingeAbove + openBelow + poweredAbove)); -+ } -+ } -+ break; -+ } -+ case 86: { // pumpkin -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType blockState = this.getBlock(position); -+ -+ // I guess this is some terrible hack to convert carved pumpkins from world gen into -+ // regular pumpkins? -+ -+ if ("minecraft:carved_pumpkin".equals(getName(blockState))) { -+ final String downName = getName(this.getBlock(relative(position, Direction.DOWN))); -+ if ("minecraft:grass_block".equals(downName) || "minecraft:dirt".equals(downName)) { -+ this.setBlock(position, PUMPKIN); -+ } -+ } -+ } -+ break; -+ } -+ case 110: { // mycelium -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType blockState = this.getBlock(position); -+ if ("minecraft:mycelium".equals(getName(blockState))) { -+ final String nameAbove = getName(this.getBlock(relative(position, Direction.UP))); -+ if ("minecraft:snow".equals(nameAbove) || "minecraft:snow_layer".equals(nameAbove)) { -+ this.setBlock(position, SNOWY_MYCELIUM); -+ } -+ } -+ } -+ break; -+ } -+ case 140: { // flower pot -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType tile = this.removeBlockEntity(position); -+ if (tile == null) { -+ continue; -+ } -+ -+ final String item; -+ if (tile.hasKey("Item", ObjectType.NUMBER)) { -+ // the item name converter should have migrated to number, however no legacy converter -+ // ever did this. so we can get data with versions above v102 (old worlds, converted prior to DFU) -+ // that didn't convert. so just do it here. -+ item = HelperItemNameV102.getNameFromId(tile.getInt("Item")); -+ } else { -+ item = tile.getString("Item", ""); -+ } -+ -+ final String state = item + tile.getInt("Data"); -+ this.setBlock(position, FLOWER_POT_MAP.getOrDefault(state, FLOWER_POT_MAP.get("minecraft:air0"))); -+ } -+ break; -+ } -+ case 144: { // mob head -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType tile = this.getBlockEntity(position); -+ if (tile == null) { -+ continue; -+ } -+ -+ final String typeString = Integer.toString(tile.getInt("SkullType")); -+ final String facing = getProperty(this.getBlock(position), "facing"); -+ final String state; -+ if (!"up".equals(facing) && !"down".equals(facing)) { -+ state = typeString + facing; -+ } else { -+ state = typeString + tile.getInt("Rot"); -+ } -+ -+ tile.remove("SkullType"); -+ tile.remove("facing"); -+ tile.remove("Rot"); -+ -+ this.setBlock(position, SKULL_MAP.getOrDefault(state, SKULL_MAP.get("0north"))); -+ } -+ break; -+ } -+ case 175: { // sunflower -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType blockState = this.getBlock(position); -+ if (!"upper".equals(getProperty(blockState, "half"))) { -+ continue; -+ } -+ -+ final MapType blockStateBelow = this.getBlock(relative(position, Direction.DOWN)); -+ final String nameBelow = getName(blockStateBelow); -+ switch (nameBelow) { -+ case "minecraft:sunflower": -+ this.setBlock(position, UPPER_SUNFLOWER); -+ break; -+ case "minecraft:lilac": -+ this.setBlock(position, UPPER_LILAC); -+ break; -+ case "minecraft:tall_grass": -+ this.setBlock(position, UPPER_TALL_GRASS); -+ break; -+ case "minecraft:large_fern": -+ this.setBlock(position, UPPER_LARGE_FERN); -+ break; -+ case "minecraft:rose_bush": -+ this.setBlock(position, UPPER_ROSE_BUSH); -+ break; -+ case "minecraft:peony": -+ this.setBlock(position, UPPER_PEONY); -+ break; -+ } -+ } -+ break; -+ } -+ case 176: // free standing banner -+ case 177: { // wall mounted banner -+ while (positionIterator.hasNext()) { -+ final int position = positionIterator.nextInt() | yIndex; -+ final MapType tile = this.getBlockEntity(position); -+ -+ if (tile == null) { -+ continue; -+ } -+ -+ final MapType blockState = this.getBlock(position); -+ -+ final int base = tile.getInt("Base"); -+ if (base != 15 && base >= 0 && base < 16) { -+ final String state = getProperty(blockState, fixEntry.getIntKey() == 176 ? "rotation" : "facing") + "_" + base; -+ final MapType update = BANNER_BLOCK_MAP.get(state); -+ if (update != null) { -+ this.setBlock(position, update); -+ } -+ } -+ } -+ break; -+ } -+ } -+ } -+ } -+ } -+ -+ private MapType getBlockEntity(final int index) { -+ return this.tileEntities.get(index); -+ } -+ -+ private MapType removeBlockEntity(final int index) { -+ return this.tileEntities.remove(index); -+ } -+ -+ public static int relative(final int index, final Direction direction) { -+ switch (direction.getAxis()) { -+ case X: -+ int j = (index & 15) + direction.getAxisDirection().getStep(); -+ return j >= 0 && j <= 15 ? index & -16 | j : -1; -+ case Y: -+ int k = (index >> 8) + direction.getAxisDirection().getStep(); -+ return k >= 0 && k <= 255 ? index & 255 | k << 8 : -1; -+ case Z: -+ int l = (index >> 4 & 15) + direction.getAxisDirection().getStep(); -+ return l >= 0 && l <= 15 ? index & -241 | l << 4 : -1; -+ default: -+ return -1; -+ } -+ } -+ -+ private void setBlock(final int index, final MapType blockState) { -+ if (index >= 0 && index <= 65535) { -+ final Section section = this.getSection(index); -+ if (section != null) { -+ section.setBlock(index & 4095, blockState); -+ } -+ } -+ } -+ -+ private Section getSection(final int index) { -+ final int y = index >> 12; -+ return y < this.sections.length ? this.sections[y] : null; -+ } -+ -+ public MapType getBlock(int i) { -+ if (i >= 0 && i <= 65535) { -+ final Section section = this.getSection(i); -+ return section == null ? AIR : section.getBlock(i & 4095); -+ } else { -+ return AIR; -+ } -+ } -+ -+ public MapType writeBackToLevel() { -+ if (this.tileEntities.isEmpty()) { -+ this.level.remove("TileEntities"); -+ } else { -+ final ListType tileEntities = Types.NBT.createEmptyList(); -+ this.tileEntities.values().forEach(tileEntities::addMap); -+ this.level.setList("TileEntities", tileEntities); -+ } -+ -+ final MapType indices = Types.NBT.createEmptyMap(); -+ final ListType sections = Types.NBT.createEmptyList(); -+ for (final Section section : this.sections) { -+ if (section == null) { -+ continue; -+ } -+ -+ sections.addMap(section.writeBackToSection()); -+ indices.setInts(Integer.toString(section.y), Arrays.copyOf(section.update.elements(), section.update.size())); -+ } -+ -+ this.level.setList("Sections", sections); -+ -+ final MapType upgradeData = Types.NBT.createEmptyMap(); -+ upgradeData.setByte("Sides", (byte)this.sides); -+ upgradeData.setMap("Indices", indices); -+ -+ this.level.setMap("UpgradeData", upgradeData); -+ -+ return this.level; -+ } -+ } -+ -+ static class Section { -+ final Palette palette = new Palette(); -+ -+ static final class Palette extends Reference2IntOpenHashMap { -+ -+ final ListType paletteStates = Types.NBT.createEmptyList(); -+ -+ private int find(final MapType k) { -+ if (((k) == (null))) -+ return containsNullKey ? n : -(n + 1); -+ MapType curr; -+ final Object[] key = this.key; -+ int pos; -+ // The starting point. -+ if (((curr = (MapType)key[pos = (it.unimi.dsi.fastutil.HashCommon.mix(System.identityHashCode(k))) & mask]) == (null))) -+ return -(pos + 1); -+ if (((k) == (curr))) -+ return pos; -+ // There's always an unused entry. -+ while (true) { -+ if (((curr = (MapType)key[pos = (pos + 1) & mask]) == (null))) -+ return -(pos + 1); -+ if (((k) == (curr))) -+ return pos; -+ } -+ } -+ -+ private void insert(final int pos, final MapType k, final int v) { -+ if (pos == n) -+ containsNullKey = true; -+ ((Object[])key)[pos] = k; -+ value[pos] = v; -+ if (size++ >= maxFill) -+ rehash(arraySize(size + 1, f)); -+ } -+ -+ private MapType[] byId = new MapType[4]; -+ private MapType last = null; -+ -+ public int getOrCreateId(final MapType k) { -+ if (k == this.last) { -+ return this.size - 1; -+ } -+ final int pos = find(k); -+ if (pos >= 0) { -+ return this.value[pos]; -+ } -+ -+ final int insert = this.size; -+ MapType inPalette = k; -+ -+ if ("%%FILTER_ME%%".equals(getName(k))) { -+ inPalette = AIR; -+ } -+ -+ if (insert >= this.byId.length) { -+ this.byId = Arrays.copyOf(this.byId, this.byId.length * 2); -+ this.byId[insert] = k; -+ } else { -+ this.byId[insert] = k; -+ } -+ this.paletteStates.addMap(inPalette); -+ -+ this.last = k; -+ -+ this.insert(-pos - 1, k, insert); -+ -+ return insert; -+ } -+ -+ } -+ -+ final MapType section; -+ final boolean hasData; -+ final Int2ObjectLinkedOpenHashMap toFix = new Int2ObjectLinkedOpenHashMap<>(); -+ final IntArrayList update = new IntArrayList(); -+ final int y; -+ final int[] buffer = new int[4096]; -+ -+ public Section(final MapType section) { -+ this.section = section; -+ this.y = section.getInt("Y"); -+ this.hasData = section.hasKey("Blocks", ObjectType.BYTE_ARRAY); -+ } -+ -+ public MapType getBlock(final int index) { -+ if (index >= 0 && index <= 4095) { -+ final MapType state = this.palette.byId[this.buffer[index]]; -+ return state == null ? AIR : state; -+ } else { -+ return AIR; -+ } -+ } -+ -+ public void setBlock(final int index, final MapType blockState) { -+ this.buffer[index] = this.palette.getOrCreateId(blockState); -+ } -+ -+ public int upgrade(int sides) { -+ if (!this.hasData) { -+ return sides; -+ } -+ -+ final byte[] blocks = this.section.getBytes("Blocks"); -+ final DataLayer data = DataLayer.getOrNull(this.section.getBytes("Data")); -+ final DataLayer add = DataLayer.getOrNull(this.section.getBytes("Add")); -+ -+ this.palette.getOrCreateId(AIR); -+ -+ for (int index = 0; index < 4096; ++index) { -+ final int x = index & 15; -+ final int z = index >> 4 & 15; -+ -+ int blockStateId = (blocks[index] & 255) << 4; -+ if (data != null) { -+ blockStateId |= data.get(index); -+ } -+ if (add != null) { -+ blockStateId |= add.get(index) << 12; -+ } -+ if (IDS_NEEDING_FIX[blockStateId >>> 4]) { -+ this.addFix(blockStateId >>> 4, index); -+ } -+ -+ if (VIRTUAL[blockStateId >>> 4]) { -+ final int additionalSides = getSideMask(x == 0, x == 15, z == 0, z == 15); -+ if (additionalSides == 0) { -+ this.update.add(index); -+ } else { -+ sides |= additionalSides; -+ } -+ } -+ -+ this.setBlock(index, HelperBlockFlatteningV1450.getNBTForId(blockStateId)); -+ } -+ -+ return sides; -+ } -+ -+ private void addFix(final int block, final int index) { -+ this.toFix.computeIfAbsent(block, (final int keyInMap) -> { -+ return new IntArrayList(); -+ }).add(index); -+ } -+ -+ // Note: modifies the current section and returns it. -+ public MapType writeBackToSection() { -+ if (!this.hasData) { -+ return this.section; -+ } -+ -+ this.section.setList("Palette", this.palette.paletteStates.copy()); // deep copy to ensure palette compound tags are NOT shared -+ -+ final int bitSize = Math.max(4, DataFixUtils.ceillog2(this.palette.size())); -+ final PackedBitStorage packedIds = new PackedBitStorage(bitSize, 4096); -+ -+ for(int index = 0; index < this.buffer.length; ++index) { -+ packedIds.set(index, this.buffer[index]); -+ } -+ -+ this.section.setLongs("BlockStates", packedIds.getRaw()); -+ -+ this.section.remove("Blocks"); -+ this.section.remove("Data"); -+ this.section.remove("Add"); -+ -+ return this.section; -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterRenameStatus.java b/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterRenameStatus.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5ba45909b5e60655f83ba96a8dc9ae43077c9fa4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/chunk/ConverterRenameStatus.java -@@ -0,0 +1,32 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.chunk; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import java.util.function.Function; -+ -+public final class ConverterRenameStatus extends DataConverter { -+ -+ private final Function renamer; -+ -+ public ConverterRenameStatus(final int toVersion, final Function renamer) { -+ this(toVersion, 0, renamer); -+ } -+ -+ public ConverterRenameStatus(final int toVersion, final int versionStep, final Function renamer) { -+ super(toVersion, versionStep); -+ this.renamer = renamer; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // Note: DFU technically enforces namespace due to how they wrote their converter, so we will do the same. -+ NamespaceUtil.enforceForPath(data, "Status"); -+ RenameHelper.renameString(data, "Status", this.renamer); -+ -+ NamespaceUtil.enforceForPath(data.getMap("below_zero_retrogen"), "target_status"); -+ RenameHelper.renameString(data.getMap("below_zero_retrogen"), "target_status", this.renamer); -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterAbstractEntityRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterAbstractEntityRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e7e34dd98541f28a9d9abd43c65c0772062e6de2 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterAbstractEntityRename.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.entity; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractEntityRename { -+ -+ private ConverterAbstractEntityRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ if (id == null) { -+ return null; -+ } -+ -+ final String converted = renamer.apply(id); -+ -+ if (converted != null) { -+ data.setString("id", converted); -+ } -+ -+ return null; -+ } -+ }); -+ ConverterAbstractStringValueTypeRename.register(version, subVersion, MCTypeRegistry.ENTITY_NAME, renamer); -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterEntityToVariant.java b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterEntityToVariant.java -new file mode 100644 -index 0000000000000000000000000000000000000000..915df90809ca5614393c851da2603920893c4251 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterEntityToVariant.java -@@ -0,0 +1,44 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.entity; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.function.IntFunction; -+ -+public final class ConverterEntityToVariant extends DataConverter { -+ -+ public final String path; -+ public final IntFunction conversion; -+ -+ public ConverterEntityToVariant(final int toVersion, final String path, final IntFunction conversion) { -+ super(toVersion); -+ this.path = path; -+ this.conversion = conversion; -+ } -+ -+ public ConverterEntityToVariant(final int toVersion, final int versionStep, final String path, final IntFunction conversion) { -+ super(toVersion, versionStep); -+ this.path = path; -+ this.conversion = conversion; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Number value = data.getNumber(this.path); -+ if (value == null) { -+ // nothing to do, DFU does the same -+ return null; -+ } -+ -+ final String converted = this.conversion.apply(value.intValue()); -+ -+ if (converted == null) { -+ throw new NullPointerException("Conversion " + this.conversion + " cannot return null value!"); -+ } -+ -+ // DFU doesn't appear to remove the old field, so why should we? -+ -+ data.setString("variant", converted); -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterEntityVariantRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterEntityVariantRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..81385ba3acb471437eb36cd289ad0548cb59b93b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterEntityVariantRename.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.entity; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.function.Function; -+ -+public final class ConverterEntityVariantRename extends DataConverter { -+ -+ private final Function renamer; -+ -+ public ConverterEntityVariantRename(final int toVersion, final Function renamer) { -+ super(toVersion); -+ this.renamer = renamer; -+ } -+ -+ public ConverterEntityVariantRename(final int toVersion, final int versionStep, final Function renamer) { -+ super(toVersion, versionStep); -+ this.renamer = renamer; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String variant = data.getString("variant"); -+ -+ if (variant == null) { -+ return null; -+ } -+ -+ final String rename = this.renamer.apply(variant); -+ -+ if (rename != null) { -+ data.setString("variant", rename); -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java -new file mode 100644 -index 0000000000000000000000000000000000000000..610cafc176ca951b49b0db1b9f9386d3c3fa2ce3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/entity/ConverterFlattenEntity.java -@@ -0,0 +1,371 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.entity; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperBlockFlatteningV1450; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class ConverterFlattenEntity extends DataConverter { -+ -+ private static final Map BLOCK_NAME_TO_ID = new HashMap<>(); -+ static { -+ BLOCK_NAME_TO_ID.put("minecraft:air", 0); -+ BLOCK_NAME_TO_ID.put("minecraft:stone", 1); -+ BLOCK_NAME_TO_ID.put("minecraft:grass", 2); -+ BLOCK_NAME_TO_ID.put("minecraft:dirt", 3); -+ BLOCK_NAME_TO_ID.put("minecraft:cobblestone", 4); -+ BLOCK_NAME_TO_ID.put("minecraft:planks", 5); -+ BLOCK_NAME_TO_ID.put("minecraft:sapling", 6); -+ BLOCK_NAME_TO_ID.put("minecraft:bedrock", 7); -+ BLOCK_NAME_TO_ID.put("minecraft:flowing_water", 8); -+ BLOCK_NAME_TO_ID.put("minecraft:water", 9); -+ BLOCK_NAME_TO_ID.put("minecraft:flowing_lava", 10); -+ BLOCK_NAME_TO_ID.put("minecraft:lava", 11); -+ BLOCK_NAME_TO_ID.put("minecraft:sand", 12); -+ BLOCK_NAME_TO_ID.put("minecraft:gravel", 13); -+ BLOCK_NAME_TO_ID.put("minecraft:gold_ore", 14); -+ BLOCK_NAME_TO_ID.put("minecraft:iron_ore", 15); -+ BLOCK_NAME_TO_ID.put("minecraft:coal_ore", 16); -+ BLOCK_NAME_TO_ID.put("minecraft:log", 17); -+ BLOCK_NAME_TO_ID.put("minecraft:leaves", 18); -+ BLOCK_NAME_TO_ID.put("minecraft:sponge", 19); -+ BLOCK_NAME_TO_ID.put("minecraft:glass", 20); -+ BLOCK_NAME_TO_ID.put("minecraft:lapis_ore", 21); -+ BLOCK_NAME_TO_ID.put("minecraft:lapis_block", 22); -+ BLOCK_NAME_TO_ID.put("minecraft:dispenser", 23); -+ BLOCK_NAME_TO_ID.put("minecraft:sandstone", 24); -+ BLOCK_NAME_TO_ID.put("minecraft:noteblock", 25); -+ BLOCK_NAME_TO_ID.put("minecraft:bed", 26); -+ BLOCK_NAME_TO_ID.put("minecraft:golden_rail", 27); -+ BLOCK_NAME_TO_ID.put("minecraft:detector_rail", 28); -+ BLOCK_NAME_TO_ID.put("minecraft:sticky_piston", 29); -+ BLOCK_NAME_TO_ID.put("minecraft:web", 30); -+ BLOCK_NAME_TO_ID.put("minecraft:tallgrass", 31); -+ BLOCK_NAME_TO_ID.put("minecraft:deadbush", 32); -+ BLOCK_NAME_TO_ID.put("minecraft:piston", 33); -+ BLOCK_NAME_TO_ID.put("minecraft:piston_head", 34); -+ BLOCK_NAME_TO_ID.put("minecraft:wool", 35); -+ BLOCK_NAME_TO_ID.put("minecraft:piston_extension", 36); -+ BLOCK_NAME_TO_ID.put("minecraft:yellow_flower", 37); -+ BLOCK_NAME_TO_ID.put("minecraft:red_flower", 38); -+ BLOCK_NAME_TO_ID.put("minecraft:brown_mushroom", 39); -+ BLOCK_NAME_TO_ID.put("minecraft:red_mushroom", 40); -+ BLOCK_NAME_TO_ID.put("minecraft:gold_block", 41); -+ BLOCK_NAME_TO_ID.put("minecraft:iron_block", 42); -+ BLOCK_NAME_TO_ID.put("minecraft:double_stone_slab", 43); -+ BLOCK_NAME_TO_ID.put("minecraft:stone_slab", 44); -+ BLOCK_NAME_TO_ID.put("minecraft:brick_block", 45); -+ BLOCK_NAME_TO_ID.put("minecraft:tnt", 46); -+ BLOCK_NAME_TO_ID.put("minecraft:bookshelf", 47); -+ BLOCK_NAME_TO_ID.put("minecraft:mossy_cobblestone", 48); -+ BLOCK_NAME_TO_ID.put("minecraft:obsidian", 49); -+ BLOCK_NAME_TO_ID.put("minecraft:torch", 50); -+ BLOCK_NAME_TO_ID.put("minecraft:fire", 51); -+ BLOCK_NAME_TO_ID.put("minecraft:mob_spawner", 52); -+ BLOCK_NAME_TO_ID.put("minecraft:oak_stairs", 53); -+ BLOCK_NAME_TO_ID.put("minecraft:chest", 54); -+ BLOCK_NAME_TO_ID.put("minecraft:redstone_wire", 55); -+ BLOCK_NAME_TO_ID.put("minecraft:diamond_ore", 56); -+ BLOCK_NAME_TO_ID.put("minecraft:diamond_block", 57); -+ BLOCK_NAME_TO_ID.put("minecraft:crafting_table", 58); -+ BLOCK_NAME_TO_ID.put("minecraft:wheat", 59); -+ BLOCK_NAME_TO_ID.put("minecraft:farmland", 60); -+ BLOCK_NAME_TO_ID.put("minecraft:furnace", 61); -+ BLOCK_NAME_TO_ID.put("minecraft:lit_furnace", 62); -+ BLOCK_NAME_TO_ID.put("minecraft:standing_sign", 63); -+ BLOCK_NAME_TO_ID.put("minecraft:wooden_door", 64); -+ BLOCK_NAME_TO_ID.put("minecraft:ladder", 65); -+ BLOCK_NAME_TO_ID.put("minecraft:rail", 66); -+ BLOCK_NAME_TO_ID.put("minecraft:stone_stairs", 67); -+ BLOCK_NAME_TO_ID.put("minecraft:wall_sign", 68); -+ BLOCK_NAME_TO_ID.put("minecraft:lever", 69); -+ BLOCK_NAME_TO_ID.put("minecraft:stone_pressure_plate", 70); -+ BLOCK_NAME_TO_ID.put("minecraft:iron_door", 71); -+ BLOCK_NAME_TO_ID.put("minecraft:wooden_pressure_plate", 72); -+ BLOCK_NAME_TO_ID.put("minecraft:redstone_ore", 73); -+ BLOCK_NAME_TO_ID.put("minecraft:lit_redstone_ore", 74); -+ BLOCK_NAME_TO_ID.put("minecraft:unlit_redstone_torch", 75); -+ BLOCK_NAME_TO_ID.put("minecraft:redstone_torch", 76); -+ BLOCK_NAME_TO_ID.put("minecraft:stone_button", 77); -+ BLOCK_NAME_TO_ID.put("minecraft:snow_layer", 78); -+ BLOCK_NAME_TO_ID.put("minecraft:ice", 79); -+ BLOCK_NAME_TO_ID.put("minecraft:snow", 80); -+ BLOCK_NAME_TO_ID.put("minecraft:cactus", 81); -+ BLOCK_NAME_TO_ID.put("minecraft:clay", 82); -+ BLOCK_NAME_TO_ID.put("minecraft:reeds", 83); -+ BLOCK_NAME_TO_ID.put("minecraft:jukebox", 84); -+ BLOCK_NAME_TO_ID.put("minecraft:fence", 85); -+ BLOCK_NAME_TO_ID.put("minecraft:pumpkin", 86); -+ BLOCK_NAME_TO_ID.put("minecraft:netherrack", 87); -+ BLOCK_NAME_TO_ID.put("minecraft:soul_sand", 88); -+ BLOCK_NAME_TO_ID.put("minecraft:glowstone", 89); -+ BLOCK_NAME_TO_ID.put("minecraft:portal", 90); -+ BLOCK_NAME_TO_ID.put("minecraft:lit_pumpkin", 91); -+ BLOCK_NAME_TO_ID.put("minecraft:cake", 92); -+ BLOCK_NAME_TO_ID.put("minecraft:unpowered_repeater", 93); -+ BLOCK_NAME_TO_ID.put("minecraft:powered_repeater", 94); -+ BLOCK_NAME_TO_ID.put("minecraft:stained_glass", 95); -+ BLOCK_NAME_TO_ID.put("minecraft:trapdoor", 96); -+ BLOCK_NAME_TO_ID.put("minecraft:monster_egg", 97); -+ BLOCK_NAME_TO_ID.put("minecraft:stonebrick", 98); -+ BLOCK_NAME_TO_ID.put("minecraft:brown_mushroom_block", 99); -+ BLOCK_NAME_TO_ID.put("minecraft:red_mushroom_block", 100); -+ BLOCK_NAME_TO_ID.put("minecraft:iron_bars", 101); -+ BLOCK_NAME_TO_ID.put("minecraft:glass_pane", 102); -+ BLOCK_NAME_TO_ID.put("minecraft:melon_block", 103); -+ BLOCK_NAME_TO_ID.put("minecraft:pumpkin_stem", 104); -+ BLOCK_NAME_TO_ID.put("minecraft:melon_stem", 105); -+ BLOCK_NAME_TO_ID.put("minecraft:vine", 106); -+ BLOCK_NAME_TO_ID.put("minecraft:fence_gate", 107); -+ BLOCK_NAME_TO_ID.put("minecraft:brick_stairs", 108); -+ BLOCK_NAME_TO_ID.put("minecraft:stone_brick_stairs", 109); -+ BLOCK_NAME_TO_ID.put("minecraft:mycelium", 110); -+ BLOCK_NAME_TO_ID.put("minecraft:waterlily", 111); -+ BLOCK_NAME_TO_ID.put("minecraft:nether_brick", 112); -+ BLOCK_NAME_TO_ID.put("minecraft:nether_brick_fence", 113); -+ BLOCK_NAME_TO_ID.put("minecraft:nether_brick_stairs", 114); -+ BLOCK_NAME_TO_ID.put("minecraft:nether_wart", 115); -+ BLOCK_NAME_TO_ID.put("minecraft:enchanting_table", 116); -+ BLOCK_NAME_TO_ID.put("minecraft:brewing_stand", 117); -+ BLOCK_NAME_TO_ID.put("minecraft:cauldron", 118); -+ BLOCK_NAME_TO_ID.put("minecraft:end_portal", 119); -+ BLOCK_NAME_TO_ID.put("minecraft:end_portal_frame", 120); -+ BLOCK_NAME_TO_ID.put("minecraft:end_stone", 121); -+ BLOCK_NAME_TO_ID.put("minecraft:dragon_egg", 122); -+ BLOCK_NAME_TO_ID.put("minecraft:redstone_lamp", 123); -+ BLOCK_NAME_TO_ID.put("minecraft:lit_redstone_lamp", 124); -+ BLOCK_NAME_TO_ID.put("minecraft:double_wooden_slab", 125); -+ BLOCK_NAME_TO_ID.put("minecraft:wooden_slab", 126); -+ BLOCK_NAME_TO_ID.put("minecraft:cocoa", 127); -+ BLOCK_NAME_TO_ID.put("minecraft:sandstone_stairs", 128); -+ BLOCK_NAME_TO_ID.put("minecraft:emerald_ore", 129); -+ BLOCK_NAME_TO_ID.put("minecraft:ender_chest", 130); -+ BLOCK_NAME_TO_ID.put("minecraft:tripwire_hook", 131); -+ BLOCK_NAME_TO_ID.put("minecraft:tripwire", 132); -+ BLOCK_NAME_TO_ID.put("minecraft:emerald_block", 133); -+ BLOCK_NAME_TO_ID.put("minecraft:spruce_stairs", 134); -+ BLOCK_NAME_TO_ID.put("minecraft:birch_stairs", 135); -+ BLOCK_NAME_TO_ID.put("minecraft:jungle_stairs", 136); -+ BLOCK_NAME_TO_ID.put("minecraft:command_block", 137); -+ BLOCK_NAME_TO_ID.put("minecraft:beacon", 138); -+ BLOCK_NAME_TO_ID.put("minecraft:cobblestone_wall", 139); -+ BLOCK_NAME_TO_ID.put("minecraft:flower_pot", 140); -+ BLOCK_NAME_TO_ID.put("minecraft:carrots", 141); -+ BLOCK_NAME_TO_ID.put("minecraft:potatoes", 142); -+ BLOCK_NAME_TO_ID.put("minecraft:wooden_button", 143); -+ BLOCK_NAME_TO_ID.put("minecraft:skull", 144); -+ BLOCK_NAME_TO_ID.put("minecraft:anvil", 145); -+ BLOCK_NAME_TO_ID.put("minecraft:trapped_chest", 146); -+ BLOCK_NAME_TO_ID.put("minecraft:light_weighted_pressure_plate", 147); -+ BLOCK_NAME_TO_ID.put("minecraft:heavy_weighted_pressure_plate", 148); -+ BLOCK_NAME_TO_ID.put("minecraft:unpowered_comparator", 149); -+ BLOCK_NAME_TO_ID.put("minecraft:powered_comparator", 150); -+ BLOCK_NAME_TO_ID.put("minecraft:daylight_detector", 151); -+ BLOCK_NAME_TO_ID.put("minecraft:redstone_block", 152); -+ BLOCK_NAME_TO_ID.put("minecraft:quartz_ore", 153); -+ BLOCK_NAME_TO_ID.put("minecraft:hopper", 154); -+ BLOCK_NAME_TO_ID.put("minecraft:quartz_block", 155); -+ BLOCK_NAME_TO_ID.put("minecraft:quartz_stairs", 156); -+ BLOCK_NAME_TO_ID.put("minecraft:activator_rail", 157); -+ BLOCK_NAME_TO_ID.put("minecraft:dropper", 158); -+ BLOCK_NAME_TO_ID.put("minecraft:stained_hardened_clay", 159); -+ BLOCK_NAME_TO_ID.put("minecraft:stained_glass_pane", 160); -+ BLOCK_NAME_TO_ID.put("minecraft:leaves2", 161); -+ BLOCK_NAME_TO_ID.put("minecraft:log2", 162); -+ BLOCK_NAME_TO_ID.put("minecraft:acacia_stairs", 163); -+ BLOCK_NAME_TO_ID.put("minecraft:dark_oak_stairs", 164); -+ BLOCK_NAME_TO_ID.put("minecraft:slime", 165); -+ BLOCK_NAME_TO_ID.put("minecraft:barrier", 166); -+ BLOCK_NAME_TO_ID.put("minecraft:iron_trapdoor", 167); -+ BLOCK_NAME_TO_ID.put("minecraft:prismarine", 168); -+ BLOCK_NAME_TO_ID.put("minecraft:sea_lantern", 169); -+ BLOCK_NAME_TO_ID.put("minecraft:hay_block", 170); -+ BLOCK_NAME_TO_ID.put("minecraft:carpet", 171); -+ BLOCK_NAME_TO_ID.put("minecraft:hardened_clay", 172); -+ BLOCK_NAME_TO_ID.put("minecraft:coal_block", 173); -+ BLOCK_NAME_TO_ID.put("minecraft:packed_ice", 174); -+ BLOCK_NAME_TO_ID.put("minecraft:double_plant", 175); -+ BLOCK_NAME_TO_ID.put("minecraft:standing_banner", 176); -+ BLOCK_NAME_TO_ID.put("minecraft:wall_banner", 177); -+ BLOCK_NAME_TO_ID.put("minecraft:daylight_detector_inverted", 178); -+ BLOCK_NAME_TO_ID.put("minecraft:red_sandstone", 179); -+ BLOCK_NAME_TO_ID.put("minecraft:red_sandstone_stairs", 180); -+ BLOCK_NAME_TO_ID.put("minecraft:double_stone_slab2", 181); -+ BLOCK_NAME_TO_ID.put("minecraft:stone_slab2", 182); -+ BLOCK_NAME_TO_ID.put("minecraft:spruce_fence_gate", 183); -+ BLOCK_NAME_TO_ID.put("minecraft:birch_fence_gate", 184); -+ BLOCK_NAME_TO_ID.put("minecraft:jungle_fence_gate", 185); -+ BLOCK_NAME_TO_ID.put("minecraft:dark_oak_fence_gate", 186); -+ BLOCK_NAME_TO_ID.put("minecraft:acacia_fence_gate", 187); -+ BLOCK_NAME_TO_ID.put("minecraft:spruce_fence", 188); -+ BLOCK_NAME_TO_ID.put("minecraft:birch_fence", 189); -+ BLOCK_NAME_TO_ID.put("minecraft:jungle_fence", 190); -+ BLOCK_NAME_TO_ID.put("minecraft:dark_oak_fence", 191); -+ BLOCK_NAME_TO_ID.put("minecraft:acacia_fence", 192); -+ BLOCK_NAME_TO_ID.put("minecraft:spruce_door", 193); -+ BLOCK_NAME_TO_ID.put("minecraft:birch_door", 194); -+ BLOCK_NAME_TO_ID.put("minecraft:jungle_door", 195); -+ BLOCK_NAME_TO_ID.put("minecraft:acacia_door", 196); -+ BLOCK_NAME_TO_ID.put("minecraft:dark_oak_door", 197); -+ BLOCK_NAME_TO_ID.put("minecraft:end_rod", 198); -+ BLOCK_NAME_TO_ID.put("minecraft:chorus_plant", 199); -+ BLOCK_NAME_TO_ID.put("minecraft:chorus_flower", 200); -+ BLOCK_NAME_TO_ID.put("minecraft:purpur_block", 201); -+ BLOCK_NAME_TO_ID.put("minecraft:purpur_pillar", 202); -+ BLOCK_NAME_TO_ID.put("minecraft:purpur_stairs", 203); -+ BLOCK_NAME_TO_ID.put("minecraft:purpur_double_slab", 204); -+ BLOCK_NAME_TO_ID.put("minecraft:purpur_slab", 205); -+ BLOCK_NAME_TO_ID.put("minecraft:end_bricks", 206); -+ BLOCK_NAME_TO_ID.put("minecraft:beetroots", 207); -+ BLOCK_NAME_TO_ID.put("minecraft:grass_path", 208); -+ BLOCK_NAME_TO_ID.put("minecraft:end_gateway", 209); -+ BLOCK_NAME_TO_ID.put("minecraft:repeating_command_block", 210); -+ BLOCK_NAME_TO_ID.put("minecraft:chain_command_block", 211); -+ BLOCK_NAME_TO_ID.put("minecraft:frosted_ice", 212); -+ BLOCK_NAME_TO_ID.put("minecraft:magma", 213); -+ BLOCK_NAME_TO_ID.put("minecraft:nether_wart_block", 214); -+ BLOCK_NAME_TO_ID.put("minecraft:red_nether_brick", 215); -+ BLOCK_NAME_TO_ID.put("minecraft:bone_block", 216); -+ BLOCK_NAME_TO_ID.put("minecraft:structure_void", 217); -+ BLOCK_NAME_TO_ID.put("minecraft:observer", 218); -+ BLOCK_NAME_TO_ID.put("minecraft:white_shulker_box", 219); -+ BLOCK_NAME_TO_ID.put("minecraft:orange_shulker_box", 220); -+ BLOCK_NAME_TO_ID.put("minecraft:magenta_shulker_box", 221); -+ BLOCK_NAME_TO_ID.put("minecraft:light_blue_shulker_box", 222); -+ BLOCK_NAME_TO_ID.put("minecraft:yellow_shulker_box", 223); -+ BLOCK_NAME_TO_ID.put("minecraft:lime_shulker_box", 224); -+ BLOCK_NAME_TO_ID.put("minecraft:pink_shulker_box", 225); -+ BLOCK_NAME_TO_ID.put("minecraft:gray_shulker_box", 226); -+ BLOCK_NAME_TO_ID.put("minecraft:silver_shulker_box", 227); -+ BLOCK_NAME_TO_ID.put("minecraft:cyan_shulker_box", 228); -+ BLOCK_NAME_TO_ID.put("minecraft:purple_shulker_box", 229); -+ BLOCK_NAME_TO_ID.put("minecraft:blue_shulker_box", 230); -+ BLOCK_NAME_TO_ID.put("minecraft:brown_shulker_box", 231); -+ BLOCK_NAME_TO_ID.put("minecraft:green_shulker_box", 232); -+ BLOCK_NAME_TO_ID.put("minecraft:red_shulker_box", 233); -+ BLOCK_NAME_TO_ID.put("minecraft:black_shulker_box", 234); -+ BLOCK_NAME_TO_ID.put("minecraft:white_glazed_terracotta", 235); -+ BLOCK_NAME_TO_ID.put("minecraft:orange_glazed_terracotta", 236); -+ BLOCK_NAME_TO_ID.put("minecraft:magenta_glazed_terracotta", 237); -+ BLOCK_NAME_TO_ID.put("minecraft:light_blue_glazed_terracotta", 238); -+ BLOCK_NAME_TO_ID.put("minecraft:yellow_glazed_terracotta", 239); -+ BLOCK_NAME_TO_ID.put("minecraft:lime_glazed_terracotta", 240); -+ BLOCK_NAME_TO_ID.put("minecraft:pink_glazed_terracotta", 241); -+ BLOCK_NAME_TO_ID.put("minecraft:gray_glazed_terracotta", 242); -+ BLOCK_NAME_TO_ID.put("minecraft:silver_glazed_terracotta", 243); -+ BLOCK_NAME_TO_ID.put("minecraft:cyan_glazed_terracotta", 244); -+ BLOCK_NAME_TO_ID.put("minecraft:purple_glazed_terracotta", 245); -+ BLOCK_NAME_TO_ID.put("minecraft:blue_glazed_terracotta", 246); -+ BLOCK_NAME_TO_ID.put("minecraft:brown_glazed_terracotta", 247); -+ BLOCK_NAME_TO_ID.put("minecraft:green_glazed_terracotta", 248); -+ BLOCK_NAME_TO_ID.put("minecraft:red_glazed_terracotta", 249); -+ BLOCK_NAME_TO_ID.put("minecraft:black_glazed_terracotta", 250); -+ BLOCK_NAME_TO_ID.put("minecraft:concrete", 251); -+ BLOCK_NAME_TO_ID.put("minecraft:concrete_powder", 252); -+ BLOCK_NAME_TO_ID.put("minecraft:structure_block", 255); -+ } -+ -+ protected static final int VERSION = MCVersions.V17W47A; -+ -+ protected final String[] paths; -+ -+ public ConverterFlattenEntity(final String... paths) { -+ super(VERSION, 3); -+ this.paths = paths; -+ } -+ -+ private static void register(final String id, final String... paths) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, new ConverterFlattenEntity(paths)); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:falling_block", new DataConverter<>(VERSION, 3) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int blockId; -+ if (data.hasKey("Block")) { -+ final Number id = data.getNumber("Block"); -+ if (id != null) { -+ blockId = id.intValue(); -+ } else { -+ blockId = getBlockId(data.getString("Block")); -+ } -+ } else { -+ final Number tileId = data.getNumber("TileID"); -+ if (tileId != null) { -+ blockId = tileId.intValue(); -+ } else { -+ blockId = data.getByte("Tile") & 255; -+ } -+ } -+ -+ final int blockData = data.getInt("Data") & 15; -+ -+ data.remove("Block"); // from type update -+ data.remove("Data"); -+ data.remove("TileID"); -+ data.remove("Tile"); -+ -+ // key is from type update -+ data.setMap("BlockState", HelperBlockFlatteningV1450.getNBTForId((blockId << 4) | blockData).copy()); // copy to avoid problems with later state datafixers -+ -+ return null; -+ } -+ }); -+ register("minecraft:enderman", "carried", "carriedData", "carriedBlockState"); -+ register("minecraft:arrow", "inTile", "inData", "inBlockState"); -+ register("minecraft:spectral_arrow", "inTile", "inData", "inBlockState"); -+ register("minecraft:egg", "inTile"); -+ register("minecraft:ender_pearl", "inTile"); -+ register("minecraft:fireball", "inTile"); -+ register("minecraft:potion", "inTile"); -+ register("minecraft:small_fireball", "inTile"); -+ register("minecraft:snowball", "inTile"); -+ register("minecraft:wither_skull", "inTile"); -+ register("minecraft:xp_bottle", "inTile"); -+ register("minecraft:commandblock_minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ register("minecraft:minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ register("minecraft:chest_minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ register("minecraft:furnace_minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ register("minecraft:tnt_minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ register("minecraft:hopper_minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ register("minecraft:spawner_minecart", "DisplayTile", "DisplayData", "DisplayState"); -+ } -+ -+ public static int getBlockId(final String block) { -+ final Integer ret = BLOCK_NAME_TO_ID.get(block); -+ return ret == null ? 0 : ret.intValue(); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (this.paths.length == 1) { -+ data.remove(this.paths[0]); -+ return null; -+ } -+ final String idPath = this.paths[0]; -+ final String dataPath = this.paths[1]; -+ final String outputStatePath = this.paths[2]; -+ -+ final int blockId; -+ if (data.hasKey(idPath, ObjectType.NUMBER)) { -+ blockId = data.getInt(idPath); -+ } else { -+ blockId = getBlockId(data.getString(idPath)); -+ } -+ -+ final int blockData = data.getInt(dataPath) & 15; -+ -+ data.remove(idPath); // from type update -+ data.remove(dataPath); -+ -+ data.setMap(outputStatePath, HelperBlockFlatteningV1450.getNBTForId((blockId << 4) | blockData).copy()); // copy to avoid problems with later state datafixers -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/AddFlagIfAbsent.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/AddFlagIfAbsent.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3ebc450551fe75bc3d22c8162eda91bd4105b80a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/AddFlagIfAbsent.java -@@ -0,0 +1,30 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class AddFlagIfAbsent extends DataConverter { -+ -+ public final String path; -+ public final boolean dfl; -+ -+ public AddFlagIfAbsent(final int toVersion, final String path, final boolean dfl) { -+ super(toVersion); -+ this.path = path; -+ this.dfl = dfl; -+ } -+ -+ public AddFlagIfAbsent(final int toVersion, final int versionStep, final String path, final boolean dfl) { -+ super(toVersion, versionStep); -+ this.path = path; -+ this.dfl = dfl; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!data.hasKey(this.path)) { -+ data.setBoolean(this.path, this.dfl); -+ } -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/ConverterAbstractStringValueTypeRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/ConverterAbstractStringValueTypeRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..bc79670f47aaa413ea3e96ef6a32e14099ad8a58 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/ConverterAbstractStringValueTypeRename.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCValueType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractStringValueTypeRename { -+ -+ private ConverterAbstractStringValueTypeRename() {} -+ -+ public static void register(final int version, final MCValueType type, final Function renamer) { -+ register(version, 0, type, renamer); -+ } -+ public static void register(final int version, final int subVersion, final MCValueType type, final Function renamer) { -+ type.addConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ final String ret = (data instanceof String) ? renamer.apply((String)data) : null; -+ return ret == data ? null : ret; -+ } -+ }); -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/CopyHelper.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/CopyHelper.java -new file mode 100644 -index 0000000000000000000000000000000000000000..549c997463df2d5c9e0d1c29a6df8ba8eeecfce8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/CopyHelper.java -@@ -0,0 +1,79 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class CopyHelper { -+ -+ // sets value at dstPath in dst to a copied value of the value at srcPath in src -+ public static boolean copy(final MapType src, final String srcPath, final MapType dst, final String dstPath) { -+ final Object val = src.getGeneric(srcPath); -+ if (val == null) { -+ dst.remove(dstPath); -+ return false; -+ } -+ -+ dst.setGeneric(dstPath, copyGeneric(val)); -+ return true; -+ } -+ -+ // moves the value at dstPath in dst to srcPath in src -+ public static boolean move(final MapType src, final String srcPath, final MapType dst, final String dstPath) { -+ final Object val = src.getGeneric(srcPath); -+ src.remove(srcPath); -+ if (val == null) { -+ dst.remove(dstPath); -+ return false; -+ } -+ -+ dst.setGeneric(dstPath, val); -+ return true; -+ } -+ -+ public static Number sanitizeNumber(final Number input) { -+ return switch (input) { -+ case Byte b -> b; -+ case Short s -> s; -+ case Integer i -> i; -+ case Long l -> l; -+ case Float f -> f; -+ case Double d -> d; -+ default -> null; -+ }; -+ } -+ -+ public static Object copyGeneric(final Object value) { -+ if (value == null || value instanceof String || value instanceof Boolean) { -+ // immutable -+ return value; -+ } -+ if (value instanceof Number number) { -+ if (sanitizeNumber(number) == null) { -+ throw new IllegalArgumentException("Unknown type: " + value.getClass()); -+ } -+ return number; -+ } -+ -+ if (value instanceof MapType mapType) { -+ return mapType.copy(); -+ } -+ -+ if (value instanceof ListType listType) { -+ return listType.copy(); -+ } -+ -+ if (value.getClass().isArray()) { -+ if (value instanceof byte[] bytes) { -+ return bytes.clone(); -+ } else if (value instanceof short[] shorts) { -+ return shorts.clone(); -+ } else if (value instanceof int[] ints) { -+ return ints.clone(); -+ } else if (value instanceof long[] longs) { -+ return longs.clone(); -+ } // else: fall through to throw -+ } -+ -+ throw new IllegalArgumentException("Unknown type: " + value.getClass()); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperBlockFlatteningV1450.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperBlockFlatteningV1450.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f632da9870305e96d51f7b5abd33749a4a15916d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperBlockFlatteningV1450.java -@@ -0,0 +1,1829 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; -+import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -+import net.minecraft.nbt.TagParser; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class HelperBlockFlatteningV1450 { -+ -+ protected static final MapType[] FLATTENED_BY_ID = new MapType[4096]; -+ protected static final MapType[] BLOCK_DEFAULTS = new MapType[4096]; -+ -+ private static final Object2IntOpenHashMap ID_BY_OLD_NBT = new Object2IntOpenHashMap(64, 0.7f) { -+ @Override -+ public int put(final MapType o, final int v) { -+ if (this.containsKey(o)) { -+ throw new RuntimeException("Already contains mapping for " + o); -+ } -+ -+ return super.put(o, v); -+ } -+ }; -+ static { -+ ID_BY_OLD_NBT.defaultReturnValue(-1); -+ } -+ -+ private static final Object2IntOpenHashMap ID_BY_OLD_NAME = new Object2IntOpenHashMap(64, 0.7f) { -+ @Override -+ public int put(final String o, final int v) { -+ if (this.containsKey(o)) { -+ throw new RuntimeException("Already contains mapping for " + o); -+ } -+ -+ return super.put(o, v); -+ } -+ }; -+ static { -+ ID_BY_OLD_NAME.defaultReturnValue(-1); -+ } -+ -+ // map used to ensure that each parsed block state contains no duplicates -+ protected static final Map IDENTITY_ENSURE = new HashMap<>(); -+ -+ public static MapType parseTag(final String blockstate) { -+ try { -+ final MapType ret = new NBTMapType(TagParser.parseCompoundFully(blockstate.replace('\'', '"'))); -+ -+ synchronized (IDENTITY_ENSURE) { -+ final MapType identity = IDENTITY_ENSURE.putIfAbsent(ret, ret); -+ -+ return identity == null ? ret : identity; -+ } -+ -+ } catch (final Exception ex) { -+ throw new RuntimeException("Exception parsing " + blockstate, ex); -+ } -+ } -+ -+ private static void register(final int id, final String flattened, final String... preFlattenings) { -+ final MapType flattenedNBT = parseTag(flattened); -+ if (FLATTENED_BY_ID[id] != null) { -+ throw new RuntimeException("Mapping already exists for id " + id); -+ } -+ FLATTENED_BY_ID[id] = flattenedNBT; -+ -+ // it's important that we register ids from smallest to largest, so that -+ // the default is going to be correct -+ final int block = id >> 4; -+ if (BLOCK_DEFAULTS[block] == null) { -+ BLOCK_DEFAULTS[block] = flattenedNBT; -+ } -+ -+ for (final String preFlattening : preFlattenings) { -+ final MapType preFlatteningNBT = parseTag(preFlattening); -+ final String name = preFlatteningNBT.getString("Name"); -+ if (name == null) { -+ throw new RuntimeException("Name does not exist for pre flattenings for id " + id); -+ } -+ -+ // putIfAbsent so we default to the lowest id, which is going to be the block default -+ ID_BY_OLD_NAME.putIfAbsent(name, id); -+ ID_BY_OLD_NBT.put(preFlatteningNBT, id); -+ } -+ } -+ -+ private static void finalizeMaps() { -+ for(int i = 0; i < FLATTENED_BY_ID.length; ++i) { -+ if (FLATTENED_BY_ID[i] == null) { -+ FLATTENED_BY_ID[i] = BLOCK_DEFAULTS[i >> 4]; -+ } -+ } -+ } -+ -+ public static MapType flattenNBT(final MapType old) { -+ final int id = ID_BY_OLD_NBT.getInt(old); -+ final MapType ret = getNBTForIdRaw(id); -+ -+ return ret == null ? old : ret; -+ } -+ -+ public static String getNewBlockName(final String old) { -+ final int id = ID_BY_OLD_NAME.getInt(old); -+ final MapType ret = getNBTForIdRaw(id); -+ return ret == null ? old : ret.getString("Name"); -+ } -+ -+ public static String getNameForId(final int block) { -+ final MapType nbt = getNBTForIdRaw(block); -+ return nbt == null ? "minecraft:air" : nbt.getString("Name"); -+ } -+ -+ protected static MapType getNBTForIdRaw(final int block) { -+ return block >= 0 && block < FLATTENED_BY_ID.length ? FLATTENED_BY_ID[block] : null; -+ } -+ -+ public static MapType getNBTForId(final int block) { -+ MapType ret = getNBTForIdRaw(block); -+ return ret == null ? FLATTENED_BY_ID[0] : ret; -+ } -+ -+ private HelperBlockFlatteningV1450() {} -+ -+ static { -+ ID_BY_OLD_NBT.defaultReturnValue(-1); -+ register(0, "{Name:'minecraft:air'}", "{Name:'minecraft:air'}"); -+ register(16, "{Name:'minecraft:stone'}", "{Name:'minecraft:stone',Properties:{variant:'stone'}}"); -+ register(17, "{Name:'minecraft:granite'}", "{Name:'minecraft:stone',Properties:{variant:'granite'}}"); -+ register(18, "{Name:'minecraft:polished_granite'}", "{Name:'minecraft:stone',Properties:{variant:'smooth_granite'}}"); -+ register(19, "{Name:'minecraft:diorite'}", "{Name:'minecraft:stone',Properties:{variant:'diorite'}}"); -+ register(20, "{Name:'minecraft:polished_diorite'}", "{Name:'minecraft:stone',Properties:{variant:'smooth_diorite'}}"); -+ register(21, "{Name:'minecraft:andesite'}", "{Name:'minecraft:stone',Properties:{variant:'andesite'}}"); -+ register(22, "{Name:'minecraft:polished_andesite'}", "{Name:'minecraft:stone',Properties:{variant:'smooth_andesite'}}"); -+ register(32, "{Name:'minecraft:grass_block',Properties:{snowy:'false'}}", "{Name:'minecraft:grass',Properties:{snowy:'false'}}", "{Name:'minecraft:grass',Properties:{snowy:'true'}}"); -+ register(48, "{Name:'minecraft:dirt'}", "{Name:'minecraft:dirt',Properties:{snowy:'false',variant:'dirt'}}", "{Name:'minecraft:dirt',Properties:{snowy:'true',variant:'dirt'}}"); -+ register(49, "{Name:'minecraft:coarse_dirt'}", "{Name:'minecraft:dirt',Properties:{snowy:'false',variant:'coarse_dirt'}}", "{Name:'minecraft:dirt',Properties:{snowy:'true',variant:'coarse_dirt'}}"); -+ register(50, "{Name:'minecraft:podzol',Properties:{snowy:'false'}}", "{Name:'minecraft:dirt',Properties:{snowy:'false',variant:'podzol'}}", "{Name:'minecraft:dirt',Properties:{snowy:'true',variant:'podzol'}}"); -+ register(64, "{Name:'minecraft:cobblestone'}", "{Name:'minecraft:cobblestone'}"); -+ register(80, "{Name:'minecraft:oak_planks'}", "{Name:'minecraft:planks',Properties:{variant:'oak'}}"); -+ register(81, "{Name:'minecraft:spruce_planks'}", "{Name:'minecraft:planks',Properties:{variant:'spruce'}}"); -+ register(82, "{Name:'minecraft:birch_planks'}", "{Name:'minecraft:planks',Properties:{variant:'birch'}}"); -+ register(83, "{Name:'minecraft:jungle_planks'}", "{Name:'minecraft:planks',Properties:{variant:'jungle'}}"); -+ register(84, "{Name:'minecraft:acacia_planks'}", "{Name:'minecraft:planks',Properties:{variant:'acacia'}}"); -+ register(85, "{Name:'minecraft:dark_oak_planks'}", "{Name:'minecraft:planks',Properties:{variant:'dark_oak'}}"); -+ register(96, "{Name:'minecraft:oak_sapling',Properties:{stage:'0'}}", "{Name:'minecraft:sapling',Properties:{stage:'0',type:'oak'}}"); -+ register(97, "{Name:'minecraft:spruce_sapling',Properties:{stage:'0'}}", "{Name:'minecraft:sapling',Properties:{stage:'0',type:'spruce'}}"); -+ register(98, "{Name:'minecraft:birch_sapling',Properties:{stage:'0'}}", "{Name:'minecraft:sapling',Properties:{stage:'0',type:'birch'}}"); -+ register(99, "{Name:'minecraft:jungle_sapling',Properties:{stage:'0'}}", "{Name:'minecraft:sapling',Properties:{stage:'0',type:'jungle'}}"); -+ register(100, "{Name:'minecraft:acacia_sapling',Properties:{stage:'0'}}", "{Name:'minecraft:sapling',Properties:{stage:'0',type:'acacia'}}"); -+ register(101, "{Name:'minecraft:dark_oak_sapling',Properties:{stage:'0'}}", "{Name:'minecraft:sapling',Properties:{stage:'0',type:'dark_oak'}}"); -+ register(104, "{Name:'minecraft:oak_sapling',Properties:{stage:'1'}}", "{Name:'minecraft:sapling',Properties:{stage:'1',type:'oak'}}"); -+ register(105, "{Name:'minecraft:spruce_sapling',Properties:{stage:'1'}}", "{Name:'minecraft:sapling',Properties:{stage:'1',type:'spruce'}}"); -+ register(106, "{Name:'minecraft:birch_sapling',Properties:{stage:'1'}}", "{Name:'minecraft:sapling',Properties:{stage:'1',type:'birch'}}"); -+ register(107, "{Name:'minecraft:jungle_sapling',Properties:{stage:'1'}}", "{Name:'minecraft:sapling',Properties:{stage:'1',type:'jungle'}}"); -+ register(108, "{Name:'minecraft:acacia_sapling',Properties:{stage:'1'}}", "{Name:'minecraft:sapling',Properties:{stage:'1',type:'acacia'}}"); -+ register(109, "{Name:'minecraft:dark_oak_sapling',Properties:{stage:'1'}}", "{Name:'minecraft:sapling',Properties:{stage:'1',type:'dark_oak'}}"); -+ register(112, "{Name:'minecraft:bedrock'}", "{Name:'minecraft:bedrock'}"); -+ register(128, "{Name:'minecraft:water',Properties:{level:'0'}}", "{Name:'minecraft:flowing_water',Properties:{level:'0'}}"); -+ register(129, "{Name:'minecraft:water',Properties:{level:'1'}}", "{Name:'minecraft:flowing_water',Properties:{level:'1'}}"); -+ register(130, "{Name:'minecraft:water',Properties:{level:'2'}}", "{Name:'minecraft:flowing_water',Properties:{level:'2'}}"); -+ register(131, "{Name:'minecraft:water',Properties:{level:'3'}}", "{Name:'minecraft:flowing_water',Properties:{level:'3'}}"); -+ register(132, "{Name:'minecraft:water',Properties:{level:'4'}}", "{Name:'minecraft:flowing_water',Properties:{level:'4'}}"); -+ register(133, "{Name:'minecraft:water',Properties:{level:'5'}}", "{Name:'minecraft:flowing_water',Properties:{level:'5'}}"); -+ register(134, "{Name:'minecraft:water',Properties:{level:'6'}}", "{Name:'minecraft:flowing_water',Properties:{level:'6'}}"); -+ register(135, "{Name:'minecraft:water',Properties:{level:'7'}}", "{Name:'minecraft:flowing_water',Properties:{level:'7'}}"); -+ register(136, "{Name:'minecraft:water',Properties:{level:'8'}}", "{Name:'minecraft:flowing_water',Properties:{level:'8'}}"); -+ register(137, "{Name:'minecraft:water',Properties:{level:'9'}}", "{Name:'minecraft:flowing_water',Properties:{level:'9'}}"); -+ register(138, "{Name:'minecraft:water',Properties:{level:'10'}}", "{Name:'minecraft:flowing_water',Properties:{level:'10'}}"); -+ register(139, "{Name:'minecraft:water',Properties:{level:'11'}}", "{Name:'minecraft:flowing_water',Properties:{level:'11'}}"); -+ register(140, "{Name:'minecraft:water',Properties:{level:'12'}}", "{Name:'minecraft:flowing_water',Properties:{level:'12'}}"); -+ register(141, "{Name:'minecraft:water',Properties:{level:'13'}}", "{Name:'minecraft:flowing_water',Properties:{level:'13'}}"); -+ register(142, "{Name:'minecraft:water',Properties:{level:'14'}}", "{Name:'minecraft:flowing_water',Properties:{level:'14'}}"); -+ register(143, "{Name:'minecraft:water',Properties:{level:'15'}}", "{Name:'minecraft:flowing_water',Properties:{level:'15'}}"); -+ register(144, "{Name:'minecraft:water',Properties:{level:'0'}}", "{Name:'minecraft:water',Properties:{level:'0'}}"); -+ register(145, "{Name:'minecraft:water',Properties:{level:'1'}}", "{Name:'minecraft:water',Properties:{level:'1'}}"); -+ register(146, "{Name:'minecraft:water',Properties:{level:'2'}}", "{Name:'minecraft:water',Properties:{level:'2'}}"); -+ register(147, "{Name:'minecraft:water',Properties:{level:'3'}}", "{Name:'minecraft:water',Properties:{level:'3'}}"); -+ register(148, "{Name:'minecraft:water',Properties:{level:'4'}}", "{Name:'minecraft:water',Properties:{level:'4'}}"); -+ register(149, "{Name:'minecraft:water',Properties:{level:'5'}}", "{Name:'minecraft:water',Properties:{level:'5'}}"); -+ register(150, "{Name:'minecraft:water',Properties:{level:'6'}}", "{Name:'minecraft:water',Properties:{level:'6'}}"); -+ register(151, "{Name:'minecraft:water',Properties:{level:'7'}}", "{Name:'minecraft:water',Properties:{level:'7'}}"); -+ register(152, "{Name:'minecraft:water',Properties:{level:'8'}}", "{Name:'minecraft:water',Properties:{level:'8'}}"); -+ register(153, "{Name:'minecraft:water',Properties:{level:'9'}}", "{Name:'minecraft:water',Properties:{level:'9'}}"); -+ register(154, "{Name:'minecraft:water',Properties:{level:'10'}}", "{Name:'minecraft:water',Properties:{level:'10'}}"); -+ register(155, "{Name:'minecraft:water',Properties:{level:'11'}}", "{Name:'minecraft:water',Properties:{level:'11'}}"); -+ register(156, "{Name:'minecraft:water',Properties:{level:'12'}}", "{Name:'minecraft:water',Properties:{level:'12'}}"); -+ register(157, "{Name:'minecraft:water',Properties:{level:'13'}}", "{Name:'minecraft:water',Properties:{level:'13'}}"); -+ register(158, "{Name:'minecraft:water',Properties:{level:'14'}}", "{Name:'minecraft:water',Properties:{level:'14'}}"); -+ register(159, "{Name:'minecraft:water',Properties:{level:'15'}}", "{Name:'minecraft:water',Properties:{level:'15'}}"); -+ register(160, "{Name:'minecraft:lava',Properties:{level:'0'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'0'}}"); -+ register(161, "{Name:'minecraft:lava',Properties:{level:'1'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'1'}}"); -+ register(162, "{Name:'minecraft:lava',Properties:{level:'2'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'2'}}"); -+ register(163, "{Name:'minecraft:lava',Properties:{level:'3'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'3'}}"); -+ register(164, "{Name:'minecraft:lava',Properties:{level:'4'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'4'}}"); -+ register(165, "{Name:'minecraft:lava',Properties:{level:'5'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'5'}}"); -+ register(166, "{Name:'minecraft:lava',Properties:{level:'6'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'6'}}"); -+ register(167, "{Name:'minecraft:lava',Properties:{level:'7'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'7'}}"); -+ register(168, "{Name:'minecraft:lava',Properties:{level:'8'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'8'}}"); -+ register(169, "{Name:'minecraft:lava',Properties:{level:'9'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'9'}}"); -+ register(170, "{Name:'minecraft:lava',Properties:{level:'10'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'10'}}"); -+ register(171, "{Name:'minecraft:lava',Properties:{level:'11'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'11'}}"); -+ register(172, "{Name:'minecraft:lava',Properties:{level:'12'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'12'}}"); -+ register(173, "{Name:'minecraft:lava',Properties:{level:'13'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'13'}}"); -+ register(174, "{Name:'minecraft:lava',Properties:{level:'14'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'14'}}"); -+ register(175, "{Name:'minecraft:lava',Properties:{level:'15'}}", "{Name:'minecraft:flowing_lava',Properties:{level:'15'}}"); -+ register(176, "{Name:'minecraft:lava',Properties:{level:'0'}}", "{Name:'minecraft:lava',Properties:{level:'0'}}"); -+ register(177, "{Name:'minecraft:lava',Properties:{level:'1'}}", "{Name:'minecraft:lava',Properties:{level:'1'}}"); -+ register(178, "{Name:'minecraft:lava',Properties:{level:'2'}}", "{Name:'minecraft:lava',Properties:{level:'2'}}"); -+ register(179, "{Name:'minecraft:lava',Properties:{level:'3'}}", "{Name:'minecraft:lava',Properties:{level:'3'}}"); -+ register(180, "{Name:'minecraft:lava',Properties:{level:'4'}}", "{Name:'minecraft:lava',Properties:{level:'4'}}"); -+ register(181, "{Name:'minecraft:lava',Properties:{level:'5'}}", "{Name:'minecraft:lava',Properties:{level:'5'}}"); -+ register(182, "{Name:'minecraft:lava',Properties:{level:'6'}}", "{Name:'minecraft:lava',Properties:{level:'6'}}"); -+ register(183, "{Name:'minecraft:lava',Properties:{level:'7'}}", "{Name:'minecraft:lava',Properties:{level:'7'}}"); -+ register(184, "{Name:'minecraft:lava',Properties:{level:'8'}}", "{Name:'minecraft:lava',Properties:{level:'8'}}"); -+ register(185, "{Name:'minecraft:lava',Properties:{level:'9'}}", "{Name:'minecraft:lava',Properties:{level:'9'}}"); -+ register(186, "{Name:'minecraft:lava',Properties:{level:'10'}}", "{Name:'minecraft:lava',Properties:{level:'10'}}"); -+ register(187, "{Name:'minecraft:lava',Properties:{level:'11'}}", "{Name:'minecraft:lava',Properties:{level:'11'}}"); -+ register(188, "{Name:'minecraft:lava',Properties:{level:'12'}}", "{Name:'minecraft:lava',Properties:{level:'12'}}"); -+ register(189, "{Name:'minecraft:lava',Properties:{level:'13'}}", "{Name:'minecraft:lava',Properties:{level:'13'}}"); -+ register(190, "{Name:'minecraft:lava',Properties:{level:'14'}}", "{Name:'minecraft:lava',Properties:{level:'14'}}"); -+ register(191, "{Name:'minecraft:lava',Properties:{level:'15'}}", "{Name:'minecraft:lava',Properties:{level:'15'}}"); -+ register(192, "{Name:'minecraft:sand'}", "{Name:'minecraft:sand',Properties:{variant:'sand'}}"); -+ register(193, "{Name:'minecraft:red_sand'}", "{Name:'minecraft:sand',Properties:{variant:'red_sand'}}"); -+ register(208, "{Name:'minecraft:gravel'}", "{Name:'minecraft:gravel'}"); -+ register(224, "{Name:'minecraft:gold_ore'}", "{Name:'minecraft:gold_ore'}"); -+ register(240, "{Name:'minecraft:iron_ore'}", "{Name:'minecraft:iron_ore'}"); -+ register(256, "{Name:'minecraft:coal_ore'}", "{Name:'minecraft:coal_ore'}"); -+ register(272, "{Name:'minecraft:oak_log',Properties:{axis:'y'}}", "{Name:'minecraft:log',Properties:{axis:'y',variant:'oak'}}"); -+ register(273, "{Name:'minecraft:spruce_log',Properties:{axis:'y'}}", "{Name:'minecraft:log',Properties:{axis:'y',variant:'spruce'}}"); -+ register(274, "{Name:'minecraft:birch_log',Properties:{axis:'y'}}", "{Name:'minecraft:log',Properties:{axis:'y',variant:'birch'}}"); -+ register(275, "{Name:'minecraft:jungle_log',Properties:{axis:'y'}}", "{Name:'minecraft:log',Properties:{axis:'y',variant:'jungle'}}"); -+ register(276, "{Name:'minecraft:oak_log',Properties:{axis:'x'}}", "{Name:'minecraft:log',Properties:{axis:'x',variant:'oak'}}"); -+ register(277, "{Name:'minecraft:spruce_log',Properties:{axis:'x'}}", "{Name:'minecraft:log',Properties:{axis:'x',variant:'spruce'}}"); -+ register(278, "{Name:'minecraft:birch_log',Properties:{axis:'x'}}", "{Name:'minecraft:log',Properties:{axis:'x',variant:'birch'}}"); -+ register(279, "{Name:'minecraft:jungle_log',Properties:{axis:'x'}}", "{Name:'minecraft:log',Properties:{axis:'x',variant:'jungle'}}"); -+ register(280, "{Name:'minecraft:oak_log',Properties:{axis:'z'}}", "{Name:'minecraft:log',Properties:{axis:'z',variant:'oak'}}"); -+ register(281, "{Name:'minecraft:spruce_log',Properties:{axis:'z'}}", "{Name:'minecraft:log',Properties:{axis:'z',variant:'spruce'}}"); -+ register(282, "{Name:'minecraft:birch_log',Properties:{axis:'z'}}", "{Name:'minecraft:log',Properties:{axis:'z',variant:'birch'}}"); -+ register(283, "{Name:'minecraft:jungle_log',Properties:{axis:'z'}}", "{Name:'minecraft:log',Properties:{axis:'z',variant:'jungle'}}"); -+ register(284, "{Name:'minecraft:oak_bark'}", "{Name:'minecraft:log',Properties:{axis:'none',variant:'oak'}}"); -+ register(285, "{Name:'minecraft:spruce_bark'}", "{Name:'minecraft:log',Properties:{axis:'none',variant:'spruce'}}"); -+ register(286, "{Name:'minecraft:birch_bark'}", "{Name:'minecraft:log',Properties:{axis:'none',variant:'birch'}}"); -+ register(287, "{Name:'minecraft:jungle_bark'}", "{Name:'minecraft:log',Properties:{axis:'none',variant:'jungle'}}"); -+ register(288, "{Name:'minecraft:oak_leaves',Properties:{check_decay:'false',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'true',variant:'oak'}}"); -+ register(289, "{Name:'minecraft:spruce_leaves',Properties:{check_decay:'false',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'true',variant:'spruce'}}"); -+ register(290, "{Name:'minecraft:birch_leaves',Properties:{check_decay:'false',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'true',variant:'birch'}}"); -+ register(291, "{Name:'minecraft:jungle_leaves',Properties:{check_decay:'false',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'true',variant:'jungle'}}"); -+ register(292, "{Name:'minecraft:oak_leaves',Properties:{check_decay:'false',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'false',variant:'oak'}}"); -+ register(293, "{Name:'minecraft:spruce_leaves',Properties:{check_decay:'false',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'false',variant:'spruce'}}"); -+ register(294, "{Name:'minecraft:birch_leaves',Properties:{check_decay:'false',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'false',variant:'birch'}}"); -+ register(295, "{Name:'minecraft:jungle_leaves',Properties:{check_decay:'false',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'false',decayable:'false',variant:'jungle'}}"); -+ register(296, "{Name:'minecraft:oak_leaves',Properties:{check_decay:'true',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'true',variant:'oak'}}"); -+ register(297, "{Name:'minecraft:spruce_leaves',Properties:{check_decay:'true',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'true',variant:'spruce'}}"); -+ register(298, "{Name:'minecraft:birch_leaves',Properties:{check_decay:'true',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'true',variant:'birch'}}"); -+ register(299, "{Name:'minecraft:jungle_leaves',Properties:{check_decay:'true',decayable:'true'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'true',variant:'jungle'}}"); -+ register(300, "{Name:'minecraft:oak_leaves',Properties:{check_decay:'true',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'false',variant:'oak'}}"); -+ register(301, "{Name:'minecraft:spruce_leaves',Properties:{check_decay:'true',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'false',variant:'spruce'}}"); -+ register(302, "{Name:'minecraft:birch_leaves',Properties:{check_decay:'true',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'false',variant:'birch'}}"); -+ register(303, "{Name:'minecraft:jungle_leaves',Properties:{check_decay:'true',decayable:'false'}}", "{Name:'minecraft:leaves',Properties:{check_decay:'true',decayable:'false',variant:'jungle'}}"); -+ register(304, "{Name:'minecraft:sponge'}", "{Name:'minecraft:sponge',Properties:{wet:'false'}}"); -+ register(305, "{Name:'minecraft:wet_sponge'}", "{Name:'minecraft:sponge',Properties:{wet:'true'}}"); -+ register(320, "{Name:'minecraft:glass'}", "{Name:'minecraft:glass'}"); -+ register(336, "{Name:'minecraft:lapis_ore'}", "{Name:'minecraft:lapis_ore'}"); -+ register(352, "{Name:'minecraft:lapis_block'}", "{Name:'minecraft:lapis_block'}"); -+ register(368, "{Name:'minecraft:dispenser',Properties:{facing:'down',triggered:'false'}}", "{Name:'minecraft:dispenser',Properties:{facing:'down',triggered:'false'}}"); -+ register(369, "{Name:'minecraft:dispenser',Properties:{facing:'up',triggered:'false'}}", "{Name:'minecraft:dispenser',Properties:{facing:'up',triggered:'false'}}"); -+ register(370, "{Name:'minecraft:dispenser',Properties:{facing:'north',triggered:'false'}}", "{Name:'minecraft:dispenser',Properties:{facing:'north',triggered:'false'}}"); -+ register(371, "{Name:'minecraft:dispenser',Properties:{facing:'south',triggered:'false'}}", "{Name:'minecraft:dispenser',Properties:{facing:'south',triggered:'false'}}"); -+ register(372, "{Name:'minecraft:dispenser',Properties:{facing:'west',triggered:'false'}}", "{Name:'minecraft:dispenser',Properties:{facing:'west',triggered:'false'}}"); -+ register(373, "{Name:'minecraft:dispenser',Properties:{facing:'east',triggered:'false'}}", "{Name:'minecraft:dispenser',Properties:{facing:'east',triggered:'false'}}"); -+ register(376, "{Name:'minecraft:dispenser',Properties:{facing:'down',triggered:'true'}}", "{Name:'minecraft:dispenser',Properties:{facing:'down',triggered:'true'}}"); -+ register(377, "{Name:'minecraft:dispenser',Properties:{facing:'up',triggered:'true'}}", "{Name:'minecraft:dispenser',Properties:{facing:'up',triggered:'true'}}"); -+ register(378, "{Name:'minecraft:dispenser',Properties:{facing:'north',triggered:'true'}}", "{Name:'minecraft:dispenser',Properties:{facing:'north',triggered:'true'}}"); -+ register(379, "{Name:'minecraft:dispenser',Properties:{facing:'south',triggered:'true'}}", "{Name:'minecraft:dispenser',Properties:{facing:'south',triggered:'true'}}"); -+ register(380, "{Name:'minecraft:dispenser',Properties:{facing:'west',triggered:'true'}}", "{Name:'minecraft:dispenser',Properties:{facing:'west',triggered:'true'}}"); -+ register(381, "{Name:'minecraft:dispenser',Properties:{facing:'east',triggered:'true'}}", "{Name:'minecraft:dispenser',Properties:{facing:'east',triggered:'true'}}"); -+ register(384, "{Name:'minecraft:sandstone'}", "{Name:'minecraft:sandstone',Properties:{type:'sandstone'}}"); -+ register(385, "{Name:'minecraft:chiseled_sandstone'}", "{Name:'minecraft:sandstone',Properties:{type:'chiseled_sandstone'}}"); -+ register(386, "{Name:'minecraft:cut_sandstone'}", "{Name:'minecraft:sandstone',Properties:{type:'smooth_sandstone'}}"); -+ register(400, "{Name:'minecraft:note_block'}", "{Name:'minecraft:noteblock'}"); -+ register(416, "{Name:'minecraft:red_bed',Properties:{facing:'south',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'south',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'south',occupied:'true',part:'foot'}}"); -+ register(417, "{Name:'minecraft:red_bed',Properties:{facing:'west',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'west',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'west',occupied:'true',part:'foot'}}"); -+ register(418, "{Name:'minecraft:red_bed',Properties:{facing:'north',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'north',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'north',occupied:'true',part:'foot'}}"); -+ register(419, "{Name:'minecraft:red_bed',Properties:{facing:'east',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'east',occupied:'false',part:'foot'}}", "{Name:'minecraft:bed',Properties:{facing:'east',occupied:'true',part:'foot'}}"); -+ register(424, "{Name:'minecraft:red_bed',Properties:{facing:'south',occupied:'false',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'south',occupied:'false',part:'head'}}"); -+ register(425, "{Name:'minecraft:red_bed',Properties:{facing:'west',occupied:'false',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'west',occupied:'false',part:'head'}}"); -+ register(426, "{Name:'minecraft:red_bed',Properties:{facing:'north',occupied:'false',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'north',occupied:'false',part:'head'}}"); -+ register(427, "{Name:'minecraft:red_bed',Properties:{facing:'east',occupied:'false',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'east',occupied:'false',part:'head'}}"); -+ register(428, "{Name:'minecraft:red_bed',Properties:{facing:'south',occupied:'true',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'south',occupied:'true',part:'head'}}"); -+ register(429, "{Name:'minecraft:red_bed',Properties:{facing:'west',occupied:'true',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'west',occupied:'true',part:'head'}}"); -+ register(430, "{Name:'minecraft:red_bed',Properties:{facing:'north',occupied:'true',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'north',occupied:'true',part:'head'}}"); -+ register(431, "{Name:'minecraft:red_bed',Properties:{facing:'east',occupied:'true',part:'head'}}", "{Name:'minecraft:bed',Properties:{facing:'east',occupied:'true',part:'head'}}"); -+ register(432, "{Name:'minecraft:powered_rail',Properties:{powered:'false',shape:'north_south'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'false',shape:'north_south'}}"); -+ register(433, "{Name:'minecraft:powered_rail',Properties:{powered:'false',shape:'east_west'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'false',shape:'east_west'}}"); -+ register(434, "{Name:'minecraft:powered_rail',Properties:{powered:'false',shape:'ascending_east'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'false',shape:'ascending_east'}}"); -+ register(435, "{Name:'minecraft:powered_rail',Properties:{powered:'false',shape:'ascending_west'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'false',shape:'ascending_west'}}"); -+ register(436, "{Name:'minecraft:powered_rail',Properties:{powered:'false',shape:'ascending_north'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'false',shape:'ascending_north'}}"); -+ register(437, "{Name:'minecraft:powered_rail',Properties:{powered:'false',shape:'ascending_south'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'false',shape:'ascending_south'}}"); -+ register(440, "{Name:'minecraft:powered_rail',Properties:{powered:'true',shape:'north_south'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'true',shape:'north_south'}}"); -+ register(441, "{Name:'minecraft:powered_rail',Properties:{powered:'true',shape:'east_west'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'true',shape:'east_west'}}"); -+ register(442, "{Name:'minecraft:powered_rail',Properties:{powered:'true',shape:'ascending_east'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'true',shape:'ascending_east'}}"); -+ register(443, "{Name:'minecraft:powered_rail',Properties:{powered:'true',shape:'ascending_west'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'true',shape:'ascending_west'}}"); -+ register(444, "{Name:'minecraft:powered_rail',Properties:{powered:'true',shape:'ascending_north'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'true',shape:'ascending_north'}}"); -+ register(445, "{Name:'minecraft:powered_rail',Properties:{powered:'true',shape:'ascending_south'}}", "{Name:'minecraft:golden_rail',Properties:{powered:'true',shape:'ascending_south'}}"); -+ register(448, "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'north_south'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'north_south'}}"); -+ register(449, "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'east_west'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'east_west'}}"); -+ register(450, "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_east'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_east'}}"); -+ register(451, "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_west'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_west'}}"); -+ register(452, "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_north'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_north'}}"); -+ register(453, "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_south'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'false',shape:'ascending_south'}}"); -+ register(456, "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'north_south'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'north_south'}}"); -+ register(457, "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'east_west'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'east_west'}}"); -+ register(458, "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_east'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_east'}}"); -+ register(459, "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_west'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_west'}}"); -+ register(460, "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_north'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_north'}}"); -+ register(461, "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_south'}}", "{Name:'minecraft:detector_rail',Properties:{powered:'true',shape:'ascending_south'}}"); -+ register(464, "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'down'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'down'}}"); -+ register(465, "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'up'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'up'}}"); -+ register(466, "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'north'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'north'}}"); -+ register(467, "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'south'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'south'}}"); -+ register(468, "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'west'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'west'}}"); -+ register(469, "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'east'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'false',facing:'east'}}"); -+ register(472, "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'down'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'down'}}"); -+ register(473, "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'up'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'up'}}"); -+ register(474, "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'north'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'north'}}"); -+ register(475, "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'south'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'south'}}"); -+ register(476, "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'west'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'west'}}"); -+ register(477, "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'east'}}", "{Name:'minecraft:sticky_piston',Properties:{extended:'true',facing:'east'}}"); -+ register(480, "{Name:'minecraft:cobweb'}", "{Name:'minecraft:web'}"); -+ register(496, "{Name:'minecraft:dead_bush'}", "{Name:'minecraft:tallgrass',Properties:{type:'dead_bush'}}"); -+ register(497, "{Name:'minecraft:grass'}", "{Name:'minecraft:tallgrass',Properties:{type:'tall_grass'}}"); -+ register(498, "{Name:'minecraft:fern'}", "{Name:'minecraft:tallgrass',Properties:{type:'fern'}}"); -+ register(512, "{Name:'minecraft:dead_bush'}", "{Name:'minecraft:deadbush'}"); -+ register(528, "{Name:'minecraft:piston',Properties:{extended:'false',facing:'down'}}", "{Name:'minecraft:piston',Properties:{extended:'false',facing:'down'}}"); -+ register(529, "{Name:'minecraft:piston',Properties:{extended:'false',facing:'up'}}", "{Name:'minecraft:piston',Properties:{extended:'false',facing:'up'}}"); -+ register(530, "{Name:'minecraft:piston',Properties:{extended:'false',facing:'north'}}", "{Name:'minecraft:piston',Properties:{extended:'false',facing:'north'}}"); -+ register(531, "{Name:'minecraft:piston',Properties:{extended:'false',facing:'south'}}", "{Name:'minecraft:piston',Properties:{extended:'false',facing:'south'}}"); -+ register(532, "{Name:'minecraft:piston',Properties:{extended:'false',facing:'west'}}", "{Name:'minecraft:piston',Properties:{extended:'false',facing:'west'}}"); -+ register(533, "{Name:'minecraft:piston',Properties:{extended:'false',facing:'east'}}", "{Name:'minecraft:piston',Properties:{extended:'false',facing:'east'}}"); -+ register(536, "{Name:'minecraft:piston',Properties:{extended:'true',facing:'down'}}", "{Name:'minecraft:piston',Properties:{extended:'true',facing:'down'}}"); -+ register(537, "{Name:'minecraft:piston',Properties:{extended:'true',facing:'up'}}", "{Name:'minecraft:piston',Properties:{extended:'true',facing:'up'}}"); -+ register(538, "{Name:'minecraft:piston',Properties:{extended:'true',facing:'north'}}", "{Name:'minecraft:piston',Properties:{extended:'true',facing:'north'}}"); -+ register(539, "{Name:'minecraft:piston',Properties:{extended:'true',facing:'south'}}", "{Name:'minecraft:piston',Properties:{extended:'true',facing:'south'}}"); -+ register(540, "{Name:'minecraft:piston',Properties:{extended:'true',facing:'west'}}", "{Name:'minecraft:piston',Properties:{extended:'true',facing:'west'}}"); -+ register(541, "{Name:'minecraft:piston',Properties:{extended:'true',facing:'east'}}", "{Name:'minecraft:piston',Properties:{extended:'true',facing:'east'}}"); -+ register(544, "{Name:'minecraft:piston_head',Properties:{facing:'down',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'down',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'down',short:'true',type:'normal'}}"); -+ register(545, "{Name:'minecraft:piston_head',Properties:{facing:'up',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'up',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'up',short:'true',type:'normal'}}"); -+ register(546, "{Name:'minecraft:piston_head',Properties:{facing:'north',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'north',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'north',short:'true',type:'normal'}}"); -+ register(547, "{Name:'minecraft:piston_head',Properties:{facing:'south',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'south',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'south',short:'true',type:'normal'}}"); -+ register(548, "{Name:'minecraft:piston_head',Properties:{facing:'west',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'west',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'west',short:'true',type:'normal'}}"); -+ register(549, "{Name:'minecraft:piston_head',Properties:{facing:'east',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'east',short:'false',type:'normal'}}", "{Name:'minecraft:piston_head',Properties:{facing:'east',short:'true',type:'normal'}}"); -+ register(552, "{Name:'minecraft:piston_head',Properties:{facing:'down',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'down',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'down',short:'true',type:'sticky'}}"); -+ register(553, "{Name:'minecraft:piston_head',Properties:{facing:'up',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'up',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'up',short:'true',type:'sticky'}}"); -+ register(554, "{Name:'minecraft:piston_head',Properties:{facing:'north',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'north',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'north',short:'true',type:'sticky'}}"); -+ register(555, "{Name:'minecraft:piston_head',Properties:{facing:'south',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'south',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'south',short:'true',type:'sticky'}}"); -+ register(556, "{Name:'minecraft:piston_head',Properties:{facing:'west',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'west',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'west',short:'true',type:'sticky'}}"); -+ register(557, "{Name:'minecraft:piston_head',Properties:{facing:'east',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'east',short:'false',type:'sticky'}}", "{Name:'minecraft:piston_head',Properties:{facing:'east',short:'true',type:'sticky'}}"); -+ register(560, "{Name:'minecraft:white_wool'}", "{Name:'minecraft:wool',Properties:{color:'white'}}"); -+ register(561, "{Name:'minecraft:orange_wool'}", "{Name:'minecraft:wool',Properties:{color:'orange'}}"); -+ register(562, "{Name:'minecraft:magenta_wool'}", "{Name:'minecraft:wool',Properties:{color:'magenta'}}"); -+ register(563, "{Name:'minecraft:light_blue_wool'}", "{Name:'minecraft:wool',Properties:{color:'light_blue'}}"); -+ register(564, "{Name:'minecraft:yellow_wool'}", "{Name:'minecraft:wool',Properties:{color:'yellow'}}"); -+ register(565, "{Name:'minecraft:lime_wool'}", "{Name:'minecraft:wool',Properties:{color:'lime'}}"); -+ register(566, "{Name:'minecraft:pink_wool'}", "{Name:'minecraft:wool',Properties:{color:'pink'}}"); -+ register(567, "{Name:'minecraft:gray_wool'}", "{Name:'minecraft:wool',Properties:{color:'gray'}}"); -+ register(568, "{Name:'minecraft:light_gray_wool'}", "{Name:'minecraft:wool',Properties:{color:'silver'}}"); -+ register(569, "{Name:'minecraft:cyan_wool'}", "{Name:'minecraft:wool',Properties:{color:'cyan'}}"); -+ register(570, "{Name:'minecraft:purple_wool'}", "{Name:'minecraft:wool',Properties:{color:'purple'}}"); -+ register(571, "{Name:'minecraft:blue_wool'}", "{Name:'minecraft:wool',Properties:{color:'blue'}}"); -+ register(572, "{Name:'minecraft:brown_wool'}", "{Name:'minecraft:wool',Properties:{color:'brown'}}"); -+ register(573, "{Name:'minecraft:green_wool'}", "{Name:'minecraft:wool',Properties:{color:'green'}}"); -+ register(574, "{Name:'minecraft:red_wool'}", "{Name:'minecraft:wool',Properties:{color:'red'}}"); -+ register(575, "{Name:'minecraft:black_wool'}", "{Name:'minecraft:wool',Properties:{color:'black'}}"); -+ register(576, "{Name:'minecraft:moving_piston',Properties:{facing:'down',type:'normal'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'down',type:'normal'}}"); -+ register(577, "{Name:'minecraft:moving_piston',Properties:{facing:'up',type:'normal'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'up',type:'normal'}}"); -+ register(578, "{Name:'minecraft:moving_piston',Properties:{facing:'north',type:'normal'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'north',type:'normal'}}"); -+ register(579, "{Name:'minecraft:moving_piston',Properties:{facing:'south',type:'normal'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'south',type:'normal'}}"); -+ register(580, "{Name:'minecraft:moving_piston',Properties:{facing:'west',type:'normal'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'west',type:'normal'}}"); -+ register(581, "{Name:'minecraft:moving_piston',Properties:{facing:'east',type:'normal'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'east',type:'normal'}}"); -+ register(584, "{Name:'minecraft:moving_piston',Properties:{facing:'down',type:'sticky'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'down',type:'sticky'}}"); -+ register(585, "{Name:'minecraft:moving_piston',Properties:{facing:'up',type:'sticky'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'up',type:'sticky'}}"); -+ register(586, "{Name:'minecraft:moving_piston',Properties:{facing:'north',type:'sticky'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'north',type:'sticky'}}"); -+ register(587, "{Name:'minecraft:moving_piston',Properties:{facing:'south',type:'sticky'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'south',type:'sticky'}}"); -+ register(588, "{Name:'minecraft:moving_piston',Properties:{facing:'west',type:'sticky'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'west',type:'sticky'}}"); -+ register(589, "{Name:'minecraft:moving_piston',Properties:{facing:'east',type:'sticky'}}", "{Name:'minecraft:piston_extension',Properties:{facing:'east',type:'sticky'}}"); -+ register(592, "{Name:'minecraft:dandelion'}", "{Name:'minecraft:yellow_flower',Properties:{type:'dandelion'}}"); -+ register(608, "{Name:'minecraft:poppy'}", "{Name:'minecraft:red_flower',Properties:{type:'poppy'}}"); -+ register(609, "{Name:'minecraft:blue_orchid'}", "{Name:'minecraft:red_flower',Properties:{type:'blue_orchid'}}"); -+ register(610, "{Name:'minecraft:allium'}", "{Name:'minecraft:red_flower',Properties:{type:'allium'}}"); -+ register(611, "{Name:'minecraft:azure_bluet'}", "{Name:'minecraft:red_flower',Properties:{type:'houstonia'}}"); -+ register(612, "{Name:'minecraft:red_tulip'}", "{Name:'minecraft:red_flower',Properties:{type:'red_tulip'}}"); -+ register(613, "{Name:'minecraft:orange_tulip'}", "{Name:'minecraft:red_flower',Properties:{type:'orange_tulip'}}"); -+ register(614, "{Name:'minecraft:white_tulip'}", "{Name:'minecraft:red_flower',Properties:{type:'white_tulip'}}"); -+ register(615, "{Name:'minecraft:pink_tulip'}", "{Name:'minecraft:red_flower',Properties:{type:'pink_tulip'}}"); -+ register(616, "{Name:'minecraft:oxeye_daisy'}", "{Name:'minecraft:red_flower',Properties:{type:'oxeye_daisy'}}"); -+ register(624, "{Name:'minecraft:brown_mushroom'}", "{Name:'minecraft:brown_mushroom'}"); -+ register(640, "{Name:'minecraft:red_mushroom'}", "{Name:'minecraft:red_mushroom'}"); -+ register(656, "{Name:'minecraft:gold_block'}", "{Name:'minecraft:gold_block'}"); -+ register(672, "{Name:'minecraft:iron_block'}", "{Name:'minecraft:iron_block'}"); -+ register(688, "{Name:'minecraft:stone_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'stone'}}"); -+ register(689, "{Name:'minecraft:sandstone_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'sandstone'}}"); -+ register(690, "{Name:'minecraft:petrified_oak_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'wood_old'}}"); -+ register(691, "{Name:'minecraft:cobblestone_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'cobblestone'}}"); -+ register(692, "{Name:'minecraft:brick_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'brick'}}"); -+ register(693, "{Name:'minecraft:stone_brick_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'stone_brick'}}"); -+ register(694, "{Name:'minecraft:nether_brick_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'nether_brick'}}"); -+ register(695, "{Name:'minecraft:quartz_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'false',variant:'quartz'}}"); -+ register(696, "{Name:'minecraft:smooth_stone'}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'stone'}}"); -+ register(697, "{Name:'minecraft:smooth_sandstone'}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'sandstone'}}"); -+ register(698, "{Name:'minecraft:petrified_oak_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'wood_old'}}"); -+ register(699, "{Name:'minecraft:cobblestone_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'cobblestone'}}"); -+ register(700, "{Name:'minecraft:brick_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'brick'}}"); -+ register(701, "{Name:'minecraft:stone_brick_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'stone_brick'}}"); -+ register(702, "{Name:'minecraft:nether_brick_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'nether_brick'}}"); -+ register(703, "{Name:'minecraft:smooth_quartz'}", "{Name:'minecraft:double_stone_slab',Properties:{seamless:'true',variant:'quartz'}}"); -+ register(704, "{Name:'minecraft:stone_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'stone'}}"); -+ register(705, "{Name:'minecraft:sandstone_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'sandstone'}}"); -+ register(706, "{Name:'minecraft:petrified_oak_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'wood_old'}}"); -+ register(707, "{Name:'minecraft:cobblestone_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'cobblestone'}}"); -+ register(708, "{Name:'minecraft:brick_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'brick'}}"); -+ register(709, "{Name:'minecraft:stone_brick_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'stone_brick'}}"); -+ register(710, "{Name:'minecraft:nether_brick_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'nether_brick'}}"); -+ register(711, "{Name:'minecraft:quartz_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab',Properties:{half:'bottom',variant:'quartz'}}"); -+ register(712, "{Name:'minecraft:stone_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'stone'}}"); -+ register(713, "{Name:'minecraft:sandstone_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'sandstone'}}"); -+ register(714, "{Name:'minecraft:petrified_oak_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'wood_old'}}"); -+ register(715, "{Name:'minecraft:cobblestone_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'cobblestone'}}"); -+ register(716, "{Name:'minecraft:brick_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'brick'}}"); -+ register(717, "{Name:'minecraft:stone_brick_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'stone_brick'}}"); -+ register(718, "{Name:'minecraft:nether_brick_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'nether_brick'}}"); -+ register(719, "{Name:'minecraft:quartz_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab',Properties:{half:'top',variant:'quartz'}}"); -+ register(720, "{Name:'minecraft:bricks'}", "{Name:'minecraft:brick_block'}"); -+ register(736, "{Name:'minecraft:tnt',Properties:{unstable:'false'}}", "{Name:'minecraft:tnt',Properties:{explode:'false'}}"); -+ register(737, "{Name:'minecraft:tnt',Properties:{unstable:'true'}}", "{Name:'minecraft:tnt',Properties:{explode:'true'}}"); -+ register(752, "{Name:'minecraft:bookshelf'}", "{Name:'minecraft:bookshelf'}"); -+ register(768, "{Name:'minecraft:mossy_cobblestone'}", "{Name:'minecraft:mossy_cobblestone'}"); -+ register(784, "{Name:'minecraft:obsidian'}", "{Name:'minecraft:obsidian'}"); -+ register(801, "{Name:'minecraft:wall_torch',Properties:{facing:'east'}}", "{Name:'minecraft:torch',Properties:{facing:'east'}}"); -+ register(802, "{Name:'minecraft:wall_torch',Properties:{facing:'west'}}", "{Name:'minecraft:torch',Properties:{facing:'west'}}"); -+ register(803, "{Name:'minecraft:wall_torch',Properties:{facing:'south'}}", "{Name:'minecraft:torch',Properties:{facing:'south'}}"); -+ register(804, "{Name:'minecraft:wall_torch',Properties:{facing:'north'}}", "{Name:'minecraft:torch',Properties:{facing:'north'}}"); -+ register(805, "{Name:'minecraft:torch'}", "{Name:'minecraft:torch',Properties:{facing:'up'}}"); -+ register(816, "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'0',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(817, "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'1',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(818, "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'2',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(819, "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'3',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(820, "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'4',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(821, "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'5',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(822, "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'6',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(823, "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'7',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(824, "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'8',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(825, "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'9',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(826, "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'10',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(827, "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'11',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(828, "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'12',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(829, "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'13',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(830, "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'14',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(831, "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:fire',Properties:{age:'15',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(832, "{Name:'minecraft:mob_spawner'}", "{Name:'minecraft:mob_spawner'}"); -+ register(848, "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(849, "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(850, "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(851, "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(852, "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(853, "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(854, "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(855, "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:oak_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(866, "{Name:'minecraft:chest',Properties:{facing:'north',type:'single'}}", "{Name:'minecraft:chest',Properties:{facing:'north'}}"); -+ register(867, "{Name:'minecraft:chest',Properties:{facing:'south',type:'single'}}", "{Name:'minecraft:chest',Properties:{facing:'south'}}"); -+ register(868, "{Name:'minecraft:chest',Properties:{facing:'west',type:'single'}}", "{Name:'minecraft:chest',Properties:{facing:'west'}}"); -+ register(869, "{Name:'minecraft:chest',Properties:{facing:'east',type:'single'}}", "{Name:'minecraft:chest',Properties:{facing:'east'}}"); -+ register(880, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'0',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'0',south:'up',west:'up'}}"); -+ register(881, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'1',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'1',south:'up',west:'up'}}"); -+ register(882, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'2',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'2',south:'up',west:'up'}}"); -+ register(883, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'3',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'3',south:'up',west:'up'}}"); -+ register(884, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'4',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'4',south:'up',west:'up'}}"); -+ register(885, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'5',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'5',south:'up',west:'up'}}"); -+ register(886, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'6',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'6',south:'up',west:'up'}}"); -+ register(887, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'7',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'7',south:'up',west:'up'}}"); -+ register(888, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'8',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'8',south:'up',west:'up'}}"); -+ register(889, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'9',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'9',south:'up',west:'up'}}"); -+ register(890, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'10',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'10',south:'up',west:'up'}}"); -+ register(891, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'11',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'11',south:'up',west:'up'}}"); -+ register(892, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'12',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'12',south:'up',west:'up'}}"); -+ register(893, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'13',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'13',south:'up',west:'up'}}"); -+ register(894, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'14',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'14',south:'up',west:'up'}}"); -+ register(895, "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'none',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'side',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'none',north:'up',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'none',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'side',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'side',north:'up',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'none',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'side',power:'15',south:'up',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'none',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'none',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'none',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'side',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'side',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'side',west:'up'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'up',west:'none'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'up',west:'side'}}", "{Name:'minecraft:redstone_wire',Properties:{east:'up',north:'up',power:'15',south:'up',west:'up'}}"); -+ register(896, "{Name:'minecraft:diamond_ore'}", "{Name:'minecraft:diamond_ore'}"); -+ register(912, "{Name:'minecraft:diamond_block'}", "{Name:'minecraft:diamond_block'}"); -+ register(928, "{Name:'minecraft:crafting_table'}", "{Name:'minecraft:crafting_table'}"); -+ register(944, "{Name:'minecraft:wheat',Properties:{age:'0'}}", "{Name:'minecraft:wheat',Properties:{age:'0'}}"); -+ register(945, "{Name:'minecraft:wheat',Properties:{age:'1'}}", "{Name:'minecraft:wheat',Properties:{age:'1'}}"); -+ register(946, "{Name:'minecraft:wheat',Properties:{age:'2'}}", "{Name:'minecraft:wheat',Properties:{age:'2'}}"); -+ register(947, "{Name:'minecraft:wheat',Properties:{age:'3'}}", "{Name:'minecraft:wheat',Properties:{age:'3'}}"); -+ register(948, "{Name:'minecraft:wheat',Properties:{age:'4'}}", "{Name:'minecraft:wheat',Properties:{age:'4'}}"); -+ register(949, "{Name:'minecraft:wheat',Properties:{age:'5'}}", "{Name:'minecraft:wheat',Properties:{age:'5'}}"); -+ register(950, "{Name:'minecraft:wheat',Properties:{age:'6'}}", "{Name:'minecraft:wheat',Properties:{age:'6'}}"); -+ register(951, "{Name:'minecraft:wheat',Properties:{age:'7'}}", "{Name:'minecraft:wheat',Properties:{age:'7'}}"); -+ register(960, "{Name:'minecraft:farmland',Properties:{moisture:'0'}}", "{Name:'minecraft:farmland',Properties:{moisture:'0'}}"); -+ register(961, "{Name:'minecraft:farmland',Properties:{moisture:'1'}}", "{Name:'minecraft:farmland',Properties:{moisture:'1'}}"); -+ register(962, "{Name:'minecraft:farmland',Properties:{moisture:'2'}}", "{Name:'minecraft:farmland',Properties:{moisture:'2'}}"); -+ register(963, "{Name:'minecraft:farmland',Properties:{moisture:'3'}}", "{Name:'minecraft:farmland',Properties:{moisture:'3'}}"); -+ register(964, "{Name:'minecraft:farmland',Properties:{moisture:'4'}}", "{Name:'minecraft:farmland',Properties:{moisture:'4'}}"); -+ register(965, "{Name:'minecraft:farmland',Properties:{moisture:'5'}}", "{Name:'minecraft:farmland',Properties:{moisture:'5'}}"); -+ register(966, "{Name:'minecraft:farmland',Properties:{moisture:'6'}}", "{Name:'minecraft:farmland',Properties:{moisture:'6'}}"); -+ register(967, "{Name:'minecraft:farmland',Properties:{moisture:'7'}}", "{Name:'minecraft:farmland',Properties:{moisture:'7'}}"); -+ register(978, "{Name:'minecraft:furnace',Properties:{facing:'north',lit:'false'}}", "{Name:'minecraft:furnace',Properties:{facing:'north'}}"); -+ register(979, "{Name:'minecraft:furnace',Properties:{facing:'south',lit:'false'}}", "{Name:'minecraft:furnace',Properties:{facing:'south'}}"); -+ register(980, "{Name:'minecraft:furnace',Properties:{facing:'west',lit:'false'}}", "{Name:'minecraft:furnace',Properties:{facing:'west'}}"); -+ register(981, "{Name:'minecraft:furnace',Properties:{facing:'east',lit:'false'}}", "{Name:'minecraft:furnace',Properties:{facing:'east'}}"); -+ register(994, "{Name:'minecraft:furnace',Properties:{facing:'north',lit:'true'}}", "{Name:'minecraft:lit_furnace',Properties:{facing:'north'}}"); -+ register(995, "{Name:'minecraft:furnace',Properties:{facing:'south',lit:'true'}}", "{Name:'minecraft:lit_furnace',Properties:{facing:'south'}}"); -+ register(996, "{Name:'minecraft:furnace',Properties:{facing:'west',lit:'true'}}", "{Name:'minecraft:lit_furnace',Properties:{facing:'west'}}"); -+ register(997, "{Name:'minecraft:furnace',Properties:{facing:'east',lit:'true'}}", "{Name:'minecraft:lit_furnace',Properties:{facing:'east'}}"); -+ register(1008, "{Name:'minecraft:sign',Properties:{rotation:'0'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'0'}}"); -+ register(1009, "{Name:'minecraft:sign',Properties:{rotation:'1'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'1'}}"); -+ register(1010, "{Name:'minecraft:sign',Properties:{rotation:'2'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'2'}}"); -+ register(1011, "{Name:'minecraft:sign',Properties:{rotation:'3'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'3'}}"); -+ register(1012, "{Name:'minecraft:sign',Properties:{rotation:'4'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'4'}}"); -+ register(1013, "{Name:'minecraft:sign',Properties:{rotation:'5'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'5'}}"); -+ register(1014, "{Name:'minecraft:sign',Properties:{rotation:'6'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'6'}}"); -+ register(1015, "{Name:'minecraft:sign',Properties:{rotation:'7'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'7'}}"); -+ register(1016, "{Name:'minecraft:sign',Properties:{rotation:'8'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'8'}}"); -+ register(1017, "{Name:'minecraft:sign',Properties:{rotation:'9'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'9'}}"); -+ register(1018, "{Name:'minecraft:sign',Properties:{rotation:'10'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'10'}}"); -+ register(1019, "{Name:'minecraft:sign',Properties:{rotation:'11'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'11'}}"); -+ register(1020, "{Name:'minecraft:sign',Properties:{rotation:'12'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'12'}}"); -+ register(1021, "{Name:'minecraft:sign',Properties:{rotation:'13'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'13'}}"); -+ register(1022, "{Name:'minecraft:sign',Properties:{rotation:'14'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'14'}}"); -+ register(1023, "{Name:'minecraft:sign',Properties:{rotation:'15'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'15'}}"); -+ register(1024, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1025, "{Name:'minecraft:oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1026, "{Name:'minecraft:oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1027, "{Name:'minecraft:oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1028, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1029, "{Name:'minecraft:oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1030, "{Name:'minecraft:oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1031, "{Name:'minecraft:oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1032, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1033, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(1034, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(1035, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:wooden_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(1036, "{Name:'minecraft:oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1037, "{Name:'minecraft:oak_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1038, "{Name:'minecraft:oak_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1039, "{Name:'minecraft:oak_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1042, "{Name:'minecraft:ladder',Properties:{facing:'north'}}", "{Name:'minecraft:ladder',Properties:{facing:'north'}}"); -+ register(1043, "{Name:'minecraft:ladder',Properties:{facing:'south'}}", "{Name:'minecraft:ladder',Properties:{facing:'south'}}"); -+ register(1044, "{Name:'minecraft:ladder',Properties:{facing:'west'}}", "{Name:'minecraft:ladder',Properties:{facing:'west'}}"); -+ register(1045, "{Name:'minecraft:ladder',Properties:{facing:'east'}}", "{Name:'minecraft:ladder',Properties:{facing:'east'}}"); -+ register(1056, "{Name:'minecraft:rail',Properties:{shape:'north_south'}}", "{Name:'minecraft:rail',Properties:{shape:'north_south'}}"); -+ register(1057, "{Name:'minecraft:rail',Properties:{shape:'east_west'}}", "{Name:'minecraft:rail',Properties:{shape:'east_west'}}"); -+ register(1058, "{Name:'minecraft:rail',Properties:{shape:'ascending_east'}}", "{Name:'minecraft:rail',Properties:{shape:'ascending_east'}}"); -+ register(1059, "{Name:'minecraft:rail',Properties:{shape:'ascending_west'}}", "{Name:'minecraft:rail',Properties:{shape:'ascending_west'}}"); -+ register(1060, "{Name:'minecraft:rail',Properties:{shape:'ascending_north'}}", "{Name:'minecraft:rail',Properties:{shape:'ascending_north'}}"); -+ register(1061, "{Name:'minecraft:rail',Properties:{shape:'ascending_south'}}", "{Name:'minecraft:rail',Properties:{shape:'ascending_south'}}"); -+ register(1062, "{Name:'minecraft:rail',Properties:{shape:'south_east'}}", "{Name:'minecraft:rail',Properties:{shape:'south_east'}}"); -+ register(1063, "{Name:'minecraft:rail',Properties:{shape:'south_west'}}", "{Name:'minecraft:rail',Properties:{shape:'south_west'}}"); -+ register(1064, "{Name:'minecraft:rail',Properties:{shape:'north_west'}}", "{Name:'minecraft:rail',Properties:{shape:'north_west'}}"); -+ register(1065, "{Name:'minecraft:rail',Properties:{shape:'north_east'}}", "{Name:'minecraft:rail',Properties:{shape:'north_east'}}"); -+ register(1072, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(1073, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(1074, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(1075, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(1076, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(1077, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(1078, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(1079, "{Name:'minecraft:cobblestone_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(1090, "{Name:'minecraft:wall_sign',Properties:{facing:'north'}}", "{Name:'minecraft:wall_sign',Properties:{facing:'north'}}"); -+ register(1091, "{Name:'minecraft:wall_sign',Properties:{facing:'south'}}", "{Name:'minecraft:wall_sign',Properties:{facing:'south'}}"); -+ register(1092, "{Name:'minecraft:wall_sign',Properties:{facing:'west'}}", "{Name:'minecraft:wall_sign',Properties:{facing:'west'}}"); -+ register(1093, "{Name:'minecraft:wall_sign',Properties:{facing:'east'}}", "{Name:'minecraft:wall_sign',Properties:{facing:'east'}}"); -+ register(1104, "{Name:'minecraft:lever',Properties:{face:'ceiling',facing:'west',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'down_x',powered:'false'}}"); -+ register(1105, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'east',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'east',powered:'false'}}"); -+ register(1106, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'west',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'west',powered:'false'}}"); -+ register(1107, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'south',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'south',powered:'false'}}"); -+ register(1108, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'north',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'north',powered:'false'}}"); -+ register(1109, "{Name:'minecraft:lever',Properties:{face:'floor',facing:'north',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'up_z',powered:'false'}}"); -+ register(1110, "{Name:'minecraft:lever',Properties:{face:'floor',facing:'west',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'up_x',powered:'false'}}"); -+ register(1111, "{Name:'minecraft:lever',Properties:{face:'ceiling',facing:'north',powered:'false'}}", "{Name:'minecraft:lever',Properties:{facing:'down_z',powered:'false'}}"); -+ register(1112, "{Name:'minecraft:lever',Properties:{face:'ceiling',facing:'west',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'down_x',powered:'true'}}"); -+ register(1113, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'east',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'east',powered:'true'}}"); -+ register(1114, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'west',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'west',powered:'true'}}"); -+ register(1115, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'south',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'south',powered:'true'}}"); -+ register(1116, "{Name:'minecraft:lever',Properties:{face:'wall',facing:'north',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'north',powered:'true'}}"); -+ register(1117, "{Name:'minecraft:lever',Properties:{face:'floor',facing:'north',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'up_z',powered:'true'}}"); -+ register(1118, "{Name:'minecraft:lever',Properties:{face:'floor',facing:'west',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'up_x',powered:'true'}}"); -+ register(1119, "{Name:'minecraft:lever',Properties:{face:'ceiling',facing:'north',powered:'true'}}", "{Name:'minecraft:lever',Properties:{facing:'down_z',powered:'true'}}"); -+ register(1120, "{Name:'minecraft:stone_pressure_plate',Properties:{powered:'false'}}", "{Name:'minecraft:stone_pressure_plate',Properties:{powered:'false'}}"); -+ register(1121, "{Name:'minecraft:stone_pressure_plate',Properties:{powered:'true'}}", "{Name:'minecraft:stone_pressure_plate',Properties:{powered:'true'}}"); -+ register(1136, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1137, "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1138, "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1139, "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(1140, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1141, "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1142, "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1143, "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(1144, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1145, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(1146, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(1147, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(1148, "{Name:'minecraft:iron_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1149, "{Name:'minecraft:iron_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1150, "{Name:'minecraft:iron_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1151, "{Name:'minecraft:iron_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(1152, "{Name:'minecraft:oak_pressure_plate',Properties:{powered:'false'}}", "{Name:'minecraft:wooden_pressure_plate',Properties:{powered:'false'}}"); -+ register(1153, "{Name:'minecraft:oak_pressure_plate',Properties:{powered:'true'}}", "{Name:'minecraft:wooden_pressure_plate',Properties:{powered:'true'}}"); -+ register(1168, "{Name:'minecraft:redstone_ore',Properties:{lit:'false'}}", "{Name:'minecraft:redstone_ore'}"); -+ register(1184, "{Name:'minecraft:redstone_ore',Properties:{lit:'true'}}", "{Name:'minecraft:lit_redstone_ore'}"); -+ register(1201, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'east',lit:'false'}}", "{Name:'minecraft:unlit_redstone_torch',Properties:{facing:'east'}}"); -+ register(1202, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'west',lit:'false'}}", "{Name:'minecraft:unlit_redstone_torch',Properties:{facing:'west'}}"); -+ register(1203, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'south',lit:'false'}}", "{Name:'minecraft:unlit_redstone_torch',Properties:{facing:'south'}}"); -+ register(1204, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'north',lit:'false'}}", "{Name:'minecraft:unlit_redstone_torch',Properties:{facing:'north'}}"); -+ register(1205, "{Name:'minecraft:redstone_torch',Properties:{lit:'false'}}", "{Name:'minecraft:unlit_redstone_torch',Properties:{facing:'up'}}"); -+ register(1217, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'east',lit:'true'}}", "{Name:'minecraft:redstone_torch',Properties:{facing:'east'}}"); -+ register(1218, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'west',lit:'true'}}", "{Name:'minecraft:redstone_torch',Properties:{facing:'west'}}"); -+ register(1219, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'south',lit:'true'}}", "{Name:'minecraft:redstone_torch',Properties:{facing:'south'}}"); -+ register(1220, "{Name:'minecraft:redstone_wall_torch',Properties:{facing:'north',lit:'true'}}", "{Name:'minecraft:redstone_torch',Properties:{facing:'north'}}"); -+ register(1221, "{Name:'minecraft:redstone_torch',Properties:{lit:'true'}}", "{Name:'minecraft:redstone_torch',Properties:{facing:'up'}}"); -+ register(1232, "{Name:'minecraft:stone_button',Properties:{face:'ceiling',facing:'north',powered:'false'}}", "{Name:'minecraft:stone_button',Properties:{facing:'down',powered:'false'}}"); -+ register(1233, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'east',powered:'false'}}", "{Name:'minecraft:stone_button',Properties:{facing:'east',powered:'false'}}"); -+ register(1234, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'west',powered:'false'}}", "{Name:'minecraft:stone_button',Properties:{facing:'west',powered:'false'}}"); -+ register(1235, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'south',powered:'false'}}", "{Name:'minecraft:stone_button',Properties:{facing:'south',powered:'false'}}"); -+ register(1236, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'north',powered:'false'}}", "{Name:'minecraft:stone_button',Properties:{facing:'north',powered:'false'}}"); -+ register(1237, "{Name:'minecraft:stone_button',Properties:{face:'floor',facing:'north',powered:'false'}}", "{Name:'minecraft:stone_button',Properties:{facing:'up',powered:'false'}}"); -+ register(1240, "{Name:'minecraft:stone_button',Properties:{face:'ceiling',facing:'north',powered:'true'}}", "{Name:'minecraft:stone_button',Properties:{facing:'down',powered:'true'}}"); -+ register(1241, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'east',powered:'true'}}", "{Name:'minecraft:stone_button',Properties:{facing:'east',powered:'true'}}"); -+ register(1242, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'west',powered:'true'}}", "{Name:'minecraft:stone_button',Properties:{facing:'west',powered:'true'}}"); -+ register(1243, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'south',powered:'true'}}", "{Name:'minecraft:stone_button',Properties:{facing:'south',powered:'true'}}"); -+ register(1244, "{Name:'minecraft:stone_button',Properties:{face:'wall',facing:'north',powered:'true'}}", "{Name:'minecraft:stone_button',Properties:{facing:'north',powered:'true'}}"); -+ register(1245, "{Name:'minecraft:stone_button',Properties:{face:'floor',facing:'north',powered:'true'}}", "{Name:'minecraft:stone_button',Properties:{facing:'up',powered:'true'}}"); -+ register(1248, "{Name:'minecraft:snow',Properties:{layers:'1'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'1'}}"); -+ register(1249, "{Name:'minecraft:snow',Properties:{layers:'2'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'2'}}"); -+ register(1250, "{Name:'minecraft:snow',Properties:{layers:'3'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'3'}}"); -+ register(1251, "{Name:'minecraft:snow',Properties:{layers:'4'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'4'}}"); -+ register(1252, "{Name:'minecraft:snow',Properties:{layers:'5'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'5'}}"); -+ register(1253, "{Name:'minecraft:snow',Properties:{layers:'6'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'6'}}"); -+ register(1254, "{Name:'minecraft:snow',Properties:{layers:'7'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'7'}}"); -+ register(1255, "{Name:'minecraft:snow',Properties:{layers:'8'}}", "{Name:'minecraft:snow_layer',Properties:{layers:'8'}}"); -+ register(1264, "{Name:'minecraft:ice'}", "{Name:'minecraft:ice'}"); -+ register(1280, "{Name:'minecraft:snow_block'}", "{Name:'minecraft:snow'}"); -+ register(1296, "{Name:'minecraft:cactus',Properties:{age:'0'}}", "{Name:'minecraft:cactus',Properties:{age:'0'}}"); -+ register(1297, "{Name:'minecraft:cactus',Properties:{age:'1'}}", "{Name:'minecraft:cactus',Properties:{age:'1'}}"); -+ register(1298, "{Name:'minecraft:cactus',Properties:{age:'2'}}", "{Name:'minecraft:cactus',Properties:{age:'2'}}"); -+ register(1299, "{Name:'minecraft:cactus',Properties:{age:'3'}}", "{Name:'minecraft:cactus',Properties:{age:'3'}}"); -+ register(1300, "{Name:'minecraft:cactus',Properties:{age:'4'}}", "{Name:'minecraft:cactus',Properties:{age:'4'}}"); -+ register(1301, "{Name:'minecraft:cactus',Properties:{age:'5'}}", "{Name:'minecraft:cactus',Properties:{age:'5'}}"); -+ register(1302, "{Name:'minecraft:cactus',Properties:{age:'6'}}", "{Name:'minecraft:cactus',Properties:{age:'6'}}"); -+ register(1303, "{Name:'minecraft:cactus',Properties:{age:'7'}}", "{Name:'minecraft:cactus',Properties:{age:'7'}}"); -+ register(1304, "{Name:'minecraft:cactus',Properties:{age:'8'}}", "{Name:'minecraft:cactus',Properties:{age:'8'}}"); -+ register(1305, "{Name:'minecraft:cactus',Properties:{age:'9'}}", "{Name:'minecraft:cactus',Properties:{age:'9'}}"); -+ register(1306, "{Name:'minecraft:cactus',Properties:{age:'10'}}", "{Name:'minecraft:cactus',Properties:{age:'10'}}"); -+ register(1307, "{Name:'minecraft:cactus',Properties:{age:'11'}}", "{Name:'minecraft:cactus',Properties:{age:'11'}}"); -+ register(1308, "{Name:'minecraft:cactus',Properties:{age:'12'}}", "{Name:'minecraft:cactus',Properties:{age:'12'}}"); -+ register(1309, "{Name:'minecraft:cactus',Properties:{age:'13'}}", "{Name:'minecraft:cactus',Properties:{age:'13'}}"); -+ register(1310, "{Name:'minecraft:cactus',Properties:{age:'14'}}", "{Name:'minecraft:cactus',Properties:{age:'14'}}"); -+ register(1311, "{Name:'minecraft:cactus',Properties:{age:'15'}}", "{Name:'minecraft:cactus',Properties:{age:'15'}}"); -+ register(1312, "{Name:'minecraft:clay'}", "{Name:'minecraft:clay'}"); -+ register(1328, "{Name:'minecraft:sugar_cane',Properties:{age:'0'}}", "{Name:'minecraft:reeds',Properties:{age:'0'}}"); -+ register(1329, "{Name:'minecraft:sugar_cane',Properties:{age:'1'}}", "{Name:'minecraft:reeds',Properties:{age:'1'}}"); -+ register(1330, "{Name:'minecraft:sugar_cane',Properties:{age:'2'}}", "{Name:'minecraft:reeds',Properties:{age:'2'}}"); -+ register(1331, "{Name:'minecraft:sugar_cane',Properties:{age:'3'}}", "{Name:'minecraft:reeds',Properties:{age:'3'}}"); -+ register(1332, "{Name:'minecraft:sugar_cane',Properties:{age:'4'}}", "{Name:'minecraft:reeds',Properties:{age:'4'}}"); -+ register(1333, "{Name:'minecraft:sugar_cane',Properties:{age:'5'}}", "{Name:'minecraft:reeds',Properties:{age:'5'}}"); -+ register(1334, "{Name:'minecraft:sugar_cane',Properties:{age:'6'}}", "{Name:'minecraft:reeds',Properties:{age:'6'}}"); -+ register(1335, "{Name:'minecraft:sugar_cane',Properties:{age:'7'}}", "{Name:'minecraft:reeds',Properties:{age:'7'}}"); -+ register(1336, "{Name:'minecraft:sugar_cane',Properties:{age:'8'}}", "{Name:'minecraft:reeds',Properties:{age:'8'}}"); -+ register(1337, "{Name:'minecraft:sugar_cane',Properties:{age:'9'}}", "{Name:'minecraft:reeds',Properties:{age:'9'}}"); -+ register(1338, "{Name:'minecraft:sugar_cane',Properties:{age:'10'}}", "{Name:'minecraft:reeds',Properties:{age:'10'}}"); -+ register(1339, "{Name:'minecraft:sugar_cane',Properties:{age:'11'}}", "{Name:'minecraft:reeds',Properties:{age:'11'}}"); -+ register(1340, "{Name:'minecraft:sugar_cane',Properties:{age:'12'}}", "{Name:'minecraft:reeds',Properties:{age:'12'}}"); -+ register(1341, "{Name:'minecraft:sugar_cane',Properties:{age:'13'}}", "{Name:'minecraft:reeds',Properties:{age:'13'}}"); -+ register(1342, "{Name:'minecraft:sugar_cane',Properties:{age:'14'}}", "{Name:'minecraft:reeds',Properties:{age:'14'}}"); -+ register(1343, "{Name:'minecraft:sugar_cane',Properties:{age:'15'}}", "{Name:'minecraft:reeds',Properties:{age:'15'}}"); -+ register(1344, "{Name:'minecraft:jukebox',Properties:{has_record:'false'}}", "{Name:'minecraft:jukebox',Properties:{has_record:'false'}}"); -+ register(1345, "{Name:'minecraft:jukebox',Properties:{has_record:'true'}}", "{Name:'minecraft:jukebox',Properties:{has_record:'true'}}"); -+ register(1360, "{Name:'minecraft:oak_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(1376, "{Name:'minecraft:carved_pumpkin',Properties:{facing:'south'}}", "{Name:'minecraft:pumpkin',Properties:{facing:'south'}}"); -+ register(1377, "{Name:'minecraft:carved_pumpkin',Properties:{facing:'west'}}", "{Name:'minecraft:pumpkin',Properties:{facing:'west'}}"); -+ register(1378, "{Name:'minecraft:carved_pumpkin',Properties:{facing:'north'}}", "{Name:'minecraft:pumpkin',Properties:{facing:'north'}}"); -+ register(1379, "{Name:'minecraft:carved_pumpkin',Properties:{facing:'east'}}", "{Name:'minecraft:pumpkin',Properties:{facing:'east'}}"); -+ register(1392, "{Name:'minecraft:netherrack'}", "{Name:'minecraft:netherrack'}"); -+ register(1408, "{Name:'minecraft:soul_sand'}", "{Name:'minecraft:soul_sand'}"); -+ register(1424, "{Name:'minecraft:glowstone'}", "{Name:'minecraft:glowstone'}"); -+ register(1441, "{Name:'minecraft:portal',Properties:{axis:'x'}}", "{Name:'minecraft:portal',Properties:{axis:'x'}}"); -+ register(1442, "{Name:'minecraft:portal',Properties:{axis:'z'}}", "{Name:'minecraft:portal',Properties:{axis:'z'}}"); -+ register(1456, "{Name:'minecraft:jack_o_lantern',Properties:{facing:'south'}}", "{Name:'minecraft:lit_pumpkin',Properties:{facing:'south'}}"); -+ register(1457, "{Name:'minecraft:jack_o_lantern',Properties:{facing:'west'}}", "{Name:'minecraft:lit_pumpkin',Properties:{facing:'west'}}"); -+ register(1458, "{Name:'minecraft:jack_o_lantern',Properties:{facing:'north'}}", "{Name:'minecraft:lit_pumpkin',Properties:{facing:'north'}}"); -+ register(1459, "{Name:'minecraft:jack_o_lantern',Properties:{facing:'east'}}", "{Name:'minecraft:lit_pumpkin',Properties:{facing:'east'}}"); -+ register(1472, "{Name:'minecraft:cake',Properties:{bites:'0'}}", "{Name:'minecraft:cake',Properties:{bites:'0'}}"); -+ register(1473, "{Name:'minecraft:cake',Properties:{bites:'1'}}", "{Name:'minecraft:cake',Properties:{bites:'1'}}"); -+ register(1474, "{Name:'minecraft:cake',Properties:{bites:'2'}}", "{Name:'minecraft:cake',Properties:{bites:'2'}}"); -+ register(1475, "{Name:'minecraft:cake',Properties:{bites:'3'}}", "{Name:'minecraft:cake',Properties:{bites:'3'}}"); -+ register(1476, "{Name:'minecraft:cake',Properties:{bites:'4'}}", "{Name:'minecraft:cake',Properties:{bites:'4'}}"); -+ register(1477, "{Name:'minecraft:cake',Properties:{bites:'5'}}", "{Name:'minecraft:cake',Properties:{bites:'5'}}"); -+ register(1478, "{Name:'minecraft:cake',Properties:{bites:'6'}}", "{Name:'minecraft:cake',Properties:{bites:'6'}}"); -+ register(1488, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'south',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'south',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'south',locked:'true'}}"); -+ register(1489, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'west',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'west',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'west',locked:'true'}}"); -+ register(1490, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'north',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'north',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'north',locked:'true'}}"); -+ register(1491, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'east',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'east',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'1',facing:'east',locked:'true'}}"); -+ register(1492, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'south',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'south',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'south',locked:'true'}}"); -+ register(1493, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'west',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'west',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'west',locked:'true'}}"); -+ register(1494, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'north',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'north',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'north',locked:'true'}}"); -+ register(1495, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'east',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'east',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'2',facing:'east',locked:'true'}}"); -+ register(1496, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'south',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'south',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'south',locked:'true'}}"); -+ register(1497, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'west',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'west',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'west',locked:'true'}}"); -+ register(1498, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'north',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'north',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'north',locked:'true'}}"); -+ register(1499, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'east',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'east',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'3',facing:'east',locked:'true'}}"); -+ register(1500, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'south',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'south',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'south',locked:'true'}}"); -+ register(1501, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'west',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'west',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'west',locked:'true'}}"); -+ register(1502, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'north',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'north',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'north',locked:'true'}}"); -+ register(1503, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'east',locked:'false',powered:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'east',locked:'false'}}", "{Name:'minecraft:unpowered_repeater',Properties:{delay:'4',facing:'east',locked:'true'}}"); -+ register(1504, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'south',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'south',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'south',locked:'true'}}"); -+ register(1505, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'west',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'west',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'west',locked:'true'}}"); -+ register(1506, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'north',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'north',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'north',locked:'true'}}"); -+ register(1507, "{Name:'minecraft:repeater',Properties:{delay:'1',facing:'east',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'east',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'1',facing:'east',locked:'true'}}"); -+ register(1508, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'south',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'south',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'south',locked:'true'}}"); -+ register(1509, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'west',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'west',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'west',locked:'true'}}"); -+ register(1510, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'north',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'north',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'north',locked:'true'}}"); -+ register(1511, "{Name:'minecraft:repeater',Properties:{delay:'2',facing:'east',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'east',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'2',facing:'east',locked:'true'}}"); -+ register(1512, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'south',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'south',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'south',locked:'true'}}"); -+ register(1513, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'west',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'west',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'west',locked:'true'}}"); -+ register(1514, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'north',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'north',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'north',locked:'true'}}"); -+ register(1515, "{Name:'minecraft:repeater',Properties:{delay:'3',facing:'east',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'east',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'3',facing:'east',locked:'true'}}"); -+ register(1516, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'south',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'south',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'south',locked:'true'}}"); -+ register(1517, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'west',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'west',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'west',locked:'true'}}"); -+ register(1518, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'north',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'north',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'north',locked:'true'}}"); -+ register(1519, "{Name:'minecraft:repeater',Properties:{delay:'4',facing:'east',locked:'false',powered:'true'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'east',locked:'false'}}", "{Name:'minecraft:powered_repeater',Properties:{delay:'4',facing:'east',locked:'true'}}"); -+ register(1520, "{Name:'minecraft:white_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'white'}}"); -+ register(1521, "{Name:'minecraft:orange_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'orange'}}"); -+ register(1522, "{Name:'minecraft:magenta_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'magenta'}}"); -+ register(1523, "{Name:'minecraft:light_blue_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'light_blue'}}"); -+ register(1524, "{Name:'minecraft:yellow_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'yellow'}}"); -+ register(1525, "{Name:'minecraft:lime_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'lime'}}"); -+ register(1526, "{Name:'minecraft:pink_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'pink'}}"); -+ register(1527, "{Name:'minecraft:gray_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'gray'}}"); -+ register(1528, "{Name:'minecraft:light_gray_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'silver'}}"); -+ register(1529, "{Name:'minecraft:cyan_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'cyan'}}"); -+ register(1530, "{Name:'minecraft:purple_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'purple'}}"); -+ register(1531, "{Name:'minecraft:blue_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'blue'}}"); -+ register(1532, "{Name:'minecraft:brown_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'brown'}}"); -+ register(1533, "{Name:'minecraft:green_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'green'}}"); -+ register(1534, "{Name:'minecraft:red_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'red'}}"); -+ register(1535, "{Name:'minecraft:black_stained_glass'}", "{Name:'minecraft:stained_glass',Properties:{color:'black'}}"); -+ register(1536, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'north',half:'bottom',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'north',half:'bottom',open:'false'}}"); -+ register(1537, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'south',half:'bottom',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'south',half:'bottom',open:'false'}}"); -+ register(1538, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'west',half:'bottom',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'west',half:'bottom',open:'false'}}"); -+ register(1539, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'east',half:'bottom',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'east',half:'bottom',open:'false'}}"); -+ register(1540, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'north',half:'bottom',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'north',half:'bottom',open:'true'}}"); -+ register(1541, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'south',half:'bottom',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'south',half:'bottom',open:'true'}}"); -+ register(1542, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'west',half:'bottom',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'west',half:'bottom',open:'true'}}"); -+ register(1543, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'east',half:'bottom',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'east',half:'bottom',open:'true'}}"); -+ register(1544, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'north',half:'top',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'north',half:'top',open:'false'}}"); -+ register(1545, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'south',half:'top',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'south',half:'top',open:'false'}}"); -+ register(1546, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'west',half:'top',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'west',half:'top',open:'false'}}"); -+ register(1547, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'east',half:'top',open:'false'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'east',half:'top',open:'false'}}"); -+ register(1548, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'north',half:'top',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'north',half:'top',open:'true'}}"); -+ register(1549, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'south',half:'top',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'south',half:'top',open:'true'}}"); -+ register(1550, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'west',half:'top',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'west',half:'top',open:'true'}}"); -+ register(1551, "{Name:'minecraft:oak_trapdoor',Properties:{facing:'east',half:'top',open:'true'}}", "{Name:'minecraft:trapdoor',Properties:{facing:'east',half:'top',open:'true'}}"); -+ register(1552, "{Name:'minecraft:infested_stone'}", "{Name:'minecraft:monster_egg',Properties:{variant:'stone'}}"); -+ register(1553, "{Name:'minecraft:infested_cobblestone'}", "{Name:'minecraft:monster_egg',Properties:{variant:'cobblestone'}}"); -+ register(1554, "{Name:'minecraft:infested_stone_bricks'}", "{Name:'minecraft:monster_egg',Properties:{variant:'stone_brick'}}"); -+ register(1555, "{Name:'minecraft:infested_mossy_stone_bricks'}", "{Name:'minecraft:monster_egg',Properties:{variant:'mossy_brick'}}"); -+ register(1556, "{Name:'minecraft:infested_cracked_stone_bricks'}", "{Name:'minecraft:monster_egg',Properties:{variant:'cracked_brick'}}"); -+ register(1557, "{Name:'minecraft:infested_chiseled_stone_bricks'}", "{Name:'minecraft:monster_egg',Properties:{variant:'chiseled_brick'}}"); -+ register(1568, "{Name:'minecraft:stone_bricks'}", "{Name:'minecraft:stonebrick',Properties:{variant:'stonebrick'}}"); -+ register(1569, "{Name:'minecraft:mossy_stone_bricks'}", "{Name:'minecraft:stonebrick',Properties:{variant:'mossy_stonebrick'}}"); -+ register(1570, "{Name:'minecraft:cracked_stone_bricks'}", "{Name:'minecraft:stonebrick',Properties:{variant:'cracked_stonebrick'}}"); -+ register(1571, "{Name:'minecraft:chiseled_stone_bricks'}", "{Name:'minecraft:stonebrick',Properties:{variant:'chiseled_stonebrick'}}"); -+ register(1584, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'all_inside'}}"); -+ register(1585, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'true',east:'false',south:'false',west:'true',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'north_west'}}"); -+ register(1586, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'true',east:'false',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'north'}}"); -+ register(1587, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'true',east:'true',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'north_east'}}"); -+ register(1588, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'true',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'west'}}"); -+ register(1589, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'center'}}"); -+ register(1590, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'true',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'east'}}"); -+ register(1591, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'true',west:'true',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'south_west'}}"); -+ register(1592, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'true',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'south'}}"); -+ register(1593, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'true',south:'true',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'south_east'}}"); -+ register(1594, "{Name:'minecraft:mushroom_stem',Properties:{north:'true',east:'true',south:'true',west:'true',up:'false',down:'false'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'stem'}}"); -+ register(1595, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}"); -+ register(1596, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}"); -+ register(1597, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}"); -+ register(1598, "{Name:'minecraft:brown_mushroom_block',Properties:{north:'true',east:'true',south:'true',west:'true',up:'true',down:'true'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'all_outside'}}"); -+ register(1599, "{Name:'minecraft:mushroom_stem',Properties:{north:'true',east:'true',south:'true',west:'true',up:'true',down:'true'}}", "{Name:'minecraft:brown_mushroom_block',Properties:{variant:'all_stem'}}"); -+ register(1600, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'all_inside'}}"); -+ register(1601, "{Name:'minecraft:red_mushroom_block',Properties:{north:'true',east:'false',south:'false',west:'true',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'north_west'}}"); -+ register(1602, "{Name:'minecraft:red_mushroom_block',Properties:{north:'true',east:'false',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'north'}}"); -+ register(1603, "{Name:'minecraft:red_mushroom_block',Properties:{north:'true',east:'true',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'north_east'}}"); -+ register(1604, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'true',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'west'}}"); -+ register(1605, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'center'}}"); -+ register(1606, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'true',south:'false',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'east'}}"); -+ register(1607, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'true',west:'true',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'south_west'}}"); -+ register(1608, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'true',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'south'}}"); -+ register(1609, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'true',south:'true',west:'false',up:'true',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'south_east'}}"); -+ register(1610, "{Name:'minecraft:mushroom_stem',Properties:{north:'true',east:'true',south:'true',west:'true',up:'false',down:'false'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'stem'}}"); -+ register(1611, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}"); -+ register(1612, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}"); -+ register(1613, "{Name:'minecraft:red_mushroom_block',Properties:{north:'false',east:'false',south:'false',west:'false',up:'false',down:'false'}}"); -+ register(1614, "{Name:'minecraft:red_mushroom_block',Properties:{north:'true',east:'true',south:'true',west:'true',up:'true',down:'true'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'all_outside'}}"); -+ register(1615, "{Name:'minecraft:mushroom_stem',Properties:{north:'true',east:'true',south:'true',west:'true',up:'true',down:'true'}}", "{Name:'minecraft:red_mushroom_block',Properties:{variant:'all_stem'}}"); -+ register(1616, "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:iron_bars',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(1632, "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:glass_pane',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(1648, "{Name:'minecraft:melon_block'}", "{Name:'minecraft:melon_block'}"); -+ register(1664, "{Name:'minecraft:pumpkin_stem',Properties:{age:'0'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'0',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'0',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'0',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'0',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'0',facing:'west'}}"); -+ register(1665, "{Name:'minecraft:pumpkin_stem',Properties:{age:'1'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'1',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'1',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'1',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'1',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'1',facing:'west'}}"); -+ register(1666, "{Name:'minecraft:pumpkin_stem',Properties:{age:'2'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'2',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'2',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'2',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'2',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'2',facing:'west'}}"); -+ register(1667, "{Name:'minecraft:pumpkin_stem',Properties:{age:'3'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'3',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'3',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'3',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'3',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'3',facing:'west'}}"); -+ register(1668, "{Name:'minecraft:pumpkin_stem',Properties:{age:'4'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'4',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'4',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'4',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'4',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'4',facing:'west'}}"); -+ register(1669, "{Name:'minecraft:pumpkin_stem',Properties:{age:'5'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'5',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'5',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'5',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'5',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'5',facing:'west'}}"); -+ register(1670, "{Name:'minecraft:pumpkin_stem',Properties:{age:'6'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'6',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'6',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'6',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'6',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'6',facing:'west'}}"); -+ register(1671, "{Name:'minecraft:pumpkin_stem',Properties:{age:'7'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'7',facing:'east'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'7',facing:'north'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'7',facing:'south'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'7',facing:'up'}}", "{Name:'minecraft:pumpkin_stem',Properties:{age:'7',facing:'west'}}"); -+ register(1680, "{Name:'minecraft:melon_stem',Properties:{age:'0'}}", "{Name:'minecraft:melon_stem',Properties:{age:'0',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'0',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'0',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'0',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'0',facing:'west'}}"); -+ register(1681, "{Name:'minecraft:melon_stem',Properties:{age:'1'}}", "{Name:'minecraft:melon_stem',Properties:{age:'1',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'1',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'1',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'1',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'1',facing:'west'}}"); -+ register(1682, "{Name:'minecraft:melon_stem',Properties:{age:'2'}}", "{Name:'minecraft:melon_stem',Properties:{age:'2',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'2',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'2',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'2',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'2',facing:'west'}}"); -+ register(1683, "{Name:'minecraft:melon_stem',Properties:{age:'3'}}", "{Name:'minecraft:melon_stem',Properties:{age:'3',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'3',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'3',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'3',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'3',facing:'west'}}"); -+ register(1684, "{Name:'minecraft:melon_stem',Properties:{age:'4'}}", "{Name:'minecraft:melon_stem',Properties:{age:'4',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'4',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'4',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'4',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'4',facing:'west'}}"); -+ register(1685, "{Name:'minecraft:melon_stem',Properties:{age:'5'}}", "{Name:'minecraft:melon_stem',Properties:{age:'5',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'5',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'5',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'5',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'5',facing:'west'}}"); -+ register(1686, "{Name:'minecraft:melon_stem',Properties:{age:'6'}}", "{Name:'minecraft:melon_stem',Properties:{age:'6',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'6',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'6',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'6',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'6',facing:'west'}}"); -+ register(1687, "{Name:'minecraft:melon_stem',Properties:{age:'7'}}", "{Name:'minecraft:melon_stem',Properties:{age:'7',facing:'east'}}", "{Name:'minecraft:melon_stem',Properties:{age:'7',facing:'north'}}", "{Name:'minecraft:melon_stem',Properties:{age:'7',facing:'south'}}", "{Name:'minecraft:melon_stem',Properties:{age:'7',facing:'up'}}", "{Name:'minecraft:melon_stem',Properties:{age:'7',facing:'west'}}"); -+ register(1696, "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'false',up:'true',west:'false'}}"); -+ register(1697, "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'true',up:'true',west:'false'}}"); -+ register(1698, "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'false',up:'true',west:'true'}}"); -+ register(1699, "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'false',south:'true',up:'true',west:'true'}}"); -+ register(1700, "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'false',up:'true',west:'false'}}"); -+ register(1701, "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'true',up:'true',west:'false'}}"); -+ register(1702, "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'false',up:'true',west:'true'}}"); -+ register(1703, "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'false',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(1704, "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'false',up:'true',west:'false'}}"); -+ register(1705, "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'true',up:'true',west:'false'}}"); -+ register(1706, "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'false',up:'true',west:'true'}}"); -+ register(1707, "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'false',south:'true',up:'true',west:'true'}}"); -+ register(1708, "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'false',up:'true',west:'false'}}"); -+ register(1709, "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'true',up:'true',west:'false'}}"); -+ register(1710, "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'false',up:'true',west:'true'}}"); -+ register(1711, "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:vine',Properties:{east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(1712, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'false'}}"); -+ register(1713, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'false'}}"); -+ register(1714, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'false'}}"); -+ register(1715, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'false'}}"); -+ register(1716, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'false'}}"); -+ register(1717, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'false'}}"); -+ register(1718, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'false'}}"); -+ register(1719, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'false'}}"); -+ register(1720, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'true'}}"); -+ register(1721, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'true'}}"); -+ register(1722, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'true'}}"); -+ register(1723, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'true'}}"); -+ register(1724, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'true'}}"); -+ register(1725, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'true'}}"); -+ register(1726, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'true'}}"); -+ register(1727, "{Name:'minecraft:oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'true'}}"); -+ register(1728, "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(1729, "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(1730, "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(1731, "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(1732, "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(1733, "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(1734, "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(1735, "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:brick_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(1744, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(1745, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(1746, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(1747, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(1748, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(1749, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(1750, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(1751, "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:stone_brick_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(1760, "{Name:'minecraft:mycelium',Properties:{snowy:'false'}}", "{Name:'minecraft:mycelium',Properties:{snowy:'false'}}", "{Name:'minecraft:mycelium',Properties:{snowy:'true'}}"); -+ register(1776, "{Name:'minecraft:lily_pad'}", "{Name:'minecraft:waterlily'}"); -+ register(1792, "{Name:'minecraft:nether_bricks'}", "{Name:'minecraft:nether_brick'}"); -+ register(1808, "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:nether_brick_fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(1824, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(1825, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(1826, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(1827, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(1828, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(1829, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(1830, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(1831, "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:nether_brick_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(1840, "{Name:'minecraft:nether_wart',Properties:{age:'0'}}", "{Name:'minecraft:nether_wart',Properties:{age:'0'}}"); -+ register(1841, "{Name:'minecraft:nether_wart',Properties:{age:'1'}}", "{Name:'minecraft:nether_wart',Properties:{age:'1'}}"); -+ register(1842, "{Name:'minecraft:nether_wart',Properties:{age:'2'}}", "{Name:'minecraft:nether_wart',Properties:{age:'2'}}"); -+ register(1843, "{Name:'minecraft:nether_wart',Properties:{age:'3'}}", "{Name:'minecraft:nether_wart',Properties:{age:'3'}}"); -+ register(1856, "{Name:'minecraft:enchanting_table'}", "{Name:'minecraft:enchanting_table'}"); -+ register(1872, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'false',has_bottle_2:'false'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'false',has_bottle_2:'false'}}"); -+ register(1873, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'false',has_bottle_2:'false'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'false',has_bottle_2:'false'}}"); -+ register(1874, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'true',has_bottle_2:'false'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'true',has_bottle_2:'false'}}"); -+ register(1875, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'true',has_bottle_2:'false'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'true',has_bottle_2:'false'}}"); -+ register(1876, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'false',has_bottle_2:'true'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'false',has_bottle_2:'true'}}"); -+ register(1877, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'false',has_bottle_2:'true'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'false',has_bottle_2:'true'}}"); -+ register(1878, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'true',has_bottle_2:'true'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'false',has_bottle_1:'true',has_bottle_2:'true'}}"); -+ register(1879, "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'true',has_bottle_2:'true'}}", "{Name:'minecraft:brewing_stand',Properties:{has_bottle_0:'true',has_bottle_1:'true',has_bottle_2:'true'}}"); -+ register(1888, "{Name:'minecraft:cauldron',Properties:{level:'0'}}", "{Name:'minecraft:cauldron',Properties:{level:'0'}}"); -+ register(1889, "{Name:'minecraft:cauldron',Properties:{level:'1'}}", "{Name:'minecraft:cauldron',Properties:{level:'1'}}"); -+ register(1890, "{Name:'minecraft:cauldron',Properties:{level:'2'}}", "{Name:'minecraft:cauldron',Properties:{level:'2'}}"); -+ register(1891, "{Name:'minecraft:cauldron',Properties:{level:'3'}}", "{Name:'minecraft:cauldron',Properties:{level:'3'}}"); -+ register(1904, "{Name:'minecraft:end_portal'}", "{Name:'minecraft:end_portal'}"); -+ register(1920, "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'south'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'south'}}"); -+ register(1921, "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'west'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'west'}}"); -+ register(1922, "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'north'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'north'}}"); -+ register(1923, "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'east'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'false',facing:'east'}}"); -+ register(1924, "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'south'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'south'}}"); -+ register(1925, "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'west'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'west'}}"); -+ register(1926, "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'north'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'north'}}"); -+ register(1927, "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'east'}}", "{Name:'minecraft:end_portal_frame',Properties:{eye:'true',facing:'east'}}"); -+ register(1936, "{Name:'minecraft:end_stone'}", "{Name:'minecraft:end_stone'}"); -+ register(1952, "{Name:'minecraft:dragon_egg'}", "{Name:'minecraft:dragon_egg'}"); -+ register(1968, "{Name:'minecraft:redstone_lamp',Properties:{lit:'false'}}", "{Name:'minecraft:redstone_lamp'}"); -+ register(1984, "{Name:'minecraft:redstone_lamp',Properties:{lit:'true'}}", "{Name:'minecraft:lit_redstone_lamp'}"); -+ register(2000, "{Name:'minecraft:oak_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_wooden_slab',Properties:{variant:'oak'}}"); -+ register(2001, "{Name:'minecraft:spruce_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_wooden_slab',Properties:{variant:'spruce'}}"); -+ register(2002, "{Name:'minecraft:birch_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_wooden_slab',Properties:{variant:'birch'}}"); -+ register(2003, "{Name:'minecraft:jungle_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_wooden_slab',Properties:{variant:'jungle'}}"); -+ register(2004, "{Name:'minecraft:acacia_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_wooden_slab',Properties:{variant:'acacia'}}"); -+ register(2005, "{Name:'minecraft:dark_oak_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_wooden_slab',Properties:{variant:'dark_oak'}}"); -+ register(2016, "{Name:'minecraft:oak_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'bottom',variant:'oak'}}"); -+ register(2017, "{Name:'minecraft:spruce_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'bottom',variant:'spruce'}}"); -+ register(2018, "{Name:'minecraft:birch_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'bottom',variant:'birch'}}"); -+ register(2019, "{Name:'minecraft:jungle_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'bottom',variant:'jungle'}}"); -+ register(2020, "{Name:'minecraft:acacia_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'bottom',variant:'acacia'}}"); -+ register(2021, "{Name:'minecraft:dark_oak_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'bottom',variant:'dark_oak'}}"); -+ register(2024, "{Name:'minecraft:oak_slab',Properties:{type:'top'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'top',variant:'oak'}}"); -+ register(2025, "{Name:'minecraft:spruce_slab',Properties:{type:'top'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'top',variant:'spruce'}}"); -+ register(2026, "{Name:'minecraft:birch_slab',Properties:{type:'top'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'top',variant:'birch'}}"); -+ register(2027, "{Name:'minecraft:jungle_slab',Properties:{type:'top'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'top',variant:'jungle'}}"); -+ register(2028, "{Name:'minecraft:acacia_slab',Properties:{type:'top'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'top',variant:'acacia'}}"); -+ register(2029, "{Name:'minecraft:dark_oak_slab',Properties:{type:'top'}}", "{Name:'minecraft:wooden_slab',Properties:{half:'top',variant:'dark_oak'}}"); -+ register(2032, "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'south'}}", "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'south'}}"); -+ register(2033, "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'west'}}", "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'west'}}"); -+ register(2034, "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'north'}}", "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'north'}}"); -+ register(2035, "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'east'}}", "{Name:'minecraft:cocoa',Properties:{age:'0',facing:'east'}}"); -+ register(2036, "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'south'}}", "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'south'}}"); -+ register(2037, "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'west'}}", "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'west'}}"); -+ register(2038, "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'north'}}", "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'north'}}"); -+ register(2039, "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'east'}}", "{Name:'minecraft:cocoa',Properties:{age:'1',facing:'east'}}"); -+ register(2040, "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'south'}}", "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'south'}}"); -+ register(2041, "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'west'}}", "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'west'}}"); -+ register(2042, "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'north'}}", "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'north'}}"); -+ register(2043, "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'east'}}", "{Name:'minecraft:cocoa',Properties:{age:'2',facing:'east'}}"); -+ register(2048, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2049, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2050, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2051, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2052, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2053, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2054, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2055, "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:sandstone_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2064, "{Name:'minecraft:emerald_ore'}", "{Name:'minecraft:emerald_ore'}"); -+ register(2082, "{Name:'minecraft:ender_chest',Properties:{facing:'north'}}", "{Name:'minecraft:ender_chest',Properties:{facing:'north'}}"); -+ register(2083, "{Name:'minecraft:ender_chest',Properties:{facing:'south'}}", "{Name:'minecraft:ender_chest',Properties:{facing:'south'}}"); -+ register(2084, "{Name:'minecraft:ender_chest',Properties:{facing:'west'}}", "{Name:'minecraft:ender_chest',Properties:{facing:'west'}}"); -+ register(2085, "{Name:'minecraft:ender_chest',Properties:{facing:'east'}}", "{Name:'minecraft:ender_chest',Properties:{facing:'east'}}"); -+ register(2096, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'south',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'south',powered:'false'}}"); -+ register(2097, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'west',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'west',powered:'false'}}"); -+ register(2098, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'north',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'north',powered:'false'}}"); -+ register(2099, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'east',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'east',powered:'false'}}"); -+ register(2100, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'south',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'south',powered:'false'}}"); -+ register(2101, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'west',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'west',powered:'false'}}"); -+ register(2102, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'north',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'north',powered:'false'}}"); -+ register(2103, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'east',powered:'false'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'east',powered:'false'}}"); -+ register(2104, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'south',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'south',powered:'true'}}"); -+ register(2105, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'west',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'west',powered:'true'}}"); -+ register(2106, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'north',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'north',powered:'true'}}"); -+ register(2107, "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'east',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'false',facing:'east',powered:'true'}}"); -+ register(2108, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'south',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'south',powered:'true'}}"); -+ register(2109, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'west',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'west',powered:'true'}}"); -+ register(2110, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'north',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'north',powered:'true'}}"); -+ register(2111, "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'east',powered:'true'}}", "{Name:'minecraft:tripwire_hook',Properties:{attached:'true',facing:'east',powered:'true'}}"); -+ register(2112, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'false',south:'true',west:'true'}}"); -+ register(2113, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'true',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'true',north:'true',powered:'true',south:'true',west:'true'}}"); -+ register(2114, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'false'}}"); -+ register(2115, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'false'}}"); -+ register(2116, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'false',south:'true',west:'true'}}"); -+ register(2117, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'true',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'true',north:'true',powered:'true',south:'true',west:'true'}}"); -+ register(2118, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'false',south:'false',west:'false'}}"); -+ register(2119, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'false',east:'false',north:'false',powered:'true',south:'false',west:'false'}}"); -+ register(2120, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'false',south:'true',west:'true'}}"); -+ register(2121, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'true',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'true',north:'true',powered:'true',south:'true',west:'true'}}"); -+ register(2122, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'false'}}"); -+ register(2123, "{Name:'minecraft:tripwire',Properties:{attached:'false',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'false'}}"); -+ register(2124, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'false',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'false',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'false',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'false',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'false',south:'true',west:'true'}}"); -+ register(2125, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'true',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'false',powered:'true',south:'true',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'true',south:'false',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'true',south:'false',west:'true'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'true',south:'true',west:'false'}}", "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'true',north:'true',powered:'true',south:'true',west:'true'}}"); -+ register(2126, "{Name:'minecraft:tripwire',Properties:{attached:'true',disarmed:'true',east:'false',north:'false',powered:'false',south:'false',west:'false'}}"); -+ register(2128, "{Name:'minecraft:emerald_block'}", "{Name:'minecraft:emerald_block'}"); -+ register(2144, "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2145, "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2146, "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2147, "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2148, "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2149, "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2150, "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2151, "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:spruce_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2160, "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2161, "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2162, "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2163, "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2164, "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2165, "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2166, "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2167, "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:birch_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2176, "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2177, "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2178, "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2179, "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2180, "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2181, "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2182, "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2183, "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:jungle_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2192, "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'down'}}", "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'down'}}"); -+ register(2193, "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'up'}}", "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'up'}}"); -+ register(2194, "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'north'}}", "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'north'}}"); -+ register(2195, "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'south'}}", "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'south'}}"); -+ register(2196, "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'west'}}", "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'west'}}"); -+ register(2197, "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'east'}}", "{Name:'minecraft:command_block',Properties:{conditional:'false',facing:'east'}}"); -+ register(2200, "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'down'}}", "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'down'}}"); -+ register(2201, "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'up'}}", "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'up'}}"); -+ register(2202, "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'north'}}", "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'north'}}"); -+ register(2203, "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'south'}}", "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'south'}}"); -+ register(2204, "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'west'}}", "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'west'}}"); -+ register(2205, "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'east'}}", "{Name:'minecraft:command_block',Properties:{conditional:'true',facing:'east'}}"); -+ register(2208, "{Name:'minecraft:beacon'}", "{Name:'minecraft:beacon'}"); -+ register(2224, "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'true',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'false',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'false',variant:'cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'true',variant:'cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'true',variant:'cobblestone',west:'true'}}"); -+ register(2225, "{Name:'minecraft:mossy_cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'false',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'false',south:'true',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'false',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'false',north:'true',south:'true',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'false',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'false',south:'true',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'false',up:'true',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'false',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'false',variant:'mossy_cobblestone',west:'true'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'true',variant:'mossy_cobblestone',west:'false'}}", "{Name:'minecraft:cobblestone_wall',Properties:{east:'true',north:'true',south:'true',up:'true',variant:'mossy_cobblestone',west:'true'}}"); -+ // There are a few changes made to flower pot here, notably handling how legacy data is handled. -+ // The TE itself should contain the target item and from there the proper state can be determined. However, there are -+ // blocks that do not contain a TE. So we need to make sure there is a default to fall on. -+ // I simply followed the legacy handling from BlockFlowerPot from 1.8.8 to find what legacy data mapped to what. -+ // It's better than defaulting everything to a cactus. -+ register(2240, "{Name:'minecraft:flower_pot'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'0'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'0'}}"); -+ register(2241, "{Name:'minecraft:potted_poppy'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'1'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'1'}}"); -+ register(2242, "{Name:'minecraft:potted_dandelion'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'2'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'2'}}"); -+ register(2243, "{Name:'minecraft:potted_oak_sapling'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'3'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'3'}}"); -+ register(2244, "{Name:'minecraft:potted_spruce_sapling'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'4'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'4'}}"); -+ register(2245, "{Name:'minecraft:potted_birch_sapling'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'5'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'5'}}"); -+ register(2246, "{Name:'minecraft:potted_jungle_sapling'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'6'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'6'}}"); -+ register(2247, "{Name:'minecraft:potted_red_mushroom'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'7'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'7'}}"); -+ register(2248, "{Name:'minecraft:potted_brown_mushroom'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'8'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'8'}}"); -+ register(2249, "{Name:'minecraft:potted_cactus'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'9'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'9'}}"); -+ register(2250, "{Name:'minecraft:potted_dead_bush'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'10'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'10'}}"); -+ register(2251, "{Name:'minecraft:potted_fern'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'11'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'11'}}"); -+ register(2252, "{Name:'minecraft:potted_acacia_sapling'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'12'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'12'}}"); -+ register(2253, "{Name:'minecraft:potted_dark_oak_sapling'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'13'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'13'}}"); -+ register(2254, "{Name:'minecraft:flower_pot'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'14'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'14'}}"); -+ register(2255, "{Name:'minecraft:flower_pot'}", "{Name:'minecraft:flower_pot',Properties:{contents:'acacia_sapling',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'allium',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'birch_sapling',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'blue_orchid',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'cactus',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dandelion',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dark_oak_sapling',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'dead_bush',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'empty',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'fern',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'houstonia',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'jungle_sapling',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_brown',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'mushroom_red',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oak_sapling',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'orange_tulip',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'oxeye_daisy',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'pink_tulip',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'red_tulip',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'rose',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'spruce_sapling',legacy_data:'15'}}", "{Name:'minecraft:flower_pot',Properties:{contents:'white_tulip',legacy_data:'15'}}"); -+ register(2256, "{Name:'minecraft:carrots',Properties:{age:'0'}}", "{Name:'minecraft:carrots',Properties:{age:'0'}}"); -+ register(2257, "{Name:'minecraft:carrots',Properties:{age:'1'}}", "{Name:'minecraft:carrots',Properties:{age:'1'}}"); -+ register(2258, "{Name:'minecraft:carrots',Properties:{age:'2'}}", "{Name:'minecraft:carrots',Properties:{age:'2'}}"); -+ register(2259, "{Name:'minecraft:carrots',Properties:{age:'3'}}", "{Name:'minecraft:carrots',Properties:{age:'3'}}"); -+ register(2260, "{Name:'minecraft:carrots',Properties:{age:'4'}}", "{Name:'minecraft:carrots',Properties:{age:'4'}}"); -+ register(2261, "{Name:'minecraft:carrots',Properties:{age:'5'}}", "{Name:'minecraft:carrots',Properties:{age:'5'}}"); -+ register(2262, "{Name:'minecraft:carrots',Properties:{age:'6'}}", "{Name:'minecraft:carrots',Properties:{age:'6'}}"); -+ register(2263, "{Name:'minecraft:carrots',Properties:{age:'7'}}", "{Name:'minecraft:carrots',Properties:{age:'7'}}"); -+ register(2272, "{Name:'minecraft:potatoes',Properties:{age:'0'}}", "{Name:'minecraft:potatoes',Properties:{age:'0'}}"); -+ register(2273, "{Name:'minecraft:potatoes',Properties:{age:'1'}}", "{Name:'minecraft:potatoes',Properties:{age:'1'}}"); -+ register(2274, "{Name:'minecraft:potatoes',Properties:{age:'2'}}", "{Name:'minecraft:potatoes',Properties:{age:'2'}}"); -+ register(2275, "{Name:'minecraft:potatoes',Properties:{age:'3'}}", "{Name:'minecraft:potatoes',Properties:{age:'3'}}"); -+ register(2276, "{Name:'minecraft:potatoes',Properties:{age:'4'}}", "{Name:'minecraft:potatoes',Properties:{age:'4'}}"); -+ register(2277, "{Name:'minecraft:potatoes',Properties:{age:'5'}}", "{Name:'minecraft:potatoes',Properties:{age:'5'}}"); -+ register(2278, "{Name:'minecraft:potatoes',Properties:{age:'6'}}", "{Name:'minecraft:potatoes',Properties:{age:'6'}}"); -+ register(2279, "{Name:'minecraft:potatoes',Properties:{age:'7'}}", "{Name:'minecraft:potatoes',Properties:{age:'7'}}"); -+ register(2288, "{Name:'minecraft:oak_button',Properties:{face:'ceiling',facing:'north',powered:'false'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'down',powered:'false'}}"); -+ register(2289, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'east',powered:'false'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'east',powered:'false'}}"); -+ register(2290, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'west',powered:'false'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'west',powered:'false'}}"); -+ register(2291, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'south',powered:'false'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'south',powered:'false'}}"); -+ register(2292, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'north',powered:'false'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'north',powered:'false'}}"); -+ register(2293, "{Name:'minecraft:oak_button',Properties:{face:'floor',facing:'north',powered:'false'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'up',powered:'false'}}"); -+ register(2296, "{Name:'minecraft:oak_button',Properties:{face:'ceiling',facing:'north',powered:'true'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'down',powered:'true'}}"); -+ register(2297, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'east',powered:'true'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'east',powered:'true'}}"); -+ register(2298, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'west',powered:'true'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'west',powered:'true'}}"); -+ register(2299, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'south',powered:'true'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'south',powered:'true'}}"); -+ register(2300, "{Name:'minecraft:oak_button',Properties:{face:'wall',facing:'north',powered:'true'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'north',powered:'true'}}"); -+ register(2301, "{Name:'minecraft:oak_button',Properties:{face:'floor',facing:'north',powered:'true'}}", "{Name:'minecraft:wooden_button',Properties:{facing:'up',powered:'true'}}"); -+ register(2304, "{Name:'%%FILTER_ME%%',Properties:{facing:'down',nodrop:'false'}}", "{Name:'minecraft:skull',Properties:{facing:'down',nodrop:'false'}}"); -+ register(2305, "{Name:'%%FILTER_ME%%',Properties:{facing:'up',nodrop:'false'}}", "{Name:'minecraft:skull',Properties:{facing:'up',nodrop:'false'}}"); -+ register(2306, "{Name:'%%FILTER_ME%%',Properties:{facing:'north',nodrop:'false'}}", "{Name:'minecraft:skull',Properties:{facing:'north',nodrop:'false'}}"); -+ register(2307, "{Name:'%%FILTER_ME%%',Properties:{facing:'south',nodrop:'false'}}", "{Name:'minecraft:skull',Properties:{facing:'south',nodrop:'false'}}"); -+ register(2308, "{Name:'%%FILTER_ME%%',Properties:{facing:'west',nodrop:'false'}}", "{Name:'minecraft:skull',Properties:{facing:'west',nodrop:'false'}}"); -+ register(2309, "{Name:'%%FILTER_ME%%',Properties:{facing:'east',nodrop:'false'}}", "{Name:'minecraft:skull',Properties:{facing:'east',nodrop:'false'}}"); -+ register(2312, "{Name:'%%FILTER_ME%%',Properties:{facing:'down',nodrop:'true'}}", "{Name:'minecraft:skull',Properties:{facing:'down',nodrop:'true'}}"); -+ register(2313, "{Name:'%%FILTER_ME%%',Properties:{facing:'up',nodrop:'true'}}", "{Name:'minecraft:skull',Properties:{facing:'up',nodrop:'true'}}"); -+ register(2314, "{Name:'%%FILTER_ME%%',Properties:{facing:'north',nodrop:'true'}}", "{Name:'minecraft:skull',Properties:{facing:'north',nodrop:'true'}}"); -+ register(2315, "{Name:'%%FILTER_ME%%',Properties:{facing:'south',nodrop:'true'}}", "{Name:'minecraft:skull',Properties:{facing:'south',nodrop:'true'}}"); -+ register(2316, "{Name:'%%FILTER_ME%%',Properties:{facing:'west',nodrop:'true'}}", "{Name:'minecraft:skull',Properties:{facing:'west',nodrop:'true'}}"); -+ register(2317, "{Name:'%%FILTER_ME%%',Properties:{facing:'east',nodrop:'true'}}", "{Name:'minecraft:skull',Properties:{facing:'east',nodrop:'true'}}"); -+ register(2320, "{Name:'minecraft:anvil',Properties:{facing:'south'}}", "{Name:'minecraft:anvil',Properties:{damage:'0',facing:'south'}}"); -+ register(2321, "{Name:'minecraft:anvil',Properties:{facing:'west'}}", "{Name:'minecraft:anvil',Properties:{damage:'0',facing:'west'}}"); -+ register(2322, "{Name:'minecraft:anvil',Properties:{facing:'north'}}", "{Name:'minecraft:anvil',Properties:{damage:'0',facing:'north'}}"); -+ register(2323, "{Name:'minecraft:anvil',Properties:{facing:'east'}}", "{Name:'minecraft:anvil',Properties:{damage:'0',facing:'east'}}"); -+ register(2324, "{Name:'minecraft:chipped_anvil',Properties:{facing:'south'}}", "{Name:'minecraft:anvil',Properties:{damage:'1',facing:'south'}}"); -+ register(2325, "{Name:'minecraft:chipped_anvil',Properties:{facing:'west'}}", "{Name:'minecraft:anvil',Properties:{damage:'1',facing:'west'}}"); -+ register(2326, "{Name:'minecraft:chipped_anvil',Properties:{facing:'north'}}", "{Name:'minecraft:anvil',Properties:{damage:'1',facing:'north'}}"); -+ register(2327, "{Name:'minecraft:chipped_anvil',Properties:{facing:'east'}}", "{Name:'minecraft:anvil',Properties:{damage:'1',facing:'east'}}"); -+ register(2328, "{Name:'minecraft:damaged_anvil',Properties:{facing:'south'}}", "{Name:'minecraft:anvil',Properties:{damage:'2',facing:'south'}}"); -+ register(2329, "{Name:'minecraft:damaged_anvil',Properties:{facing:'west'}}", "{Name:'minecraft:anvil',Properties:{damage:'2',facing:'west'}}"); -+ register(2330, "{Name:'minecraft:damaged_anvil',Properties:{facing:'north'}}", "{Name:'minecraft:anvil',Properties:{damage:'2',facing:'north'}}"); -+ register(2331, "{Name:'minecraft:damaged_anvil',Properties:{facing:'east'}}", "{Name:'minecraft:anvil',Properties:{damage:'2',facing:'east'}}"); -+ register(2338, "{Name:'minecraft:trapped_chest',Properties:{facing:'north',type:'single'}}", "{Name:'minecraft:trapped_chest',Properties:{facing:'north'}}"); -+ register(2339, "{Name:'minecraft:trapped_chest',Properties:{facing:'south',type:'single'}}", "{Name:'minecraft:trapped_chest',Properties:{facing:'south'}}"); -+ register(2340, "{Name:'minecraft:trapped_chest',Properties:{facing:'west',type:'single'}}", "{Name:'minecraft:trapped_chest',Properties:{facing:'west'}}"); -+ register(2341, "{Name:'minecraft:trapped_chest',Properties:{facing:'east',type:'single'}}", "{Name:'minecraft:trapped_chest',Properties:{facing:'east'}}"); -+ register(2352, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'0'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'0'}}"); -+ register(2353, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'1'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'1'}}"); -+ register(2354, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'2'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'2'}}"); -+ register(2355, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'3'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'3'}}"); -+ register(2356, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'4'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'4'}}"); -+ register(2357, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'5'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'5'}}"); -+ register(2358, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'6'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'6'}}"); -+ register(2359, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'7'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'7'}}"); -+ register(2360, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'8'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'8'}}"); -+ register(2361, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'9'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'9'}}"); -+ register(2362, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'10'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'10'}}"); -+ register(2363, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'11'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'11'}}"); -+ register(2364, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'12'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'12'}}"); -+ register(2365, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'13'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'13'}}"); -+ register(2366, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'14'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'14'}}"); -+ register(2367, "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'15'}}", "{Name:'minecraft:light_weighted_pressure_plate',Properties:{power:'15'}}"); -+ register(2368, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'0'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'0'}}"); -+ register(2369, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'1'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'1'}}"); -+ register(2370, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'2'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'2'}}"); -+ register(2371, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'3'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'3'}}"); -+ register(2372, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'4'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'4'}}"); -+ register(2373, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'5'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'5'}}"); -+ register(2374, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'6'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'6'}}"); -+ register(2375, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'7'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'7'}}"); -+ register(2376, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'8'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'8'}}"); -+ register(2377, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'9'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'9'}}"); -+ register(2378, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'10'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'10'}}"); -+ register(2379, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'11'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'11'}}"); -+ register(2380, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'12'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'12'}}"); -+ register(2381, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'13'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'13'}}"); -+ register(2382, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'14'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'14'}}"); -+ register(2383, "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'15'}}", "{Name:'minecraft:heavy_weighted_pressure_plate',Properties:{power:'15'}}"); -+ register(2384, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'compare',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'south',mode:'compare',powered:'false'}}"); -+ register(2385, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'compare',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'west',mode:'compare',powered:'false'}}"); -+ register(2386, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'compare',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'north',mode:'compare',powered:'false'}}"); -+ register(2387, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'compare',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'east',mode:'compare',powered:'false'}}"); -+ register(2388, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'subtract',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'south',mode:'subtract',powered:'false'}}"); -+ register(2389, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'subtract',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'west',mode:'subtract',powered:'false'}}"); -+ register(2390, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'subtract',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'north',mode:'subtract',powered:'false'}}"); -+ register(2391, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'subtract',powered:'false'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'east',mode:'subtract',powered:'false'}}"); -+ register(2392, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'compare',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'south',mode:'compare',powered:'true'}}"); -+ register(2393, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'compare',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'west',mode:'compare',powered:'true'}}"); -+ register(2394, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'compare',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'north',mode:'compare',powered:'true'}}"); -+ register(2395, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'compare',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'east',mode:'compare',powered:'true'}}"); -+ register(2396, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'subtract',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'south',mode:'subtract',powered:'true'}}"); -+ register(2397, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'subtract',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'west',mode:'subtract',powered:'true'}}"); -+ register(2398, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'subtract',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'north',mode:'subtract',powered:'true'}}"); -+ register(2399, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'subtract',powered:'true'}}", "{Name:'minecraft:unpowered_comparator',Properties:{facing:'east',mode:'subtract',powered:'true'}}"); -+ register(2400, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'compare',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'south',mode:'compare',powered:'false'}}"); -+ register(2401, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'compare',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'west',mode:'compare',powered:'false'}}"); -+ register(2402, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'compare',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'north',mode:'compare',powered:'false'}}"); -+ register(2403, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'compare',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'east',mode:'compare',powered:'false'}}"); -+ register(2404, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'subtract',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'south',mode:'subtract',powered:'false'}}"); -+ register(2405, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'subtract',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'west',mode:'subtract',powered:'false'}}"); -+ register(2406, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'subtract',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'north',mode:'subtract',powered:'false'}}"); -+ register(2407, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'subtract',powered:'false'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'east',mode:'subtract',powered:'false'}}"); -+ register(2408, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'compare',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'south',mode:'compare',powered:'true'}}"); -+ register(2409, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'compare',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'west',mode:'compare',powered:'true'}}"); -+ register(2410, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'compare',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'north',mode:'compare',powered:'true'}}"); -+ register(2411, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'compare',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'east',mode:'compare',powered:'true'}}"); -+ register(2412, "{Name:'minecraft:comparator',Properties:{facing:'south',mode:'subtract',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'south',mode:'subtract',powered:'true'}}"); -+ register(2413, "{Name:'minecraft:comparator',Properties:{facing:'west',mode:'subtract',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'west',mode:'subtract',powered:'true'}}"); -+ register(2414, "{Name:'minecraft:comparator',Properties:{facing:'north',mode:'subtract',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'north',mode:'subtract',powered:'true'}}"); -+ register(2415, "{Name:'minecraft:comparator',Properties:{facing:'east',mode:'subtract',powered:'true'}}", "{Name:'minecraft:powered_comparator',Properties:{facing:'east',mode:'subtract',powered:'true'}}"); -+ register(2416, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'0'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'0'}}"); -+ register(2417, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'1'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'1'}}"); -+ register(2418, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'2'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'2'}}"); -+ register(2419, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'3'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'3'}}"); -+ register(2420, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'4'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'4'}}"); -+ register(2421, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'5'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'5'}}"); -+ register(2422, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'6'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'6'}}"); -+ register(2423, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'7'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'7'}}"); -+ register(2424, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'8'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'8'}}"); -+ register(2425, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'9'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'9'}}"); -+ register(2426, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'10'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'10'}}"); -+ register(2427, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'11'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'11'}}"); -+ register(2428, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'12'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'12'}}"); -+ register(2429, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'13'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'13'}}"); -+ register(2430, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'14'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'14'}}"); -+ register(2431, "{Name:'minecraft:daylight_detector',Properties:{inverted:'false',power:'15'}}", "{Name:'minecraft:daylight_detector',Properties:{power:'15'}}"); -+ register(2432, "{Name:'minecraft:redstone_block'}", "{Name:'minecraft:redstone_block'}"); -+ register(2448, "{Name:'minecraft:nether_quartz_ore'}", "{Name:'minecraft:quartz_ore'}"); -+ register(2464, "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'down'}}", "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'down'}}"); -+ register(2466, "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'north'}}", "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'north'}}"); -+ register(2467, "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'south'}}", "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'south'}}"); -+ register(2468, "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'west'}}", "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'west'}}"); -+ register(2469, "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'east'}}", "{Name:'minecraft:hopper',Properties:{enabled:'true',facing:'east'}}"); -+ register(2472, "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'down'}}", "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'down'}}"); -+ register(2474, "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'north'}}", "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'north'}}"); -+ register(2475, "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'south'}}", "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'south'}}"); -+ register(2476, "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'west'}}", "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'west'}}"); -+ register(2477, "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'east'}}", "{Name:'minecraft:hopper',Properties:{enabled:'false',facing:'east'}}"); -+ register(2480, "{Name:'minecraft:quartz_block'}", "{Name:'minecraft:quartz_block',Properties:{variant:'default'}}"); -+ register(2481, "{Name:'minecraft:chiseled_quartz_block'}", "{Name:'minecraft:quartz_block',Properties:{variant:'chiseled'}}"); -+ register(2482, "{Name:'minecraft:quartz_pillar',Properties:{axis:'y'}}", "{Name:'minecraft:quartz_block',Properties:{variant:'lines_y'}}"); -+ register(2483, "{Name:'minecraft:quartz_pillar',Properties:{axis:'x'}}", "{Name:'minecraft:quartz_block',Properties:{variant:'lines_x'}}"); -+ register(2484, "{Name:'minecraft:quartz_pillar',Properties:{axis:'z'}}", "{Name:'minecraft:quartz_block',Properties:{variant:'lines_z'}}"); -+ register(2496, "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2497, "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2498, "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2499, "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2500, "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2501, "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2502, "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2503, "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:quartz_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2512, "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'north_south'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'north_south'}}"); -+ register(2513, "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'east_west'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'east_west'}}"); -+ register(2514, "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_east'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_east'}}"); -+ register(2515, "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_west'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_west'}}"); -+ register(2516, "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_north'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_north'}}"); -+ register(2517, "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_south'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'false',shape:'ascending_south'}}"); -+ register(2520, "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'north_south'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'north_south'}}"); -+ register(2521, "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'east_west'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'east_west'}}"); -+ register(2522, "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_east'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_east'}}"); -+ register(2523, "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_west'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_west'}}"); -+ register(2524, "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_north'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_north'}}"); -+ register(2525, "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_south'}}", "{Name:'minecraft:activator_rail',Properties:{powered:'true',shape:'ascending_south'}}"); -+ register(2528, "{Name:'minecraft:dropper',Properties:{facing:'down',triggered:'false'}}", "{Name:'minecraft:dropper',Properties:{facing:'down',triggered:'false'}}"); -+ register(2529, "{Name:'minecraft:dropper',Properties:{facing:'up',triggered:'false'}}", "{Name:'minecraft:dropper',Properties:{facing:'up',triggered:'false'}}"); -+ register(2530, "{Name:'minecraft:dropper',Properties:{facing:'north',triggered:'false'}}", "{Name:'minecraft:dropper',Properties:{facing:'north',triggered:'false'}}"); -+ register(2531, "{Name:'minecraft:dropper',Properties:{facing:'south',triggered:'false'}}", "{Name:'minecraft:dropper',Properties:{facing:'south',triggered:'false'}}"); -+ register(2532, "{Name:'minecraft:dropper',Properties:{facing:'west',triggered:'false'}}", "{Name:'minecraft:dropper',Properties:{facing:'west',triggered:'false'}}"); -+ register(2533, "{Name:'minecraft:dropper',Properties:{facing:'east',triggered:'false'}}", "{Name:'minecraft:dropper',Properties:{facing:'east',triggered:'false'}}"); -+ register(2536, "{Name:'minecraft:dropper',Properties:{facing:'down',triggered:'true'}}", "{Name:'minecraft:dropper',Properties:{facing:'down',triggered:'true'}}"); -+ register(2537, "{Name:'minecraft:dropper',Properties:{facing:'up',triggered:'true'}}", "{Name:'minecraft:dropper',Properties:{facing:'up',triggered:'true'}}"); -+ register(2538, "{Name:'minecraft:dropper',Properties:{facing:'north',triggered:'true'}}", "{Name:'minecraft:dropper',Properties:{facing:'north',triggered:'true'}}"); -+ register(2539, "{Name:'minecraft:dropper',Properties:{facing:'south',triggered:'true'}}", "{Name:'minecraft:dropper',Properties:{facing:'south',triggered:'true'}}"); -+ register(2540, "{Name:'minecraft:dropper',Properties:{facing:'west',triggered:'true'}}", "{Name:'minecraft:dropper',Properties:{facing:'west',triggered:'true'}}"); -+ register(2541, "{Name:'minecraft:dropper',Properties:{facing:'east',triggered:'true'}}", "{Name:'minecraft:dropper',Properties:{facing:'east',triggered:'true'}}"); -+ register(2544, "{Name:'minecraft:white_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'white'}}"); -+ register(2545, "{Name:'minecraft:orange_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'orange'}}"); -+ register(2546, "{Name:'minecraft:magenta_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'magenta'}}"); -+ register(2547, "{Name:'minecraft:light_blue_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'light_blue'}}"); -+ register(2548, "{Name:'minecraft:yellow_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'yellow'}}"); -+ register(2549, "{Name:'minecraft:lime_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'lime'}}"); -+ register(2550, "{Name:'minecraft:pink_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'pink'}}"); -+ register(2551, "{Name:'minecraft:gray_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'gray'}}"); -+ register(2552, "{Name:'minecraft:light_gray_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'silver'}}"); -+ register(2553, "{Name:'minecraft:cyan_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'cyan'}}"); -+ register(2554, "{Name:'minecraft:purple_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'purple'}}"); -+ register(2555, "{Name:'minecraft:blue_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'blue'}}"); -+ register(2556, "{Name:'minecraft:brown_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'brown'}}"); -+ register(2557, "{Name:'minecraft:green_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'green'}}"); -+ register(2558, "{Name:'minecraft:red_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'red'}}"); -+ register(2559, "{Name:'minecraft:black_terracotta'}", "{Name:'minecraft:stained_hardened_clay',Properties:{color:'black'}}"); -+ register(2560, "{Name:'minecraft:white_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'white',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2561, "{Name:'minecraft:orange_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'orange',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2562, "{Name:'minecraft:magenta_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'magenta',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2563, "{Name:'minecraft:light_blue_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'light_blue',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2564, "{Name:'minecraft:yellow_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'yellow',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2565, "{Name:'minecraft:lime_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'lime',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2566, "{Name:'minecraft:pink_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'pink',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2567, "{Name:'minecraft:gray_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'gray',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2568, "{Name:'minecraft:light_gray_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'silver',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2569, "{Name:'minecraft:cyan_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'cyan',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2570, "{Name:'minecraft:purple_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'purple',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2571, "{Name:'minecraft:blue_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'blue',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2572, "{Name:'minecraft:brown_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'brown',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2573, "{Name:'minecraft:green_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'green',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2574, "{Name:'minecraft:red_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'red',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2575, "{Name:'minecraft:black_stained_glass_pane',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:stained_glass_pane',Properties:{color:'black',east:'true',north:'true',south:'true',west:'true'}}"); -+ register(2576, "{Name:'minecraft:acacia_leaves',Properties:{check_decay:'false',decayable:'true'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'false',decayable:'true',variant:'acacia'}}"); -+ register(2577, "{Name:'minecraft:dark_oak_leaves',Properties:{check_decay:'false',decayable:'true'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'false',decayable:'true',variant:'dark_oak'}}"); -+ register(2580, "{Name:'minecraft:acacia_leaves',Properties:{check_decay:'false',decayable:'false'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'false',decayable:'false',variant:'acacia'}}"); -+ register(2581, "{Name:'minecraft:dark_oak_leaves',Properties:{check_decay:'false',decayable:'false'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'false',decayable:'false',variant:'dark_oak'}}"); -+ register(2584, "{Name:'minecraft:acacia_leaves',Properties:{check_decay:'true',decayable:'true'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'true',decayable:'true',variant:'acacia'}}"); -+ register(2585, "{Name:'minecraft:dark_oak_leaves',Properties:{check_decay:'true',decayable:'true'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'true',decayable:'true',variant:'dark_oak'}}"); -+ register(2588, "{Name:'minecraft:acacia_leaves',Properties:{check_decay:'true',decayable:'false'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'true',decayable:'false',variant:'acacia'}}"); -+ register(2589, "{Name:'minecraft:dark_oak_leaves',Properties:{check_decay:'true',decayable:'false'}}", "{Name:'minecraft:leaves2',Properties:{check_decay:'true',decayable:'false',variant:'dark_oak'}}"); -+ register(2592, "{Name:'minecraft:acacia_log',Properties:{axis:'y'}}", "{Name:'minecraft:log2',Properties:{axis:'y',variant:'acacia'}}"); -+ register(2593, "{Name:'minecraft:dark_oak_log',Properties:{axis:'y'}}", "{Name:'minecraft:log2',Properties:{axis:'y',variant:'dark_oak'}}"); -+ register(2596, "{Name:'minecraft:acacia_log',Properties:{axis:'x'}}", "{Name:'minecraft:log2',Properties:{axis:'x',variant:'acacia'}}"); -+ register(2597, "{Name:'minecraft:dark_oak_log',Properties:{axis:'x'}}", "{Name:'minecraft:log2',Properties:{axis:'x',variant:'dark_oak'}}"); -+ register(2600, "{Name:'minecraft:acacia_log',Properties:{axis:'z'}}", "{Name:'minecraft:log2',Properties:{axis:'z',variant:'acacia'}}"); -+ register(2601, "{Name:'minecraft:dark_oak_log',Properties:{axis:'z'}}", "{Name:'minecraft:log2',Properties:{axis:'z',variant:'dark_oak'}}"); -+ register(2604, "{Name:'minecraft:acacia_bark'}", "{Name:'minecraft:log2',Properties:{axis:'none',variant:'acacia'}}"); -+ register(2605, "{Name:'minecraft:dark_oak_bark'}", "{Name:'minecraft:log2',Properties:{axis:'none',variant:'dark_oak'}}"); -+ register(2608, "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2609, "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2610, "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2611, "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2612, "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2613, "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2614, "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2615, "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:acacia_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2624, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2625, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2626, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2627, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2628, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2629, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2630, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2631, "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:dark_oak_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2640, "{Name:'minecraft:slime_block'}", "{Name:'minecraft:slime'}"); -+ register(2656, "{Name:'minecraft:barrier'}", "{Name:'minecraft:barrier'}"); -+ register(2672, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'bottom',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'bottom',open:'false'}}"); -+ register(2673, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'bottom',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'bottom',open:'false'}}"); -+ register(2674, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'bottom',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'bottom',open:'false'}}"); -+ register(2675, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'bottom',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'bottom',open:'false'}}"); -+ register(2676, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'bottom',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'bottom',open:'true'}}"); -+ register(2677, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'bottom',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'bottom',open:'true'}}"); -+ register(2678, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'bottom',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'bottom',open:'true'}}"); -+ register(2679, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'bottom',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'bottom',open:'true'}}"); -+ register(2680, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'top',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'top',open:'false'}}"); -+ register(2681, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'top',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'top',open:'false'}}"); -+ register(2682, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'top',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'top',open:'false'}}"); -+ register(2683, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'top',open:'false'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'top',open:'false'}}"); -+ register(2684, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'top',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'north',half:'top',open:'true'}}"); -+ register(2685, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'top',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'south',half:'top',open:'true'}}"); -+ register(2686, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'top',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'west',half:'top',open:'true'}}"); -+ register(2687, "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'top',open:'true'}}", "{Name:'minecraft:iron_trapdoor',Properties:{facing:'east',half:'top',open:'true'}}"); -+ register(2688, "{Name:'minecraft:prismarine'}", "{Name:'minecraft:prismarine',Properties:{variant:'prismarine'}}"); -+ register(2689, "{Name:'minecraft:prismarine_bricks'}", "{Name:'minecraft:prismarine',Properties:{variant:'prismarine_bricks'}}"); -+ register(2690, "{Name:'minecraft:dark_prismarine'}", "{Name:'minecraft:prismarine',Properties:{variant:'dark_prismarine'}}"); -+ register(2704, "{Name:'minecraft:sea_lantern'}", "{Name:'minecraft:sea_lantern'}"); -+ register(2720, "{Name:'minecraft:hay_block',Properties:{axis:'y'}}", "{Name:'minecraft:hay_block',Properties:{axis:'y'}}"); -+ register(2724, "{Name:'minecraft:hay_block',Properties:{axis:'x'}}", "{Name:'minecraft:hay_block',Properties:{axis:'x'}}"); -+ register(2728, "{Name:'minecraft:hay_block',Properties:{axis:'z'}}", "{Name:'minecraft:hay_block',Properties:{axis:'z'}}"); -+ register(2736, "{Name:'minecraft:white_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'white'}}"); -+ register(2737, "{Name:'minecraft:orange_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'orange'}}"); -+ register(2738, "{Name:'minecraft:magenta_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'magenta'}}"); -+ register(2739, "{Name:'minecraft:light_blue_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'light_blue'}}"); -+ register(2740, "{Name:'minecraft:yellow_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'yellow'}}"); -+ register(2741, "{Name:'minecraft:lime_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'lime'}}"); -+ register(2742, "{Name:'minecraft:pink_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'pink'}}"); -+ register(2743, "{Name:'minecraft:gray_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'gray'}}"); -+ register(2744, "{Name:'minecraft:light_gray_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'silver'}}"); -+ register(2745, "{Name:'minecraft:cyan_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'cyan'}}"); -+ register(2746, "{Name:'minecraft:purple_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'purple'}}"); -+ register(2747, "{Name:'minecraft:blue_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'blue'}}"); -+ register(2748, "{Name:'minecraft:brown_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'brown'}}"); -+ register(2749, "{Name:'minecraft:green_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'green'}}"); -+ register(2750, "{Name:'minecraft:red_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'red'}}"); -+ register(2751, "{Name:'minecraft:black_carpet'}", "{Name:'minecraft:carpet',Properties:{color:'black'}}"); -+ register(2752, "{Name:'minecraft:terracotta'}", "{Name:'minecraft:hardened_clay'}"); -+ register(2768, "{Name:'minecraft:coal_block'}", "{Name:'minecraft:coal_block'}"); -+ register(2784, "{Name:'minecraft:packed_ice'}", "{Name:'minecraft:packed_ice'}"); -+ register(2800, "{Name:'minecraft:sunflower',Properties:{half:'lower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'lower',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'lower',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'lower',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'lower',variant:'sunflower'}}"); -+ register(2801, "{Name:'minecraft:lilac',Properties:{half:'lower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'lower',variant:'syringa'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'lower',variant:'syringa'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'lower',variant:'syringa'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'lower',variant:'syringa'}}"); -+ register(2802, "{Name:'minecraft:tall_grass',Properties:{half:'lower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'lower',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'lower',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'lower',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'lower',variant:'double_grass'}}"); -+ register(2803, "{Name:'minecraft:large_fern',Properties:{half:'lower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'lower',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'lower',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'lower',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'lower',variant:'double_fern'}}"); -+ register(2804, "{Name:'minecraft:rose_bush',Properties:{half:'lower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'lower',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'lower',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'lower',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'lower',variant:'double_rose'}}"); -+ register(2805, "{Name:'minecraft:peony',Properties:{half:'lower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'lower',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'lower',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'lower',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'lower',variant:'paeonia'}}"); -+ register(2808, "{Name:'minecraft:peony',Properties:{half:'upper'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'upper',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'upper',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'upper',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'upper',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'upper',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'south',half:'upper',variant:'syringa'}}"); -+ register(2809, "{Name:'minecraft:peony',Properties:{half:'upper'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'upper',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'upper',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'upper',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'upper',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'upper',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'west',half:'upper',variant:'syringa'}}"); -+ register(2810, "{Name:'minecraft:peony',Properties:{half:'upper'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'upper',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'upper',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'upper',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'upper',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'upper',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'north',half:'upper',variant:'syringa'}}"); -+ register(2811, "{Name:'minecraft:peony',Properties:{half:'upper'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'upper',variant:'double_fern'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'upper',variant:'double_grass'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'upper',variant:'double_rose'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'upper',variant:'paeonia'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'upper',variant:'sunflower'}}", "{Name:'minecraft:double_plant',Properties:{facing:'east',half:'upper',variant:'syringa'}}"); -+ register(2816, "{Name:'minecraft:white_banner',Properties:{rotation:'0'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'0'}}"); -+ register(2817, "{Name:'minecraft:white_banner',Properties:{rotation:'1'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'1'}}"); -+ register(2818, "{Name:'minecraft:white_banner',Properties:{rotation:'2'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'2'}}"); -+ register(2819, "{Name:'minecraft:white_banner',Properties:{rotation:'3'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'3'}}"); -+ register(2820, "{Name:'minecraft:white_banner',Properties:{rotation:'4'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'4'}}"); -+ register(2821, "{Name:'minecraft:white_banner',Properties:{rotation:'5'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'5'}}"); -+ register(2822, "{Name:'minecraft:white_banner',Properties:{rotation:'6'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'6'}}"); -+ register(2823, "{Name:'minecraft:white_banner',Properties:{rotation:'7'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'7'}}"); -+ register(2824, "{Name:'minecraft:white_banner',Properties:{rotation:'8'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'8'}}"); -+ register(2825, "{Name:'minecraft:white_banner',Properties:{rotation:'9'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'9'}}"); -+ register(2826, "{Name:'minecraft:white_banner',Properties:{rotation:'10'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'10'}}"); -+ register(2827, "{Name:'minecraft:white_banner',Properties:{rotation:'11'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'11'}}"); -+ register(2828, "{Name:'minecraft:white_banner',Properties:{rotation:'12'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'12'}}"); -+ register(2829, "{Name:'minecraft:white_banner',Properties:{rotation:'13'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'13'}}"); -+ register(2830, "{Name:'minecraft:white_banner',Properties:{rotation:'14'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'14'}}"); -+ register(2831, "{Name:'minecraft:white_banner',Properties:{rotation:'15'}}", "{Name:'minecraft:standing_banner',Properties:{rotation:'15'}}"); -+ register(2834, "{Name:'minecraft:white_wall_banner',Properties:{facing:'north'}}", "{Name:'minecraft:wall_banner',Properties:{facing:'north'}}"); -+ register(2835, "{Name:'minecraft:white_wall_banner',Properties:{facing:'south'}}", "{Name:'minecraft:wall_banner',Properties:{facing:'south'}}"); -+ register(2836, "{Name:'minecraft:white_wall_banner',Properties:{facing:'west'}}", "{Name:'minecraft:wall_banner',Properties:{facing:'west'}}"); -+ register(2837, "{Name:'minecraft:white_wall_banner',Properties:{facing:'east'}}", "{Name:'minecraft:wall_banner',Properties:{facing:'east'}}"); -+ register(2848, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'0'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'0'}}"); -+ register(2849, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'1'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'1'}}"); -+ register(2850, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'2'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'2'}}"); -+ register(2851, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'3'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'3'}}"); -+ register(2852, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'4'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'4'}}"); -+ register(2853, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'5'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'5'}}"); -+ register(2854, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'6'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'6'}}"); -+ register(2855, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'7'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'7'}}"); -+ register(2856, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'8'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'8'}}"); -+ register(2857, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'9'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'9'}}"); -+ register(2858, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'10'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'10'}}"); -+ register(2859, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'11'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'11'}}"); -+ register(2860, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'12'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'12'}}"); -+ register(2861, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'13'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'13'}}"); -+ register(2862, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'14'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'14'}}"); -+ register(2863, "{Name:'minecraft:daylight_detector',Properties:{inverted:'true',power:'15'}}", "{Name:'minecraft:daylight_detector_inverted',Properties:{power:'15'}}"); -+ register(2864, "{Name:'minecraft:red_sandstone'}", "{Name:'minecraft:red_sandstone',Properties:{type:'red_sandstone'}}"); -+ register(2865, "{Name:'minecraft:chiseled_red_sandstone'}", "{Name:'minecraft:red_sandstone',Properties:{type:'chiseled_red_sandstone'}}"); -+ register(2866, "{Name:'minecraft:cut_red_sandstone'}", "{Name:'minecraft:red_sandstone',Properties:{type:'smooth_red_sandstone'}}"); -+ register(2880, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(2881, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(2882, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(2883, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(2884, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(2885, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(2886, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(2887, "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:red_sandstone_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(2896, "{Name:'minecraft:red_sandstone_slab',Properties:{type:'double'}}", "{Name:'minecraft:double_stone_slab2',Properties:{seamless:'false',variant:'red_sandstone'}}"); -+ register(2904, "{Name:'minecraft:smooth_red_sandstone'}", "{Name:'minecraft:double_stone_slab2',Properties:{seamless:'true',variant:'red_sandstone'}}"); -+ register(2912, "{Name:'minecraft:red_sandstone_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:stone_slab2',Properties:{half:'bottom',variant:'red_sandstone'}}"); -+ register(2920, "{Name:'minecraft:red_sandstone_slab',Properties:{type:'top'}}", "{Name:'minecraft:stone_slab2',Properties:{half:'top',variant:'red_sandstone'}}"); -+ register(2928, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2929, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2930, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2931, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2932, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2933, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2934, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2935, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2936, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2937, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2938, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2939, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2940, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2941, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2942, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2943, "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2944, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2945, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2946, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2947, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2948, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2949, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2950, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2951, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2952, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2953, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2954, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2955, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2956, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2957, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2958, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2959, "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:birch_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2960, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2961, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2962, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2963, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2964, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2965, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2966, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2967, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2968, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2969, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2970, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2971, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2972, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2973, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2974, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2975, "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2976, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2977, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2978, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2979, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2980, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2981, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2982, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2983, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2984, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2985, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2986, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2987, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'true'}}"); -+ register(2988, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2989, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2990, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2991, "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'true'}}"); -+ register(2992, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2993, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2994, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2995, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'false'}}"); -+ register(2996, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2997, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2998, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'false'}}"); -+ register(2999, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'false'}}"); -+ register(3000, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'true',open:'false',powered:'true'}}"); -+ register(3001, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'true',open:'false',powered:'true'}}"); -+ register(3002, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'true',open:'false',powered:'true'}}"); -+ register(3003, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'true',open:'false',powered:'true'}}"); -+ register(3004, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'south',in_wall:'true',open:'true',powered:'true'}}"); -+ register(3005, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'west',in_wall:'true',open:'true',powered:'true'}}"); -+ register(3006, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'north',in_wall:'true',open:'true',powered:'true'}}"); -+ register(3007, "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'false',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_fence_gate',Properties:{facing:'east',in_wall:'true',open:'true',powered:'true'}}"); -+ register(3008, "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:spruce_fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(3024, "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:birch_fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(3040, "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:jungle_fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(3056, "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:dark_oak_fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(3072, "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'false',north:'true',south:'true',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'false',south:'false',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'false',south:'false',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'false',south:'true',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'false',south:'true',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'true',south:'false',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'true',south:'false',west:'true'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'true',south:'true',west:'false'}}", "{Name:'minecraft:acacia_fence',Properties:{east:'true',north:'true',south:'true',west:'true'}}"); -+ register(3088, "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3089, "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3090, "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3091, "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3092, "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3093, "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3094, "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3095, "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3096, "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(3097, "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(3098, "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(3099, "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:spruce_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(3104, "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3105, "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3106, "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3107, "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3108, "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3109, "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3110, "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3111, "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3112, "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(3113, "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(3114, "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(3115, "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:birch_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(3120, "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3121, "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3122, "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3123, "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3124, "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3125, "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3126, "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3127, "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3128, "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(3129, "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(3130, "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(3131, "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:jungle_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(3136, "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3137, "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3138, "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3139, "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3140, "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3141, "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3142, "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3143, "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3144, "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(3145, "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(3146, "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(3147, "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:acacia_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(3152, "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3153, "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3154, "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3155, "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'false',powered:'true'}}"); -+ register(3156, "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3157, "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3158, "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3159, "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'lower',hinge:'right',open:'true',powered:'true'}}"); -+ register(3160, "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'false'}}"); -+ register(3161, "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'false'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'false'}}"); -+ register(3162, "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'left',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'left',open:'true',powered:'true'}}"); -+ register(3163, "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'east',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'north',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'south',half:'upper',hinge:'right',open:'true',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'false',powered:'true'}}", "{Name:'minecraft:dark_oak_door',Properties:{facing:'west',half:'upper',hinge:'right',open:'true',powered:'true'}}"); -+ register(3168, "{Name:'minecraft:end_rod',Properties:{facing:'down'}}", "{Name:'minecraft:end_rod',Properties:{facing:'down'}}"); -+ register(3169, "{Name:'minecraft:end_rod',Properties:{facing:'up'}}", "{Name:'minecraft:end_rod',Properties:{facing:'up'}}"); -+ register(3170, "{Name:'minecraft:end_rod',Properties:{facing:'north'}}", "{Name:'minecraft:end_rod',Properties:{facing:'north'}}"); -+ register(3171, "{Name:'minecraft:end_rod',Properties:{facing:'south'}}", "{Name:'minecraft:end_rod',Properties:{facing:'south'}}"); -+ register(3172, "{Name:'minecraft:end_rod',Properties:{facing:'west'}}", "{Name:'minecraft:end_rod',Properties:{facing:'west'}}"); -+ register(3173, "{Name:'minecraft:end_rod',Properties:{facing:'east'}}", "{Name:'minecraft:end_rod',Properties:{facing:'east'}}"); -+ register(3184, "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'false',east:'true',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'false',north:'true',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'false',south:'true',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'false',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'false',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'false',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'false',up:'true',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'true',up:'false',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'true',up:'false',west:'true'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'true',up:'true',west:'false'}}", "{Name:'minecraft:chorus_plant',Properties:{down:'true',east:'true',north:'true',south:'true',up:'true',west:'true'}}"); -+ register(3200, "{Name:'minecraft:chorus_flower',Properties:{age:'0'}}", "{Name:'minecraft:chorus_flower',Properties:{age:'0'}}"); -+ register(3201, "{Name:'minecraft:chorus_flower',Properties:{age:'1'}}", "{Name:'minecraft:chorus_flower',Properties:{age:'1'}}"); -+ register(3202, "{Name:'minecraft:chorus_flower',Properties:{age:'2'}}", "{Name:'minecraft:chorus_flower',Properties:{age:'2'}}"); -+ register(3203, "{Name:'minecraft:chorus_flower',Properties:{age:'3'}}", "{Name:'minecraft:chorus_flower',Properties:{age:'3'}}"); -+ register(3204, "{Name:'minecraft:chorus_flower',Properties:{age:'4'}}", "{Name:'minecraft:chorus_flower',Properties:{age:'4'}}"); -+ register(3205, "{Name:'minecraft:chorus_flower',Properties:{age:'5'}}", "{Name:'minecraft:chorus_flower',Properties:{age:'5'}}"); -+ register(3216, "{Name:'minecraft:purpur_block'}", "{Name:'minecraft:purpur_block'}"); -+ register(3232, "{Name:'minecraft:purpur_pillar',Properties:{axis:'y'}}", "{Name:'minecraft:purpur_pillar',Properties:{axis:'y'}}"); -+ register(3236, "{Name:'minecraft:purpur_pillar',Properties:{axis:'x'}}", "{Name:'minecraft:purpur_pillar',Properties:{axis:'x'}}"); -+ register(3240, "{Name:'minecraft:purpur_pillar',Properties:{axis:'z'}}", "{Name:'minecraft:purpur_pillar',Properties:{axis:'z'}}"); -+ register(3248, "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'bottom',shape:'straight'}}"); -+ register(3249, "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'bottom',shape:'straight'}}"); -+ register(3250, "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'bottom',shape:'straight'}}"); -+ register(3251, "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'bottom',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'bottom',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'bottom',shape:'straight'}}"); -+ register(3252, "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'top',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'top',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'top',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'top',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'east',half:'top',shape:'straight'}}"); -+ register(3253, "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'top',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'top',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'top',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'top',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'west',half:'top',shape:'straight'}}"); -+ register(3254, "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'top',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'top',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'top',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'top',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'south',half:'top',shape:'straight'}}"); -+ register(3255, "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'top',shape:'inner_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'top',shape:'inner_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'top',shape:'outer_left'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'top',shape:'outer_right'}}", "{Name:'minecraft:purpur_stairs',Properties:{facing:'north',half:'top',shape:'straight'}}"); -+ register(3264, "{Name:'minecraft:purpur_slab',Properties:{type:'double'}}", "{Name:'minecraft:purpur_double_slab',Properties:{variant:'default'}}"); -+ register(3280, "{Name:'minecraft:purpur_slab',Properties:{type:'bottom'}}", "{Name:'minecraft:purpur_slab',Properties:{half:'bottom',variant:'default'}}"); -+ register(3288, "{Name:'minecraft:purpur_slab',Properties:{type:'top'}}", "{Name:'minecraft:purpur_slab',Properties:{half:'top',variant:'default'}}"); -+ register(3296, "{Name:'minecraft:end_stone_bricks'}", "{Name:'minecraft:end_bricks'}"); -+ register(3312, "{Name:'minecraft:beetroots',Properties:{age:'0'}}", "{Name:'minecraft:beetroots',Properties:{age:'0'}}"); -+ register(3313, "{Name:'minecraft:beetroots',Properties:{age:'1'}}", "{Name:'minecraft:beetroots',Properties:{age:'1'}}"); -+ register(3314, "{Name:'minecraft:beetroots',Properties:{age:'2'}}", "{Name:'minecraft:beetroots',Properties:{age:'2'}}"); -+ register(3315, "{Name:'minecraft:beetroots',Properties:{age:'3'}}", "{Name:'minecraft:beetroots',Properties:{age:'3'}}"); -+ register(3328, "{Name:'minecraft:grass_path'}", "{Name:'minecraft:grass_path'}"); -+ register(3344, "{Name:'minecraft:end_gateway'}", "{Name:'minecraft:end_gateway'}"); -+ register(3360, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'down'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'down'}}"); -+ register(3361, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'up'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'up'}}"); -+ register(3362, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'north'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'north'}}"); -+ register(3363, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'south'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'south'}}"); -+ register(3364, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'west'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'west'}}"); -+ register(3365, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'east'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'false',facing:'east'}}"); -+ register(3368, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'down'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'down'}}"); -+ register(3369, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'up'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'up'}}"); -+ register(3370, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'north'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'north'}}"); -+ register(3371, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'south'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'south'}}"); -+ register(3372, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'west'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'west'}}"); -+ register(3373, "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'east'}}", "{Name:'minecraft:repeating_command_block',Properties:{conditional:'true',facing:'east'}}"); -+ register(3376, "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'down'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'down'}}"); -+ register(3377, "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'up'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'up'}}"); -+ register(3378, "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'north'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'north'}}"); -+ register(3379, "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'south'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'south'}}"); -+ register(3380, "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'west'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'west'}}"); -+ register(3381, "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'east'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'false',facing:'east'}}"); -+ register(3384, "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'down'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'down'}}"); -+ register(3385, "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'up'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'up'}}"); -+ register(3386, "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'north'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'north'}}"); -+ register(3387, "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'south'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'south'}}"); -+ register(3388, "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'west'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'west'}}"); -+ register(3389, "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'east'}}", "{Name:'minecraft:chain_command_block',Properties:{conditional:'true',facing:'east'}}"); -+ register(3392, "{Name:'minecraft:frosted_ice',Properties:{age:'0'}}", "{Name:'minecraft:frosted_ice',Properties:{age:'0'}}"); -+ register(3393, "{Name:'minecraft:frosted_ice',Properties:{age:'1'}}", "{Name:'minecraft:frosted_ice',Properties:{age:'1'}}"); -+ register(3394, "{Name:'minecraft:frosted_ice',Properties:{age:'2'}}", "{Name:'minecraft:frosted_ice',Properties:{age:'2'}}"); -+ register(3395, "{Name:'minecraft:frosted_ice',Properties:{age:'3'}}", "{Name:'minecraft:frosted_ice',Properties:{age:'3'}}"); -+ register(3408, "{Name:'minecraft:magma_block'}", "{Name:'minecraft:magma'}"); -+ register(3424, "{Name:'minecraft:nether_wart_block'}", "{Name:'minecraft:nether_wart_block'}"); -+ register(3440, "{Name:'minecraft:red_nether_bricks'}", "{Name:'minecraft:red_nether_brick'}"); -+ register(3456, "{Name:'minecraft:bone_block',Properties:{axis:'y'}}", "{Name:'minecraft:bone_block',Properties:{axis:'y'}}"); -+ register(3460, "{Name:'minecraft:bone_block',Properties:{axis:'x'}}", "{Name:'minecraft:bone_block',Properties:{axis:'x'}}"); -+ register(3464, "{Name:'minecraft:bone_block',Properties:{axis:'z'}}", "{Name:'minecraft:bone_block',Properties:{axis:'z'}}"); -+ register(3472, "{Name:'minecraft:structure_void'}", "{Name:'minecraft:structure_void'}"); -+ register(3488, "{Name:'minecraft:observer',Properties:{facing:'down',powered:'false'}}", "{Name:'minecraft:observer',Properties:{facing:'down',powered:'false'}}"); -+ register(3489, "{Name:'minecraft:observer',Properties:{facing:'up',powered:'false'}}", "{Name:'minecraft:observer',Properties:{facing:'up',powered:'false'}}"); -+ register(3490, "{Name:'minecraft:observer',Properties:{facing:'north',powered:'false'}}", "{Name:'minecraft:observer',Properties:{facing:'north',powered:'false'}}"); -+ register(3491, "{Name:'minecraft:observer',Properties:{facing:'south',powered:'false'}}", "{Name:'minecraft:observer',Properties:{facing:'south',powered:'false'}}"); -+ register(3492, "{Name:'minecraft:observer',Properties:{facing:'west',powered:'false'}}", "{Name:'minecraft:observer',Properties:{facing:'west',powered:'false'}}"); -+ register(3493, "{Name:'minecraft:observer',Properties:{facing:'east',powered:'false'}}", "{Name:'minecraft:observer',Properties:{facing:'east',powered:'false'}}"); -+ register(3496, "{Name:'minecraft:observer',Properties:{facing:'down',powered:'true'}}", "{Name:'minecraft:observer',Properties:{facing:'down',powered:'true'}}"); -+ register(3497, "{Name:'minecraft:observer',Properties:{facing:'up',powered:'true'}}", "{Name:'minecraft:observer',Properties:{facing:'up',powered:'true'}}"); -+ register(3498, "{Name:'minecraft:observer',Properties:{facing:'north',powered:'true'}}", "{Name:'minecraft:observer',Properties:{facing:'north',powered:'true'}}"); -+ register(3499, "{Name:'minecraft:observer',Properties:{facing:'south',powered:'true'}}", "{Name:'minecraft:observer',Properties:{facing:'south',powered:'true'}}"); -+ register(3500, "{Name:'minecraft:observer',Properties:{facing:'west',powered:'true'}}", "{Name:'minecraft:observer',Properties:{facing:'west',powered:'true'}}"); -+ register(3501, "{Name:'minecraft:observer',Properties:{facing:'east',powered:'true'}}", "{Name:'minecraft:observer',Properties:{facing:'east',powered:'true'}}"); -+ register(3504, "{Name:'minecraft:white_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:white_shulker_box',Properties:{facing:'down'}}"); -+ register(3505, "{Name:'minecraft:white_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:white_shulker_box',Properties:{facing:'up'}}"); -+ register(3506, "{Name:'minecraft:white_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:white_shulker_box',Properties:{facing:'north'}}"); -+ register(3507, "{Name:'minecraft:white_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:white_shulker_box',Properties:{facing:'south'}}"); -+ register(3508, "{Name:'minecraft:white_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:white_shulker_box',Properties:{facing:'west'}}"); -+ register(3509, "{Name:'minecraft:white_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:white_shulker_box',Properties:{facing:'east'}}"); -+ register(3520, "{Name:'minecraft:orange_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:orange_shulker_box',Properties:{facing:'down'}}"); -+ register(3521, "{Name:'minecraft:orange_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:orange_shulker_box',Properties:{facing:'up'}}"); -+ register(3522, "{Name:'minecraft:orange_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:orange_shulker_box',Properties:{facing:'north'}}"); -+ register(3523, "{Name:'minecraft:orange_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:orange_shulker_box',Properties:{facing:'south'}}"); -+ register(3524, "{Name:'minecraft:orange_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:orange_shulker_box',Properties:{facing:'west'}}"); -+ register(3525, "{Name:'minecraft:orange_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:orange_shulker_box',Properties:{facing:'east'}}"); -+ register(3536, "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'down'}}"); -+ register(3537, "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'up'}}"); -+ register(3538, "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'north'}}"); -+ register(3539, "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'south'}}"); -+ register(3540, "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'west'}}"); -+ register(3541, "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:magenta_shulker_box',Properties:{facing:'east'}}"); -+ register(3552, "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'down'}}"); -+ register(3553, "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'up'}}"); -+ register(3554, "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'north'}}"); -+ register(3555, "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'south'}}"); -+ register(3556, "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'west'}}"); -+ register(3557, "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:light_blue_shulker_box',Properties:{facing:'east'}}"); -+ register(3568, "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'down'}}"); -+ register(3569, "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'up'}}"); -+ register(3570, "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'north'}}"); -+ register(3571, "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'south'}}"); -+ register(3572, "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'west'}}"); -+ register(3573, "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:yellow_shulker_box',Properties:{facing:'east'}}"); -+ register(3584, "{Name:'minecraft:lime_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:lime_shulker_box',Properties:{facing:'down'}}"); -+ register(3585, "{Name:'minecraft:lime_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:lime_shulker_box',Properties:{facing:'up'}}"); -+ register(3586, "{Name:'minecraft:lime_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:lime_shulker_box',Properties:{facing:'north'}}"); -+ register(3587, "{Name:'minecraft:lime_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:lime_shulker_box',Properties:{facing:'south'}}"); -+ register(3588, "{Name:'minecraft:lime_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:lime_shulker_box',Properties:{facing:'west'}}"); -+ register(3589, "{Name:'minecraft:lime_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:lime_shulker_box',Properties:{facing:'east'}}"); -+ register(3600, "{Name:'minecraft:pink_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:pink_shulker_box',Properties:{facing:'down'}}"); -+ register(3601, "{Name:'minecraft:pink_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:pink_shulker_box',Properties:{facing:'up'}}"); -+ register(3602, "{Name:'minecraft:pink_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:pink_shulker_box',Properties:{facing:'north'}}"); -+ register(3603, "{Name:'minecraft:pink_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:pink_shulker_box',Properties:{facing:'south'}}"); -+ register(3604, "{Name:'minecraft:pink_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:pink_shulker_box',Properties:{facing:'west'}}"); -+ register(3605, "{Name:'minecraft:pink_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:pink_shulker_box',Properties:{facing:'east'}}"); -+ register(3616, "{Name:'minecraft:gray_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:gray_shulker_box',Properties:{facing:'down'}}"); -+ register(3617, "{Name:'minecraft:gray_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:gray_shulker_box',Properties:{facing:'up'}}"); -+ register(3618, "{Name:'minecraft:gray_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:gray_shulker_box',Properties:{facing:'north'}}"); -+ register(3619, "{Name:'minecraft:gray_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:gray_shulker_box',Properties:{facing:'south'}}"); -+ register(3620, "{Name:'minecraft:gray_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:gray_shulker_box',Properties:{facing:'west'}}"); -+ register(3621, "{Name:'minecraft:gray_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:gray_shulker_box',Properties:{facing:'east'}}"); -+ register(3632, "{Name:'minecraft:light_gray_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:silver_shulker_box',Properties:{facing:'down'}}"); -+ register(3633, "{Name:'minecraft:light_gray_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:silver_shulker_box',Properties:{facing:'up'}}"); -+ register(3634, "{Name:'minecraft:light_gray_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:silver_shulker_box',Properties:{facing:'north'}}"); -+ register(3635, "{Name:'minecraft:light_gray_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:silver_shulker_box',Properties:{facing:'south'}}"); -+ register(3636, "{Name:'minecraft:light_gray_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:silver_shulker_box',Properties:{facing:'west'}}"); -+ register(3637, "{Name:'minecraft:light_gray_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:silver_shulker_box',Properties:{facing:'east'}}"); -+ register(3648, "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'down'}}"); -+ register(3649, "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'up'}}"); -+ register(3650, "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'north'}}"); -+ register(3651, "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'south'}}"); -+ register(3652, "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'west'}}"); -+ register(3653, "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:cyan_shulker_box',Properties:{facing:'east'}}"); -+ register(3664, "{Name:'minecraft:purple_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:purple_shulker_box',Properties:{facing:'down'}}"); -+ register(3665, "{Name:'minecraft:purple_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:purple_shulker_box',Properties:{facing:'up'}}"); -+ register(3666, "{Name:'minecraft:purple_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:purple_shulker_box',Properties:{facing:'north'}}"); -+ register(3667, "{Name:'minecraft:purple_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:purple_shulker_box',Properties:{facing:'south'}}"); -+ register(3668, "{Name:'minecraft:purple_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:purple_shulker_box',Properties:{facing:'west'}}"); -+ register(3669, "{Name:'minecraft:purple_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:purple_shulker_box',Properties:{facing:'east'}}"); -+ register(3680, "{Name:'minecraft:blue_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:blue_shulker_box',Properties:{facing:'down'}}"); -+ register(3681, "{Name:'minecraft:blue_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:blue_shulker_box',Properties:{facing:'up'}}"); -+ register(3682, "{Name:'minecraft:blue_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:blue_shulker_box',Properties:{facing:'north'}}"); -+ register(3683, "{Name:'minecraft:blue_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:blue_shulker_box',Properties:{facing:'south'}}"); -+ register(3684, "{Name:'minecraft:blue_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:blue_shulker_box',Properties:{facing:'west'}}"); -+ register(3685, "{Name:'minecraft:blue_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:blue_shulker_box',Properties:{facing:'east'}}"); -+ register(3696, "{Name:'minecraft:brown_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:brown_shulker_box',Properties:{facing:'down'}}"); -+ register(3697, "{Name:'minecraft:brown_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:brown_shulker_box',Properties:{facing:'up'}}"); -+ register(3698, "{Name:'minecraft:brown_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:brown_shulker_box',Properties:{facing:'north'}}"); -+ register(3699, "{Name:'minecraft:brown_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:brown_shulker_box',Properties:{facing:'south'}}"); -+ register(3700, "{Name:'minecraft:brown_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:brown_shulker_box',Properties:{facing:'west'}}"); -+ register(3701, "{Name:'minecraft:brown_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:brown_shulker_box',Properties:{facing:'east'}}"); -+ register(3712, "{Name:'minecraft:green_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:green_shulker_box',Properties:{facing:'down'}}"); -+ register(3713, "{Name:'minecraft:green_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:green_shulker_box',Properties:{facing:'up'}}"); -+ register(3714, "{Name:'minecraft:green_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:green_shulker_box',Properties:{facing:'north'}}"); -+ register(3715, "{Name:'minecraft:green_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:green_shulker_box',Properties:{facing:'south'}}"); -+ register(3716, "{Name:'minecraft:green_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:green_shulker_box',Properties:{facing:'west'}}"); -+ register(3717, "{Name:'minecraft:green_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:green_shulker_box',Properties:{facing:'east'}}"); -+ register(3728, "{Name:'minecraft:red_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:red_shulker_box',Properties:{facing:'down'}}"); -+ register(3729, "{Name:'minecraft:red_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:red_shulker_box',Properties:{facing:'up'}}"); -+ register(3730, "{Name:'minecraft:red_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:red_shulker_box',Properties:{facing:'north'}}"); -+ register(3731, "{Name:'minecraft:red_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:red_shulker_box',Properties:{facing:'south'}}"); -+ register(3732, "{Name:'minecraft:red_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:red_shulker_box',Properties:{facing:'west'}}"); -+ register(3733, "{Name:'minecraft:red_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:red_shulker_box',Properties:{facing:'east'}}"); -+ register(3744, "{Name:'minecraft:black_shulker_box',Properties:{facing:'down'}}", "{Name:'minecraft:black_shulker_box',Properties:{facing:'down'}}"); -+ register(3745, "{Name:'minecraft:black_shulker_box',Properties:{facing:'up'}}", "{Name:'minecraft:black_shulker_box',Properties:{facing:'up'}}"); -+ register(3746, "{Name:'minecraft:black_shulker_box',Properties:{facing:'north'}}", "{Name:'minecraft:black_shulker_box',Properties:{facing:'north'}}"); -+ register(3747, "{Name:'minecraft:black_shulker_box',Properties:{facing:'south'}}", "{Name:'minecraft:black_shulker_box',Properties:{facing:'south'}}"); -+ register(3748, "{Name:'minecraft:black_shulker_box',Properties:{facing:'west'}}", "{Name:'minecraft:black_shulker_box',Properties:{facing:'west'}}"); -+ register(3749, "{Name:'minecraft:black_shulker_box',Properties:{facing:'east'}}", "{Name:'minecraft:black_shulker_box',Properties:{facing:'east'}}"); -+ register(3760, "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3761, "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3762, "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3763, "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:white_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3776, "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3777, "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3778, "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3779, "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:orange_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3792, "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3793, "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3794, "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3795, "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:magenta_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3808, "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3809, "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3810, "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3811, "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:light_blue_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3824, "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3825, "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3826, "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3827, "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:yellow_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3840, "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3841, "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3842, "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3843, "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:lime_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3856, "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3857, "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3858, "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3859, "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:pink_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3872, "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3873, "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3874, "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3875, "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:gray_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3888, "{Name:'minecraft:light_gray_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:silver_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3889, "{Name:'minecraft:light_gray_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:silver_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3890, "{Name:'minecraft:light_gray_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:silver_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3891, "{Name:'minecraft:light_gray_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:silver_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3904, "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3905, "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3906, "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3907, "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:cyan_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3920, "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3921, "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3922, "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3923, "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:purple_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3936, "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3937, "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3938, "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3939, "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:blue_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3952, "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3953, "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3954, "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3955, "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:brown_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3968, "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3969, "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3970, "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3971, "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:green_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(3984, "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(3985, "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(3986, "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(3987, "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:red_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(4000, "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'south'}}", "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'south'}}"); -+ register(4001, "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'west'}}", "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'west'}}"); -+ register(4002, "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'north'}}", "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'north'}}"); -+ register(4003, "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'east'}}", "{Name:'minecraft:black_glazed_terracotta',Properties:{facing:'east'}}"); -+ register(4016, "{Name:'minecraft:white_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'white'}}"); -+ register(4017, "{Name:'minecraft:orange_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'orange'}}"); -+ register(4018, "{Name:'minecraft:magenta_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'magenta'}}"); -+ register(4019, "{Name:'minecraft:light_blue_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'light_blue'}}"); -+ register(4020, "{Name:'minecraft:yellow_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'yellow'}}"); -+ register(4021, "{Name:'minecraft:lime_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'lime'}}"); -+ register(4022, "{Name:'minecraft:pink_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'pink'}}"); -+ register(4023, "{Name:'minecraft:gray_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'gray'}}"); -+ register(4024, "{Name:'minecraft:light_gray_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'silver'}}"); -+ register(4025, "{Name:'minecraft:cyan_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'cyan'}}"); -+ register(4026, "{Name:'minecraft:purple_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'purple'}}"); -+ register(4027, "{Name:'minecraft:blue_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'blue'}}"); -+ register(4028, "{Name:'minecraft:brown_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'brown'}}"); -+ register(4029, "{Name:'minecraft:green_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'green'}}"); -+ register(4030, "{Name:'minecraft:red_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'red'}}"); -+ register(4031, "{Name:'minecraft:black_concrete'}", "{Name:'minecraft:concrete',Properties:{color:'black'}}"); -+ register(4032, "{Name:'minecraft:white_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'white'}}"); -+ register(4033, "{Name:'minecraft:orange_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'orange'}}"); -+ register(4034, "{Name:'minecraft:magenta_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'magenta'}}"); -+ register(4035, "{Name:'minecraft:light_blue_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'light_blue'}}"); -+ register(4036, "{Name:'minecraft:yellow_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'yellow'}}"); -+ register(4037, "{Name:'minecraft:lime_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'lime'}}"); -+ register(4038, "{Name:'minecraft:pink_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'pink'}}"); -+ register(4039, "{Name:'minecraft:gray_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'gray'}}"); -+ register(4040, "{Name:'minecraft:light_gray_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'silver'}}"); -+ register(4041, "{Name:'minecraft:cyan_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'cyan'}}"); -+ register(4042, "{Name:'minecraft:purple_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'purple'}}"); -+ register(4043, "{Name:'minecraft:blue_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'blue'}}"); -+ register(4044, "{Name:'minecraft:brown_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'brown'}}"); -+ register(4045, "{Name:'minecraft:green_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'green'}}"); -+ register(4046, "{Name:'minecraft:red_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'red'}}"); -+ register(4047, "{Name:'minecraft:black_concrete_powder'}", "{Name:'minecraft:concrete_powder',Properties:{color:'black'}}"); -+ register(4080, "{Name:'minecraft:structure_block',Properties:{mode:'save'}}", "{Name:'minecraft:structure_block',Properties:{mode:'save'}}"); -+ register(4081, "{Name:'minecraft:structure_block',Properties:{mode:'load'}}", "{Name:'minecraft:structure_block',Properties:{mode:'load'}}"); -+ register(4082, "{Name:'minecraft:structure_block',Properties:{mode:'corner'}}", "{Name:'minecraft:structure_block',Properties:{mode:'corner'}}"); -+ register(4083, "{Name:'minecraft:structure_block',Properties:{mode:'data'}}", "{Name:'minecraft:structure_block',Properties:{mode:'data'}}"); -+ finalizeMaps(); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperItemNameV102.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperItemNameV102.java -new file mode 100644 -index 0000000000000000000000000000000000000000..86f6aa3e3fa886976809f350fc5eb16f6a026ed9 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperItemNameV102.java -@@ -0,0 +1,533 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+ -+public final class HelperItemNameV102 { -+ -+ // This class is responsible for mapping the id -> string update in itemstacks and potions -+ -+ private static final Int2ObjectOpenHashMap ITEM_NAMES = new Int2ObjectOpenHashMap() { -+ @Override -+ public String put(final int k, final String o) { -+ final String ret = super.put(k, o); -+ -+ if (ret != null) { -+ throw new IllegalStateException("Mapping already exists for " + k + ": prev: " + ret + ", new: " + o); -+ } -+ -+ return ret; -+ } -+ }; -+ -+ static { -+ ITEM_NAMES.put(0, "minecraft:air"); -+ ITEM_NAMES.put(1, "minecraft:stone"); -+ ITEM_NAMES.put(2, "minecraft:grass"); -+ ITEM_NAMES.put(3, "minecraft:dirt"); -+ ITEM_NAMES.put(4, "minecraft:cobblestone"); -+ ITEM_NAMES.put(5, "minecraft:planks"); -+ ITEM_NAMES.put(6, "minecraft:sapling"); -+ ITEM_NAMES.put(7, "minecraft:bedrock"); -+ ITEM_NAMES.put(8, "minecraft:flowing_water"); -+ ITEM_NAMES.put(9, "minecraft:water"); -+ ITEM_NAMES.put(10, "minecraft:flowing_lava"); -+ ITEM_NAMES.put(11, "minecraft:lava"); -+ ITEM_NAMES.put(12, "minecraft:sand"); -+ ITEM_NAMES.put(13, "minecraft:gravel"); -+ ITEM_NAMES.put(14, "minecraft:gold_ore"); -+ ITEM_NAMES.put(15, "minecraft:iron_ore"); -+ ITEM_NAMES.put(16, "minecraft:coal_ore"); -+ ITEM_NAMES.put(17, "minecraft:log"); -+ ITEM_NAMES.put(18, "minecraft:leaves"); -+ ITEM_NAMES.put(19, "minecraft:sponge"); -+ ITEM_NAMES.put(20, "minecraft:glass"); -+ ITEM_NAMES.put(21, "minecraft:lapis_ore"); -+ ITEM_NAMES.put(22, "minecraft:lapis_block"); -+ ITEM_NAMES.put(23, "minecraft:dispenser"); -+ ITEM_NAMES.put(24, "minecraft:sandstone"); -+ ITEM_NAMES.put(25, "minecraft:noteblock"); -+ ITEM_NAMES.put(27, "minecraft:golden_rail"); -+ ITEM_NAMES.put(28, "minecraft:detector_rail"); -+ ITEM_NAMES.put(29, "minecraft:sticky_piston"); -+ ITEM_NAMES.put(30, "minecraft:web"); -+ ITEM_NAMES.put(31, "minecraft:tallgrass"); -+ ITEM_NAMES.put(32, "minecraft:deadbush"); -+ ITEM_NAMES.put(33, "minecraft:piston"); -+ ITEM_NAMES.put(35, "minecraft:wool"); -+ ITEM_NAMES.put(37, "minecraft:yellow_flower"); -+ ITEM_NAMES.put(38, "minecraft:red_flower"); -+ ITEM_NAMES.put(39, "minecraft:brown_mushroom"); -+ ITEM_NAMES.put(40, "minecraft:red_mushroom"); -+ ITEM_NAMES.put(41, "minecraft:gold_block"); -+ ITEM_NAMES.put(42, "minecraft:iron_block"); -+ ITEM_NAMES.put(43, "minecraft:double_stone_slab"); -+ ITEM_NAMES.put(44, "minecraft:stone_slab"); -+ ITEM_NAMES.put(45, "minecraft:brick_block"); -+ ITEM_NAMES.put(46, "minecraft:tnt"); -+ ITEM_NAMES.put(47, "minecraft:bookshelf"); -+ ITEM_NAMES.put(48, "minecraft:mossy_cobblestone"); -+ ITEM_NAMES.put(49, "minecraft:obsidian"); -+ ITEM_NAMES.put(50, "minecraft:torch"); -+ ITEM_NAMES.put(51, "minecraft:fire"); -+ ITEM_NAMES.put(52, "minecraft:mob_spawner"); -+ ITEM_NAMES.put(53, "minecraft:oak_stairs"); -+ ITEM_NAMES.put(54, "minecraft:chest"); -+ ITEM_NAMES.put(56, "minecraft:diamond_ore"); -+ ITEM_NAMES.put(57, "minecraft:diamond_block"); -+ ITEM_NAMES.put(58, "minecraft:crafting_table"); -+ ITEM_NAMES.put(60, "minecraft:farmland"); -+ ITEM_NAMES.put(61, "minecraft:furnace"); -+ ITEM_NAMES.put(62, "minecraft:lit_furnace"); -+ ITEM_NAMES.put(65, "minecraft:ladder"); -+ ITEM_NAMES.put(66, "minecraft:rail"); -+ ITEM_NAMES.put(67, "minecraft:stone_stairs"); -+ ITEM_NAMES.put(69, "minecraft:lever"); -+ ITEM_NAMES.put(70, "minecraft:stone_pressure_plate"); -+ ITEM_NAMES.put(72, "minecraft:wooden_pressure_plate"); -+ ITEM_NAMES.put(73, "minecraft:redstone_ore"); -+ ITEM_NAMES.put(76, "minecraft:redstone_torch"); -+ ITEM_NAMES.put(77, "minecraft:stone_button"); -+ ITEM_NAMES.put(78, "minecraft:snow_layer"); -+ ITEM_NAMES.put(79, "minecraft:ice"); -+ ITEM_NAMES.put(80, "minecraft:snow"); -+ ITEM_NAMES.put(81, "minecraft:cactus"); -+ ITEM_NAMES.put(82, "minecraft:clay"); -+ ITEM_NAMES.put(84, "minecraft:jukebox"); -+ ITEM_NAMES.put(85, "minecraft:fence"); -+ ITEM_NAMES.put(86, "minecraft:pumpkin"); -+ ITEM_NAMES.put(87, "minecraft:netherrack"); -+ ITEM_NAMES.put(88, "minecraft:soul_sand"); -+ ITEM_NAMES.put(89, "minecraft:glowstone"); -+ ITEM_NAMES.put(90, "minecraft:portal"); -+ ITEM_NAMES.put(91, "minecraft:lit_pumpkin"); -+ ITEM_NAMES.put(95, "minecraft:stained_glass"); -+ ITEM_NAMES.put(96, "minecraft:trapdoor"); -+ ITEM_NAMES.put(97, "minecraft:monster_egg"); -+ ITEM_NAMES.put(98, "minecraft:stonebrick"); -+ ITEM_NAMES.put(99, "minecraft:brown_mushroom_block"); -+ ITEM_NAMES.put(100, "minecraft:red_mushroom_block"); -+ ITEM_NAMES.put(101, "minecraft:iron_bars"); -+ ITEM_NAMES.put(102, "minecraft:glass_pane"); -+ ITEM_NAMES.put(103, "minecraft:melon_block"); -+ ITEM_NAMES.put(106, "minecraft:vine"); -+ ITEM_NAMES.put(107, "minecraft:fence_gate"); -+ ITEM_NAMES.put(108, "minecraft:brick_stairs"); -+ ITEM_NAMES.put(109, "minecraft:stone_brick_stairs"); -+ ITEM_NAMES.put(110, "minecraft:mycelium"); -+ ITEM_NAMES.put(111, "minecraft:waterlily"); -+ ITEM_NAMES.put(112, "minecraft:nether_brick"); -+ ITEM_NAMES.put(113, "minecraft:nether_brick_fence"); -+ ITEM_NAMES.put(114, "minecraft:nether_brick_stairs"); -+ ITEM_NAMES.put(116, "minecraft:enchanting_table"); -+ ITEM_NAMES.put(119, "minecraft:end_portal"); -+ ITEM_NAMES.put(120, "minecraft:end_portal_frame"); -+ ITEM_NAMES.put(121, "minecraft:end_stone"); -+ ITEM_NAMES.put(122, "minecraft:dragon_egg"); -+ ITEM_NAMES.put(123, "minecraft:redstone_lamp"); -+ ITEM_NAMES.put(125, "minecraft:double_wooden_slab"); -+ ITEM_NAMES.put(126, "minecraft:wooden_slab"); -+ ITEM_NAMES.put(127, "minecraft:cocoa"); -+ ITEM_NAMES.put(128, "minecraft:sandstone_stairs"); -+ ITEM_NAMES.put(129, "minecraft:emerald_ore"); -+ ITEM_NAMES.put(130, "minecraft:ender_chest"); -+ ITEM_NAMES.put(131, "minecraft:tripwire_hook"); -+ ITEM_NAMES.put(133, "minecraft:emerald_block"); -+ ITEM_NAMES.put(134, "minecraft:spruce_stairs"); -+ ITEM_NAMES.put(135, "minecraft:birch_stairs"); -+ ITEM_NAMES.put(136, "minecraft:jungle_stairs"); -+ ITEM_NAMES.put(137, "minecraft:command_block"); -+ ITEM_NAMES.put(138, "minecraft:beacon"); -+ ITEM_NAMES.put(139, "minecraft:cobblestone_wall"); -+ ITEM_NAMES.put(141, "minecraft:carrots"); -+ ITEM_NAMES.put(142, "minecraft:potatoes"); -+ ITEM_NAMES.put(143, "minecraft:wooden_button"); -+ ITEM_NAMES.put(145, "minecraft:anvil"); -+ ITEM_NAMES.put(146, "minecraft:trapped_chest"); -+ ITEM_NAMES.put(147, "minecraft:light_weighted_pressure_plate"); -+ ITEM_NAMES.put(148, "minecraft:heavy_weighted_pressure_plate"); -+ ITEM_NAMES.put(151, "minecraft:daylight_detector"); -+ ITEM_NAMES.put(152, "minecraft:redstone_block"); -+ ITEM_NAMES.put(153, "minecraft:quartz_ore"); -+ ITEM_NAMES.put(154, "minecraft:hopper"); -+ ITEM_NAMES.put(155, "minecraft:quartz_block"); -+ ITEM_NAMES.put(156, "minecraft:quartz_stairs"); -+ ITEM_NAMES.put(157, "minecraft:activator_rail"); -+ ITEM_NAMES.put(158, "minecraft:dropper"); -+ ITEM_NAMES.put(159, "minecraft:stained_hardened_clay"); -+ ITEM_NAMES.put(160, "minecraft:stained_glass_pane"); -+ ITEM_NAMES.put(161, "minecraft:leaves2"); -+ ITEM_NAMES.put(162, "minecraft:log2"); -+ ITEM_NAMES.put(163, "minecraft:acacia_stairs"); -+ ITEM_NAMES.put(164, "minecraft:dark_oak_stairs"); -+ ITEM_NAMES.put(170, "minecraft:hay_block"); -+ ITEM_NAMES.put(171, "minecraft:carpet"); -+ ITEM_NAMES.put(172, "minecraft:hardened_clay"); -+ ITEM_NAMES.put(173, "minecraft:coal_block"); -+ ITEM_NAMES.put(174, "minecraft:packed_ice"); -+ ITEM_NAMES.put(175, "minecraft:double_plant"); -+ ITEM_NAMES.put(256, "minecraft:iron_shovel"); -+ ITEM_NAMES.put(257, "minecraft:iron_pickaxe"); -+ ITEM_NAMES.put(258, "minecraft:iron_axe"); -+ ITEM_NAMES.put(259, "minecraft:flint_and_steel"); -+ ITEM_NAMES.put(260, "minecraft:apple"); -+ ITEM_NAMES.put(261, "minecraft:bow"); -+ ITEM_NAMES.put(262, "minecraft:arrow"); -+ ITEM_NAMES.put(263, "minecraft:coal"); -+ ITEM_NAMES.put(264, "minecraft:diamond"); -+ ITEM_NAMES.put(265, "minecraft:iron_ingot"); -+ ITEM_NAMES.put(266, "minecraft:gold_ingot"); -+ ITEM_NAMES.put(267, "minecraft:iron_sword"); -+ ITEM_NAMES.put(268, "minecraft:wooden_sword"); -+ ITEM_NAMES.put(269, "minecraft:wooden_shovel"); -+ ITEM_NAMES.put(270, "minecraft:wooden_pickaxe"); -+ ITEM_NAMES.put(271, "minecraft:wooden_axe"); -+ ITEM_NAMES.put(272, "minecraft:stone_sword"); -+ ITEM_NAMES.put(273, "minecraft:stone_shovel"); -+ ITEM_NAMES.put(274, "minecraft:stone_pickaxe"); -+ ITEM_NAMES.put(275, "minecraft:stone_axe"); -+ ITEM_NAMES.put(276, "minecraft:diamond_sword"); -+ ITEM_NAMES.put(277, "minecraft:diamond_shovel"); -+ ITEM_NAMES.put(278, "minecraft:diamond_pickaxe"); -+ ITEM_NAMES.put(279, "minecraft:diamond_axe"); -+ ITEM_NAMES.put(280, "minecraft:stick"); -+ ITEM_NAMES.put(281, "minecraft:bowl"); -+ ITEM_NAMES.put(282, "minecraft:mushroom_stew"); -+ ITEM_NAMES.put(283, "minecraft:golden_sword"); -+ ITEM_NAMES.put(284, "minecraft:golden_shovel"); -+ ITEM_NAMES.put(285, "minecraft:golden_pickaxe"); -+ ITEM_NAMES.put(286, "minecraft:golden_axe"); -+ ITEM_NAMES.put(287, "minecraft:string"); -+ ITEM_NAMES.put(288, "minecraft:feather"); -+ ITEM_NAMES.put(289, "minecraft:gunpowder"); -+ ITEM_NAMES.put(290, "minecraft:wooden_hoe"); -+ ITEM_NAMES.put(291, "minecraft:stone_hoe"); -+ ITEM_NAMES.put(292, "minecraft:iron_hoe"); -+ ITEM_NAMES.put(293, "minecraft:diamond_hoe"); -+ ITEM_NAMES.put(294, "minecraft:golden_hoe"); -+ ITEM_NAMES.put(295, "minecraft:wheat_seeds"); -+ ITEM_NAMES.put(296, "minecraft:wheat"); -+ ITEM_NAMES.put(297, "minecraft:bread"); -+ ITEM_NAMES.put(298, "minecraft:leather_helmet"); -+ ITEM_NAMES.put(299, "minecraft:leather_chestplate"); -+ ITEM_NAMES.put(300, "minecraft:leather_leggings"); -+ ITEM_NAMES.put(301, "minecraft:leather_boots"); -+ ITEM_NAMES.put(302, "minecraft:chainmail_helmet"); -+ ITEM_NAMES.put(303, "minecraft:chainmail_chestplate"); -+ ITEM_NAMES.put(304, "minecraft:chainmail_leggings"); -+ ITEM_NAMES.put(305, "minecraft:chainmail_boots"); -+ ITEM_NAMES.put(306, "minecraft:iron_helmet"); -+ ITEM_NAMES.put(307, "minecraft:iron_chestplate"); -+ ITEM_NAMES.put(308, "minecraft:iron_leggings"); -+ ITEM_NAMES.put(309, "minecraft:iron_boots"); -+ ITEM_NAMES.put(310, "minecraft:diamond_helmet"); -+ ITEM_NAMES.put(311, "minecraft:diamond_chestplate"); -+ ITEM_NAMES.put(312, "minecraft:diamond_leggings"); -+ ITEM_NAMES.put(313, "minecraft:diamond_boots"); -+ ITEM_NAMES.put(314, "minecraft:golden_helmet"); -+ ITEM_NAMES.put(315, "minecraft:golden_chestplate"); -+ ITEM_NAMES.put(316, "minecraft:golden_leggings"); -+ ITEM_NAMES.put(317, "minecraft:golden_boots"); -+ ITEM_NAMES.put(318, "minecraft:flint"); -+ ITEM_NAMES.put(319, "minecraft:porkchop"); -+ ITEM_NAMES.put(320, "minecraft:cooked_porkchop"); -+ ITEM_NAMES.put(321, "minecraft:painting"); -+ ITEM_NAMES.put(322, "minecraft:golden_apple"); -+ ITEM_NAMES.put(323, "minecraft:sign"); -+ ITEM_NAMES.put(324, "minecraft:wooden_door"); -+ ITEM_NAMES.put(325, "minecraft:bucket"); -+ ITEM_NAMES.put(326, "minecraft:water_bucket"); -+ ITEM_NAMES.put(327, "minecraft:lava_bucket"); -+ ITEM_NAMES.put(328, "minecraft:minecart"); -+ ITEM_NAMES.put(329, "minecraft:saddle"); -+ ITEM_NAMES.put(330, "minecraft:iron_door"); -+ ITEM_NAMES.put(331, "minecraft:redstone"); -+ ITEM_NAMES.put(332, "minecraft:snowball"); -+ ITEM_NAMES.put(333, "minecraft:boat"); -+ ITEM_NAMES.put(334, "minecraft:leather"); -+ ITEM_NAMES.put(335, "minecraft:milk_bucket"); -+ ITEM_NAMES.put(336, "minecraft:brick"); -+ ITEM_NAMES.put(337, "minecraft:clay_ball"); -+ ITEM_NAMES.put(338, "minecraft:reeds"); -+ ITEM_NAMES.put(339, "minecraft:paper"); -+ ITEM_NAMES.put(340, "minecraft:book"); -+ ITEM_NAMES.put(341, "minecraft:slime_ball"); -+ ITEM_NAMES.put(342, "minecraft:chest_minecart"); -+ ITEM_NAMES.put(343, "minecraft:furnace_minecart"); -+ ITEM_NAMES.put(344, "minecraft:egg"); -+ ITEM_NAMES.put(345, "minecraft:compass"); -+ ITEM_NAMES.put(346, "minecraft:fishing_rod"); -+ ITEM_NAMES.put(347, "minecraft:clock"); -+ ITEM_NAMES.put(348, "minecraft:glowstone_dust"); -+ ITEM_NAMES.put(349, "minecraft:fish"); -+ ITEM_NAMES.put(350, "minecraft:cooked_fish"); // Fix typo, the game never recognized cooked_fished -+ ITEM_NAMES.put(351, "minecraft:dye"); -+ ITEM_NAMES.put(352, "minecraft:bone"); -+ ITEM_NAMES.put(353, "minecraft:sugar"); -+ ITEM_NAMES.put(354, "minecraft:cake"); -+ ITEM_NAMES.put(355, "minecraft:bed"); -+ ITEM_NAMES.put(356, "minecraft:repeater"); -+ ITEM_NAMES.put(357, "minecraft:cookie"); -+ ITEM_NAMES.put(358, "minecraft:filled_map"); -+ ITEM_NAMES.put(359, "minecraft:shears"); -+ ITEM_NAMES.put(360, "minecraft:melon"); -+ ITEM_NAMES.put(361, "minecraft:pumpkin_seeds"); -+ ITEM_NAMES.put(362, "minecraft:melon_seeds"); -+ ITEM_NAMES.put(363, "minecraft:beef"); -+ ITEM_NAMES.put(364, "minecraft:cooked_beef"); -+ ITEM_NAMES.put(365, "minecraft:chicken"); -+ ITEM_NAMES.put(366, "minecraft:cooked_chicken"); -+ ITEM_NAMES.put(367, "minecraft:rotten_flesh"); -+ ITEM_NAMES.put(368, "minecraft:ender_pearl"); -+ ITEM_NAMES.put(369, "minecraft:blaze_rod"); -+ ITEM_NAMES.put(370, "minecraft:ghast_tear"); -+ ITEM_NAMES.put(371, "minecraft:gold_nugget"); -+ ITEM_NAMES.put(372, "minecraft:nether_wart"); -+ ITEM_NAMES.put(373, "minecraft:potion"); -+ ITEM_NAMES.put(374, "minecraft:glass_bottle"); -+ ITEM_NAMES.put(375, "minecraft:spider_eye"); -+ ITEM_NAMES.put(376, "minecraft:fermented_spider_eye"); -+ ITEM_NAMES.put(377, "minecraft:blaze_powder"); -+ ITEM_NAMES.put(378, "minecraft:magma_cream"); -+ ITEM_NAMES.put(379, "minecraft:brewing_stand"); -+ ITEM_NAMES.put(380, "minecraft:cauldron"); -+ ITEM_NAMES.put(381, "minecraft:ender_eye"); -+ ITEM_NAMES.put(382, "minecraft:speckled_melon"); -+ ITEM_NAMES.put(383, "minecraft:spawn_egg"); -+ ITEM_NAMES.put(384, "minecraft:experience_bottle"); -+ ITEM_NAMES.put(385, "minecraft:fire_charge"); -+ ITEM_NAMES.put(386, "minecraft:writable_book"); -+ ITEM_NAMES.put(387, "minecraft:written_book"); -+ ITEM_NAMES.put(388, "minecraft:emerald"); -+ ITEM_NAMES.put(389, "minecraft:item_frame"); -+ ITEM_NAMES.put(390, "minecraft:flower_pot"); -+ ITEM_NAMES.put(391, "minecraft:carrot"); -+ ITEM_NAMES.put(392, "minecraft:potato"); -+ ITEM_NAMES.put(393, "minecraft:baked_potato"); -+ ITEM_NAMES.put(394, "minecraft:poisonous_potato"); -+ ITEM_NAMES.put(395, "minecraft:map"); -+ ITEM_NAMES.put(396, "minecraft:golden_carrot"); -+ ITEM_NAMES.put(397, "minecraft:skull"); -+ ITEM_NAMES.put(398, "minecraft:carrot_on_a_stick"); -+ ITEM_NAMES.put(399, "minecraft:nether_star"); -+ ITEM_NAMES.put(400, "minecraft:pumpkin_pie"); -+ ITEM_NAMES.put(401, "minecraft:fireworks"); -+ ITEM_NAMES.put(402, "minecraft:firework_charge"); -+ ITEM_NAMES.put(403, "minecraft:enchanted_book"); -+ ITEM_NAMES.put(404, "minecraft:comparator"); -+ ITEM_NAMES.put(405, "minecraft:netherbrick"); -+ ITEM_NAMES.put(406, "minecraft:quartz"); -+ ITEM_NAMES.put(407, "minecraft:tnt_minecart"); -+ ITEM_NAMES.put(408, "minecraft:hopper_minecart"); -+ ITEM_NAMES.put(417, "minecraft:iron_horse_armor"); -+ ITEM_NAMES.put(418, "minecraft:golden_horse_armor"); -+ ITEM_NAMES.put(419, "minecraft:diamond_horse_armor"); -+ ITEM_NAMES.put(420, "minecraft:lead"); -+ ITEM_NAMES.put(421, "minecraft:name_tag"); -+ ITEM_NAMES.put(422, "minecraft:command_block_minecart"); -+ ITEM_NAMES.put(2256, "minecraft:record_13"); -+ ITEM_NAMES.put(2257, "minecraft:record_cat"); -+ ITEM_NAMES.put(2258, "minecraft:record_blocks"); -+ ITEM_NAMES.put(2259, "minecraft:record_chirp"); -+ ITEM_NAMES.put(2260, "minecraft:record_far"); -+ ITEM_NAMES.put(2261, "minecraft:record_mall"); -+ ITEM_NAMES.put(2262, "minecraft:record_mellohi"); -+ ITEM_NAMES.put(2263, "minecraft:record_stal"); -+ ITEM_NAMES.put(2264, "minecraft:record_strad"); -+ ITEM_NAMES.put(2265, "minecraft:record_ward"); -+ ITEM_NAMES.put(2266, "minecraft:record_11"); -+ ITEM_NAMES.put(2267, "minecraft:record_wait"); -+ // https://github.com/starlis/empirecraft/commit/2da59d1901407fc0c135ef0458c0fe9b016570b3 -+ // It's likely that this is a result of old CB/Spigot behavior still writing ids into items as ints. -+ // These ids do not appear to be used by regular MC anyways, so I do not see the harm of porting it here. -+ // Extras can be added if needed -+ String[] extra = new String[4_000]; -+ // EMC start -+ extra[409] = "minecraft:prismarine_shard"; -+ extra[410] = "minecraft:prismarine_crystals"; -+ extra[411] = "minecraft:rabbit"; -+ extra[412] = "minecraft:cooked_rabbit"; -+ extra[413] = "minecraft:rabbit_stew"; -+ extra[414] = "minecraft:rabbit_foot"; -+ extra[415] = "minecraft:rabbit_hide"; -+ extra[416] = "minecraft:armor_stand"; -+ extra[423] = "minecraft:mutton"; -+ extra[424] = "minecraft:cooked_mutton"; -+ extra[425] = "minecraft:banner"; -+ extra[426] = "minecraft:end_crystal"; -+ extra[427] = "minecraft:spruce_door"; -+ extra[428] = "minecraft:birch_door"; -+ extra[429] = "minecraft:jungle_door"; -+ extra[430] = "minecraft:acacia_door"; -+ extra[431] = "minecraft:dark_oak_door"; -+ extra[432] = "minecraft:chorus_fruit"; -+ extra[433] = "minecraft:chorus_fruit_popped"; -+ extra[434] = "minecraft:beetroot"; -+ extra[435] = "minecraft:beetroot_seeds"; -+ extra[436] = "minecraft:beetroot_soup"; -+ extra[437] = "minecraft:dragon_breath"; -+ extra[438] = "minecraft:splash_potion"; -+ extra[439] = "minecraft:spectral_arrow"; -+ extra[440] = "minecraft:tipped_arrow"; -+ extra[441] = "minecraft:lingering_potion"; -+ extra[442] = "minecraft:shield"; -+ extra[443] = "minecraft:elytra"; -+ extra[444] = "minecraft:spruce_boat"; -+ extra[445] = "minecraft:birch_boat"; -+ extra[446] = "minecraft:jungle_boat"; -+ extra[447] = "minecraft:acacia_boat"; -+ extra[448] = "minecraft:dark_oak_boat"; -+ extra[449] = "minecraft:totem_of_undying"; -+ extra[450] = "minecraft:shulker_shell"; -+ extra[452] = "minecraft:iron_nugget"; -+ extra[453] = "minecraft:knowledge_book"; -+ // EMC end -+ -+ // dump extra into map -+ for (int i = 0; i < extra.length; ++i) { -+ if (extra[i] != null) { -+ ITEM_NAMES.put(i, extra[i]); -+ } -+ } -+ } -+ -+ private static final String[] POTION_NAMES = new String[128]; -+ static { -+ POTION_NAMES[0] = "minecraft:water"; -+ POTION_NAMES[1] = "minecraft:regeneration"; -+ POTION_NAMES[2] = "minecraft:swiftness"; -+ POTION_NAMES[3] = "minecraft:fire_resistance"; -+ POTION_NAMES[4] = "minecraft:poison"; -+ POTION_NAMES[5] = "minecraft:healing"; -+ POTION_NAMES[6] = "minecraft:night_vision"; -+ POTION_NAMES[7] = null; -+ POTION_NAMES[8] = "minecraft:weakness"; -+ POTION_NAMES[9] = "minecraft:strength"; -+ POTION_NAMES[10] = "minecraft:slowness"; -+ POTION_NAMES[11] = "minecraft:leaping"; -+ POTION_NAMES[12] = "minecraft:harming"; -+ POTION_NAMES[13] = "minecraft:water_breathing"; -+ POTION_NAMES[14] = "minecraft:invisibility"; -+ POTION_NAMES[15] = null; -+ POTION_NAMES[16] = "minecraft:awkward"; -+ POTION_NAMES[17] = "minecraft:regeneration"; -+ POTION_NAMES[18] = "minecraft:swiftness"; -+ POTION_NAMES[19] = "minecraft:fire_resistance"; -+ POTION_NAMES[20] = "minecraft:poison"; -+ POTION_NAMES[21] = "minecraft:healing"; -+ POTION_NAMES[22] = "minecraft:night_vision"; -+ POTION_NAMES[23] = null; -+ POTION_NAMES[24] = "minecraft:weakness"; -+ POTION_NAMES[25] = "minecraft:strength"; -+ POTION_NAMES[26] = "minecraft:slowness"; -+ POTION_NAMES[27] = "minecraft:leaping"; -+ POTION_NAMES[28] = "minecraft:harming"; -+ POTION_NAMES[29] = "minecraft:water_breathing"; -+ POTION_NAMES[30] = "minecraft:invisibility"; -+ POTION_NAMES[31] = null; -+ POTION_NAMES[32] = "minecraft:thick"; -+ POTION_NAMES[33] = "minecraft:strong_regeneration"; -+ POTION_NAMES[34] = "minecraft:strong_swiftness"; -+ POTION_NAMES[35] = "minecraft:fire_resistance"; -+ POTION_NAMES[36] = "minecraft:strong_poison"; -+ POTION_NAMES[37] = "minecraft:strong_healing"; -+ POTION_NAMES[38] = "minecraft:night_vision"; -+ POTION_NAMES[39] = null; -+ POTION_NAMES[40] = "minecraft:weakness"; -+ POTION_NAMES[41] = "minecraft:strong_strength"; -+ POTION_NAMES[42] = "minecraft:slowness"; -+ POTION_NAMES[43] = "minecraft:strong_leaping"; -+ POTION_NAMES[44] = "minecraft:strong_harming"; -+ POTION_NAMES[45] = "minecraft:water_breathing"; -+ POTION_NAMES[46] = "minecraft:invisibility"; -+ POTION_NAMES[47] = null; -+ POTION_NAMES[48] = null; -+ POTION_NAMES[49] = "minecraft:strong_regeneration"; -+ POTION_NAMES[50] = "minecraft:strong_swiftness"; -+ POTION_NAMES[51] = "minecraft:fire_resistance"; -+ POTION_NAMES[52] = "minecraft:strong_poison"; -+ POTION_NAMES[53] = "minecraft:strong_healing"; -+ POTION_NAMES[54] = "minecraft:night_vision"; -+ POTION_NAMES[55] = null; -+ POTION_NAMES[56] = "minecraft:weakness"; -+ POTION_NAMES[57] = "minecraft:strong_strength"; -+ POTION_NAMES[58] = "minecraft:slowness"; -+ POTION_NAMES[59] = "minecraft:strong_leaping"; -+ POTION_NAMES[60] = "minecraft:strong_harming"; -+ POTION_NAMES[61] = "minecraft:water_breathing"; -+ POTION_NAMES[62] = "minecraft:invisibility"; -+ POTION_NAMES[63] = null; -+ POTION_NAMES[64] = "minecraft:mundane"; -+ POTION_NAMES[65] = "minecraft:long_regeneration"; -+ POTION_NAMES[66] = "minecraft:long_swiftness"; -+ POTION_NAMES[67] = "minecraft:long_fire_resistance"; -+ POTION_NAMES[68] = "minecraft:long_poison"; -+ POTION_NAMES[69] = "minecraft:healing"; -+ POTION_NAMES[70] = "minecraft:long_night_vision"; -+ POTION_NAMES[71] = null; -+ POTION_NAMES[72] = "minecraft:long_weakness"; -+ POTION_NAMES[73] = "minecraft:long_strength"; -+ POTION_NAMES[74] = "minecraft:long_slowness"; -+ POTION_NAMES[75] = "minecraft:long_leaping"; -+ POTION_NAMES[76] = "minecraft:harming"; -+ POTION_NAMES[77] = "minecraft:long_water_breathing"; -+ POTION_NAMES[78] = "minecraft:long_invisibility"; -+ POTION_NAMES[79] = null; -+ POTION_NAMES[80] = "minecraft:awkward"; -+ POTION_NAMES[81] = "minecraft:long_regeneration"; -+ POTION_NAMES[82] = "minecraft:long_swiftness"; -+ POTION_NAMES[83] = "minecraft:long_fire_resistance"; -+ POTION_NAMES[84] = "minecraft:long_poison"; -+ POTION_NAMES[85] = "minecraft:healing"; -+ POTION_NAMES[86] = "minecraft:long_night_vision"; -+ POTION_NAMES[87] = null; -+ POTION_NAMES[88] = "minecraft:long_weakness"; -+ POTION_NAMES[89] = "minecraft:long_strength"; -+ POTION_NAMES[90] = "minecraft:long_slowness"; -+ POTION_NAMES[91] = "minecraft:long_leaping"; -+ POTION_NAMES[92] = "minecraft:harming"; -+ POTION_NAMES[93] = "minecraft:long_water_breathing"; -+ POTION_NAMES[94] = "minecraft:long_invisibility"; -+ POTION_NAMES[95] = null; -+ POTION_NAMES[96] = "minecraft:thick"; -+ POTION_NAMES[97] = "minecraft:regeneration"; -+ POTION_NAMES[98] = "minecraft:swiftness"; -+ POTION_NAMES[99] = "minecraft:long_fire_resistance"; -+ POTION_NAMES[100] = "minecraft:poison"; -+ POTION_NAMES[101] = "minecraft:strong_healing"; -+ POTION_NAMES[102] = "minecraft:long_night_vision"; -+ POTION_NAMES[103] = null; -+ POTION_NAMES[104] = "minecraft:long_weakness"; -+ POTION_NAMES[105] = "minecraft:strength"; -+ POTION_NAMES[106] = "minecraft:long_slowness"; -+ POTION_NAMES[107] = "minecraft:leaping"; -+ POTION_NAMES[108] = "minecraft:strong_harming"; -+ POTION_NAMES[109] = "minecraft:long_water_breathing"; -+ POTION_NAMES[110] = "minecraft:long_invisibility"; -+ POTION_NAMES[111] = null; -+ POTION_NAMES[112] = null; -+ POTION_NAMES[113] = "minecraft:regeneration"; -+ POTION_NAMES[114] = "minecraft:swiftness"; -+ POTION_NAMES[115] = "minecraft:long_fire_resistance"; -+ POTION_NAMES[116] = "minecraft:poison"; -+ POTION_NAMES[117] = "minecraft:strong_healing"; -+ POTION_NAMES[118] = "minecraft:long_night_vision"; -+ POTION_NAMES[119] = null; -+ POTION_NAMES[120] = "minecraft:long_weakness"; -+ POTION_NAMES[121] = "minecraft:strength"; -+ POTION_NAMES[122] = "minecraft:long_slowness"; -+ POTION_NAMES[123] = "minecraft:leaping"; -+ POTION_NAMES[124] = "minecraft:strong_harming"; -+ POTION_NAMES[125] = "minecraft:long_water_breathing"; -+ POTION_NAMES[126] = "minecraft:long_invisibility"; -+ POTION_NAMES[127] = null; -+ } -+ -+ // ret is nullable, you are supposed to log when it does not exist, NOT HIDE IT! -+ public static String getNameFromId(final int id) { -+ return ITEM_NAMES.get(id); -+ } -+ -+ public static String getPotionNameFromId(final short id) { -+ return POTION_NAMES[id & 127]; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperSpawnEggNameV105.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperSpawnEggNameV105.java -new file mode 100644 -index 0000000000000000000000000000000000000000..bcc586cb68148fd960dd685eecce853169a92ed5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/HelperSpawnEggNameV105.java -@@ -0,0 +1,77 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+public final class HelperSpawnEggNameV105 { -+ -+ private static final String[] ID_TO_STRING = new String[256]; -+ static { -+ ID_TO_STRING[1] = "Item"; -+ ID_TO_STRING[2] = "XPOrb"; -+ ID_TO_STRING[7] = "ThrownEgg"; -+ ID_TO_STRING[8] = "LeashKnot"; -+ ID_TO_STRING[9] = "Painting"; -+ ID_TO_STRING[10] = "Arrow"; -+ ID_TO_STRING[11] = "Snowball"; -+ ID_TO_STRING[12] = "Fireball"; -+ ID_TO_STRING[13] = "SmallFireball"; -+ ID_TO_STRING[14] = "ThrownEnderpearl"; -+ ID_TO_STRING[15] = "EyeOfEnderSignal"; -+ ID_TO_STRING[16] = "ThrownPotion"; -+ ID_TO_STRING[17] = "ThrownExpBottle"; -+ ID_TO_STRING[18] = "ItemFrame"; -+ ID_TO_STRING[19] = "WitherSkull"; -+ ID_TO_STRING[20] = "PrimedTnt"; -+ ID_TO_STRING[21] = "FallingSand"; -+ ID_TO_STRING[22] = "FireworksRocketEntity"; -+ ID_TO_STRING[23] = "TippedArrow"; -+ ID_TO_STRING[24] = "SpectralArrow"; -+ ID_TO_STRING[25] = "ShulkerBullet"; -+ ID_TO_STRING[26] = "DragonFireball"; -+ ID_TO_STRING[30] = "ArmorStand"; -+ ID_TO_STRING[41] = "Boat"; -+ ID_TO_STRING[42] = "MinecartRideable"; -+ ID_TO_STRING[43] = "MinecartChest"; -+ ID_TO_STRING[44] = "MinecartFurnace"; -+ ID_TO_STRING[45] = "MinecartTNT"; -+ ID_TO_STRING[46] = "MinecartHopper"; -+ ID_TO_STRING[47] = "MinecartSpawner"; -+ ID_TO_STRING[40] = "MinecartCommandBlock"; -+ ID_TO_STRING[50] = "Creeper"; -+ ID_TO_STRING[51] = "Skeleton"; -+ ID_TO_STRING[52] = "Spider"; -+ ID_TO_STRING[53] = "Giant"; -+ ID_TO_STRING[54] = "Zombie"; -+ ID_TO_STRING[55] = "Slime"; -+ ID_TO_STRING[56] = "Ghast"; -+ ID_TO_STRING[57] = "PigZombie"; -+ ID_TO_STRING[58] = "Enderman"; -+ ID_TO_STRING[59] = "CaveSpider"; -+ ID_TO_STRING[60] = "Silverfish"; -+ ID_TO_STRING[61] = "Blaze"; -+ ID_TO_STRING[62] = "LavaSlime"; -+ ID_TO_STRING[63] = "EnderDragon"; -+ ID_TO_STRING[64] = "WitherBoss"; -+ ID_TO_STRING[65] = "Bat"; -+ ID_TO_STRING[66] = "Witch"; -+ ID_TO_STRING[67] = "Endermite"; -+ ID_TO_STRING[68] = "Guardian"; -+ ID_TO_STRING[69] = "Shulker"; -+ ID_TO_STRING[90] = "Pig"; -+ ID_TO_STRING[91] = "Sheep"; -+ ID_TO_STRING[92] = "Cow"; -+ ID_TO_STRING[93] = "Chicken"; -+ ID_TO_STRING[94] = "Squid"; -+ ID_TO_STRING[95] = "Wolf"; -+ ID_TO_STRING[96] = "MushroomCow"; -+ ID_TO_STRING[97] = "SnowMan"; -+ ID_TO_STRING[98] = "Ozelot"; -+ ID_TO_STRING[99] = "VillagerGolem"; -+ ID_TO_STRING[100] = "EntityHorse"; -+ ID_TO_STRING[101] = "Rabbit"; -+ ID_TO_STRING[120] = "Villager"; -+ ID_TO_STRING[200] = "EnderCrystal"; -+ } -+ -+ public static String getSpawnNameFromId(final short id) { -+ return ID_TO_STRING[id & 255]; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/helpers/RenameHelper.java b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/RenameHelper.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1c0483b72f45f8c98e19237579bfdf5915001768 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/helpers/RenameHelper.java -@@ -0,0 +1,108 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.helpers; -+ -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.ArrayList; -+import java.util.List; -+import java.util.function.Function; -+ -+public final class RenameHelper { -+ -+ // assumes no two or more entries are renamed to a single value, otherwise result will be only one of them will win -+ // and there is no defined winner in such a case -+ public static void renameKeys(final MapType data, final Function renamer) { -+ if (data == null) { -+ return; -+ } -+ -+ List newKeys = null; -+ List newValues = null; -+ boolean needsRename = false; -+ for (final String key : data.keys()) { -+ final String renamed = renamer.apply(key); -+ if (renamed != null) { -+ newKeys = new ArrayList<>(); -+ newValues = new ArrayList<>(); -+ newValues.add(data.getGeneric(key)); -+ newKeys.add(renamed); -+ data.remove(key); -+ needsRename = true; -+ break; -+ } -+ } -+ -+ if (!needsRename) { -+ return; -+ } -+ -+ for (final String key : new ArrayList<>(data.keys())) { -+ final String renamed = renamer.apply(key); -+ -+ if (renamed != null) { -+ newValues.add(data.getGeneric(key)); -+ newKeys.add(renamed); -+ data.remove(key); -+ } -+ } -+ -+ // insert new keys -+ for (int i = 0, len = newKeys.size(); i < len; ++i) { -+ final String key = newKeys.get(i); -+ final Object value = newValues.get(i); -+ -+ data.setGeneric(key, value); -+ } -+ } -+ -+ // Clobbers anything in toKey if fromKey exists -+ public static boolean renameSingle(final MapType data, final String fromKey, final String toKey) { -+ if (data == null) { -+ return false; -+ } -+ -+ final Object value = data.getGeneric(fromKey); -+ if (value != null) { -+ data.remove(fromKey); -+ data.setGeneric(toKey, value); -+ return true; -+ } -+ return false; -+ } -+ -+ public static void renameString(final MapType data, final String key, final Function renamer) { -+ if (data == null) { -+ return; -+ } -+ -+ final String value = data.getString(key); -+ if (value == null) { -+ return; -+ } -+ -+ final String renamed = renamer.apply(value); -+ if (renamed == null) { -+ return; -+ } -+ -+ data.setString(key, renamed); -+ } -+ -+ public static void renameListMapItems(final MapType data, final String listPath, final String mapPath, -+ final Function renamer) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(listPath); -+ if (list == null) { -+ return; -+ } -+ -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ RenameHelper.renameString(list.getMap(i, null), mapPath, renamer); -+ } -+ } -+ -+ private RenameHelper() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/itemname/ConverterAbstractItemRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/itemname/ConverterAbstractItemRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..94569f0ccff0d3a09eafd4ba73572d9db0a0ac5b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/itemname/ConverterAbstractItemRename.java -@@ -0,0 +1,18 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.itemname; -+ -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import java.util.function.Function; -+ -+public final class ConverterAbstractItemRename { -+ -+ private ConverterAbstractItemRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ ConverterAbstractStringValueTypeRename.register(version, subVersion, MCTypeRegistry.ITEM_NAME, renamer); -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterEnchantmentsRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterEnchantmentsRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0244aab4905fc2b88abff344c2b2ab753d4b335e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterEnchantmentsRename.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.itemstack; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import java.util.function.Function; -+ -+public final class ConverterEnchantmentsRename extends DataConverter { -+ -+ private final Function renamer; -+ -+ public ConverterEnchantmentsRename(final int toVersion, final Function renamer) { -+ this(toVersion, 0, renamer); -+ } -+ -+ public ConverterEnchantmentsRename(final int toVersion, final int versionStep, final Function renamer) { -+ super(toVersion, versionStep); -+ -+ this.renamer = (final String input) -> { -+ return renamer.apply(NamespaceUtil.correctNamespace(input)); -+ }; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ -+ if (tag == null) { -+ return null; -+ } -+ -+ RenameHelper.renameListMapItems(tag, "Enchantments", "id", this.renamer); -+ RenameHelper.renameListMapItems(tag, "StoredEnchantments", "id", this.renamer); -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenItemStack.java b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenItemStack.java -new file mode 100644 -index 0000000000000000000000000000000000000000..eca9a58f43ac80f2fd3c8179d2790dae737951f7 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenItemStack.java -@@ -0,0 +1,460 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.itemstack; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.mojang.logging.LogUtils; -+import org.slf4j.Logger; -+import java.util.Arrays; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Map; -+import java.util.Set; -+ -+public final class ConverterFlattenItemStack extends DataConverter { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ // Map of "id.damage" -> "flattened id" -+ private static final Map FLATTEN_MAP = new HashMap<>(); -+ static { -+ FLATTEN_MAP.put("minecraft:stone.0", "minecraft:stone"); -+ FLATTEN_MAP.put("minecraft:stone.1", "minecraft:granite"); -+ FLATTEN_MAP.put("minecraft:stone.2", "minecraft:polished_granite"); -+ FLATTEN_MAP.put("minecraft:stone.3", "minecraft:diorite"); -+ FLATTEN_MAP.put("minecraft:stone.4", "minecraft:polished_diorite"); -+ FLATTEN_MAP.put("minecraft:stone.5", "minecraft:andesite"); -+ FLATTEN_MAP.put("minecraft:stone.6", "minecraft:polished_andesite"); -+ FLATTEN_MAP.put("minecraft:dirt.0", "minecraft:dirt"); -+ FLATTEN_MAP.put("minecraft:dirt.1", "minecraft:coarse_dirt"); -+ FLATTEN_MAP.put("minecraft:dirt.2", "minecraft:podzol"); -+ FLATTEN_MAP.put("minecraft:leaves.0", "minecraft:oak_leaves"); -+ FLATTEN_MAP.put("minecraft:leaves.1", "minecraft:spruce_leaves"); -+ FLATTEN_MAP.put("minecraft:leaves.2", "minecraft:birch_leaves"); -+ FLATTEN_MAP.put("minecraft:leaves.3", "minecraft:jungle_leaves"); -+ FLATTEN_MAP.put("minecraft:leaves2.0", "minecraft:acacia_leaves"); -+ FLATTEN_MAP.put("minecraft:leaves2.1", "minecraft:dark_oak_leaves"); -+ FLATTEN_MAP.put("minecraft:log.0", "minecraft:oak_log"); -+ FLATTEN_MAP.put("minecraft:log.1", "minecraft:spruce_log"); -+ FLATTEN_MAP.put("minecraft:log.2", "minecraft:birch_log"); -+ FLATTEN_MAP.put("minecraft:log.3", "minecraft:jungle_log"); -+ FLATTEN_MAP.put("minecraft:log2.0", "minecraft:acacia_log"); -+ FLATTEN_MAP.put("minecraft:log2.1", "minecraft:dark_oak_log"); -+ FLATTEN_MAP.put("minecraft:sapling.0", "minecraft:oak_sapling"); -+ FLATTEN_MAP.put("minecraft:sapling.1", "minecraft:spruce_sapling"); -+ FLATTEN_MAP.put("minecraft:sapling.2", "minecraft:birch_sapling"); -+ FLATTEN_MAP.put("minecraft:sapling.3", "minecraft:jungle_sapling"); -+ FLATTEN_MAP.put("minecraft:sapling.4", "minecraft:acacia_sapling"); -+ FLATTEN_MAP.put("minecraft:sapling.5", "minecraft:dark_oak_sapling"); -+ FLATTEN_MAP.put("minecraft:planks.0", "minecraft:oak_planks"); -+ FLATTEN_MAP.put("minecraft:planks.1", "minecraft:spruce_planks"); -+ FLATTEN_MAP.put("minecraft:planks.2", "minecraft:birch_planks"); -+ FLATTEN_MAP.put("minecraft:planks.3", "minecraft:jungle_planks"); -+ FLATTEN_MAP.put("minecraft:planks.4", "minecraft:acacia_planks"); -+ FLATTEN_MAP.put("minecraft:planks.5", "minecraft:dark_oak_planks"); -+ FLATTEN_MAP.put("minecraft:sand.0", "minecraft:sand"); -+ FLATTEN_MAP.put("minecraft:sand.1", "minecraft:red_sand"); -+ FLATTEN_MAP.put("minecraft:quartz_block.0", "minecraft:quartz_block"); -+ FLATTEN_MAP.put("minecraft:quartz_block.1", "minecraft:chiseled_quartz_block"); -+ FLATTEN_MAP.put("minecraft:quartz_block.2", "minecraft:quartz_pillar"); -+ FLATTEN_MAP.put("minecraft:anvil.0", "minecraft:anvil"); -+ FLATTEN_MAP.put("minecraft:anvil.1", "minecraft:chipped_anvil"); -+ FLATTEN_MAP.put("minecraft:anvil.2", "minecraft:damaged_anvil"); -+ FLATTEN_MAP.put("minecraft:wool.0", "minecraft:white_wool"); -+ FLATTEN_MAP.put("minecraft:wool.1", "minecraft:orange_wool"); -+ FLATTEN_MAP.put("minecraft:wool.2", "minecraft:magenta_wool"); -+ FLATTEN_MAP.put("minecraft:wool.3", "minecraft:light_blue_wool"); -+ FLATTEN_MAP.put("minecraft:wool.4", "minecraft:yellow_wool"); -+ FLATTEN_MAP.put("minecraft:wool.5", "minecraft:lime_wool"); -+ FLATTEN_MAP.put("minecraft:wool.6", "minecraft:pink_wool"); -+ FLATTEN_MAP.put("minecraft:wool.7", "minecraft:gray_wool"); -+ FLATTEN_MAP.put("minecraft:wool.8", "minecraft:light_gray_wool"); -+ FLATTEN_MAP.put("minecraft:wool.9", "minecraft:cyan_wool"); -+ FLATTEN_MAP.put("minecraft:wool.10", "minecraft:purple_wool"); -+ FLATTEN_MAP.put("minecraft:wool.11", "minecraft:blue_wool"); -+ FLATTEN_MAP.put("minecraft:wool.12", "minecraft:brown_wool"); -+ FLATTEN_MAP.put("minecraft:wool.13", "minecraft:green_wool"); -+ FLATTEN_MAP.put("minecraft:wool.14", "minecraft:red_wool"); -+ FLATTEN_MAP.put("minecraft:wool.15", "minecraft:black_wool"); -+ FLATTEN_MAP.put("minecraft:carpet.0", "minecraft:white_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.1", "minecraft:orange_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.2", "minecraft:magenta_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.3", "minecraft:light_blue_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.4", "minecraft:yellow_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.5", "minecraft:lime_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.6", "minecraft:pink_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.7", "minecraft:gray_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.8", "minecraft:light_gray_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.9", "minecraft:cyan_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.10", "minecraft:purple_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.11", "minecraft:blue_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.12", "minecraft:brown_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.13", "minecraft:green_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.14", "minecraft:red_carpet"); -+ FLATTEN_MAP.put("minecraft:carpet.15", "minecraft:black_carpet"); -+ FLATTEN_MAP.put("minecraft:hardened_clay.0", "minecraft:terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.0", "minecraft:white_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.1", "minecraft:orange_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.2", "minecraft:magenta_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.3", "minecraft:light_blue_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.4", "minecraft:yellow_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.5", "minecraft:lime_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.6", "minecraft:pink_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.7", "minecraft:gray_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.8", "minecraft:light_gray_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.9", "minecraft:cyan_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.10", "minecraft:purple_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.11", "minecraft:blue_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.12", "minecraft:brown_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.13", "minecraft:green_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.14", "minecraft:red_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_hardened_clay.15", "minecraft:black_terracotta"); -+ FLATTEN_MAP.put("minecraft:silver_glazed_terracotta.0", "minecraft:light_gray_glazed_terracotta"); -+ FLATTEN_MAP.put("minecraft:stained_glass.0", "minecraft:white_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.1", "minecraft:orange_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.2", "minecraft:magenta_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.3", "minecraft:light_blue_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.4", "minecraft:yellow_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.5", "minecraft:lime_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.6", "minecraft:pink_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.7", "minecraft:gray_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.8", "minecraft:light_gray_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.9", "minecraft:cyan_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.10", "minecraft:purple_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.11", "minecraft:blue_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.12", "minecraft:brown_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.13", "minecraft:green_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.14", "minecraft:red_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass.15", "minecraft:black_stained_glass"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.0", "minecraft:white_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.1", "minecraft:orange_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.2", "minecraft:magenta_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.3", "minecraft:light_blue_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.4", "minecraft:yellow_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.5", "minecraft:lime_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.6", "minecraft:pink_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.7", "minecraft:gray_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.8", "minecraft:light_gray_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.9", "minecraft:cyan_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.10", "minecraft:purple_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.11", "minecraft:blue_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.12", "minecraft:brown_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.13", "minecraft:green_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.14", "minecraft:red_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:stained_glass_pane.15", "minecraft:black_stained_glass_pane"); -+ FLATTEN_MAP.put("minecraft:prismarine.0", "minecraft:prismarine"); -+ FLATTEN_MAP.put("minecraft:prismarine.1", "minecraft:prismarine_bricks"); -+ FLATTEN_MAP.put("minecraft:prismarine.2", "minecraft:dark_prismarine"); -+ FLATTEN_MAP.put("minecraft:concrete.0", "minecraft:white_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.1", "minecraft:orange_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.2", "minecraft:magenta_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.3", "minecraft:light_blue_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.4", "minecraft:yellow_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.5", "minecraft:lime_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.6", "minecraft:pink_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.7", "minecraft:gray_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.8", "minecraft:light_gray_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.9", "minecraft:cyan_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.10", "minecraft:purple_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.11", "minecraft:blue_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.12", "minecraft:brown_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.13", "minecraft:green_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.14", "minecraft:red_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete.15", "minecraft:black_concrete"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.0", "minecraft:white_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.1", "minecraft:orange_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.2", "minecraft:magenta_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.3", "minecraft:light_blue_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.4", "minecraft:yellow_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.5", "minecraft:lime_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.6", "minecraft:pink_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.7", "minecraft:gray_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.8", "minecraft:light_gray_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.9", "minecraft:cyan_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.10", "minecraft:purple_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.11", "minecraft:blue_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.12", "minecraft:brown_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.13", "minecraft:green_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.14", "minecraft:red_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:concrete_powder.15", "minecraft:black_concrete_powder"); -+ FLATTEN_MAP.put("minecraft:cobblestone_wall.0", "minecraft:cobblestone_wall"); -+ FLATTEN_MAP.put("minecraft:cobblestone_wall.1", "minecraft:mossy_cobblestone_wall"); -+ FLATTEN_MAP.put("minecraft:sandstone.0", "minecraft:sandstone"); -+ FLATTEN_MAP.put("minecraft:sandstone.1", "minecraft:chiseled_sandstone"); -+ FLATTEN_MAP.put("minecraft:sandstone.2", "minecraft:cut_sandstone"); -+ FLATTEN_MAP.put("minecraft:red_sandstone.0", "minecraft:red_sandstone"); -+ FLATTEN_MAP.put("minecraft:red_sandstone.1", "minecraft:chiseled_red_sandstone"); -+ FLATTEN_MAP.put("minecraft:red_sandstone.2", "minecraft:cut_red_sandstone"); -+ FLATTEN_MAP.put("minecraft:stonebrick.0", "minecraft:stone_bricks"); -+ FLATTEN_MAP.put("minecraft:stonebrick.1", "minecraft:mossy_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:stonebrick.2", "minecraft:cracked_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:stonebrick.3", "minecraft:chiseled_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:monster_egg.0", "minecraft:infested_stone"); -+ FLATTEN_MAP.put("minecraft:monster_egg.1", "minecraft:infested_cobblestone"); -+ FLATTEN_MAP.put("minecraft:monster_egg.2", "minecraft:infested_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:monster_egg.3", "minecraft:infested_mossy_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:monster_egg.4", "minecraft:infested_cracked_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:monster_egg.5", "minecraft:infested_chiseled_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:yellow_flower.0", "minecraft:dandelion"); -+ FLATTEN_MAP.put("minecraft:red_flower.0", "minecraft:poppy"); -+ FLATTEN_MAP.put("minecraft:red_flower.1", "minecraft:blue_orchid"); -+ FLATTEN_MAP.put("minecraft:red_flower.2", "minecraft:allium"); -+ FLATTEN_MAP.put("minecraft:red_flower.3", "minecraft:azure_bluet"); -+ FLATTEN_MAP.put("minecraft:red_flower.4", "minecraft:red_tulip"); -+ FLATTEN_MAP.put("minecraft:red_flower.5", "minecraft:orange_tulip"); -+ FLATTEN_MAP.put("minecraft:red_flower.6", "minecraft:white_tulip"); -+ FLATTEN_MAP.put("minecraft:red_flower.7", "minecraft:pink_tulip"); -+ FLATTEN_MAP.put("minecraft:red_flower.8", "minecraft:oxeye_daisy"); -+ FLATTEN_MAP.put("minecraft:double_plant.0", "minecraft:sunflower"); -+ FLATTEN_MAP.put("minecraft:double_plant.1", "minecraft:lilac"); -+ FLATTEN_MAP.put("minecraft:double_plant.2", "minecraft:tall_grass"); -+ FLATTEN_MAP.put("minecraft:double_plant.3", "minecraft:large_fern"); -+ FLATTEN_MAP.put("minecraft:double_plant.4", "minecraft:rose_bush"); -+ FLATTEN_MAP.put("minecraft:double_plant.5", "minecraft:peony"); -+ FLATTEN_MAP.put("minecraft:deadbush.0", "minecraft:dead_bush"); -+ FLATTEN_MAP.put("minecraft:tallgrass.0", "minecraft:dead_bush"); -+ FLATTEN_MAP.put("minecraft:tallgrass.1", "minecraft:grass"); -+ FLATTEN_MAP.put("minecraft:tallgrass.2", "minecraft:fern"); -+ FLATTEN_MAP.put("minecraft:sponge.0", "minecraft:sponge"); -+ FLATTEN_MAP.put("minecraft:sponge.1", "minecraft:wet_sponge"); -+ FLATTEN_MAP.put("minecraft:purpur_slab.0", "minecraft:purpur_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.0", "minecraft:stone_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.1", "minecraft:sandstone_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.2", "minecraft:petrified_oak_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.3", "minecraft:cobblestone_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.4", "minecraft:brick_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.5", "minecraft:stone_brick_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.6", "minecraft:nether_brick_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab.7", "minecraft:quartz_slab"); -+ FLATTEN_MAP.put("minecraft:stone_slab2.0", "minecraft:red_sandstone_slab"); -+ FLATTEN_MAP.put("minecraft:wooden_slab.0", "minecraft:oak_slab"); -+ FLATTEN_MAP.put("minecraft:wooden_slab.1", "minecraft:spruce_slab"); -+ FLATTEN_MAP.put("minecraft:wooden_slab.2", "minecraft:birch_slab"); -+ FLATTEN_MAP.put("minecraft:wooden_slab.3", "minecraft:jungle_slab"); -+ FLATTEN_MAP.put("minecraft:wooden_slab.4", "minecraft:acacia_slab"); -+ FLATTEN_MAP.put("minecraft:wooden_slab.5", "minecraft:dark_oak_slab"); -+ FLATTEN_MAP.put("minecraft:coal.0", "minecraft:coal"); -+ FLATTEN_MAP.put("minecraft:coal.1", "minecraft:charcoal"); -+ FLATTEN_MAP.put("minecraft:fish.0", "minecraft:cod"); -+ FLATTEN_MAP.put("minecraft:fish.1", "minecraft:salmon"); -+ FLATTEN_MAP.put("minecraft:fish.2", "minecraft:clownfish"); -+ FLATTEN_MAP.put("minecraft:fish.3", "minecraft:pufferfish"); -+ FLATTEN_MAP.put("minecraft:cooked_fish.0", "minecraft:cooked_cod"); -+ FLATTEN_MAP.put("minecraft:cooked_fish.1", "minecraft:cooked_salmon"); -+ FLATTEN_MAP.put("minecraft:skull.0", "minecraft:skeleton_skull"); -+ FLATTEN_MAP.put("minecraft:skull.1", "minecraft:wither_skeleton_skull"); -+ FLATTEN_MAP.put("minecraft:skull.2", "minecraft:zombie_head"); -+ FLATTEN_MAP.put("minecraft:skull.3", "minecraft:player_head"); -+ FLATTEN_MAP.put("minecraft:skull.4", "minecraft:creeper_head"); -+ FLATTEN_MAP.put("minecraft:skull.5", "minecraft:dragon_head"); -+ FLATTEN_MAP.put("minecraft:golden_apple.0", "minecraft:golden_apple"); -+ FLATTEN_MAP.put("minecraft:golden_apple.1", "minecraft:enchanted_golden_apple"); -+ FLATTEN_MAP.put("minecraft:fireworks.0", "minecraft:firework_rocket"); -+ FLATTEN_MAP.put("minecraft:firework_charge.0", "minecraft:firework_star"); -+ FLATTEN_MAP.put("minecraft:dye.0", "minecraft:ink_sac"); -+ FLATTEN_MAP.put("minecraft:dye.1", "minecraft:rose_red"); -+ FLATTEN_MAP.put("minecraft:dye.2", "minecraft:cactus_green"); -+ FLATTEN_MAP.put("minecraft:dye.3", "minecraft:cocoa_beans"); -+ FLATTEN_MAP.put("minecraft:dye.4", "minecraft:lapis_lazuli"); -+ FLATTEN_MAP.put("minecraft:dye.5", "minecraft:purple_dye"); -+ FLATTEN_MAP.put("minecraft:dye.6", "minecraft:cyan_dye"); -+ FLATTEN_MAP.put("minecraft:dye.7", "minecraft:light_gray_dye"); -+ FLATTEN_MAP.put("minecraft:dye.8", "minecraft:gray_dye"); -+ FLATTEN_MAP.put("minecraft:dye.9", "minecraft:pink_dye"); -+ FLATTEN_MAP.put("minecraft:dye.10", "minecraft:lime_dye"); -+ FLATTEN_MAP.put("minecraft:dye.11", "minecraft:dandelion_yellow"); -+ FLATTEN_MAP.put("minecraft:dye.12", "minecraft:light_blue_dye"); -+ FLATTEN_MAP.put("minecraft:dye.13", "minecraft:magenta_dye"); -+ FLATTEN_MAP.put("minecraft:dye.14", "minecraft:orange_dye"); -+ FLATTEN_MAP.put("minecraft:dye.15", "minecraft:bone_meal"); -+ FLATTEN_MAP.put("minecraft:silver_shulker_box.0", "minecraft:light_gray_shulker_box"); -+ FLATTEN_MAP.put("minecraft:fence.0", "minecraft:oak_fence"); -+ FLATTEN_MAP.put("minecraft:fence_gate.0", "minecraft:oak_fence_gate"); -+ FLATTEN_MAP.put("minecraft:wooden_door.0", "minecraft:oak_door"); -+ FLATTEN_MAP.put("minecraft:boat.0", "minecraft:oak_boat"); -+ FLATTEN_MAP.put("minecraft:lit_pumpkin.0", "minecraft:jack_o_lantern"); -+ FLATTEN_MAP.put("minecraft:pumpkin.0", "minecraft:carved_pumpkin"); -+ FLATTEN_MAP.put("minecraft:trapdoor.0", "minecraft:oak_trapdoor"); -+ FLATTEN_MAP.put("minecraft:nether_brick.0", "minecraft:nether_bricks"); -+ FLATTEN_MAP.put("minecraft:red_nether_brick.0", "minecraft:red_nether_bricks"); -+ FLATTEN_MAP.put("minecraft:netherbrick.0", "minecraft:nether_brick"); -+ FLATTEN_MAP.put("minecraft:wooden_button.0", "minecraft:oak_button"); -+ FLATTEN_MAP.put("minecraft:wooden_pressure_plate.0", "minecraft:oak_pressure_plate"); -+ FLATTEN_MAP.put("minecraft:noteblock.0", "minecraft:note_block"); -+ FLATTEN_MAP.put("minecraft:bed.0", "minecraft:white_bed"); -+ FLATTEN_MAP.put("minecraft:bed.1", "minecraft:orange_bed"); -+ FLATTEN_MAP.put("minecraft:bed.2", "minecraft:magenta_bed"); -+ FLATTEN_MAP.put("minecraft:bed.3", "minecraft:light_blue_bed"); -+ FLATTEN_MAP.put("minecraft:bed.4", "minecraft:yellow_bed"); -+ FLATTEN_MAP.put("minecraft:bed.5", "minecraft:lime_bed"); -+ FLATTEN_MAP.put("minecraft:bed.6", "minecraft:pink_bed"); -+ FLATTEN_MAP.put("minecraft:bed.7", "minecraft:gray_bed"); -+ FLATTEN_MAP.put("minecraft:bed.8", "minecraft:light_gray_bed"); -+ FLATTEN_MAP.put("minecraft:bed.9", "minecraft:cyan_bed"); -+ FLATTEN_MAP.put("minecraft:bed.10", "minecraft:purple_bed"); -+ FLATTEN_MAP.put("minecraft:bed.11", "minecraft:blue_bed"); -+ FLATTEN_MAP.put("minecraft:bed.12", "minecraft:brown_bed"); -+ FLATTEN_MAP.put("minecraft:bed.13", "minecraft:green_bed"); -+ FLATTEN_MAP.put("minecraft:bed.14", "minecraft:red_bed"); -+ FLATTEN_MAP.put("minecraft:bed.15", "minecraft:black_bed"); -+ FLATTEN_MAP.put("minecraft:banner.15", "minecraft:white_banner"); -+ FLATTEN_MAP.put("minecraft:banner.14", "minecraft:orange_banner"); -+ FLATTEN_MAP.put("minecraft:banner.13", "minecraft:magenta_banner"); -+ FLATTEN_MAP.put("minecraft:banner.12", "minecraft:light_blue_banner"); -+ FLATTEN_MAP.put("minecraft:banner.11", "minecraft:yellow_banner"); -+ FLATTEN_MAP.put("minecraft:banner.10", "minecraft:lime_banner"); -+ FLATTEN_MAP.put("minecraft:banner.9", "minecraft:pink_banner"); -+ FLATTEN_MAP.put("minecraft:banner.8", "minecraft:gray_banner"); -+ FLATTEN_MAP.put("minecraft:banner.7", "minecraft:light_gray_banner"); -+ FLATTEN_MAP.put("minecraft:banner.6", "minecraft:cyan_banner"); -+ FLATTEN_MAP.put("minecraft:banner.5", "minecraft:purple_banner"); -+ FLATTEN_MAP.put("minecraft:banner.4", "minecraft:blue_banner"); -+ FLATTEN_MAP.put("minecraft:banner.3", "minecraft:brown_banner"); -+ FLATTEN_MAP.put("minecraft:banner.2", "minecraft:green_banner"); -+ FLATTEN_MAP.put("minecraft:banner.1", "minecraft:red_banner"); -+ FLATTEN_MAP.put("minecraft:banner.0", "minecraft:black_banner"); -+ FLATTEN_MAP.put("minecraft:grass.0", "minecraft:grass_block"); -+ FLATTEN_MAP.put("minecraft:brick_block.0", "minecraft:bricks"); -+ FLATTEN_MAP.put("minecraft:end_bricks.0", "minecraft:end_stone_bricks"); -+ FLATTEN_MAP.put("minecraft:golden_rail.0", "minecraft:powered_rail"); -+ FLATTEN_MAP.put("minecraft:magma.0", "minecraft:magma_block"); -+ FLATTEN_MAP.put("minecraft:quartz_ore.0", "minecraft:nether_quartz_ore"); -+ FLATTEN_MAP.put("minecraft:reeds.0", "minecraft:sugar_cane"); -+ FLATTEN_MAP.put("minecraft:slime.0", "minecraft:slime_block"); -+ FLATTEN_MAP.put("minecraft:stone_stairs.0", "minecraft:cobblestone_stairs"); -+ FLATTEN_MAP.put("minecraft:waterlily.0", "minecraft:lily_pad"); -+ FLATTEN_MAP.put("minecraft:web.0", "minecraft:cobweb"); -+ FLATTEN_MAP.put("minecraft:snow.0", "minecraft:snow_block"); -+ FLATTEN_MAP.put("minecraft:snow_layer.0", "minecraft:snow"); -+ FLATTEN_MAP.put("minecraft:record_11.0", "minecraft:music_disc_11"); -+ FLATTEN_MAP.put("minecraft:record_13.0", "minecraft:music_disc_13"); -+ FLATTEN_MAP.put("minecraft:record_blocks.0", "minecraft:music_disc_blocks"); -+ FLATTEN_MAP.put("minecraft:record_cat.0", "minecraft:music_disc_cat"); -+ FLATTEN_MAP.put("minecraft:record_chirp.0", "minecraft:music_disc_chirp"); -+ FLATTEN_MAP.put("minecraft:record_far.0", "minecraft:music_disc_far"); -+ FLATTEN_MAP.put("minecraft:record_mall.0", "minecraft:music_disc_mall"); -+ FLATTEN_MAP.put("minecraft:record_mellohi.0", "minecraft:music_disc_mellohi"); -+ FLATTEN_MAP.put("minecraft:record_stal.0", "minecraft:music_disc_stal"); -+ FLATTEN_MAP.put("minecraft:record_strad.0", "minecraft:music_disc_strad"); -+ FLATTEN_MAP.put("minecraft:record_wait.0", "minecraft:music_disc_wait"); -+ FLATTEN_MAP.put("minecraft:record_ward.0", "minecraft:music_disc_ward"); -+ } -+ -+ // maps out ids requiring flattening -+ private static final Set IDS_REQUIRING_FLATTENING = new HashSet<>(); -+ static { -+ for (final String key : FLATTEN_MAP.keySet()) { -+ IDS_REQUIRING_FLATTENING.add(key.substring(0, key.indexOf('.'))); -+ } -+ } -+ -+ // Damage tag is moved from the ItemStack base tag to the ItemStack tag, and we only want to migrate that -+ // for items that actually require it for damage purposes (Remember, old damage was used to differentiate item types) -+ // It should be noted that this ID set should not be included in the flattening map, because damage for these items -+ // is actual damage and not a subtype specifier -+ private static final Set ITEMS_WITH_DAMAGE = new HashSet<>(Arrays.asList( -+ "minecraft:bow", -+ "minecraft:carrot_on_a_stick", -+ "minecraft:chainmail_boots", -+ "minecraft:chainmail_chestplate", -+ "minecraft:chainmail_helmet", -+ "minecraft:chainmail_leggings", -+ "minecraft:diamond_axe", -+ "minecraft:diamond_boots", -+ "minecraft:diamond_chestplate", -+ "minecraft:diamond_helmet", -+ "minecraft:diamond_hoe", -+ "minecraft:diamond_leggings", -+ "minecraft:diamond_pickaxe", -+ "minecraft:diamond_shovel", -+ "minecraft:diamond_sword", -+ "minecraft:elytra", -+ "minecraft:fishing_rod", -+ "minecraft:flint_and_steel", -+ "minecraft:golden_axe", -+ "minecraft:golden_boots", -+ "minecraft:golden_chestplate", -+ "minecraft:golden_helmet", -+ "minecraft:golden_hoe", -+ "minecraft:golden_leggings", -+ "minecraft:golden_pickaxe", -+ "minecraft:golden_shovel", -+ "minecraft:golden_sword", -+ "minecraft:iron_axe", -+ "minecraft:iron_boots", -+ "minecraft:iron_chestplate", -+ "minecraft:iron_helmet", -+ "minecraft:iron_hoe", -+ "minecraft:iron_leggings", -+ "minecraft:iron_pickaxe", -+ "minecraft:iron_shovel", -+ "minecraft:iron_sword", -+ "minecraft:leather_boots", -+ "minecraft:leather_chestplate", -+ "minecraft:leather_helmet", -+ "minecraft:leather_leggings", -+ "minecraft:shears", -+ "minecraft:shield", -+ "minecraft:stone_axe", -+ "minecraft:stone_hoe", -+ "minecraft:stone_pickaxe", -+ "minecraft:stone_shovel", -+ "minecraft:stone_sword", -+ "minecraft:wooden_axe", -+ "minecraft:wooden_hoe", -+ "minecraft:wooden_pickaxe", -+ "minecraft:wooden_shovel", -+ "minecraft:wooden_sword" -+ )); -+ -+ public ConverterFlattenItemStack() { -+ super(MCVersions.V17W47A, 4); -+ } -+ -+ public static String flattenItem(final String oldName, final int data) { -+ if (IDS_REQUIRING_FLATTENING.contains(oldName)) { -+ final String flattened = FLATTEN_MAP.get(oldName + '.' + data); -+ return flattened == null ? FLATTEN_MAP.get(oldName.concat(".0")) : flattened; -+ } else { -+ return null; -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ -+ if (id == null) { -+ return null; -+ } -+ -+ final int damage = data.getInt("Damage"); -+ data.remove("Damage"); -+ -+ if (IDS_REQUIRING_FLATTENING.contains(id)) { -+ String remap = FLATTEN_MAP.get(id + '.' + damage); -+ if (remap == null) { -+ remap = FLATTEN_MAP.get(id.concat(".0")); -+ // this shouldn't be null -+ } -+ if (remap != null) { -+ data.setString("id", remap); -+ } else { -+ LOGGER.warn("Item '" + id + "' requires flattening but found no mapping for it! (ConverterFlattenItemStack)"); -+ } -+ } -+ -+ if (damage != 0 && ITEMS_WITH_DAMAGE.contains(id)) { -+ // migrate damage -+ MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ tag = Types.NBT.createEmptyMap(); -+ data.setMap("tag", tag); -+ } -+ tag.setInt("Damage", damage); -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenSpawnEgg.java b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenSpawnEgg.java -new file mode 100644 -index 0000000000000000000000000000000000000000..32d498fac143f40124dc69fa0cf566f1ac33545c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterFlattenSpawnEgg.java -@@ -0,0 +1,87 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.itemstack; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class ConverterFlattenSpawnEgg extends DataConverter { -+ -+ private static final Map ENTITY_ID_TO_NEW_EGG_ID = new HashMap<>(); -+ static { -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:bat", "minecraft:bat_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:blaze", "minecraft:blaze_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:cave_spider", "minecraft:cave_spider_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:chicken", "minecraft:chicken_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:cow", "minecraft:cow_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:creeper", "minecraft:creeper_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:donkey", "minecraft:donkey_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:elder_guardian", "minecraft:elder_guardian_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:ender_dragon", "minecraft:ender_dragon_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:enderman", "minecraft:enderman_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:endermite", "minecraft:endermite_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:evocation_illager", "minecraft:evocation_illager_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:ghast", "minecraft:ghast_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:guardian", "minecraft:guardian_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:horse", "minecraft:horse_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:husk", "minecraft:husk_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:iron_golem", "minecraft:iron_golem_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:llama", "minecraft:llama_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:magma_cube", "minecraft:magma_cube_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:mooshroom", "minecraft:mooshroom_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:mule", "minecraft:mule_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:ocelot", "minecraft:ocelot_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:pufferfish", "minecraft:pufferfish_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:parrot", "minecraft:parrot_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:pig", "minecraft:pig_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:polar_bear", "minecraft:polar_bear_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:rabbit", "minecraft:rabbit_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:sheep", "minecraft:sheep_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:shulker", "minecraft:shulker_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:silverfish", "minecraft:silverfish_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:skeleton", "minecraft:skeleton_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:skeleton_horse", "minecraft:skeleton_horse_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:slime", "minecraft:slime_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:snow_golem", "minecraft:snow_golem_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:spider", "minecraft:spider_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:squid", "minecraft:squid_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:stray", "minecraft:stray_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:turtle", "minecraft:turtle_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:vex", "minecraft:vex_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:villager", "minecraft:villager_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:vindication_illager", "minecraft:vindication_illager_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:witch", "minecraft:witch_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:wither", "minecraft:wither_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:wither_skeleton", "minecraft:wither_skeleton_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:wolf", "minecraft:wolf_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:zombie", "minecraft:zombie_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:zombie_horse", "minecraft:zombie_horse_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:zombie_pigman", "minecraft:zombie_pigman_spawn_egg"); -+ ENTITY_ID_TO_NEW_EGG_ID.put("minecraft:zombie_villager", "minecraft:zombie_villager_spawn_egg"); -+ } -+ -+ public ConverterFlattenSpawnEgg(final int version, final int versionStep) { -+ super(version, versionStep); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final MapType entityTag = tag.getMap("EntityTag"); -+ if (entityTag == null) { -+ return null; -+ } -+ -+ final String id = entityTag.getString("id"); -+ if (id != null) { -+ data.setString("id", ENTITY_ID_TO_NEW_EGG_ID.getOrDefault(id, "minecraft:pig_spawn_egg")); -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterItemStackToDataComponents.java b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterItemStackToDataComponents.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d5c5b711406f63a3e35ae7e5bfbf1d306bee4f1c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterItemStackToDataComponents.java -@@ -0,0 +1,1244 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.itemstack; -+ -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.minecraft.versions.V3818; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import net.minecraft.util.Mth; -+import java.util.Arrays; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class ConverterItemStackToDataComponents { -+ -+ private static final int TOOLTIP_FLAG_HIDE_ENCHANTMENTS = 1 << 0; -+ private static final int TOOLTIP_FLAG_HIDE_MODIFIERS = 1 << 1; -+ private static final int TOOLTIP_FLAG_HIDE_UNBREAKABLE = 1 << 2; -+ private static final int TOOLTIP_FLAG_HIDE_CAN_DESTROY = 1 << 3; -+ private static final int TOOLTIP_FLAG_HIDE_CAN_PLACE = 1 << 4; -+ private static final int TOOLTIP_FLAG_HIDE_ADDITIONAL = 1 << 5; -+ private static final int TOOLTIP_FLAG_HIDE_DYE = 1 << 6; -+ private static final int TOOLTIP_FLAG_HIDE_UPGRADES = 1 << 7; -+ -+ private static final int DEFAULT_LEATHER_COLOUR = (160 << 16) | (101 << 8) | (64 << 0); // r, g, b -+ -+ private static final String[] BUCKETED_MOB_TAGS = new String[] { -+ "NoAI", -+ "Silent", -+ "NoGravity", -+ "Glowing", -+ "Invulnerable", -+ "Health", -+ "Age", -+ "Variant", -+ "HuntingCooldown", -+ "BucketVariantTag" -+ }; -+ private static final Set BOOLEAN_BLOCK_STATE_PROPERTIES = new HashSet<>( -+ Arrays.asList( -+ "attached", -+ "bottom", -+ "conditional", -+ "disarmed", -+ "drag", -+ "enabled", -+ "extended", -+ "eye", -+ "falling", -+ "hanging", -+ "has_bottle_0", -+ "has_bottle_1", -+ "has_bottle_2", -+ "has_record", -+ "has_book", -+ "inverted", -+ "in_wall", -+ "lit", -+ "locked", -+ "occupied", -+ "open", -+ "persistent", -+ "powered", -+ "short", -+ "signal_fire", -+ "snowy", -+ "triggered", -+ "unstable", -+ "waterlogged", -+ "berries", -+ "bloom", -+ "shrieking", -+ "can_summon", -+ "up", -+ "down", -+ "north", -+ "east", -+ "south", -+ "west", -+ "slot_0_occupied", -+ "slot_1_occupied", -+ "slot_2_occupied", -+ "slot_3_occupied", -+ "slot_4_occupied", -+ "slot_5_occupied", -+ "cracked", -+ "crafting" -+ ) -+ ); -+ private static final String[] MAP_DECORATION_CONVERSION_TABLE = new String[34]; -+ static { -+ MAP_DECORATION_CONVERSION_TABLE[0] = "player"; -+ MAP_DECORATION_CONVERSION_TABLE[1] = "frame"; -+ MAP_DECORATION_CONVERSION_TABLE[2] = "red_marker"; -+ MAP_DECORATION_CONVERSION_TABLE[3] = "blue_marker"; -+ MAP_DECORATION_CONVERSION_TABLE[4] = "target_x"; -+ MAP_DECORATION_CONVERSION_TABLE[5] = "target_point"; -+ MAP_DECORATION_CONVERSION_TABLE[6] = "player_off_map"; -+ MAP_DECORATION_CONVERSION_TABLE[7] = "player_off_limits"; -+ MAP_DECORATION_CONVERSION_TABLE[8] = "mansion"; -+ MAP_DECORATION_CONVERSION_TABLE[9] = "monument"; -+ MAP_DECORATION_CONVERSION_TABLE[10] = "banner_white"; -+ MAP_DECORATION_CONVERSION_TABLE[11] = "banner_orange"; -+ MAP_DECORATION_CONVERSION_TABLE[12] = "banner_magenta"; -+ MAP_DECORATION_CONVERSION_TABLE[13] = "banner_light_blue"; -+ MAP_DECORATION_CONVERSION_TABLE[14] = "banner_yellow"; -+ MAP_DECORATION_CONVERSION_TABLE[15] = "banner_lime"; -+ MAP_DECORATION_CONVERSION_TABLE[16] = "banner_pink"; -+ MAP_DECORATION_CONVERSION_TABLE[17] = "banner_gray"; -+ MAP_DECORATION_CONVERSION_TABLE[18] = "banner_light_gray"; -+ MAP_DECORATION_CONVERSION_TABLE[19] = "banner_cyan"; -+ MAP_DECORATION_CONVERSION_TABLE[20] = "banner_purple"; -+ MAP_DECORATION_CONVERSION_TABLE[21] = "banner_blue"; -+ MAP_DECORATION_CONVERSION_TABLE[22] = "banner_brown"; -+ MAP_DECORATION_CONVERSION_TABLE[23] = "banner_green"; -+ MAP_DECORATION_CONVERSION_TABLE[24] = "banner_red"; -+ MAP_DECORATION_CONVERSION_TABLE[25] = "banner_black"; -+ MAP_DECORATION_CONVERSION_TABLE[26] = "red_x"; -+ MAP_DECORATION_CONVERSION_TABLE[27] = "village_desert"; -+ MAP_DECORATION_CONVERSION_TABLE[28] = "village_plains"; -+ MAP_DECORATION_CONVERSION_TABLE[29] = "village_savanna"; -+ MAP_DECORATION_CONVERSION_TABLE[30] = "village_snowy"; -+ MAP_DECORATION_CONVERSION_TABLE[31] = "village_taiga"; -+ MAP_DECORATION_CONVERSION_TABLE[32] = "jungle_temple"; -+ MAP_DECORATION_CONVERSION_TABLE[33] = "swamp_hut"; -+ } -+ -+ private static String convertMapDecorationId(final int type) { -+ return type >= 0 && type < MAP_DECORATION_CONVERSION_TABLE.length ? MAP_DECORATION_CONVERSION_TABLE[type] : MAP_DECORATION_CONVERSION_TABLE[0]; -+ } -+ -+ private static void convertBlockStateProperties(final MapType properties) { -+ // convert values stored as boolean/integer to string -+ for (final String key : properties.keys()) { -+ final Object value = properties.getGeneric(key); -+ if (value instanceof Number number) { -+ if (BOOLEAN_BLOCK_STATE_PROPERTIES.contains(key)) { -+ properties.setString(key, Boolean.toString(number.byteValue() != (byte)0)); -+ } else { -+ properties.setString(key, number.toString()); -+ } -+ } -+ } -+ } -+ -+ private static void convertTileEntity(final MapType tileEntity, final TransientItemStack transientItem) { -+ final Object lock = tileEntity.getGeneric("Lock"); -+ if (lock != null) { -+ tileEntity.remove("Lock"); -+ transientItem.componentSetGeneric("minecraft:lock", lock); -+ } -+ -+ final Object lootTable = tileEntity.getGeneric("LootTable"); -+ if (lootTable != null) { -+ final MapType containerLoot = tileEntity.getTypeUtil().createEmptyMap(); -+ transientItem.componentSetMap("minecraft:container_loot", containerLoot); -+ -+ containerLoot.setGeneric("loot_table", lootTable); -+ -+ final long seed = tileEntity.getLong("LootTableSeed", 0L); -+ if (seed != 0L) { -+ containerLoot.setLong("seed", seed); -+ } -+ -+ tileEntity.remove("LootTable"); -+ tileEntity.remove("LootTableSeed"); -+ } -+ -+ final String id = NamespaceUtil.correctNamespace(tileEntity.getString("id", "")); -+ -+ switch (id) { -+ case "minecraft:skull": { -+ final Object noteBlockSound = tileEntity.getGeneric("note_block_sound"); -+ if (noteBlockSound != null) { -+ tileEntity.remove("note_block_sound"); -+ transientItem.componentSetGeneric("minecraft:note_block_sound", noteBlockSound); -+ } -+ -+ break; -+ } -+ case "minecraft:decorated_pot": { -+ final Object sherds = tileEntity.getGeneric("sherds"); -+ if (sherds != null) { -+ tileEntity.remove("sherds"); -+ transientItem.componentSetGeneric("minecraft:pot_decorations", sherds); -+ } -+ -+ final Object item = tileEntity.getGeneric("item"); -+ if (item != null) { -+ tileEntity.remove("item"); -+ -+ final ListType container = tileEntity.getTypeUtil().createEmptyList(); -+ transientItem.componentSetList("minecraft:container", container); -+ -+ final MapType wrappedItem = tileEntity.getTypeUtil().createEmptyMap(); -+ container.addMap(wrappedItem); -+ -+ wrappedItem.setInt("slot", 0); -+ wrappedItem.setGeneric("item", item); -+ } -+ -+ break; -+ } -+ case "minecraft:banner": { -+ final Object patterns = tileEntity.getGeneric("patterns"); -+ if (patterns != null) { -+ tileEntity.remove("patterns"); -+ -+ transientItem.componentSetGeneric("minecraft:banner_patterns", patterns); -+ } -+ -+ final Number base = tileEntity.getNumber("Base"); -+ if (base != null) { -+ tileEntity.remove("Base"); -+ -+ transientItem.componentSetString("minecraft:base_color", V3818.getBannerColour(base.intValue())); -+ } -+ -+ break; -+ } -+ -+ case "minecraft:shulker_box": -+ case "minecraft:chest": -+ case "minecraft:trapped_chest": -+ case "minecraft:furnace": -+ case "minecraft:ender_chest": -+ case "minecraft:dispenser": -+ case "minecraft:dropper": -+ case "minecraft:brewing_stand": -+ case "minecraft:hopper": -+ case "minecraft:barrel": -+ case "minecraft:smoker": -+ case "minecraft:blast_furnace": -+ case "minecraft:campfire": -+ case "minecraft:chiseled_bookshelf": -+ case "minecraft:crafter": { -+ final ListType items = tileEntity.getList("Items", ObjectType.MAP); -+ tileEntity.remove("Items"); -+ if (items != null && items.size() > 0) { -+ transientItem.componentSetList("minecraft:container", items); -+ -+ for (int i = 0, len = items.size(); i < len; ++i) { -+ final MapType item = items.getMap(i); -+ final int slot = (int)item.getByte("Slot", (byte)0) & 0xFF; -+ item.remove("Slot"); -+ -+ final MapType wrappedItem = item.getTypeUtil().createEmptyMap(); -+ items.setMap(i, wrappedItem); -+ -+ wrappedItem.setInt("slot", slot); -+ wrappedItem.setMap("item", item); -+ } -+ } -+ -+ break; -+ } -+ -+ case "minecraft:beehive": { -+ final Object bees = tileEntity.getGeneric("bees"); -+ if (bees != null) { -+ tileEntity.remove("bees"); -+ -+ transientItem.componentSetGeneric("minecraft:bees", bees); -+ } -+ break; -+ } -+ } -+ } -+ -+ private static void convertEnchantments(final TransientItemStack transientItem, final TypeUtil type, -+ final String tagKey, final String componentKey, -+ final boolean hideToolTip) { -+ final ListType enchantments = transientItem.tagRemoveList(tagKey, ObjectType.MAP); -+ if (enchantments == null || enchantments.size() == 0) { -+ if (hideToolTip) { -+ final MapType newEnchants = type.createEmptyMap(); -+ transientItem.componentSetMap(componentKey, newEnchants); -+ -+ newEnchants.setMap("levels", type.createEmptyMap()); -+ newEnchants.setBoolean("show_in_tooltip", false); -+ } -+ } else { -+ final MapType newEnchantments = type.createEmptyMap(); -+ -+ for (int i = 0, len = enchantments.size(); i < len; ++i) { -+ final MapType enchantment = enchantments.getMap(i); -+ -+ final String id = enchantment.getString("id"); -+ final Number level = enchantment.getNumber("lvl"); -+ -+ if (id == null || level == null) { -+ continue; -+ } -+ -+ newEnchantments.setInt(id, Mth.clamp(level.intValue(), 0, 0xFF)); -+ } -+ -+ if (!newEnchantments.isEmpty() || hideToolTip) { -+ final MapType newEnchants = type.createEmptyMap(); -+ transientItem.componentSetMap(componentKey, newEnchants); -+ -+ newEnchants.setMap("levels", newEnchantments); -+ if (hideToolTip) { -+ newEnchants.setBoolean("show_in_tooltip", false); -+ } -+ } -+ } -+ -+ if (enchantments != null && enchantments.size() == 0) { -+ transientItem.componentSetBoolean("minecraft:enchantment_glint_override", true); -+ } -+ } -+ -+ private static void convertDisplay(final TransientItemStack transientItem, final TypeUtil type, final int flags) { -+ final MapType display = transientItem.tag.getMap("display"); -+ -+ if (display != null) { -+ final Object name = display.getGeneric("Name"); -+ if (name != null) { -+ display.remove("Name"); -+ -+ transientItem.componentSetGeneric("minecraft:custom_name", name); -+ } -+ -+ final Object lore = display.getGeneric("Lore"); -+ if (lore != null) { -+ display.remove("Lore"); -+ -+ transientItem.componentSetGeneric("minecraft:lore", lore); -+ } -+ } -+ -+ final Number color = display == null ? null : display.getNumber("color"); -+ final boolean hideDye = (flags & TOOLTIP_FLAG_HIDE_DYE) != 0; -+ -+ if (hideDye || color != null) { -+ if (color != null) { -+ display.remove("color"); -+ } -+ -+ final MapType dyedColor = type.createEmptyMap(); -+ transientItem.componentSetMap("minecraft:dyed_color", dyedColor); -+ -+ dyedColor.setInt("rgb", color == null ? DEFAULT_LEATHER_COLOUR : color.intValue()); -+ if (hideDye) { -+ dyedColor.setBoolean("show_in_tooltip", false); -+ } -+ } -+ -+ final Object locName = display == null ? null : display.getGeneric("LocName"); -+ if (locName != null) { -+ display.remove("LocName"); -+ -+ if (locName instanceof String locNameString) { -+ transientItem.componentSetString("minecraft:item_name", ComponentUtils.createTranslatableComponent(locNameString)); -+ } -+ } -+ -+ if (display != null && "minecraft:filled_map".equals(transientItem.id)) { -+ final Object mapColor = display.getGeneric("MapColor"); -+ if (mapColor != null) { -+ display.remove("MapColor"); -+ -+ transientItem.componentSetGeneric("minecraft:map_color", mapColor); -+ } -+ } -+ -+ // mirror behavior of fixSubTag -+ if (display != null && display.isEmpty()) { -+ transientItem.tagRemoveMap("display"); -+ } -+ } -+ -+ public static MapType convertBlockStatePredicate(final String value, final TypeUtil type) { -+ final int propertyStart = value.indexOf('['); -+ final int nbtStart = value.indexOf('{'); -+ int blockNameEnd = value.length(); -+ -+ if (propertyStart != -1) { -+ blockNameEnd = propertyStart; -+ } -+ if (nbtStart != -1) { -+ blockNameEnd = Math.min(blockNameEnd, nbtStart); -+ } -+ -+ final MapType ret = type.createEmptyMap(); -+ -+ final String blockName = value.substring(0, blockNameEnd); -+ -+ // string is fine here, the underlying type accepts string AND list under the same name... -+ ret.setString("blocks", blockName.trim()); -+ -+ if (propertyStart != -1) { -+ // unlike DFU, set the fromIndex so that on malformed data we do not IOOBE -+ final int propertyEnd = value.indexOf(']', propertyStart + 1); -+ if (propertyEnd != -1) { -+ final MapType state = type.createEmptyMap(); -+ ret.setMap("state", state); -+ -+ for (final String property : value.substring(propertyStart + 1, propertyEnd).split(",")) { -+ final int separatorIdx = property.indexOf('='); -+ if (separatorIdx == -1) { -+ continue; -+ } -+ -+ final String propertyKey = property.substring(0, separatorIdx).trim(); -+ final String propertyValue = property.substring(separatorIdx + 1); -+ -+ state.setString(propertyKey, propertyValue); -+ } -+ } -+ } -+ -+ if (nbtStart != -1) { -+ // unlike DFU, set the fromIndex so that on malformed data we do not IOOBE -+ final int nbtEnd = value.indexOf('}', nbtStart + 1); -+ if (nbtEnd != -1) { -+ // note: want to include { and } -+ ret.setString("nbt", value.substring(nbtStart, nbtEnd + 1)); -+ } -+ } -+ -+ return ret; -+ } -+ -+ private static void convertBlockStatePredicates(final TransientItemStack item, final TypeUtil type, -+ final String tagKey, final String componentKey, -+ final boolean hideInTooltip) { -+ final ListType blocks = item.tagRemoveListUnchecked(tagKey); -+ if (blocks == null) { -+ return; -+ } -+ -+ final MapType blockPredicates = type.createEmptyMap(); -+ item.componentSetMap(componentKey, blockPredicates); -+ -+ if (hideInTooltip) { -+ blockPredicates.setBoolean("show_in_tooltip", false); -+ } -+ -+ final ListType predicates = type.createEmptyList(); -+ blockPredicates.setList("predicates", predicates); -+ -+ for (int i = 0, len = blocks.size(); i < len; ++i) { -+ final Object block = blocks.getGeneric(i); -+ if (!(block instanceof String blockString)) { -+ // cannot type error here, if block is not a string then nothing in `blocks` is as they have the same type -+ predicates.addGeneric(block); -+ continue; -+ } -+ -+ final MapType predicate = convertBlockStatePredicate(blockString, type); -+ -+ predicates.addMap(predicate); -+ } -+ } -+ -+ private static void convertAdventureMode(final TransientItemStack item, final TypeUtil type, final int flags) { -+ convertBlockStatePredicates( -+ item, type, "CanDestroy", "minecraft:can_break", -+ (flags & TOOLTIP_FLAG_HIDE_CAN_DESTROY) != 0 -+ ); -+ convertBlockStatePredicates( -+ item, type, "CanPlaceOn", "minecraft:can_place_on", -+ (flags & TOOLTIP_FLAG_HIDE_CAN_PLACE) != 0 -+ ); -+ } -+ -+ private static void copy(final MapType src, final String srcKey, final MapType dst, final String dstKey) { -+ if (src == null || dst == null) { -+ return; -+ } -+ -+ final Object srcValue = src.getGeneric(srcKey); -+ if (srcValue != null) { -+ dst.setGeneric(dstKey, srcValue); -+ } -+ } -+ -+ private static MapType convertAttribute(final Object inputGeneric, final TypeUtil type) { -+ final MapType input = inputGeneric instanceof MapType casted ? (MapType)casted : null; -+ -+ final MapType ret = type.createEmptyMap(); -+ ret.setString("name", ""); -+ ret.setDouble("amount", 0.0); -+ ret.setString("operation", "add_value"); -+ -+ copy(input, "AttributeName", ret, "type"); -+ copy(input, "Slot", ret, "slot"); -+ copy(input, "UUID", ret, "uuid"); -+ copy(input, "Name", ret, "name"); -+ copy(input, "Amount", ret, "amount"); -+ -+ // note: no type check on hasKey -+ if (input != null && input.hasKey("Operation")) { -+ final String operation; -+ switch (input.getInt("Operation", 0)) { -+ case 1: { -+ operation = "add_multiplied_base"; -+ break; -+ } -+ case 2: { -+ operation = "add_multiplied_total"; -+ break; -+ } -+ default: { -+ operation = "add_value"; -+ break; -+ } -+ } -+ ret.setString("operation", operation); -+ } -+ -+ return ret; -+ } -+ -+ private static void convertAttributes(final TransientItemStack item, final TypeUtil type, final int flags) { -+ final ListType attributes = item.tagRemoveListUnchecked("AttributeModifiers"); -+ final ListType newAttributes = type.createEmptyList(); -+ -+ if (attributes != null) { -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ newAttributes.addMap(convertAttribute(attributes.getGeneric(i), type)); -+ } -+ } -+ -+ if (newAttributes.size() > 0) { -+ final MapType newModifiers = type.createEmptyMap(); -+ item.componentSetMap("minecraft:attribute_modifiers", newModifiers); -+ -+ newModifiers.setList("modifiers", newAttributes); -+ -+ final boolean hideModifiers = (flags & TOOLTIP_FLAG_HIDE_MODIFIERS) != 0; -+ if (hideModifiers) { -+ newModifiers.setBoolean("show_in_tooltip", false); -+ } -+ } -+ } -+ -+ private static void convertMap(final TransientItemStack item, final TypeUtil type) { -+ item.tagMigrateToComponent("map", "minecraft:map_id"); -+ -+ final ListType decorations = item.tagRemoveListUnchecked("Decorations"); -+ if (decorations != null) { -+ final MapType newDecorations = type.createEmptyMap(); -+ -+ for (int i = 0, len = decorations.size(); i < len; ++i) { -+ final Object decorationGeneric = decorations.getGeneric(i); -+ -+ final MapType decoration = decorationGeneric instanceof MapType casted ? (MapType)casted : null; -+ -+ final String id = decoration == null ? "" : decoration.getString("id", ""); -+ if (newDecorations.hasKey(id)) { -+ // note: never replace existing decorations by id -+ continue; -+ } -+ -+ final int typeId = decoration == null ? 0 : decoration.getInt("type", 0); -+ final double x = decoration == null ? 0.0 : decoration.getDouble("x", 0.0); -+ final double z = decoration == null ? 0.0 : decoration.getDouble("z", 0.0); -+ final float rot = decoration == null ? 0.0f : (float)decoration.getDouble("rot", 0.0); -+ -+ final MapType newDecoration = type.createEmptyMap(); -+ newDecorations.setMap(id, newDecoration); -+ -+ newDecoration.setString("type", convertMapDecorationId(typeId)); -+ newDecoration.setDouble("x", x); -+ newDecoration.setDouble("z", z); -+ newDecoration.setFloat("rotation", rot); -+ } -+ -+ if (!newDecorations.isEmpty()) { -+ item.componentSetMap("minecraft:map_decorations", newDecorations); -+ } -+ } -+ } -+ -+ private static void convertPotion(final TransientItemStack item, final TypeUtil type) { -+ final MapType potionContents = type.createEmptyMap(); -+ -+ final String potion = item.tagRemoveString("Potion"); -+ -+ if (potion != null && !"minecraft:empty".equals(potion)) { -+ potionContents.setString("potion", potion); -+ } -+ -+ item.migrateTagTo("CustomPotionColor", potionContents, "custom_color"); -+ item.migrateTagTo("custom_potion_effects", potionContents, "custom_effects"); -+ -+ if (!potionContents.isEmpty()) { -+ item.componentSetMap("minecraft:potion_contents", potionContents); -+ } -+ } -+ -+ private static MapType makeFilteredText(final String raw, final String filtered, final TypeUtil type) { -+ final MapType ret = type.createEmptyMap(); -+ -+ ret.setString("raw", raw); -+ if (filtered != null) { -+ ret.setString("filtered", filtered); -+ } -+ -+ return ret; -+ } -+ -+ private static ListType convertBookPages(final TransientItemStack item, final TypeUtil type) { -+ final ListType oldPages = item.tagRemoveListUnchecked("pages"); -+ -+ final MapType filteredPages = item.tagRemoveMap("filtered_pages"); -+ -+ if (oldPages == null || oldPages.size() == 0) { -+ return null; -+ } -+ -+ final ListType ret = type.createEmptyList(); -+ -+ for (int i = 0, len = oldPages.size(); i < len; ++i) { -+ final String page = oldPages.getGeneric(i) instanceof String str ? str : ""; -+ final String filtered = filteredPages == null ? null : filteredPages.getString(Integer.toString(i)); -+ -+ ret.addMap(makeFilteredText(page, filtered, type)); -+ } -+ -+ return ret; -+ } -+ -+ private static void convertWritableBook(final TransientItemStack item, final TypeUtil type) { -+ final ListType pages = convertBookPages(item, type); -+ if (pages != null) { -+ final MapType bookContent = type.createEmptyMap(); -+ item.componentSetMap("minecraft:writable_book_content", bookContent); -+ -+ bookContent.setList("pages", pages); -+ } -+ } -+ -+ private static void convertWrittenBook(final TransientItemStack item, final TypeUtil type) { -+ final ListType pages = convertBookPages(item, type); -+ -+ final MapType bookContent = type.createEmptyMap(); -+ item.componentSetMap("minecraft:written_book_content", bookContent); -+ if (pages != null) { -+ bookContent.setList("pages", pages); -+ } -+ -+ final String title = item.tagRemoveString("title", ""); -+ final String filteredTitle = item.tagRemoveString("filtered_title"); -+ -+ bookContent.setMap("title", makeFilteredText(title, filteredTitle, type)); -+ -+ bookContent.setString("author", item.tagRemoveString("author", "")); -+ item.migrateTagTo("resolved", bookContent, "resolved"); -+ item.migrateTagTo("generation", bookContent, "generation"); -+ } -+ -+ private static void convertMobBucket(final TransientItemStack item, final TypeUtil type) { -+ final MapType bucketEntityData = type.createEmptyMap(); -+ -+ for (final String oldKey : BUCKETED_MOB_TAGS) { -+ item.migrateTagTo(oldKey, bucketEntityData, oldKey); -+ } -+ -+ if (!bucketEntityData.isEmpty()) { -+ item.componentSetMap("minecraft:bucket_entity_data", bucketEntityData); -+ } -+ } -+ -+ private static void convertCompass(final TransientItemStack item, final TypeUtil type) { -+ final Object lodestonePos = item.tagRemoveGeneric("LodestonePos"); -+ final Object lodestoneDim = item.tagRemoveGeneric("LodestoneDimension"); -+ -+ if (lodestonePos == null && lodestoneDim == null) { -+ return; -+ } -+ -+ final MapType lodestoneTracker = type.createEmptyMap(); -+ item.componentSetMap("minecraft:lodestone_tracker", lodestoneTracker); -+ -+ if (lodestonePos != null && lodestoneDim != null) { -+ final MapType target = type.createEmptyMap(); -+ lodestoneTracker.setMap("target", target); -+ -+ target.setGeneric("pos", lodestonePos); -+ target.setGeneric("dimension", lodestoneDim); -+ } -+ -+ final boolean tracked = item.tagRemoveBoolean("LodestoneTracked", true); -+ if (!tracked) { -+ lodestoneTracker.setBoolean("tracked", false); -+ } -+ } -+ -+ private static void convertFireworkExplosion(final Object inputGeneric) { -+ if (!(inputGeneric instanceof MapType)) { -+ return; -+ } -+ -+ final MapType input = (MapType)inputGeneric; -+ -+ RenameHelper.renameSingle(input, "Colors", "colors"); -+ RenameHelper.renameSingle(input, "FadeColors", "fade_colors"); -+ RenameHelper.renameSingle(input, "Trail", "has_trail"); -+ RenameHelper.renameSingle(input, "Flicker", "has_twinkle"); -+ -+ final int type = input.getInt("Type", 0); -+ input.remove("Type"); -+ -+ final String newType; -+ switch (type) { -+ case 1: { -+ newType = "large_ball"; -+ break; -+ } -+ case 2: { -+ newType = "star"; -+ break; -+ } -+ case 3: { -+ newType = "creeper"; -+ break; -+ } -+ case 4: { -+ newType = "burst"; -+ break; -+ } -+ default: { -+ newType = "small_ball"; -+ break; -+ } -+ } -+ -+ input.setString("shape", newType); -+ } -+ -+ private static void convertFireworkRocket(final TransientItemStack item, final TypeUtil type) { -+ // adhere to fixSubTag(true) behavior -+ final Object fireworksGeneric = item.tag.getGeneric("Fireworks"); -+ if (fireworksGeneric == null) { -+ return; -+ } -+ -+ if (!(fireworksGeneric instanceof MapType)) { -+ final MapType newFireworks = type.createEmptyMap(); -+ item.componentSetMap("minecraft:fireworks", newFireworks); -+ -+ newFireworks.setList("explosions", type.createEmptyList()); -+ newFireworks.setByte("flight_duration", (byte)0); -+ -+ return; -+ } -+ -+ final MapType fireworks = (MapType)fireworksGeneric; -+ -+ final MapType newFireworks = type.createEmptyMap(); -+ item.componentSetMap("minecraft:fireworks", newFireworks); -+ -+ final int flight = fireworks.getInt("Flight", 0); -+ newFireworks.setByte("flight_duration", (byte)flight); -+ -+ final ListType explosions = fireworks.getListUnchecked("Explosions", type.createEmptyList()); -+ newFireworks.setList("explosions", explosions); -+ -+ for (int i = 0, len = explosions.size(); i < len; ++i) { -+ convertFireworkExplosion(explosions.getGeneric(i)); -+ } -+ -+ fireworks.remove("Explosions"); -+ fireworks.remove("Flight"); -+ if (fireworks.isEmpty()) { -+ item.tag.remove("Fireworks"); -+ } -+ } -+ -+ private static Object copyGeneric(final Object value, final TypeUtil type) { -+ if (value == null || value instanceof Number || value instanceof String) { -+ return value; -+ } -+ if (value instanceof MapType mapType) { -+ return mapType.copy(); -+ } -+ if (value instanceof ListType listType) { -+ return listType.copy(); -+ } -+ // rest of the cases can take the slow path -+ -+ final ListType dummy = type.createEmptyList(); -+ dummy.addGeneric(value); -+ -+ return dummy.copy().getGeneric(0); -+ } -+ -+ private static void convertFireworkStar(final TransientItemStack item, final TypeUtil type) { -+ // note: adhere to fixSubTag(true) behavior -+ final Object explosionGeneric = item.tag.getGeneric("Explosion"); -+ if (explosionGeneric == null) { -+ return; -+ } -+ -+ if (!(explosionGeneric instanceof MapType)) { -+ // important that we copy the generic value when not moving it -+ item.componentSetGeneric("minecraft:firework_explosion", copyGeneric(explosionGeneric, type)); -+ return; -+ } -+ -+ final MapType explosion = (MapType)explosionGeneric; -+ -+ final MapType explosionCopy = explosion.copy(); -+ item.componentSetGeneric("minecraft:firework_explosion", explosionCopy); -+ convertFireworkExplosion(explosionCopy); -+ -+ explosion.remove("Type"); -+ explosion.remove("Colors"); -+ explosion.remove("FadeColors"); -+ explosion.remove("Trail"); -+ explosion.remove("Flicker"); -+ -+ if (explosion.isEmpty()) { -+ item.tag.remove("Explosion"); -+ } -+ } -+ -+ private static boolean isValidPlayerName(final String name) { -+ if (name.length() > 16) { -+ return false; -+ } -+ -+ for (int i = 0, len = name.length(); i < len; ++i) { -+ final char character = name.charAt(i); -+ if (character <= 0x20 || character >= 0x7F) { // printable ascii -+ return false; -+ } -+ } -+ -+ return true; -+ } -+ -+ private static ListType convertProperties(final MapType properties, final TypeUtil type) { -+ final ListType ret = type.createEmptyList(); -+ -+ for (final String propertyKey : properties.keys()) { -+ final ListType propertyValues = properties.getListUnchecked(propertyKey); -+ -+ if (propertyValues == null) { -+ continue; -+ } -+ -+ for (int i = 0, len = propertyValues.size(); i < len; ++i) { -+ final MapType property = propertyValues.getGeneric(i) instanceof MapType casted ? (MapType)casted : null; -+ -+ final String value = property == null ? "" : property.getString("Value", ""); -+ final String signature = property == null ? null : property.getString("Signature"); -+ -+ final MapType newProperty = type.createEmptyMap(); -+ ret.addMap(newProperty); -+ -+ newProperty.setString("name", propertyKey); -+ newProperty.setString("value", value); -+ if (signature != null) { -+ newProperty.setString("signature", signature); -+ } -+ } -+ } -+ -+ return ret; -+ } -+ -+ public static MapType convertProfile(final Object inputGeneric, final TypeUtil type) { -+ final MapType ret = type.createEmptyMap(); -+ -+ if (inputGeneric instanceof String name) { -+ if (!isValidPlayerName(name)) { -+ return ret; -+ } -+ -+ ret.setString("name", name); -+ -+ return ret; -+ } -+ -+ final MapType input = inputGeneric instanceof MapType casted ? (MapType)casted : null; -+ -+ final String name = input == null ? "" : input.getString("Name", ""); -+ -+ if (isValidPlayerName(name)) { -+ ret.setString("name", name); -+ } -+ -+ final Object id = input == null ? null : input.getGeneric("Id"); -+ -+ if (id != null) { -+ ret.setGeneric("id", id); -+ } -+ -+ final MapType properties = input == null ? null : input.getMap("Properties"); -+ if (properties != null && !properties.isEmpty()) { -+ ret.setList("properties", convertProperties(properties, type)); -+ } -+ -+ return ret; -+ } -+ -+ private static void convertSukll(final TransientItemStack item, final TypeUtil type) { -+ final Object skullOwnerGeneric = item.tagRemoveGeneric("SkullOwner"); -+ if (skullOwnerGeneric == null) { -+ return; -+ } -+ -+ item.componentSetMap("minecraft:profile", convertProfile(skullOwnerGeneric, type)); -+ } -+ -+ // input is unmodified -+ public static MapType convertItem(final MapType input) { -+ if (!input.hasKey("id", ObjectType.STRING) || !input.hasKey("Count", ObjectType.NUMBER)) { -+ return input.copy(); -+ } -+ -+ final TypeUtil type = input.getTypeUtil(); -+ -+ final TransientItemStack item = new TransientItemStack(input); -+ -+ item.tagMigrateToComponent("Damage", "minecraft:damage", 0); -+ item.tagMigrateToComponent("RepairCost", "minecraft:repair_cost", 0); -+ item.tagMigrateToComponent("CustomModelData", "minecraft:custom_model_data"); -+ -+ final MapType blockStateProperties = item.tagRemoveMap("BlockStateTag"); -+ if (blockStateProperties != null) { -+ item.componentSetMap("minecraft:block_state", blockStateProperties); -+ convertBlockStateProperties(blockStateProperties); -+ } -+ -+ item.tagMigrateToComponent("EntityTag", "minecraft:entity_data"); -+ -+ final MapType tileEntityTag = item.tagRemoveMap("BlockEntityTag"); -+ if (tileEntityTag != null) { -+ convertTileEntity(tileEntityTag, item); -+ -+ if (tileEntityTag.size() > 1 || (tileEntityTag.size() == 1 && !tileEntityTag.hasKey("id"))) { -+ item.componentSetMap("minecraft:block_entity_data", tileEntityTag); -+ } -+ } -+ -+ final int flags = item.tagRemoveInt("HideFlags", 0); -+ -+ if (item.tagRemoveInt("Unbreakable", 0) != 0) { -+ final MapType unbreakable = type.createEmptyMap(); -+ item.componentSetMap("minecraft:unbreakable", unbreakable); -+ if ((flags & TOOLTIP_FLAG_HIDE_UNBREAKABLE) != 0) { -+ unbreakable.setBoolean("show_in_tooltip", false); -+ } -+ } -+ -+ convertEnchantments( -+ item, type, "Enchantments", "minecraft:enchantments", -+ (flags & TOOLTIP_FLAG_HIDE_ENCHANTMENTS) != 0 -+ ); -+ -+ convertDisplay(item, type, flags); -+ convertAdventureMode(item, type, flags); -+ convertAttributes(item, type, flags); -+ -+ final Object trim = item.tagRemoveGeneric("Trim"); -+ if (trim != null) { -+ // note: DFU set does nothing if not map -+ if ((flags & TOOLTIP_FLAG_HIDE_UPGRADES) != 0 && trim instanceof MapType) { -+ ((MapType)trim).setBoolean("show_in_tooltip", false); -+ } -+ -+ item.componentSetGeneric("minecraft:trim", trim); -+ } -+ -+ if ((flags & TOOLTIP_FLAG_HIDE_ADDITIONAL) != 0) { -+ item.componentSetMap("minecraft:hide_additional_tooltip", type.createEmptyMap()); -+ } -+ -+ switch (item.id) { -+ case "minecraft:enchanted_book": { -+ convertEnchantments( -+ item, type, "StoredEnchantments", "minecraft:stored_enchantments", -+ (flags & TOOLTIP_FLAG_HIDE_ADDITIONAL) != 0 -+ ); -+ break; -+ } -+ case "minecraft:crossbow": { -+ item.tagRemoveGeneric("Charged"); -+ item.tagMigrateNonEmptyListToComponent("ChargedProjectiles", "minecraft:charged_projectiles"); -+ break; -+ } -+ case "minecraft:bundle": { -+ item.tagMigrateNonEmptyListToComponent("Items", "minecraft:bundle_contents"); -+ break; -+ } -+ case "minecraft:filled_map": { -+ convertMap(item, type); -+ break; -+ } -+ case "minecraft:potion": -+ case "minecraft:splash_potion": -+ case "minecraft:lingering_potion": -+ case "minecraft:tipped_arrow": { -+ convertPotion(item, type); -+ break; -+ } -+ case "minecraft:writable_book": { -+ convertWritableBook(item, type); -+ break; -+ } -+ case "minecraft:written_book": { -+ convertWrittenBook(item, type); -+ break; -+ } -+ case "minecraft:suspicious_stew": { -+ item.tagMigrateToComponent("effects", "minecraft:suspicious_stew_effects"); -+ break; -+ } -+ case "minecraft:debug_stick": { -+ item.tagMigrateToComponent("DebugProperty", "minecraft:debug_stick_state"); -+ break; -+ } -+ case "minecraft:pufferfish_bucket": -+ case "minecraft:salmon_bucket": -+ case "minecraft:cod_bucket": -+ case "minecraft:tropical_fish_bucket": -+ case "minecraft:axolotl_bucket": -+ case "minecraft:tadpole_bucket": { -+ convertMobBucket(item, type); -+ break; -+ } -+ case "minecraft:goat_horn": { -+ item.tagMigrateToComponent("instrument", "minecraft:instrument"); -+ break; -+ } -+ case "minecraft:knowledge_book": { -+ item.tagMigrateToComponent("Recipes", "minecraft:recipes"); -+ break; -+ } -+ case "minecraft:compass": { -+ convertCompass(item, type); -+ break; -+ } -+ case "minecraft:firework_rocket": { -+ convertFireworkRocket(item, type); -+ break; -+ } -+ case "minecraft:firework_star": { -+ convertFireworkStar(item, type); -+ break; -+ } -+ case "minecraft:player_head": { -+ convertSukll(item, type); -+ break; -+ } -+ } -+ -+ return item.serialize(); -+ } -+ -+ private ConverterItemStackToDataComponents() {} -+ -+ private static final class TransientItemStack { -+ -+ private final String id; -+ private final int count; -+ -+ private final MapType components; -+ private final MapType tag; -+ private final MapType root; -+ -+ public TransientItemStack(final MapType root) { -+ this.id = root.getString("id"); -+ this.count = root.getInt("Count"); -+ -+ final TypeUtil type = root.getTypeUtil(); -+ -+ this.components = type.createEmptyMap(); -+ -+ final MapType rootCopy = root.copy(); -+ -+ final MapType tag = rootCopy.getMap("tag"); -+ -+ rootCopy.remove("id"); -+ rootCopy.remove("Count"); -+ rootCopy.remove("tag"); -+ -+ this.tag = tag == null ? type.createEmptyMap() : tag; -+ -+ this.root = rootCopy; -+ } -+ -+ public void migrateTagTo(final String tagKey, final MapType dst, final String dstKey) { -+ final Object value = this.tag.getGeneric(tagKey); -+ -+ if (value != null) { -+ this.tag.remove(tagKey); -+ -+ dst.setGeneric(dstKey, value); -+ } -+ } -+ -+ public String tagRemoveString(final String key) { -+ final String ret = this.tag.getString(key); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public String tagRemoveString(final String key, final String dfl) { -+ final String ret = this.tag.getString(key, dfl); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public ListType tagRemoveListUnchecked(final String key) { -+ final ListType ret = this.tag.getListUnchecked(key); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public ListType tagRemoveList(final String key, final ObjectType listType) { -+ final ListType ret = this.tag.getList(key, listType); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public MapType tagRemoveMap(final String key) { -+ final MapType ret = this.tag.getMap(key); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public boolean tagRemoveBoolean(final String key, final boolean dfl) { -+ final boolean ret = this.tag.getBoolean(key, dfl); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public int tagRemoveInt(final String key, final int dfl) { -+ final int ret = this.tag.getInt(key, dfl); -+ -+ this.tag.remove(key); -+ -+ return ret; -+ } -+ -+ public Object tagRemoveGeneric(final String key) { -+ final Object ret = this.tag.getGeneric(key); -+ -+ if (ret != null) { -+ this.tag.remove(key); -+ return ret; -+ } -+ -+ return ret; -+ } -+ -+ public void tagMigrateToComponent(final String tagKey, final String componentKey) { -+ final Object value = this.tag.getGeneric(tagKey); -+ if (value != null) { -+ this.tag.remove(tagKey); -+ -+ this.components.setGeneric(componentKey, value); -+ } -+ } -+ -+ public void tagMigrateNonEmptyListToComponent(final String tagKey, final String componentKey) { -+ final Object value = this.tag.getGeneric(tagKey); -+ if (value != null) { -+ this.tag.remove(tagKey); -+ -+ if (!(value instanceof ListType list) || list.size() > 0) { -+ this.components.setGeneric(componentKey, value); -+ } -+ } -+ } -+ -+ public void tagMigrateToComponent(final String tagKey, final String componentKey, final int defaultComponent) { -+ final int value = this.tag.getInt(tagKey, defaultComponent); -+ this.tag.remove(tagKey); -+ -+ if (value != defaultComponent) { -+ this.components.setGeneric(componentKey, value); -+ } -+ } -+ -+ public void componentSetBoolean(final String key, final boolean value) { -+ this.components.setBoolean(key, value); -+ } -+ -+ public void componentSetString(final String key, final String value) { -+ this.components.setString(key, value); -+ } -+ -+ public void componentSetList(final String key, final ListType value) { -+ this.components.setList(key, value); -+ } -+ -+ public void componentSetMap(final String key, final MapType value) { -+ this.components.setMap(key, value); -+ } -+ -+ public void componentSetGeneric(final String key, final Object value) { -+ this.components.setGeneric(key, value); -+ } -+ -+ public MapType serialize() { -+ final MapType ret = this.components.getTypeUtil().createEmptyMap(); -+ -+ ret.setString("id", this.id); -+ ret.setInt("count", this.count); -+ if (!this.tag.isEmpty()) { -+ this.components.setMap("minecraft:custom_data", this.tag); -+ } -+ -+ if (!this.components.isEmpty()) { -+ ret.setMap("components", this.components); -+ } -+ -+ // merge root to ret, with entries in ret taking priority -+ if (!this.root.isEmpty()) { -+ for (final String key : this.root.keys()) { -+ if (ret.hasKey(key)) { -+ continue; -+ } -+ -+ ret.setGeneric(key, this.root.getGeneric(key)); -+ } -+ } -+ -+ return ret; -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/leveldat/ConverterRemoveFeatureFlag.java b/ca/spottedleaf/dataconverter/minecraft/converters/leveldat/ConverterRemoveFeatureFlag.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d47f922b2dd1a92be1d128df16a81983eddc2ac2 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/leveldat/ConverterRemoveFeatureFlag.java -@@ -0,0 +1,46 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.leveldat; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.Set; -+ -+public final class ConverterRemoveFeatureFlag extends DataConverter { -+ -+ private final Set flags; -+ -+ public ConverterRemoveFeatureFlag(final int toVersion, final Set flags) { -+ this(toVersion, 0, flags); -+ } -+ -+ public ConverterRemoveFeatureFlag(final int toVersion, final int versionStep, final Set flags) { -+ super(toVersion, versionStep); -+ this.flags = flags; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType enabledFeatures = data.getList("enabled_features", ObjectType.STRING); -+ if (enabledFeatures == null) { -+ return null; -+ } -+ -+ ListType removedFeatures = null; -+ -+ for (int i = 0; i < enabledFeatures.size(); ++i) { -+ final String flag = enabledFeatures.getString(i); -+ if (!this.flags.contains(flag)) { -+ continue; -+ } -+ enabledFeatures.remove(i--); -+ -+ if (removedFeatures == null) { -+ removedFeatures = data.getOrCreateList("removed_features", ObjectType.STRING); -+ } -+ removedFeatures.addString(flag); -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/options/ConverterAbstractOptionsRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/options/ConverterAbstractOptionsRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3b6341eb7cd843749f377684c14cbb81043660bc ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/options/ConverterAbstractOptionsRename.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.options; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.ArrayList; -+import java.util.function.Function; -+ -+public final class ConverterAbstractOptionsRename { -+ -+ private ConverterAbstractOptionsRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameKeys(data, renamer); -+ return null; -+ } -+ }); -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/particle/ConverterParticleToNBT.java b/ca/spottedleaf/dataconverter/minecraft/converters/particle/ConverterParticleToNBT.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e02fac460178e5aef15f330de88253c019e492b6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/particle/ConverterParticleToNBT.java -@@ -0,0 +1,270 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.particle; -+ -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import com.mojang.brigadier.StringReader; -+import com.mojang.brigadier.exceptions.CommandSyntaxException; -+import com.mojang.logging.LogUtils; -+import net.minecraft.nbt.CompoundTag; -+import net.minecraft.nbt.TagParser; -+import net.minecraft.util.Mth; -+import org.slf4j.Logger; -+ -+public final class ConverterParticleToNBT { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static CompoundTag parseNBT(final String flat) { -+ try { -+ return TagParser.parseCompoundFully(flat); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse nbt: " + flat, ex); -+ return null; -+ } -+ } -+ -+ private static void convertItem(final MapType nbt, final String data) { -+ final MapType itemNBT = nbt.getTypeUtil().createEmptyMap(); -+ nbt.setMap("item", itemNBT); -+ itemNBT.setInt("Count", 1); -+ -+ final int nbtStart = data.indexOf('{'); -+ if (nbtStart == -1) { -+ // assume data is item name -+ itemNBT.setString("id", NamespaceUtil.correctNamespace(data)); -+ return; -+ } -+ // itemname{tagNBT} -+ itemNBT.setString("id", NamespaceUtil.correctNamespace(data.substring(0, nbtStart))); -+ -+ final CompoundTag tag = parseNBT(data.substring(nbtStart)); -+ if (tag != null) { -+ // do we need to worry about type conversion? -+ itemNBT.setMap("tag", new NBTMapType(tag)); -+ } -+ } -+ -+ private static MapType parseProperties(final String input, final TypeUtil type) { -+ final MapType ret = type.createEmptyMap(); -+ try { -+ // format: [p1=v1, p2=v2, p3=v3, ...] -+ final StringReader reader = new StringReader(input); -+ -+ reader.expect('['); -+ reader.skipWhitespace(); -+ -+ if (reader.canRead() && reader.peek() != ']') { -+ while (reader.canRead()) { -+ final String property = reader.readString(); -+ -+ reader.skipWhitespace(); -+ reader.expect('='); -+ reader.skipWhitespace(); -+ -+ final String value = reader.readString(); -+ ret.setString(property, value); -+ -+ reader.skipWhitespace(); -+ if (reader.canRead()) { -+ if (reader.peek() != ',') { -+ // invalid character or ']' -+ break; -+ } -+ -+ // skip ',' and move onto next entry -+ reader.skip(); -+ } -+ -+ reader.skipWhitespace(); -+ } -+ } -+ -+ reader.expect(']'); -+ return ret; -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse block properties: " + input, ex); -+ return null; -+ } -+ } -+ -+ private static void convertBlock(final MapType nbt, final String data) { -+ final MapType blockNBT = nbt.getTypeUtil().createEmptyMap(); -+ nbt.setMap("block_state", blockNBT); -+ -+ final int propertiesStart = data.indexOf('['); -+ if (propertiesStart == -1) { -+ // assume data is id -+ blockNBT.setString("Name", NamespaceUtil.correctNamespace(data)); -+ return; -+ } -+ blockNBT.setString("Name", NamespaceUtil.correctNamespace(data.substring(0, propertiesStart))); -+ -+ // blockname{properties} -+ final MapType properties = parseProperties(data.substring(propertiesStart), nbt.getTypeUtil()); -+ if (properties != null && !properties.isEmpty()) { -+ blockNBT.setMap("Properties", properties); -+ } -+ } -+ -+ private static ListType parseFloatVector(final StringReader reader, final TypeUtil type) throws CommandSyntaxException { -+ final float x = reader.readFloat(); -+ -+ reader.expect(' '); -+ final float y = reader.readFloat(); -+ -+ reader.expect(' '); -+ final float z = reader.readFloat(); -+ -+ final ListType ret = type.createEmptyList(); -+ ret.addFloat(x); -+ ret.addFloat(y); -+ ret.addFloat(z); -+ -+ return ret; -+ } -+ -+ private static void convertDust(final MapType nbt, final String data) { -+ try { -+ final StringReader reader = new StringReader(data); -+ -+ final ListType color = parseFloatVector(reader, nbt.getTypeUtil()); -+ -+ reader.expect(' '); -+ final float scale = reader.readFloat(); -+ -+ nbt.setList("color", color); -+ nbt.setFloat("scale", scale); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse dust particle: " + data, ex); -+ } -+ } -+ -+ private static void convertColorDust(final MapType nbt, final String data) { -+ try { -+ final StringReader reader = new StringReader(data); -+ -+ final ListType fromColor = parseFloatVector(reader, nbt.getTypeUtil()); -+ -+ reader.expect(' '); -+ final float scale = reader.readFloat(); -+ -+ reader.expect(' '); -+ final ListType toColor = parseFloatVector(reader, nbt.getTypeUtil()); -+ -+ nbt.setList("from_color", fromColor); -+ nbt.setFloat("scale", scale); -+ nbt.setList("to_color", toColor); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse color transition dust particle: " + data, ex); -+ } -+ } -+ -+ private static void convertSculk(final MapType nbt, final String data) { -+ try { -+ final StringReader reader = new StringReader(data); -+ -+ final float roll = reader.readFloat(); -+ -+ nbt.setFloat("roll", roll); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse sculk particle: " + data, ex); -+ } -+ } -+ -+ private static void convertVibration(final MapType nbt, final String data) { -+ try { -+ final StringReader reader = new StringReader(data); -+ -+ final double posX = reader.readDouble(); -+ -+ reader.expect(' '); -+ final double posY = reader.readDouble(); -+ -+ reader.expect(' '); -+ final double posZ = reader.readDouble(); -+ -+ reader.expect(' '); -+ final int arrival = reader.readInt(); -+ -+ nbt.setInt("arrival_in_ticks", arrival); -+ -+ final MapType destination = nbt.getTypeUtil().createEmptyMap(); -+ nbt.setMap("destination", destination); -+ -+ destination.setString("type", "minecraft:block"); -+ -+ final ListType pos = nbt.getTypeUtil().createEmptyList(); -+ destination.setList("pos", pos); -+ -+ pos.addInt(Mth.floor(posX)); -+ pos.addInt(Mth.floor(posY)); -+ pos.addInt(Mth.floor(posZ)); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse vibration particle: " + data, ex); -+ } -+ } -+ -+ private static void convertShriek(final MapType nbt, final String data) { -+ try { -+ final StringReader reader = new StringReader(data); -+ -+ final int delay = reader.readInt(); -+ -+ nbt.setInt("delay", delay); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse shriek particle: " + data, ex); -+ } -+ } -+ -+ public static MapType convert(final String flat, final TypeUtil type) { -+ final String[] split = flat.split(" ", 2); -+ final String name = NamespaceUtil.correctNamespace(split[0]); -+ -+ final MapType ret = type.createEmptyMap(); -+ ret.setString("type", name); -+ -+ if (split.length > 1) { -+ final String data = split[1]; -+ switch (name) { -+ case "minecraft:item": { -+ convertItem(ret, data); -+ break; -+ } -+ case "minecraft:block": -+ case "minecraft:block_marker": -+ case "minecraft:falling_dust": -+ case "minecraft:dust_pillar": { -+ convertBlock(ret, data); -+ break; -+ } -+ case "minecraft:dust": { -+ convertDust(ret, data); -+ break; -+ } -+ case "minecraft:dust_color_transition": { -+ convertColorDust(ret, data); -+ break; -+ } -+ case "minecraft:sculk_charge": { -+ convertSculk(ret, data); -+ break; -+ } -+ case "minecraft:vibration": { -+ convertVibration(ret, data); -+ break; -+ } -+ case "minecraft:shriek": { -+ convertShriek(ret, data); -+ break; -+ } -+ } -+ } -+ -+ return ret; -+ } -+ -+ private ConverterParticleToNBT() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/poi/ConverterAbstractPOIRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/poi/ConverterAbstractPOIRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cdd60c91796691b79e4848a5565616351474f453 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/poi/ConverterAbstractPOIRename.java -@@ -0,0 +1,53 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.poi; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractPOIRename { -+ -+ private ConverterAbstractPOIRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ MCTypeRegistry.POI_CHUNK.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType sections = data.getMap("Sections"); -+ if (sections == null) { -+ return null; -+ } -+ -+ for (final String key : sections.keys()) { -+ final MapType section = sections.getMap(key); -+ -+ final ListType records = section.getList("Records", ObjectType.MAP); -+ -+ if (records == null) { -+ continue; -+ } -+ -+ for (int i = 0, len = records.size(); i < len; ++i) { -+ final MapType record = records.getMap(i); -+ -+ final String type = record.getString("type"); -+ if (type != null) { -+ final String converted = renamer.apply(type); -+ if (converted != null) { -+ record.setString("type", converted); -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/poi/ConverterPoiDelete.java b/ca/spottedleaf/dataconverter/minecraft/converters/poi/ConverterPoiDelete.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c61537e7ebef1c48d65a302ab174ef41847560a8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/poi/ConverterPoiDelete.java -@@ -0,0 +1,53 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.poi; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.function.Predicate; -+ -+public final class ConverterPoiDelete extends DataConverter { -+ -+ private final Predicate delete; -+ -+ public ConverterPoiDelete(final int toVersion, final Predicate delete) { -+ super(toVersion); -+ this.delete = delete; -+ } -+ -+ public ConverterPoiDelete(final int toVersion, final int versionStep, final Predicate delete) { -+ super(toVersion, versionStep); -+ this.delete = delete; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType sections = data.getMap("Sections"); -+ if (sections == null) { -+ return null; -+ } -+ -+ for (final String key : sections.keys()) { -+ final MapType section = sections.getMap(key); -+ -+ final ListType records = section.getList("Records", ObjectType.MAP); -+ -+ if (records == null) { -+ continue; -+ } -+ -+ for (int i = 0; i < records.size();) { -+ final MapType record = records.getMap(i); -+ -+ final String type = record.getString("type"); -+ if (type != null && this.delete.test(type)) { -+ records.remove(i); -+ continue; -+ } -+ ++i; -+ } -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/recipe/ConverterAbstractRecipeRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/recipe/ConverterAbstractRecipeRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8f35cbbd78a629712f9ae3cd5d180269f015a11d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/recipe/ConverterAbstractRecipeRename.java -@@ -0,0 +1,18 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.recipe; -+ -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import java.util.function.Function; -+ -+public final class ConverterAbstractRecipeRename { -+ -+ private ConverterAbstractRecipeRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ ConverterAbstractStringValueTypeRename.register(version, subVersion, MCTypeRegistry.RECIPE, renamer); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/stats/ConverterAbstractStatsRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/stats/ConverterAbstractStatsRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2468ebedfabfb93f9b8d398d77e70d019b9a3dfa ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/stats/ConverterAbstractStatsRename.java -@@ -0,0 +1,66 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.stats; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.ArrayList; -+import java.util.function.Function; -+ -+public final class ConverterAbstractStatsRename { -+ -+ private ConverterAbstractStatsRename() {} -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ MCTypeRegistry.OBJECTIVE.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType criteriaType = data.getMap("CriteriaType"); -+ if (criteriaType == null) { -+ return null; -+ } -+ -+ final String type = criteriaType.getString("type"); -+ if (!"minecraft:custom".equals(type)) { -+ return null; -+ } -+ -+ final String id = criteriaType.getString("id"); -+ if (id == null) { -+ return null; -+ } -+ -+ final String rename = renamer.apply(id); -+ if (rename != null) { -+ criteriaType.setString("id", rename); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.STATS.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType stats = data.getMap("stats"); -+ -+ if (stats == null) { -+ return null; -+ } -+ -+ final MapType custom = stats.getMap("minecraft:custom"); -+ if (custom == null) { -+ return null; -+ } -+ -+ RenameHelper.renameKeys(custom, renamer); -+ -+ return null; -+ } -+ }); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/stats/ConverterFlattenStats.java b/ca/spottedleaf/dataconverter/minecraft/converters/stats/ConverterFlattenStats.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f8a5d9e4d8fb0f1b3c2fed900fa1d52e2d25f5ec ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/stats/ConverterFlattenStats.java -@@ -0,0 +1,321 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.stats; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperBlockFlatteningV1450; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterFlattenItemStack; -+import ca.spottedleaf.dataconverter.minecraft.versions.V1451; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.common.collect.ImmutableMap; -+import com.google.common.collect.ImmutableSet; -+import org.apache.commons.lang3.StringUtils; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Map; -+import java.util.Set; -+ -+public final class ConverterFlattenStats { -+ -+ private static final int VERSION = MCVersions.V17W47A; -+ private static final int VERSION_STEP = 6; -+ -+ private static final Set SPECIAL_OBJECTIVE_CRITERIA = new HashSet<>( -+ Set.of( -+ "dummy", -+ "trigger", -+ "deathCount", -+ "playerKillCount", -+ "totalKillCount", -+ "health", -+ "food", -+ "air", -+ "armor", -+ "xp", -+ "level", -+ "killedByTeam.aqua", -+ "killedByTeam.black", -+ "killedByTeam.blue", -+ "killedByTeam.dark_aqua", -+ "killedByTeam.dark_blue", -+ "killedByTeam.dark_gray", -+ "killedByTeam.dark_green", -+ "killedByTeam.dark_purple", -+ "killedByTeam.dark_red", -+ "killedByTeam.gold", -+ "killedByTeam.gray", -+ "killedByTeam.green", -+ "killedByTeam.light_purple", -+ "killedByTeam.red", -+ "killedByTeam.white", -+ "killedByTeam.yellow", -+ "teamkill.aqua", -+ "teamkill.black", -+ "teamkill.blue", -+ "teamkill.dark_aqua", -+ "teamkill.dark_blue", -+ "teamkill.dark_gray", -+ "teamkill.dark_green", -+ "teamkill.dark_purple", -+ "teamkill.dark_red", -+ "teamkill.gold", -+ "teamkill.gray", -+ "teamkill.green", -+ "teamkill.light_purple", -+ "teamkill.red", -+ "teamkill.white", -+ "teamkill.yellow" -+ ) -+ ); -+ -+ private static final Set SKIP = new HashSet<>( -+ ImmutableSet.builder() -+ .add("stat.craftItem.minecraft.spawn_egg") -+ .add("stat.useItem.minecraft.spawn_egg") -+ .add("stat.breakItem.minecraft.spawn_egg") -+ .add("stat.pickup.minecraft.spawn_egg") -+ .add("stat.drop.minecraft.spawn_egg") -+ .build() -+ ); -+ -+ private static final Map CUSTOM_MAP = new HashMap<>( -+ ImmutableMap.builder() -+ .put("stat.leaveGame", "minecraft:leave_game") -+ .put("stat.playOneMinute", "minecraft:play_one_minute") -+ .put("stat.timeSinceDeath", "minecraft:time_since_death") -+ .put("stat.sneakTime", "minecraft:sneak_time") -+ .put("stat.walkOneCm", "minecraft:walk_one_cm") -+ .put("stat.crouchOneCm", "minecraft:crouch_one_cm") -+ .put("stat.sprintOneCm", "minecraft:sprint_one_cm") -+ .put("stat.swimOneCm", "minecraft:swim_one_cm") -+ .put("stat.fallOneCm", "minecraft:fall_one_cm") -+ .put("stat.climbOneCm", "minecraft:climb_one_cm") -+ .put("stat.flyOneCm", "minecraft:fly_one_cm") -+ .put("stat.diveOneCm", "minecraft:dive_one_cm") -+ .put("stat.minecartOneCm", "minecraft:minecart_one_cm") -+ .put("stat.boatOneCm", "minecraft:boat_one_cm") -+ .put("stat.pigOneCm", "minecraft:pig_one_cm") -+ .put("stat.horseOneCm", "minecraft:horse_one_cm") -+ .put("stat.aviateOneCm", "minecraft:aviate_one_cm") -+ .put("stat.jump", "minecraft:jump") -+ .put("stat.drop", "minecraft:drop") -+ .put("stat.damageDealt", "minecraft:damage_dealt") -+ .put("stat.damageTaken", "minecraft:damage_taken") -+ .put("stat.deaths", "minecraft:deaths") -+ .put("stat.mobKills", "minecraft:mob_kills") -+ .put("stat.animalsBred", "minecraft:animals_bred") -+ .put("stat.playerKills", "minecraft:player_kills") -+ .put("stat.fishCaught", "minecraft:fish_caught") -+ .put("stat.talkedToVillager", "minecraft:talked_to_villager") -+ .put("stat.tradedWithVillager", "minecraft:traded_with_villager") -+ .put("stat.cakeSlicesEaten", "minecraft:eat_cake_slice") -+ .put("stat.cauldronFilled", "minecraft:fill_cauldron") -+ .put("stat.cauldronUsed", "minecraft:use_cauldron") -+ .put("stat.armorCleaned", "minecraft:clean_armor") -+ .put("stat.bannerCleaned", "minecraft:clean_banner") -+ .put("stat.brewingstandInteraction", "minecraft:interact_with_brewingstand") -+ .put("stat.beaconInteraction", "minecraft:interact_with_beacon") -+ .put("stat.dropperInspected", "minecraft:inspect_dropper") -+ .put("stat.hopperInspected", "minecraft:inspect_hopper") -+ .put("stat.dispenserInspected", "minecraft:inspect_dispenser") -+ .put("stat.noteblockPlayed", "minecraft:play_noteblock") -+ .put("stat.noteblockTuned", "minecraft:tune_noteblock") -+ .put("stat.flowerPotted", "minecraft:pot_flower") -+ .put("stat.trappedChestTriggered", "minecraft:trigger_trapped_chest") -+ .put("stat.enderchestOpened", "minecraft:open_enderchest") -+ .put("stat.itemEnchanted", "minecraft:enchant_item") -+ .put("stat.recordPlayed", "minecraft:play_record") -+ .put("stat.furnaceInteraction", "minecraft:interact_with_furnace") -+ .put("stat.craftingTableInteraction", "minecraft:interact_with_crafting_table") -+ .put("stat.chestOpened", "minecraft:open_chest") -+ .put("stat.sleepInBed", "minecraft:sleep_in_bed") -+ .put("stat.shulkerBoxOpened", "minecraft:open_shulker_box") -+ .build() -+ ); -+ -+ private static final String BLOCK_KEY = "stat.mineBlock"; -+ private static final String NEW_BLOCK_KEY = "minecraft:mined"; -+ -+ private static final Map ITEM_KEYS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("stat.craftItem", "minecraft:crafted") -+ .put("stat.useItem", "minecraft:used") -+ .put("stat.breakItem", "minecraft:broken") -+ .put("stat.pickup", "minecraft:picked_up") -+ .put("stat.drop", "minecraft:dropped") -+ .build() -+ ); -+ -+ private static final Map ENTITY_KEYS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("stat.entityKilledBy", "minecraft:killed_by") -+ .put("stat.killEntity", "minecraft:killed") -+ .build() -+ ); -+ -+ private static final Map ENTITIES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("Bat", "minecraft:bat") -+ .put("Blaze", "minecraft:blaze") -+ .put("CaveSpider", "minecraft:cave_spider") -+ .put("Chicken", "minecraft:chicken") -+ .put("Cow", "minecraft:cow") -+ .put("Creeper", "minecraft:creeper") -+ .put("Donkey", "minecraft:donkey") -+ .put("ElderGuardian", "minecraft:elder_guardian") -+ .put("Enderman", "minecraft:enderman") -+ .put("Endermite", "minecraft:endermite") -+ .put("EvocationIllager", "minecraft:evocation_illager") -+ .put("Ghast", "minecraft:ghast") -+ .put("Guardian", "minecraft:guardian") -+ .put("Horse", "minecraft:horse") -+ .put("Husk", "minecraft:husk") -+ .put("Llama", "minecraft:llama") -+ .put("LavaSlime", "minecraft:magma_cube") -+ .put("MushroomCow", "minecraft:mooshroom") -+ .put("Mule", "minecraft:mule") -+ .put("Ozelot", "minecraft:ocelot") -+ .put("Parrot", "minecraft:parrot") -+ .put("Pig", "minecraft:pig") -+ .put("PolarBear", "minecraft:polar_bear") -+ .put("Rabbit", "minecraft:rabbit") -+ .put("Sheep", "minecraft:sheep") -+ .put("Shulker", "minecraft:shulker") -+ .put("Silverfish", "minecraft:silverfish") -+ .put("SkeletonHorse", "minecraft:skeleton_horse") -+ .put("Skeleton", "minecraft:skeleton") -+ .put("Slime", "minecraft:slime") -+ .put("Spider", "minecraft:spider") -+ .put("Squid", "minecraft:squid") -+ .put("Stray", "minecraft:stray") -+ .put("Vex", "minecraft:vex") -+ .put("Villager", "minecraft:villager") -+ .put("VindicationIllager", "minecraft:vindication_illager") -+ .put("Witch", "minecraft:witch") -+ .put("WitherSkeleton", "minecraft:wither_skeleton") -+ .put("Wolf", "minecraft:wolf") -+ .put("ZombieHorse", "minecraft:zombie_horse") -+ .put("PigZombie", "minecraft:zombie_pigman") -+ .put("ZombieVillager", "minecraft:zombie_villager") -+ .put("Zombie", "minecraft:zombie") -+ .build() -+ ); -+ -+ private static final String NEW_CUSTOM_KEY = "minecraft:custom"; -+ -+ private ConverterFlattenStats() {} -+ -+ private static String upgradeItem(final String itemName) { -+ return ConverterFlattenItemStack.flattenItem(itemName, 0); -+ } -+ -+ private static String upgradeBlock(final String block) { -+ return HelperBlockFlatteningV1450.getNewBlockName(block); -+ } -+ -+ private static record StatType(String category, String key) {} -+ -+ private static StatType convertLegacyKey(final String key) { -+ if (SKIP.contains(key)) { -+ return null; -+ } -+ -+ final String custom = CUSTOM_MAP.get(key); -+ if (custom != null) { -+ return new StatType(NEW_CUSTOM_KEY, custom); -+ } -+ -+ final int i = StringUtils.ordinalIndexOf(key, ".", 2); -+ if (i < 0) { -+ return null; -+ } -+ -+ final String stat = key.substring(0, i); -+ -+ if (BLOCK_KEY.equals(stat)) { -+ return new StatType(NEW_BLOCK_KEY, upgradeBlock(key.substring(i + 1).replace('.', ':'))); -+ } -+ -+ final String itemStat = ITEM_KEYS.get(stat); -+ -+ if (itemStat != null) { -+ final String itemId = key.substring(i + 1).replace('.', ':'); -+ final String flattenedItem = upgradeItem(itemId); -+ -+ return new StatType(itemStat, flattenedItem == null ? itemId : flattenedItem); -+ } -+ -+ final String entityStat = ENTITY_KEYS.get(stat); -+ if (entityStat != null) { -+ final String entityId = key.substring(i + 1).replace('.', ':'); -+ -+ return new StatType(entityStat, ENTITIES.getOrDefault(entityId, entityId)); -+ } -+ -+ return null; -+ } -+ -+ public static DataConverter makeStatsConverter() { -+ return new DataConverter<>(VERSION, VERSION_STEP) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType stats = Types.NBT.createEmptyMap(); -+ -+ for (final String statKey : data.keys()) { -+ final Number value = data.getNumber(statKey); -+ if (value == null) { -+ continue; -+ } -+ -+ final StatType converted = convertLegacyKey(statKey); -+ -+ if (converted == null) { -+ continue; -+ } -+ -+ stats.getOrCreateMap(converted.category()).setGeneric(converted.key(), value); -+ } -+ -+ data.clear(); -+ data.setMap("stats", stats); -+ -+ return null; -+ } -+ }; -+ } -+ -+ public static DataConverter makeObjectiveConverter() { -+ return new DataConverter<>(VERSION, VERSION_STEP) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertCriteriaName(data, "CriteriaName"); -+ -+ // We also need to update CriteriaType that is created by the data hook in V1451, -+ // otherwise that data hook will overwrite our CriteriaName -+ final MapType criteriaType = data.getMap("CriteriaType"); -+ if (criteriaType != null) { -+ if ("_special".equals(criteriaType.getString("type"))) { -+ convertCriteriaName(criteriaType, "id"); -+ } -+ } -+ -+ return null; -+ } -+ -+ private void convertCriteriaName(final MapType data, final String key) { -+ final String criteriaName = data.getString(key); -+ -+ if (criteriaName == null) { -+ return; -+ } -+ -+ if (SPECIAL_OBJECTIVE_CRITERIA.contains(criteriaName)) { -+ return; -+ } -+ -+ final StatType converted = convertLegacyKey(criteriaName); -+ data.setString(key, converted == null ? "dummy" : V1451.packWithDot(converted.category()) + ":" + V1451.packWithDot(converted.key())); -+ } -+ }; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/converters/tileentity/ConverterAbstractTileEntityRename.java b/ca/spottedleaf/dataconverter/minecraft/converters/tileentity/ConverterAbstractTileEntityRename.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9b82500851430bbe55669d83602931edbc2fa973 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/converters/tileentity/ConverterAbstractTileEntityRename.java -@@ -0,0 +1,34 @@ -+package ca.spottedleaf.dataconverter.minecraft.converters.tileentity; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.function.Function; -+ -+public final class ConverterAbstractTileEntityRename { -+ -+ public static void register(final int version, final Function renamer) { -+ register(version, 0, renamer); -+ } -+ -+ public static void register(final int version, final int subVersion, final Function renamer) { -+ MCTypeRegistry.TILE_ENTITY.addStructureConverter(new DataConverter<>(version, subVersion) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ if (id == null) { -+ return null; -+ } -+ -+ final String converted = renamer.apply(id); -+ -+ if (converted != null) { -+ data.setString("id", converted); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/datatypes/DynamicDataType.java b/ca/spottedleaf/dataconverter/minecraft/datatypes/DynamicDataType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..48f5e7950a27995f16787d4eaaa7dc10182a10c8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/datatypes/DynamicDataType.java -@@ -0,0 +1,132 @@ -+package ca.spottedleaf.dataconverter.minecraft.datatypes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersionRegistry; -+import ca.spottedleaf.dataconverter.util.Long2ObjectArraySortedMap; -+import java.util.ArrayList; -+import java.util.List; -+ -+public class DynamicDataType extends DataType { -+ -+ public final String name; -+ -+ protected final ArrayList> structureConverters = new ArrayList<>(); -+ protected final Long2ObjectArraySortedMap>> structureWalkers = new Long2ObjectArraySortedMap<>(); -+ protected final Long2ObjectArraySortedMap>> structureHooks = new Long2ObjectArraySortedMap<>(); -+ -+ public DynamicDataType(final String name) { -+ this.name = name; -+ } -+ -+ public void addStructureConverter(final DataConverter converter) { -+ MCVersionRegistry.checkVersion(converter.getEncodedVersion()); -+ final boolean sort = !this.structureConverters.isEmpty() -+ && DataConverter.LOWEST_VERSION_COMPARATOR.compare(this.structureConverters.getLast(), converter) > 0; -+ this.structureConverters.add(converter); -+ if (sort) { -+ this.structureConverters.sort(DataConverter.LOWEST_VERSION_COMPARATOR); -+ } -+ } -+ -+ public void addStructureWalker(final int minVersion, final DataWalker walker) { -+ this.addStructureWalker(minVersion, 0, walker); -+ } -+ -+ public void addStructureWalker(final int minVersion, final int versionStep, final DataWalker walker) { -+ this.structureWalkers.computeIfAbsent(DataConverter.encodeVersions(minVersion, versionStep), (final long keyInMap) -> { -+ return new ArrayList<>(); -+ }).add(walker); -+ } -+ -+ public void addStructureHook(final int minVersion, final DataHook hook) { -+ this.addStructureHook(minVersion, 0, hook); -+ } -+ -+ public void addStructureHook(final int minVersion, final int versionStep, final DataHook hook) { -+ this.structureHooks.computeIfAbsent(DataConverter.encodeVersions(minVersion, versionStep), (final long keyInMap) -> { -+ return new ArrayList<>(); -+ }).add(hook); -+ } -+ -+ @Override -+ public Object convert(Object data, final long fromVersion, final long toVersion) { -+ Object ret = null; -+ -+ final List> converters = this.structureConverters; -+ for (int i = 0, len = converters.size(); i < len; ++i) { -+ final DataConverter converter = converters.get(i); -+ final long converterVersion = converter.getEncodedVersion(); -+ -+ if (converterVersion <= fromVersion) { -+ continue; -+ } -+ -+ if (converterVersion > toVersion) { -+ break; -+ } -+ -+ List> hooks = this.structureHooks.getFloor(converterVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final Object replace = hooks.get(k).preHook(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ final Object replace = converter.convert(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ -+ // possibly new data format, update hooks -+ hooks = this.structureHooks.getFloor(toVersion); -+ -+ if (hooks != null) { -+ for (int klen = hooks.size(), k = klen - 1; k >= 0; --k) { -+ final Object postReplace = hooks.get(k).postHook(data, fromVersion, toVersion); -+ if (postReplace != null) { -+ ret = data = postReplace; -+ } -+ } -+ } -+ } -+ -+ final List> hooks = this.structureHooks.getFloor(toVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final Object replace = hooks.get(k).preHook(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ final List> walkers = this.structureWalkers.getFloor(toVersion); -+ if (walkers != null) { -+ for (int i = 0, len = walkers.size(); i < len; ++i) { -+ final Object replace = walkers.get(i).walk(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ if (hooks != null) { -+ for (int klen = hooks.size(), k = klen - 1; k >= 0; --k) { -+ final Object postReplace = hooks.get(k).postHook(data, fromVersion, toVersion); -+ if (postReplace != null) { -+ ret = data = postReplace; -+ } -+ } -+ } -+ -+ return ret; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/datatypes/IDDataType.java b/ca/spottedleaf/dataconverter/minecraft/datatypes/IDDataType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..35ae849cb57e2e6b54f5607e8bacdc43448ae6a1 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/datatypes/IDDataType.java -@@ -0,0 +1,170 @@ -+package ca.spottedleaf.dataconverter.minecraft.datatypes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersionRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.Long2ObjectArraySortedMap; -+ -+import java.util.ArrayList; -+import java.util.HashMap; -+import java.util.List; -+import java.util.Map; -+ -+public class IDDataType extends MCDataType { -+ -+ protected final Map>>> walkersById = new HashMap<>(); -+ -+ public IDDataType(final String name) { -+ super(name); -+ } -+ -+ public void addConverterForId(final String id, final DataConverter converter) { -+ this.addStructureConverter(new DataConverter<>(converter.getToVersion(), converter.getVersionStep()) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!id.equals(data.getString("id"))) { -+ return null; -+ } -+ return converter.convert(data, sourceVersion, toVersion); -+ } -+ }); -+ } -+ -+ public boolean hasWalkers(final String id) { -+ return this.walkersById.containsKey(id); -+ } -+ -+ public void addWalker(final int minVersion, final String id, final DataWalker walker) { -+ this.addWalker(minVersion, 0, id, walker); -+ } -+ -+ public void addWalker(final int minVersion, final int versionStep, final String id, final DataWalker walker) { -+ this.walkersById.computeIfAbsent(id, (final String keyInMap) -> { -+ return new Long2ObjectArraySortedMap<>(); -+ }).computeIfAbsent(DataConverter.encodeVersions(minVersion, versionStep), (final long keyInMap) -> { -+ return new ArrayList<>(); -+ }).add(walker); -+ } -+ -+ public void copyWalkers(final int minVersion, final String fromId, final String toId) { -+ this.copyWalkers(minVersion, 0, fromId, toId); -+ } -+ -+ public void copyWalkers(final int minVersion, final int versionStep, final String fromId, final String toId) { -+ final long version = DataConverter.encodeVersions(minVersion, versionStep); -+ final Long2ObjectArraySortedMap>> walkersForId = this.walkersById.get(fromId); -+ if (walkersForId == null) { -+ return; -+ } -+ -+ final List> nearest = walkersForId.getFloor(version); -+ -+ if (nearest == null) { -+ return; -+ } -+ -+ for (final DataWalker walker : nearest) { -+ this.addWalker(minVersion, versionStep, toId, walker); -+ } -+ } -+ -+ @Override -+ public MapType convert(MapType data, final long fromVersion, final long toVersion) { -+ MapType ret = null; -+ -+ final List> converters = this.structureConverters; -+ for (int i = 0, len = converters.size(); i < len; ++i) { -+ final DataConverter converter = converters.get(i); -+ final long converterVersion = converter.getEncodedVersion(); -+ -+ if (converterVersion <= fromVersion) { -+ continue; -+ } -+ -+ if (converterVersion > toVersion) { -+ break; -+ } -+ -+ List> hooks = this.structureHooks.getFloor(converterVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final MapType replace = hooks.get(k).preHook(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ final MapType replace = converter.convert(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ -+ // possibly new data format, update hooks -+ hooks = this.structureHooks.getFloor(toVersion); -+ -+ if (hooks != null) { -+ for (int klen = hooks.size(), k = klen - 1; k >= 0; --k) { -+ final MapType postReplace = hooks.get(k).postHook(data, fromVersion, toVersion); -+ if (postReplace != null) { -+ ret = data = postReplace; -+ } -+ } -+ } -+ } -+ -+ final List> hooks = this.structureHooks.getFloor(toVersion); -+ -+ // run pre hooks -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final MapType replace = hooks.get(k).preHook(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ // run all walkers -+ -+ final List> walkers = this.structureWalkers.getFloor(toVersion); -+ if (walkers != null) { -+ for (int i = 0, len = walkers.size(); i < len; ++i) { -+ final MapType replace = walkers.get(i).walk(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ final Long2ObjectArraySortedMap>> walkersByVersion = this.walkersById.get(data.getString("id")); -+ if (walkersByVersion != null) { -+ final List> walkersForId = walkersByVersion.getFloor(toVersion); -+ if (walkersForId != null) { -+ for (int i = 0, len = walkersForId.size(); i < len; ++i) { -+ final MapType replace = walkersForId.get(i).walk(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ } -+ -+ // run post hooks -+ -+ if (hooks != null) { -+ for (int klen = hooks.size(), k = klen - 1; k >= 0; --k) { -+ final MapType postReplace = hooks.get(k).postHook(data, fromVersion, toVersion); -+ if (postReplace != null) { -+ ret = data = postReplace; -+ } -+ } -+ } -+ -+ return ret; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/datatypes/MCDataType.java b/ca/spottedleaf/dataconverter/minecraft/datatypes/MCDataType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e1f7c0d7fd80556941bbba8018aa85e7c896b630 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/datatypes/MCDataType.java -@@ -0,0 +1,133 @@ -+package ca.spottedleaf.dataconverter.minecraft.datatypes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersionRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.Long2ObjectArraySortedMap; -+import java.util.ArrayList; -+import java.util.List; -+ -+public class MCDataType extends DataType { -+ -+ public final String name; -+ -+ protected final ArrayList> structureConverters = new ArrayList<>(); -+ protected final Long2ObjectArraySortedMap>> structureWalkers = new Long2ObjectArraySortedMap<>(); -+ protected final Long2ObjectArraySortedMap>> structureHooks = new Long2ObjectArraySortedMap<>(); -+ -+ public MCDataType(final String name) { -+ this.name = name; -+ } -+ -+ public void addStructureConverter(final DataConverter converter) { -+ MCVersionRegistry.checkVersion(converter.getEncodedVersion()); -+ final boolean sort = !this.structureConverters.isEmpty() -+ && DataConverter.LOWEST_VERSION_COMPARATOR.compare(this.structureConverters.getLast(), converter) > 0; -+ this.structureConverters.add(converter); -+ if (sort) { -+ this.structureConverters.sort(DataConverter.LOWEST_VERSION_COMPARATOR); -+ } -+ } -+ -+ public void addStructureWalker(final int minVersion, final DataWalker walker) { -+ this.addStructureWalker(minVersion, 0, walker); -+ } -+ -+ public void addStructureWalker(final int minVersion, final int versionStep, final DataWalker walker) { -+ this.structureWalkers.computeIfAbsent(DataConverter.encodeVersions(minVersion, versionStep), (final long keyInMap) -> { -+ return new ArrayList<>(); -+ }).add(walker); -+ } -+ -+ public void addStructureHook(final int minVersion, final DataHook hook) { -+ this.addStructureHook(minVersion, 0, hook); -+ } -+ -+ public void addStructureHook(final int minVersion, final int versionStep, final DataHook hook) { -+ this.structureHooks.computeIfAbsent(DataConverter.encodeVersions(minVersion, versionStep), (final long keyInMap) -> { -+ return new ArrayList<>(); -+ }).add(hook); -+ } -+ -+ @Override -+ public MapType convert(MapType data, final long fromVersion, final long toVersion) { -+ MapType ret = null; -+ -+ final List> converters = this.structureConverters; -+ for (int i = 0, len = converters.size(); i < len; ++i) { -+ final DataConverter converter = converters.get(i); -+ final long converterVersion = converter.getEncodedVersion(); -+ -+ if (converterVersion <= fromVersion) { -+ continue; -+ } -+ -+ if (converterVersion > toVersion) { -+ break; -+ } -+ -+ List> hooks = this.structureHooks.getFloor(converterVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final MapType replace = hooks.get(k).preHook(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ final MapType replace = converter.convert(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ -+ // possibly new data format, update hooks -+ hooks = this.structureHooks.getFloor(toVersion); -+ -+ if (hooks != null) { -+ for (int klen = hooks.size(), k = klen - 1; k >= 0; --k) { -+ final MapType postReplace = hooks.get(k).postHook(data, fromVersion, toVersion); -+ if (postReplace != null) { -+ ret = data = postReplace; -+ } -+ } -+ } -+ } -+ -+ final List> hooks = this.structureHooks.getFloor(toVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final MapType replace = hooks.get(k).preHook(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ final List> walkers = this.structureWalkers.getFloor(toVersion); -+ if (walkers != null) { -+ for (int i = 0, len = walkers.size(); i < len; ++i) { -+ final MapType replace = walkers.get(i).walk(data, fromVersion, toVersion); -+ if (replace != null) { -+ ret = data = replace; -+ } -+ } -+ } -+ -+ if (hooks != null) { -+ for (int klen = hooks.size(), k = klen - 1; k >= 0; --k) { -+ final MapType postReplace = hooks.get(k).postHook(data, fromVersion, toVersion); -+ if (postReplace != null) { -+ ret = data = postReplace; -+ } -+ } -+ } -+ -+ return ret; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java b/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java -new file mode 100644 -index 0000000000000000000000000000000000000000..edeb0db8e00157da02f9318a1625a62a06f7de0e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java -@@ -0,0 +1,369 @@ -+package ca.spottedleaf.dataconverter.minecraft.datatypes; -+ -+import ca.spottedleaf.dataconverter.minecraft.versions.*; -+import com.mojang.logging.LogUtils; -+import org.slf4j.Logger; -+import java.text.DecimalFormat; -+ -+public final class MCTypeRegistry { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ public static final MCDataType LEVEL = new MCDataType("Level"); -+ public static final MCDataType LIGHTWEIGHT_LEVEL = new MCDataType("LightweightLevel"); -+ public static final MCDataType PLAYER = new MCDataType("Player"); -+ public static final MCDataType CHUNK = new MCDataType("Chunk"); -+ public static final MCDataType HOTBAR = new MCDataType("CreativeHotbar"); -+ public static final MCDataType OPTIONS = new MCDataType("Options"); -+ public static final MCDataType STRUCTURE = new MCDataType("Structure"); -+ public static final MCDataType STATS = new MCDataType("Stats"); -+ public static final MCDataType ADVANCEMENTS = new MCDataType("Advancements"); -+ public static final MCDataType POI_CHUNK = new MCDataType("PoiChunk"); -+ public static final MCDataType ENTITY_CHUNK = new MCDataType("EntityChunk"); -+ public static final IDDataType TILE_ENTITY = new IDDataType("TileEntity"); -+ public static final IDDataType ITEM_STACK = new IDDataType("ItemStack"); -+ public static final MCDataType BLOCK_STATE = new MCDataType("BlockState"); -+ public static final MCValueType FLAT_BLOCK_STATE = new MCValueType("FlatBlockState"); -+ public static final MCDataType DATA_COMPONENTS = new MCDataType("DataComponents"); -+ public static final MCDataType VILLAGER_TRADE = new MCDataType("VillagerTrade"); -+ public static final DynamicDataType PARTICLE = new DynamicDataType("Particle"); -+ public static final MCValueType ENTITY_NAME = new MCValueType("EntityName"); -+ public static final IDDataType ENTITY = new IDDataType("Entity"); -+ public static final MCValueType BLOCK_NAME = new MCValueType("BlockName"); -+ public static final MCValueType ITEM_NAME = new MCValueType("ItemName"); -+ public static final MCDataType UNTAGGED_SPAWNER = new MCDataType("Spawner"); -+ public static final MCDataType STRUCTURE_FEATURE = new MCDataType("StructureFeature"); -+ public static final MCDataType OBJECTIVE = new MCDataType("Objective"); -+ public static final MCDataType TEAM = new MCDataType("Team"); -+ public static final MCValueType RECIPE = new MCValueType("RecipeName"); -+ public static final MCValueType BIOME = new MCValueType("Biome"); -+ public static final MCDataType WORLD_GEN_SETTINGS = new MCDataType("WorldGenSettings"); -+ public static final MCValueType GAME_EVENT_NAME = new MCValueType("GameEventName"); -+ // NOTE: Prior to V165, TEXT_COMPONENT _also_ mark plain strings (not components!) to be converted to json format. -+ // So, great care should be taken to ensure that when dealing with versions up to and including V165 that BOTH formats -+ // of JSON and plain text are parsed properly. -+ // As a result, we differ from Vanilla's schemas to ensure that legacy data converts correctly. -+ public static final DynamicDataType TEXT_COMPONENT = new DynamicDataType("TextComponent"); -+ public static final MCDataType ENTITY_EQUIPMENT = new MCDataType("EntityEquipment"); -+ -+ public static final MCValueType MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST = new MCValueType("MultiNoiseBiomeSourceParameterList"); -+ -+ public static final MCDataType SAVED_DATA_RANDOM_SEQUENCES = new MCDataType("SavedData/RandomSequences"); -+ public static final MCDataType SAVED_DATA_SCOREBOARD = new MCDataType("SavedData/Scoreboard"); -+ public static final MCDataType SAVED_DATA_STRUCTURE_FEATURE_INDICES = new MCDataType("SavedData/StructureFeatureIndices"); -+ public static final MCDataType SAVED_DATA_MAP_DATA = new MCDataType("SavedData/MapData"); -+ public static final MCDataType SAVED_DATA_RAIDS = new MCDataType("SavedData/Raids"); -+ public static final MCDataType SAVED_DATA_COMMAND_STORAGE = new MCDataType("SavedData/CommandStorage"); -+ public static final MCDataType SAVED_DATA_MAP_INDEX = new MCDataType("SavedData/IdCounts"); -+ public static final MCDataType SAVED_DATA_TICKETS = new MCDataType("SavedData/Tickets"); -+ -+ public static final DynamicDataType DATACONVERTER_CUSTOM_TYPE_COMMAND = new DynamicDataType("DC_Custom/Command"); -+ -+ static { -+ LOGGER.info("Initialising converters for DataConverter..."); -+ -+ final long start = System.nanoTime(); -+ try { -+ registerAll(); -+ } catch (final Throwable thr) { -+ LOGGER.error(LogUtils.FATAL_MARKER, "Failed to register data converters", thr); -+ throw new RuntimeException(thr); -+ } -+ final long end = System.nanoTime(); -+ -+ final DecimalFormat oneDecimalFormat = new DecimalFormat("#,##0.0"); -+ -+ LOGGER.info("Finished initialising converters for DataConverter in " + oneDecimalFormat.format((double)(end - start) / 1.0E6) + "ms"); -+ } -+ -+ public static void init() {} -+ -+ private static void registerAll() { -+ // General notes: -+ // - Structure converters run before everything. -+ // - ID specific converters run after structure converters. -+ // - Structure walkers run after id specific converters. -+ // - ID specific walkers run after structure walkers. -+ -+ V99.register(); // all legacy data before converters existed -+ V100.register(); // first version with version id -+ V101.register(); -+ V102.register(); -+ V105.register(); -+ V106.register(); -+ V107.register(); -+ V108.register(); -+ V109.register(); -+ V110.register(); -+ V111.register(); -+ V113.register(); -+ V135.register(); -+ V143.register(); -+ V147.register(); -+ V165.register(); -+ V501.register(); -+ V502.register(); -+ V505.register(); -+ V700.register(); -+ V701.register(); -+ V702.register(); -+ V703.register(); -+ V704.register(); -+ V705.register(); -+ V804.register(); -+ V806.register(); -+ V808.register(); -+ V813.register(); -+ V816.register(); -+ V820.register(); -+ V1022.register(); -+ V1125.register(); -+ // END OF LEGACY DATA CONVERTERS -+ -+ // V1.13 -+ V1344.register(); -+ V1446.register(); -+ // START THE FLATTENING -+ V1450.register(); -+ V1451.register(); -+ // END THE FLATTENING -+ -+ V1456.register(); -+ V1458.register(); -+ V1460.register(); -+ V1466.register(); -+ V1470.register(); -+ V1474.register(); -+ V1475.register(); -+ V1480.register(); -+ // V1481 is adding simple block entity -+ V1483.register(); -+ V1484.register(); -+ V1486.register(); -+ V1487.register(); -+ V1488.register(); -+ V1490.register(); -+ V1492.register(); -+ V1494.register(); -+ V1496.register(); -+ V1500.register(); -+ V1501.register(); -+ V1502.register(); -+ V1506.register(); -+ V1510.register(); -+ V1514.register(); -+ V1515.register(); -+ V1624.register(); -+ // V1.14 -+ V1800.register(); -+ V1801.register(); -+ V1802.register(); -+ V1803.register(); -+ V1904.register(); -+ V1905.register(); -+ V1906.register(); -+ V1909.register(); -+ V1911.register(); -+ V1914.register(); -+ V1917.register(); -+ V1918.register(); -+ V1920.register(); -+ V1925.register(); -+ V1928.register(); -+ V1929.register(); -+ V1931.register(); -+ V1936.register(); -+ V1946.register(); -+ V1948.register(); -+ V1953.register(); -+ V1955.register(); -+ V1961.register(); -+ V1963.register(); -+ // V1.15 -+ V2100.register(); -+ V2202.register(); -+ V2209.register(); -+ V2211.register(); -+ V2218.register(); -+ // V1.16 -+ V2501.register(); -+ V2502.register(); -+ V2503.register(); -+ V2505.register(); -+ V2508.register(); -+ V2509.register(); -+ V2511.register(); -+ V2514.register(); -+ V2516.register(); -+ V2518.register(); -+ V2519.register(); -+ V2522.register(); -+ V2523.register(); -+ V2527.register(); -+ V2528.register(); -+ V2529.register(); -+ V2531.register(); -+ V2533.register(); -+ V2535.register(); -+ V2537.register(); -+ V2538.register(); -+ V2550.register(); -+ V2551.register(); -+ V2552.register(); -+ V2553.register(); -+ V2558.register(); -+ V2568.register(); -+ // V1.17 -+ // WARN: Mojang registers V2671 under 2571, but that version predates 1.16.5? So it looks like a typo... -+ // I changed it to 2671, just so that it's after 1.16.5, but even then this looks misplaced... Thankfully this is -+ // the first datafixer, and all it does is add a walker, so I think even if the version here is just wrong it will -+ // work. -+ V2671.register(); -+ V2679.register(); -+ V2680.register(); -+ V2684.register(); -+ V2686.register(); -+ V2688.register(); -+ V2690.register(); -+ V2691.register(); -+ V2693.register(); -+ V2696.register(); -+ V2700.register(); -+ V2701.register(); -+ V2702.register(); -+ // In reference to V2671, why the fuck is goat being registered again? For this obvious reason, V2704 is absent. -+ V2707.register(); -+ V2710.register(); -+ V2717.register(); -+ // V1.18 -+ V2825.register(); -+ V2831.register(); -+ V2832.register(); -+ V2833.register(); -+ V2838.register(); -+ V2841.register(); -+ V2842.register(); -+ V2843.register(); -+ V2846.register(); -+ V2852.register(); -+ V2967.register(); -+ V2970.register(); -+ // V1.19 -+ // V3076 is registering a simple tile entity (sculk_catalyst) -+ V3077.register(); -+ V3078.register(); -+ V3081.register(); -+ V3082.register(); -+ V3083.register(); -+ V3084.register(); -+ V3086.register(); -+ V3087.register(); -+ V3088.register(); -+ V3090.register(); -+ V3093.register(); -+ V3094.register(); -+ V3097.register(); -+ V3108.register(); -+ V3201.register(); -+ V3202.register(); -+ V3203.register(); -+ V3204.register(); -+ V3209.register(); -+ V3214.register(); -+ V3319.register(); -+ V3322.register(); -+ V3325.register(); -+ V3326.register(); -+ V3327.register(); -+ V3328.register(); -+ // V1.20 -+ V3438.register(); -+ V3439.register(); -+ V3440.register(); -+ V3441.register(); -+ V3447.register(); -+ V3448.register(); -+ V3450.register(); -+ V3451.register(); -+ V3459.register(); -+ V3564.register(); -+ V3565.register(); -+ V3566.register(); -+ V3568.register(); -+ V3682.register(); -+ V3683.register(); -+ V3685.register(); -+ V3689.register(); -+ V3692.register(); -+ // V1.20.5 -+ V3799.register(); -+ V3800.register(); -+ V3803.register(); -+ V3807.register(); -+ V3808.register(); -+ V3809.register(); -+ V3812.register(); -+ V3813.register(); -+ V3814.register(); -+ V3816.register(); -+ V3818.register(); -+ V3820.register(); -+ V3825.register(); -+ V3828.register(); -+ V3833.register(); -+ // V1.21 -+ V3938.register(); -+ V3939.register(); -+ V3943.register(); -+ V3945.register(); -+ // V1.21.2 -+ V4054.register(); -+ V4055.register(); -+ V4057.register(); -+ V4059.register(); -+ V4061.register(); -+ V4064.register(); -+ V4067.register(); -+ V4068.register(); -+ V4070.register(); -+ V4071.register(); -+ // V1.21.3 -+ V4081.register(); -+ // V1.21.4 -+ V4173.register(); -+ V4175.register(); -+ V4176.register(); -+ V4180.register(); -+ V4181.register(); -+ V4185.register(); -+ V4187.register(); -+ // V1.21.5 -+ V4290.register(); -+ V4291.register(); -+ V4292.register(); -+ V4293.register(); -+ V4294.register(); -+ V4295.register(); -+ V4296.register(); -+ V4297.register(); -+ V4299.register(); -+ V4300.register(); -+ V4301.register(); -+ V4302.register(); -+ V4303.register(); -+ V4305.register(); -+ V4306.register(); -+ V4307.register(); -+ V4309.register(); -+ V4311.register(); -+ V4312.register(); -+ V4314.register(); -+ /* -+ V4420.register(); -+ V4421.register(); -+ V4424.register(); -+ */ -+ } -+ -+ private MCTypeRegistry() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/datatypes/MCValueType.java b/ca/spottedleaf/dataconverter/minecraft/datatypes/MCValueType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c2598db6f73019e2730622e8156b71196bfe0ee5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/datatypes/MCValueType.java -@@ -0,0 +1,90 @@ -+package ca.spottedleaf.dataconverter.minecraft.datatypes; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.minecraft.MCVersionRegistry; -+import ca.spottedleaf.dataconverter.util.Long2ObjectArraySortedMap; -+import java.util.ArrayList; -+import java.util.List; -+ -+public class MCValueType extends DataType { -+ -+ public final String name; -+ -+ protected final ArrayList> converters = new ArrayList<>(); -+ protected final Long2ObjectArraySortedMap>> structureHooks = new Long2ObjectArraySortedMap<>(); -+ -+ public MCValueType(final String name) { -+ this.name = name; -+ } -+ -+ public void addStructureHook(final int minVersion, final DataHook hook) { -+ this.addStructureHook(minVersion, 0, hook); -+ } -+ -+ public void addStructureHook(final int minVersion, final int versionStep, final DataHook hook) { -+ this.structureHooks.computeIfAbsent(DataConverter.encodeVersions(minVersion, versionStep), (final long keyInMap) -> { -+ return new ArrayList<>(); -+ }).add(hook); -+ } -+ -+ public void addConverter(final DataConverter converter) { -+ MCVersionRegistry.checkVersion(converter.getEncodedVersion()); -+ final boolean sort = !this.converters.isEmpty() -+ && DataConverter.LOWEST_VERSION_COMPARATOR.compare(this.converters.getLast(), converter) > 0; -+ this.converters.add(converter); -+ if (sort) { -+ this.converters.sort(DataConverter.LOWEST_VERSION_COMPARATOR); -+ } -+ } -+ -+ @Override -+ public Object convert(final Object data, final long fromVersion, final long toVersion) { -+ Object ret = null; -+ final List> converters = this.converters; -+ -+ for (int i = 0, len = converters.size(); i < len; ++i) { -+ final DataConverter converter = converters.get(i); -+ final long converterVersion = converter.getEncodedVersion(); -+ -+ if (converterVersion <= fromVersion) { -+ continue; -+ } -+ -+ if (converterVersion > toVersion) { -+ break; -+ } -+ -+ List> hooks = this.structureHooks.getFloor(converterVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final Object replace = hooks.get(k).preHook(ret == null ? data : ret, fromVersion, toVersion); -+ if (replace != null) { -+ ret = replace; -+ } -+ } -+ } -+ -+ final Object converted = converter.convert(ret == null ? data : ret, fromVersion, toVersion); -+ if (converted != null) { -+ ret = converted; -+ } -+ -+ // possibly new data format, update hooks -+ hooks = this.structureHooks.getFloor(toVersion); -+ -+ if (hooks != null) { -+ for (int k = 0, klen = hooks.size(); k < klen; ++k) { -+ final Object replace = hooks.get(k).postHook(ret == null ? data : ret, fromVersion, toVersion); -+ if (replace != null) { -+ ret = replace; -+ } -+ } -+ } -+ } -+ -+ return ret; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/hooks/DataHookEnforceNamespacedID.java b/ca/spottedleaf/dataconverter/minecraft/hooks/DataHookEnforceNamespacedID.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a0d5bdfce1e7f433ee3bb984814315a157fa3c15 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/hooks/DataHookEnforceNamespacedID.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.hooks; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public class DataHookEnforceNamespacedID implements DataHook { -+ -+ private final String path; -+ -+ public DataHookEnforceNamespacedID() { -+ this("id"); -+ } -+ -+ public DataHookEnforceNamespacedID(final String path) { -+ this.path = path; -+ } -+ -+ @Override -+ public MapType preHook(final MapType data, final long fromVersion, final long toVersion) { -+ NamespaceUtil.enforceForPath(data, this.path); -+ return null; -+ } -+ -+ @Override -+ public MapType postHook(final MapType data, final long fromVersion, final long toVersion) { -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/hooks/DataHookValueTypeEnforceNamespaced.java b/ca/spottedleaf/dataconverter/minecraft/hooks/DataHookValueTypeEnforceNamespaced.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8467d4849f9988da3d79620337be8e12815fa4ff ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/hooks/DataHookValueTypeEnforceNamespaced.java -@@ -0,0 +1,20 @@ -+package ca.spottedleaf.dataconverter.minecraft.hooks; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public class DataHookValueTypeEnforceNamespaced implements DataHook { -+ -+ @Override -+ public Object preHook(final Object data, final long fromVersion, final long toVersion) { -+ if (data instanceof String string) { -+ return NamespaceUtil.correctNamespaceOrNull(string); -+ } -+ return null; -+ } -+ -+ @Override -+ public Object postHook(final Object data, final long fromVersion, final long toVersion) { -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/util/ComponentUtils.java b/ca/spottedleaf/dataconverter/minecraft/util/ComponentUtils.java -new file mode 100644 -index 0000000000000000000000000000000000000000..17ded002b5546de8be4a5238c20ccfda460a98bb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/util/ComponentUtils.java -@@ -0,0 +1,82 @@ -+package ca.spottedleaf.dataconverter.minecraft.util; -+ -+import com.google.gson.JsonElement; -+import com.google.gson.JsonObject; -+import com.google.gson.JsonParseException; -+import com.google.gson.JsonParser; -+import com.google.gson.JsonPrimitive; -+import net.minecraft.util.GsonHelper; -+ -+public final class ComponentUtils { -+ -+ public static final String EMPTY = createPlainTextComponent(""); -+ -+ public static String createPlainTextComponent(final String text) { -+ final JsonObject ret = new JsonObject(); -+ -+ ret.addProperty("text", text); -+ -+ return GsonHelper.toStableString(ret); -+ } -+ -+ public static String createTranslatableComponent(final String key) { -+ final JsonObject ret = new JsonObject(); -+ -+ ret.addProperty("translate", key); -+ -+ return GsonHelper.toStableString(ret); -+ } -+ -+ public static String retrieveTranslationString(final String possibleJson) { -+ if (possibleJson == null) { -+ return null; -+ } -+ -+ try { -+ final JsonElement element = JsonParser.parseString(possibleJson); -+ -+ if (element instanceof JsonObject object) { -+ final JsonElement translation = object.get("translate"); -+ if (translation instanceof JsonPrimitive primitive) { -+ return primitive.getAsString(); -+ } -+ } -+ -+ return null; -+ } catch (final Exception ex) { -+ return null; -+ } -+ } -+ -+ public static String convertFromLenient(final String input) { -+ if (input == null) { -+ return input; -+ } -+ -+ if (input.isEmpty() || input.equals("null")) { -+ return EMPTY; -+ } -+ -+ final char firstCharacter = input.charAt(0); -+ final char lastCharacter = input.charAt(input.length() - 1); -+ if ((firstCharacter == '"' && lastCharacter == '"') -+ || (firstCharacter == '{' && lastCharacter == '}') -+ || (firstCharacter == '[' && lastCharacter == ']')) { -+ try { -+ final JsonElement json = JsonParser.parseString(input); -+ -+ if (json.isJsonPrimitive()) { -+ return createPlainTextComponent(json.getAsString()); -+ } -+ -+ return GsonHelper.toStableString(json); -+ } catch (final JsonParseException ignored) { -+ // fall through to plain text -+ } -+ } -+ -+ return createPlainTextComponent(input); -+ } -+ -+ private ComponentUtils() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/util/StringWalker.java b/ca/spottedleaf/dataconverter/minecraft/util/StringWalker.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4e1add641c092b241b48e93732dab4ef646eafc3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/util/StringWalker.java -@@ -0,0 +1,78 @@ -+package ca.spottedleaf.dataconverter.minecraft.util; -+ -+public final class StringWalker { -+ -+ public final String string; -+ private int index; // index of next value to return -+ private final int maxIndex; // exclusive -+ -+ public StringWalker(final String string) { -+ this(string, 0); -+ } -+ -+ public StringWalker(final String string, final int index) { -+ this(string, index, string.length()); -+ } -+ -+ public StringWalker(final String string, final int index, final int maxIndex) { -+ this.string = string; -+ this.index = index; -+ this.maxIndex = maxIndex; -+ -+ if (maxIndex < 0 || maxIndex > string.length()) { -+ throw new IllegalArgumentException("Max index out of string range"); -+ } -+ -+ if (index < 0 || index > maxIndex) { -+ throw new IllegalArgumentException("Index out of string range"); -+ } -+ } -+ -+ public int getIndex() { -+ return this.index; -+ } -+ -+ public void setIndex(final int to) { -+ this.index = to; -+ } -+ -+ private void checkNext() { -+ if (!this.hasNext()) { -+ throw this.parseFail(this.getIndex(), "Expecting more input"); -+ } -+ } -+ -+ public boolean hasNext() { -+ return this.index < this.maxIndex; -+ } -+ -+ public char next() { -+ return this.string.charAt(this.index++); -+ } -+ -+ public char peek() { -+ return this.string.charAt(this.index); -+ } -+ -+ public void advance() { -+ ++this.index; -+ } -+ -+ public void skipWhitespace() { -+ while (this.hasNext() || Character.isWhitespace(this.peek())) { -+ this.advance(); -+ } -+ } -+ -+ public boolean skipIf(final char c) { -+ if (this.hasNext() && this.peek() == c) { -+ this.advance(); -+ return true; -+ } -+ return false; -+ } -+ -+ public IllegalStateException parseFail(final int index, final String reason) { -+ return new IllegalStateException("At column " + index + ": " + reason); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/util/Version.java b/ca/spottedleaf/dataconverter/minecraft/util/Version.java -new file mode 100644 -index 0000000000000000000000000000000000000000..57563e3f85653d1e946495e7609c6ee644095ceb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/util/Version.java -@@ -0,0 +1,12 @@ -+package ca.spottedleaf.dataconverter.minecraft.util; -+ -+import net.minecraft.SharedConstants; -+ -+public final class Version { -+ -+ public static int getCurrentVersion() { -+ return SharedConstants.getCurrentVersion().getDataVersion().getVersion(); -+ } -+ -+ private Version() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V100.java b/ca/spottedleaf/dataconverter/minecraft/versions/V100.java -new file mode 100644 -index 0000000000000000000000000000000000000000..166953878ce7df4317a40ad274f56ecd3f7214cc ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V100.java -@@ -0,0 +1,124 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.block_name.DataWalkerBlockNames; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V100 { -+ -+ private static final int VERSION = MCVersions.V15W32A; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType equipment = data.getList("Equipment", ObjectType.MAP); -+ data.remove("Equipment"); -+ -+ if (equipment != null) { -+ if (equipment.size() > 0 && data.getListUnchecked("HandItems") == null) { -+ final ListType handItems = Types.NBT.createEmptyList(); -+ data.setList("HandItems", handItems); -+ handItems.addMap(equipment.getMap(0)); -+ handItems.addMap(Types.NBT.createEmptyMap()); -+ } -+ -+ if (equipment.size() > 1 && data.getListUnchecked("ArmorItems") == null) { -+ final ListType armorItems = Types.NBT.createEmptyList(); -+ data.setList("ArmorItems", armorItems); -+ for (int i = 1; i < Math.min(equipment.size(), 5); ++i) { -+ armorItems.addMap(equipment.getMap(i)); -+ } -+ } -+ } -+ -+ final ListType dropChances = data.getList("DropChances", ObjectType.FLOAT); -+ data.remove("DropChances"); -+ -+ if (dropChances != null) { -+ if (data.getListUnchecked("HandDropChances") == null) { -+ final ListType handDropChances = Types.NBT.createEmptyList(); -+ data.setList("HandDropChances", handDropChances); -+ if (0 < dropChances.size()) { -+ handDropChances.addFloat(dropChances.getFloat(0)); -+ } else { -+ handDropChances.addFloat(0.0F); -+ } -+ handDropChances.addFloat(0.0F); -+ } -+ -+ if (data.getListUnchecked("ArmorDropChances") == null) { -+ final ListType armorDropChances = Types.NBT.createEmptyList(); -+ data.setList("ArmorDropChances", armorDropChances); -+ for (int i = 1; i < 5; ++i) { -+ if (i < dropChances.size()) { -+ armorDropChances.addFloat(dropChances.getFloat(i)); -+ } else { -+ armorDropChances.addFloat(0.0F); -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY_EQUIPMENT.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "ArmorItems", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "HandItems", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, data, "body_armor_item", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, data, "saddle", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ //registerMob("ArmorStand"); // changed to simple in 1.21.5 -+ //registerMob("Creeper"); // changed to simple in 1.21.5 -+ //registerMob("Skeleton"); // changed to simple in 1.21.5 -+ //registerMob("Spider"); // changed to simple in 1.21.5 -+ //registerMob("Giant"); // changed to simple in 1.21.5 -+ //registerMob("Zombie"); // changed to simple in 1.21.5 -+ //registerMob("Slime"); // changed to simple in 1.21.5 -+ //registerMob("Ghast"); // changed to simple in 1.21.5 -+ //registerMob("PigZombie"); // changed to simple in 1.21.5 -+ // Enderman is now identical to V99 due to moving equipment to base in 1.21.5 -+ //registerMob("CaveSpider"); // changed to simple in 1.21.5 -+ //registerMob("Silverfish"); // changed to simple in 1.21.5 -+ //registerMob("Blaze"); // changed to simple in 1.21.5 -+ //registerMob("LavaSlime"); // changed to simple in 1.21.5 -+ //registerMob("EnderDragon"); // changed to simple in 1.21.5 -+ //registerMob("WitherBoss"); // changed to simple in 1.21.5 -+ //registerMob("Bat"); // changed to simple in 1.21.5 -+ //registerMob("Witch"); // changed to simple in 1.21.5 -+ //registerMob("Endermite"); // changed to simple in 1.21.5 -+ //registerMob("Guardian"); // changed to simple in 1.21.5 -+ //registerMob("Pig"); // changed to simple in 1.21.5 -+ //registerMob("Sheep"); // changed to simple in 1.21.5 -+ //registerMob("Cow"); // changed to simple in 1.21.5 -+ //registerMob("Chicken"); // changed to simple in 1.21.5 -+ //registerMob("Squid"); // changed to simple in 1.21.5 -+ //registerMob("Wolf"); // changed to simple in 1.21.5 -+ //registerMob("MushroomCow"); // changed to simple in 1.21.5 -+ //registerMob("SnowMan"); // changed to simple in 1.21.5 -+ //registerMob("Ozelot"); // changed to simple in 1.21.5 -+ //registerMob("VillagerGolem"); // changed to simple in 1.21.5 -+ // EntityHorse is now identical to V99 due to moving equipment to base in 1.21.5 -+ //registerMob("Rabbit"); // changed to simple in 1.21.5 -+ // Villager is now identical to V99 due to moving equipment to base in 1.21.5 -+ //registerMob("Shulker"); // changed to simple in 1.21.5 -+ // AreaEffectCloud is now identical to V99 due to moving equipment to base in 1.21.5 -+ -+ // Moved to V99 in 1.21.5 -+ } -+ -+ private V100() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V101.java b/ca/spottedleaf/dataconverter/minecraft/versions/V101.java -new file mode 100644 -index 0000000000000000000000000000000000000000..787f09af1338483fdb820806f94680c7e5db7d7c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V101.java -@@ -0,0 +1,46 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V101 { -+ -+ private static final int VERSION = MCVersions.V15W32A + 1; -+ -+ private static void updateLine(final MapType data, final String path) { -+ final String textString = data.getString(path); -+ -+ if (textString == null) { -+ return; -+ } -+ -+ data.setString(path, ComponentUtils.convertFromLenient(textString)); -+ } -+ -+ public static void register() { -+ // Mojang Removed in 1.21.5, replaced in V165 - although we should not be modifying old converters unless -+ // we need to (the conversion is the same) -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("Sign", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateLine(data, "Text1"); -+ updateLine(data, "Text2"); -+ updateLine(data, "Text3"); -+ updateLine(data, "Text4"); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("Villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setBoolean("CanPickUpLoot", true); -+ return null; -+ } -+ }); -+ } -+ -+ private V101() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V102.java b/ca/spottedleaf/dataconverter/minecraft/versions/V102.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b9f23288d9cc912eccd07418e38cd6ffcdf65360 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V102.java -@@ -0,0 +1,86 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperItemNameV102; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.mojang.logging.LogUtils; -+import org.slf4j.Logger; -+ -+public final class V102 { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final int VERSION = MCVersions.V15W32A + 2; -+ -+ public static void register() { -+ // V102 -> V15W32A + 2 -+ // V102 schema only modifies ITEM_STACK to have only a string ID, but our ITEM_NAME is generic (int or String) so we don't -+ // actually need to update the walker -+ -+ MCTypeRegistry.ITEM_NAME.addConverter(new DataConverter<>(VERSION) { -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ if (!(data instanceof Number)) { -+ return null; -+ } -+ final int id = ((Number)data).intValue(); -+ final String remap = HelperItemNameV102.getNameFromId(id); -+ if (remap == null) { -+ LOGGER.warn("Unknown legacy integer id (V102) " + id); -+ } -+ return remap == null ? HelperItemNameV102.getNameFromId(0) : remap; -+ } -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!data.hasKey("id", ObjectType.NUMBER)) { -+ return null; -+ } -+ -+ final int id = data.getInt("id"); -+ -+ String remap = HelperItemNameV102.getNameFromId(id); -+ if (remap == null) { -+ LOGGER.warn("Unknown legacy integer id (V102) " + id); -+ remap = HelperItemNameV102.getNameFromId(0); -+ } -+ -+ data.setString("id", remap); -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:potion", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final short damage = data.getShort("Damage"); -+ if (damage != 0) { -+ data.setShort("Damage", (short)0); -+ } -+ MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ tag = Types.NBT.createEmptyMap(); -+ data.setMap("tag", tag); -+ } -+ -+ if (!tag.hasKey("Potion", ObjectType.STRING)) { -+ final String converted = HelperItemNameV102.getPotionNameFromId(damage); -+ tag.setString("Potion", converted == null ? "minecraft:water" : converted); -+ if ((damage & 16384) == 16384) { -+ data.setString("id", "minecraft:splash_potion"); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V102() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1022.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1022.java -new file mode 100644 -index 0000000000000000000000000000000000000000..dab97581780d0d3156335fe0fbb84ea0823c5585 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1022.java -@@ -0,0 +1,43 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1022 { -+ -+ private static final int VERSION = MCVersions.V17W06A; -+ -+ public static void register() { -+ MCTypeRegistry.PLAYER.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data.getMap("RootVehicle"), "Entity", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "ender_pearls", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Inventory", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "EnderItems", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "ShoulderEntityLeft", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "ShoulderEntityRight", fromVersion, toVersion); -+ -+ final MapType recipeBook = data.getMap("recipeBook"); -+ if (recipeBook != null) { -+ WalkerUtils.convertList(MCTypeRegistry.RECIPE, recipeBook, "recipes", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.RECIPE, recipeBook, "toBeDisplayed", fromVersion, toVersion); -+ } -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.HOTBAR.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ for (final String key : data.keys()) { -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, key, fromVersion, toVersion); -+ } -+ -+ return null; -+ }); -+ } -+ -+ private V1022() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V105.java b/ca/spottedleaf/dataconverter/minecraft/versions/V105.java -new file mode 100644 -index 0000000000000000000000000000000000000000..072c64eda648496ceee300abaff62c8b64a84219 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V105.java -@@ -0,0 +1,49 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperSpawnEggNameV105; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V105 { -+ -+ private static final int VERSION = MCVersions.V15W32C + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:spawn_egg", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ tag = Types.NBT.createEmptyMap(); -+ } -+ -+ final short damage = data.getShort("Damage"); -+ if (damage != 0) { -+ data.setShort("Damage", (short)0); -+ } -+ -+ MapType entityTag = tag.getMap("EntityTag"); -+ if (entityTag == null) { -+ entityTag = Types.NBT.createEmptyMap(); -+ } -+ -+ if (!entityTag.hasKey("id", ObjectType.STRING)) { -+ final String converted = HelperSpawnEggNameV105.getSpawnNameFromId(damage); -+ if (converted != null) { -+ entityTag.setString("id", converted); -+ tag.setMap("EntityTag", entityTag); -+ data.setMap("tag", tag); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V105() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V106.java b/ca/spottedleaf/dataconverter/minecraft/versions/V106.java -new file mode 100644 -index 0000000000000000000000000000000000000000..025488260309ea2816b6513338a0aba21fd6f9e3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V106.java -@@ -0,0 +1,83 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V106 { -+ -+ private static final int VERSION = MCVersions.V15W32C + 2; -+ -+ public static void register() { -+ // V106 -> V15W32C + 2 -+ -+ MCTypeRegistry.UNTAGGED_SPAWNER.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // While all converters for spawners check the id for this version, we don't because spawners exist in minecarts. ooops! Loading a chunk -+ // with a minecart spawner from 1.7.10 in 1.16.5 vanilla will fail to convert! Clearly there was a mistake in how they -+ // used and applied spawner converters. In anycase, do not check the id - we are not guaranteed to be a tile -+ // entity. We can be a regular old minecart spawner. And we know we are a spawner because this is only called from data walkers. -+ -+ final String entityId = data.getString("EntityId"); -+ if (entityId != null) { -+ data.remove("EntityId"); -+ MapType spawnData = data.getMap("SpawnData"); -+ if (spawnData == null) { -+ spawnData = Types.NBT.createEmptyMap(); -+ data.setMap("SpawnData", spawnData); -+ } -+ spawnData.setString("id", entityId.isEmpty() ? "Pig" : entityId); -+ } -+ -+ final ListType spawnPotentials = data.getList("SpawnPotentials", ObjectType.MAP); -+ if (spawnPotentials != null) { -+ for (int i = 0, len = spawnPotentials.size(); i < len; ++i) { -+ // convert to standard entity format (it's not a coincidence a walker for spawners is only added -+ // in this version) -+ final MapType spawn = spawnPotentials.getMap(i); -+ final String spawnType = spawn.getString("Type"); -+ if (spawnType == null) { -+ continue; -+ } -+ spawn.remove("Type"); -+ -+ MapType properties = spawn.getMap("Properties"); -+ if (properties == null) { -+ properties = Types.NBT.createEmptyMap(); -+ } else { -+ spawn.remove("Properties"); -+ } -+ -+ properties.setString("id", spawnType); -+ -+ spawn.setMap("Entity", properties); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.UNTAGGED_SPAWNER.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final ListType spawnPotentials = data.getList("SpawnPotentials", ObjectType.MAP); -+ if (spawnPotentials != null) { -+ for (int i = 0, len = spawnPotentials.size(); i < len; ++i) { -+ final MapType spawnPotential = spawnPotentials.getMap(i); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, spawnPotential, "Entity", fromVersion, toVersion); -+ } -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "SpawnData", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ private V106() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V107.java b/ca/spottedleaf/dataconverter/minecraft/versions/V107.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1b845e6df83694de203181382094c6c30684c0cc ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V107.java -@@ -0,0 +1,43 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V107 { -+ -+ private static final int VERSION = MCVersions.V15W32C + 3; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("Minecart", new DataConverter<>(VERSION) { -+ protected final String[] MINECART_IDS = new String[] { -+ "MinecartRideable", // 0 -+ "MinecartChest", // 1 -+ "MinecartFurnace", // 2 -+ "MinecartTNT", // 3 -+ "MinecartSpawner", // 4 -+ "MinecartHopper", // 5 -+ "MinecartCommandBlock" // 6 -+ }; -+ // Vanilla does not use all of the IDs here. The legacy (pre DFU) code does, so I'm going to use them. -+ // No harm in catching more cases here. -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ String newId = "MinecartRideable"; // dfl -+ final int type = data.getInt("Type"); -+ data.remove("Type"); -+ -+ if (type >= 0 && type < MINECART_IDS.length) { -+ newId = MINECART_IDS[type]; -+ } -+ data.setString("id", newId); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V107() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V108.java b/ca/spottedleaf/dataconverter/minecraft/versions/V108.java -new file mode 100644 -index 0000000000000000000000000000000000000000..19246f5219896f018b2e6a6adfcadce95a795f59 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V108.java -@@ -0,0 +1,46 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.mojang.logging.LogUtils; -+import org.slf4j.Logger; -+import java.util.UUID; -+ -+public final class V108 { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final int VERSION = MCVersions.V15W32C + 4; -+ -+ public static void register() { -+ // Convert String UUID into UUIDMost and UUIDLeast -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String uuidString = data.getString("UUID"); -+ -+ if (uuidString == null) { -+ return null; -+ } -+ data.remove("UUID"); -+ -+ final UUID uuid; -+ try { -+ uuid = UUID.fromString(uuidString); -+ } catch (final Exception ex) { -+ LOGGER.warn("Failed to parse UUID for legacy entity (V108): " + uuidString, ex); -+ return null; -+ } -+ -+ data.setLong("UUIDMost", uuid.getMostSignificantBits()); -+ data.setLong("UUIDLeast", uuid.getLeastSignificantBits()); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V108() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V109.java b/ca/spottedleaf/dataconverter/minecraft/versions/V109.java -new file mode 100644 -index 0000000000000000000000000000000000000000..05e54a7f716899060aae56be20e8b3764bc97081 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V109.java -@@ -0,0 +1,41 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V109 { -+ -+ private static final int VERSION = MCVersions.V15W32C + 5; -+ -+ public static void register() { -+ // Converts health to be in float, and cleans up whatever the hell was going on with HealF and Health... -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Number healF = data.getNumber("HealF"); -+ final Number heal = data.getNumber("Health"); -+ -+ final float newHealth; -+ -+ if (healF != null) { -+ data.remove("HealF"); -+ newHealth = healF.floatValue(); -+ } else { -+ if (heal == null) { -+ return null; -+ } -+ -+ newHealth = heal.floatValue(); -+ } -+ -+ data.setFloat("Health", newHealth); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V109() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V110.java b/ca/spottedleaf/dataconverter/minecraft/versions/V110.java -new file mode 100644 -index 0000000000000000000000000000000000000000..11db20648cf877eacaa2a39e62fa66daad3a79bb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V110.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V110 { -+ -+ private static final int VERSION = MCVersions.V15W32C + 6; -+ -+ public static void register() { -+ // Moves the Saddle boolean to be an actual saddle item. Note: The data walker for the SaddleItem exists -+ // in V99, it doesn't need to be added here. -+ MCTypeRegistry.ENTITY.addConverterForId("EntityHorse", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!data.getBoolean("Saddle") || data.hasKey("SaddleItem", ObjectType.MAP)) { -+ return null; -+ } -+ -+ final MapType saddleItem = Types.NBT.createEmptyMap(); -+ data.remove("Saddle"); -+ data.setMap("SaddleItem", saddleItem); -+ -+ saddleItem.setString("id", "minecraft:saddle"); -+ saddleItem.setByte("Count", (byte)1); -+ saddleItem.setShort("Damage", (short)0); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V110() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V111.java b/ca/spottedleaf/dataconverter/minecraft/versions/V111.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9eaf34660e1b42ab99d06d43d86cda13a69448ae ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V111.java -@@ -0,0 +1,64 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V111 { -+ -+ private static final int VERSION = MCVersions.V15W33B; -+ -+ public static void register() { -+ final EntityRotationFix rotationFix = new EntityRotationFix(VERSION); -+ MCTypeRegistry.ENTITY.addConverterForId("Painting", rotationFix); -+ MCTypeRegistry.ENTITY.addConverterForId("ItemFrame", rotationFix); -+ } -+ -+ private V111() {} -+ -+ protected static final class EntityRotationFix extends DataConverter { -+ -+ private static final int[][] DIRECTIONS = new int[][] { -+ {0, 0, 1}, -+ {-1, 0, 0}, -+ {0, 0, -1}, -+ {1, 0, 0} -+ }; -+ -+ public EntityRotationFix(final int version) { -+ super(version); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getNumber("Facing") != null) { -+ return null; -+ } -+ -+ final Number direction = data.getNumber("Direction"); -+ final int facing; -+ if (direction != null) { -+ data.remove("Direction"); -+ facing = direction.intValue() % DIRECTIONS.length; -+ final int[] offsets = DIRECTIONS[facing]; -+ data.setInt("TileX", data.getInt("TileX") + offsets[0]); -+ data.setInt("TileY", data.getInt("TileY") + offsets[1]); -+ data.setInt("TileZ", data.getInt("TileZ") + offsets[2]); -+ if ("ItemFrame".equals(data.getString("id"))) { -+ final Number rotation = data.getNumber("ItemRotation"); -+ if (rotation != null) { -+ data.setByte("ItemRotation", (byte)(rotation.byteValue() * 2)); -+ } -+ } -+ } else { -+ facing = data.getByte("Dir") % DIRECTIONS.length; -+ data.remove("Dir"); -+ } -+ -+ data.setByte("Facing", (byte)facing); -+ -+ return null; -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1125.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1125.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ff99e8e263d6fd234bce01c0c02fdb3eb0ff7eaa ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1125.java -@@ -0,0 +1,101 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.hooks.DataHookValueTypeEnforceNamespaced; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V1125 { -+ -+ private static final int VERSION = MCVersions.V17W15A; -+ private static final int BED_BLOCK_ID = 416; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ final int chunkX = level.getInt("xPos"); -+ final int chunkZ = level.getInt("zPos"); -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections == null) { -+ return null; -+ } -+ -+ ListType tileEntities = level.getList("TileEntities", ObjectType.MAP); -+ if (tileEntities == null) { -+ tileEntities = Types.NBT.createEmptyList(); -+ level.setList("TileEntities", tileEntities); -+ } -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ final byte sectionY = section.getByte("Y"); -+ final byte[] blocks = section.getBytes("Blocks"); -+ -+ if (blocks == null) { -+ continue; -+ } -+ -+ for (int blockIndex = 0; blockIndex < blocks.length; ++blockIndex) { -+ if (BED_BLOCK_ID != ((blocks[blockIndex] & 255) << 4)) { -+ continue; -+ } -+ -+ final int localX = blockIndex & 15; -+ final int localZ = (blockIndex >> 4) & 15; -+ final int localY = (blockIndex >> 8) & 15; -+ -+ final MapType newTile = Types.NBT.createEmptyMap(); -+ newTile.setString("id", "minecraft:bed"); -+ newTile.setInt("x", localX + (chunkX << 4)); -+ newTile.setInt("y", localY + (sectionY << 4)); -+ newTile.setInt("z", localZ + (chunkZ << 4)); -+ newTile.setShort("color", (short)14); // Red -+ -+ tileEntities.addMap(newTile); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:bed", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getShort("Damage") == 0) { -+ data.setShort("Damage", (short)14); // Red -+ } -+ -+ return null; -+ } -+ }); -+ -+ -+ MCTypeRegistry.ADVANCEMENTS.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertKeys(MCTypeRegistry.BIOME, data.getMap("minecraft:adventure/adventuring_time"), "criteria", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ENTITY_NAME, data.getMap("minecraft:adventure/kill_a_mob"), "criteria", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ENTITY_NAME, data.getMap("minecraft:adventure/kill_all_mobs"), "criteria", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ENTITY_NAME, data.getMap("minecraft:adventure/bred_all_animals"), "criteria", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Enforce namespacing for ids -+ MCTypeRegistry.BIOME.addStructureHook(VERSION, new DataHookValueTypeEnforceNamespaced()); -+ } -+ -+ private V1125() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V113.java b/ca/spottedleaf/dataconverter/minecraft/versions/V113.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3470afede273da32d98571524817dc1979b3044d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V113.java -@@ -0,0 +1,40 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V113 { -+ -+ private static final int VERSION = MCVersions.V15W33C + 1; -+ -+ private static void checkList(final MapType data, final String id, final int requiredLength) { -+ final ListType list = data.getList(id, ObjectType.FLOAT); -+ if (list != null && list.size() == requiredLength) { -+ for (int i = 0; i < requiredLength; ++i) { -+ if (list.getFloat(i) != 0.0F) { -+ return; -+ } -+ } -+ } -+ -+ data.remove(id); -+ } -+ -+ public static void register() { -+ // Removes "HandDropChances" and "ArmorDropChances" if they're empty. -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ checkList(data, "HandDropChances", 2); -+ checkList(data, "ArmorDropChances", 4); -+ return null; -+ } -+ }); -+ } -+ -+ private V113() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1344.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1344.java -new file mode 100644 -index 0000000000000000000000000000000000000000..18d5a0f47066b8c92dc13e5b7c441f8c8258c85d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1344.java -@@ -0,0 +1,176 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+ -+public final class V1344 { -+ -+ private static final int VERSION = MCVersions.V1_12_2 + 1; -+ -+ private static final Int2ObjectOpenHashMap BUTTON_ID_TO_NAME = new Int2ObjectOpenHashMap<>(); -+ static { -+ BUTTON_ID_TO_NAME.put(0, "key.unknown"); -+ BUTTON_ID_TO_NAME.put(11, "key.0"); -+ BUTTON_ID_TO_NAME.put(2, "key.1"); -+ BUTTON_ID_TO_NAME.put(3, "key.2"); -+ BUTTON_ID_TO_NAME.put(4, "key.3"); -+ BUTTON_ID_TO_NAME.put(5, "key.4"); -+ BUTTON_ID_TO_NAME.put(6, "key.5"); -+ BUTTON_ID_TO_NAME.put(7, "key.6"); -+ BUTTON_ID_TO_NAME.put(8, "key.7"); -+ BUTTON_ID_TO_NAME.put(9, "key.8"); -+ BUTTON_ID_TO_NAME.put(10, "key.9"); -+ BUTTON_ID_TO_NAME.put(30, "key.a"); -+ BUTTON_ID_TO_NAME.put(40, "key.apostrophe"); -+ BUTTON_ID_TO_NAME.put(48, "key.b"); -+ BUTTON_ID_TO_NAME.put(43, "key.backslash"); -+ BUTTON_ID_TO_NAME.put(14, "key.backspace"); -+ BUTTON_ID_TO_NAME.put(46, "key.c"); -+ BUTTON_ID_TO_NAME.put(58, "key.caps.lock"); -+ BUTTON_ID_TO_NAME.put(51, "key.comma"); -+ BUTTON_ID_TO_NAME.put(32, "key.d"); -+ BUTTON_ID_TO_NAME.put(211, "key.delete"); -+ BUTTON_ID_TO_NAME.put(208, "key.down"); -+ BUTTON_ID_TO_NAME.put(18, "key.e"); -+ BUTTON_ID_TO_NAME.put(207, "key.end"); -+ BUTTON_ID_TO_NAME.put(28, "key.enter"); -+ BUTTON_ID_TO_NAME.put(13, "key.equal"); -+ BUTTON_ID_TO_NAME.put(1, "key.escape"); -+ BUTTON_ID_TO_NAME.put(33, "key.f"); -+ BUTTON_ID_TO_NAME.put(59, "key.f1"); -+ BUTTON_ID_TO_NAME.put(68, "key.f10"); -+ BUTTON_ID_TO_NAME.put(87, "key.f11"); -+ BUTTON_ID_TO_NAME.put(88, "key.f12"); -+ BUTTON_ID_TO_NAME.put(100, "key.f13"); -+ BUTTON_ID_TO_NAME.put(101, "key.f14"); -+ BUTTON_ID_TO_NAME.put(102, "key.f15"); -+ BUTTON_ID_TO_NAME.put(103, "key.f16"); -+ BUTTON_ID_TO_NAME.put(104, "key.f17"); -+ BUTTON_ID_TO_NAME.put(105, "key.f18"); -+ BUTTON_ID_TO_NAME.put(113, "key.f19"); -+ BUTTON_ID_TO_NAME.put(60, "key.f2"); -+ BUTTON_ID_TO_NAME.put(61, "key.f3"); -+ BUTTON_ID_TO_NAME.put(62, "key.f4"); -+ BUTTON_ID_TO_NAME.put(63, "key.f5"); -+ BUTTON_ID_TO_NAME.put(64, "key.f6"); -+ BUTTON_ID_TO_NAME.put(65, "key.f7"); -+ BUTTON_ID_TO_NAME.put(66, "key.f8"); -+ BUTTON_ID_TO_NAME.put(67, "key.f9"); -+ BUTTON_ID_TO_NAME.put(34, "key.g"); -+ BUTTON_ID_TO_NAME.put(41, "key.grave.accent"); -+ BUTTON_ID_TO_NAME.put(35, "key.h"); -+ BUTTON_ID_TO_NAME.put(199, "key.home"); -+ BUTTON_ID_TO_NAME.put(23, "key.i"); -+ BUTTON_ID_TO_NAME.put(210, "key.insert"); -+ BUTTON_ID_TO_NAME.put(36, "key.j"); -+ BUTTON_ID_TO_NAME.put(37, "key.k"); -+ BUTTON_ID_TO_NAME.put(82, "key.keypad.0"); -+ BUTTON_ID_TO_NAME.put(79, "key.keypad.1"); -+ BUTTON_ID_TO_NAME.put(80, "key.keypad.2"); -+ BUTTON_ID_TO_NAME.put(81, "key.keypad.3"); -+ BUTTON_ID_TO_NAME.put(75, "key.keypad.4"); -+ BUTTON_ID_TO_NAME.put(76, "key.keypad.5"); -+ BUTTON_ID_TO_NAME.put(77, "key.keypad.6"); -+ BUTTON_ID_TO_NAME.put(71, "key.keypad.7"); -+ BUTTON_ID_TO_NAME.put(72, "key.keypad.8"); -+ BUTTON_ID_TO_NAME.put(73, "key.keypad.9"); -+ BUTTON_ID_TO_NAME.put(78, "key.keypad.add"); -+ BUTTON_ID_TO_NAME.put(83, "key.keypad.decimal"); -+ BUTTON_ID_TO_NAME.put(181, "key.keypad.divide"); -+ BUTTON_ID_TO_NAME.put(156, "key.keypad.enter"); -+ BUTTON_ID_TO_NAME.put(141, "key.keypad.equal"); -+ BUTTON_ID_TO_NAME.put(55, "key.keypad.multiply"); -+ BUTTON_ID_TO_NAME.put(74, "key.keypad.subtract"); -+ BUTTON_ID_TO_NAME.put(38, "key.l"); -+ BUTTON_ID_TO_NAME.put(203, "key.left"); -+ BUTTON_ID_TO_NAME.put(56, "key.left.alt"); -+ BUTTON_ID_TO_NAME.put(26, "key.left.bracket"); -+ BUTTON_ID_TO_NAME.put(29, "key.left.control"); -+ BUTTON_ID_TO_NAME.put(42, "key.left.shift"); -+ BUTTON_ID_TO_NAME.put(219, "key.left.win"); -+ BUTTON_ID_TO_NAME.put(50, "key.m"); -+ BUTTON_ID_TO_NAME.put(12, "key.minus"); -+ BUTTON_ID_TO_NAME.put(49, "key.n"); -+ BUTTON_ID_TO_NAME.put(69, "key.num.lock"); -+ BUTTON_ID_TO_NAME.put(24, "key.o"); -+ BUTTON_ID_TO_NAME.put(25, "key.p"); -+ BUTTON_ID_TO_NAME.put(209, "key.page.down"); -+ BUTTON_ID_TO_NAME.put(201, "key.page.up"); -+ BUTTON_ID_TO_NAME.put(197, "key.pause"); -+ BUTTON_ID_TO_NAME.put(52, "key.period"); -+ BUTTON_ID_TO_NAME.put(183, "key.print.screen"); -+ BUTTON_ID_TO_NAME.put(16, "key.q"); -+ BUTTON_ID_TO_NAME.put(19, "key.r"); -+ BUTTON_ID_TO_NAME.put(205, "key.right"); -+ BUTTON_ID_TO_NAME.put(184, "key.right.alt"); -+ BUTTON_ID_TO_NAME.put(27, "key.right.bracket"); -+ BUTTON_ID_TO_NAME.put(157, "key.right.control"); -+ BUTTON_ID_TO_NAME.put(54, "key.right.shift"); -+ BUTTON_ID_TO_NAME.put(220, "key.right.win"); -+ BUTTON_ID_TO_NAME.put(31, "key.s"); -+ BUTTON_ID_TO_NAME.put(70, "key.scroll.lock"); -+ BUTTON_ID_TO_NAME.put(39, "key.semicolon"); -+ BUTTON_ID_TO_NAME.put(53, "key.slash"); -+ BUTTON_ID_TO_NAME.put(57, "key.space"); -+ BUTTON_ID_TO_NAME.put(20, "key.t"); -+ BUTTON_ID_TO_NAME.put(15, "key.tab"); -+ BUTTON_ID_TO_NAME.put(22, "key.u"); -+ BUTTON_ID_TO_NAME.put(200, "key.up"); -+ BUTTON_ID_TO_NAME.put(47, "key.v"); -+ BUTTON_ID_TO_NAME.put(17, "key.w"); -+ BUTTON_ID_TO_NAME.put(45, "key.x"); -+ BUTTON_ID_TO_NAME.put(21, "key.y"); -+ BUTTON_ID_TO_NAME.put(44, "key.z"); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ for (final String key : data.keys()) { -+ if (!key.startsWith("key_")) { -+ continue; -+ } -+ final String value = data.getString(key); -+ final int code; -+ try { -+ code = Integer.parseInt(value); -+ } catch (final NumberFormatException ex) { -+ continue; -+ } -+ -+ final String newEntry; -+ -+ if (code < 0) { -+ final int mouseCode = code + 100; -+ switch (mouseCode) { -+ case 0: -+ newEntry = "key.mouse.left"; -+ break; -+ case 1: -+ newEntry = "key.mouse.right"; -+ break; -+ case 2: -+ newEntry = "key.mouse.middle"; -+ break; -+ default: -+ newEntry = "key.mouse." + (mouseCode + 1); -+ break; -+ } -+ } else { -+ newEntry = BUTTON_ID_TO_NAME.getOrDefault(code, "key.unknown"); -+ } -+ -+ // No CMEs occur for existing entries in maps. -+ data.setString(key, newEntry); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V1344() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V135.java b/ca/spottedleaf/dataconverter/minecraft/versions/V135.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9b6d09980bd1479ca9a4dc275f2abb4cfbecd545 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V135.java -@@ -0,0 +1,62 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V135 { -+ -+ private static final int VERSION = MCVersions.V15W40B + 1; -+ -+ public static void register() { -+ // In this update they changed the "Riding" value to be "Passengers", which is now a list. So it added -+ // support for multiple entities riding. Of course, Riding and Passenger are opposites - so it also will -+ // switch the data layout to be from highest rider to lowest rider, in terms of depth. -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(MapType data, final long sourceVersion, final long toVersion) { -+ MapType ret = null; -+ while (data.hasKey("Riding", ObjectType.MAP)) { -+ final MapType riding = data.getMap("Riding"); -+ data.remove("Riding"); -+ -+ final ListType passengers = Types.NBT.createEmptyList(); -+ riding.setList("Passengers", passengers); -+ passengers.addMap(data); -+ -+ ret = data = riding; -+ } -+ -+ return ret; -+ } -+ }); -+ -+ -+ MCTypeRegistry.PLAYER.addStructureWalker(VERSION, new DataWalkerItemLists("Inventory", "EnderItems")); -+ MCTypeRegistry.PLAYER.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType rootVehicle = data.getMap("RootVehicle"); -+ if (rootVehicle != null) { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, rootVehicle, "Entity", fromVersion, toVersion); -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "ender_pearls", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.ENTITY.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "Passengers", fromVersion, toVersion); -+ -+ return MCTypeRegistry.ENTITY_EQUIPMENT.convert(data, fromVersion, toVersion); -+ }); -+ -+ } -+ -+ private V135() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V143.java b/ca/spottedleaf/dataconverter/minecraft/versions/V143.java -new file mode 100644 -index 0000000000000000000000000000000000000000..90889dddd8a510fe69c47413f5fe3ed4a756fedb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V143.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+ -+public final class V143 { -+ -+ private static final int VERSION = MCVersions.V15W44B; -+ -+ public static void register() { -+ ConverterAbstractEntityRename.register(VERSION, (final String input) -> { -+ return "TippedArrow".equals(input) ? "Arrow" : null; -+ }); -+ } -+ -+ private V143() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1446.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1446.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8d1d3a5898e87754510e63ce7444286418a077ef ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1446.java -@@ -0,0 +1,35 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1446 { -+ -+ private static final int VERSION = MCVersions.V17W43B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ for (final String key : data.keys()) { -+ if (!key.startsWith("key_")) { -+ continue; -+ } -+ -+ final String value = data.getString(key); -+ -+ if (value.startsWith("key.mouse") || value.startsWith("scancode.")) { -+ continue; -+ } -+ -+ data.setString(key, "key.keyboard." + value.substring("key.".length())); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V1446() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1450.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1450.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7f2e0b6c1f75c61230d138a2fa4328dd9cc99eab ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1450.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperBlockFlatteningV1450; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1450 { -+ -+ private static final int VERSION = MCVersions.V17W46A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType ret = HelperBlockFlatteningV1450.flattenNBT(data); -+ return ret == data ? null : ret.copy(); // copy to avoid problems with later state datafixers -+ } -+ }); -+ } -+ -+ private V1450() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1451.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1451.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1856060ba8124c36fd64c816921a4b908fec2bfd ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1451.java -@@ -0,0 +1,518 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.chunk.ConverterFlattenChunk; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperBlockFlatteningV1450; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperItemNameV102; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterFlattenItemStack; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterFlattenSpawnEgg; -+import ca.spottedleaf.dataconverter.minecraft.converters.stats.ConverterFlattenStats; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterFlattenEntity; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.minecraft.walkers.tile_entity.DataWalkerTileEntities; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.common.base.Splitter; -+import net.minecraft.resources.ResourceLocation; -+import net.minecraft.util.datafix.fixes.BlockStateData; -+import net.minecraft.util.datafix.fixes.EntityBlockStateFix; -+import org.apache.commons.lang3.math.NumberUtils; -+import java.util.Iterator; -+import java.util.List; -+import java.util.stream.Collectors; -+import java.util.stream.StreamSupport; -+ -+public final class V1451 { -+ -+ private static final int VERSION = MCVersions.V17W47A; -+ -+ public static String packWithDot(final String string) { -+ final ResourceLocation resourceLocation = ResourceLocation.tryParse(string); -+ return resourceLocation != null ? resourceLocation.getNamespace() + "." + resourceLocation.getPath() : string; -+ } -+ -+ public static void register() { -+ // V0 -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, 0, "minecraft:trapped_chest", new DataWalkerItemLists("Items")); -+ -+ // V1 -+ MCTypeRegistry.CHUNK.addStructureConverter(new ConverterFlattenChunk()); -+ -+ MCTypeRegistry.CHUNK.addStructureWalker(VERSION, 1, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, level, "Entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TILE_ENTITY, level, "TileEntities", fromVersion, toVersion); -+ -+ final ListType tileTicks = level.getList("TileTicks", ObjectType.MAP); -+ if (tileTicks != null) { -+ for (int i = 0, len = tileTicks.size(); i < len; ++i) { -+ final MapType tileTick = tileTicks.getMap(i); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, tileTick, "i", fromVersion, toVersion); -+ } -+ } -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, section, "Palette", fromVersion, toVersion); -+ } -+ } -+ -+ return null; -+ }); -+ -+ // V2 -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:piston", new DataConverter<>(VERSION, 2) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int blockId = data.getInt("blockId"); -+ final int blockData = data.getInt("blockData") & 15; -+ -+ data.remove("blockId"); -+ data.remove("blockData"); -+ -+ data.setMap("blockState", HelperBlockFlatteningV1450.getNBTForId((blockId << 4) | blockData).copy()); // copy to avoid problems with later state datafixers -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, 2, "minecraft:piston", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "blockState")); -+ -+ // V3 -+ ConverterFlattenEntity.register(); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:filled_map", new DataConverter<>(VERSION, 3) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ tag = Types.NBT.createEmptyMap(); -+ data.setMap("tag", tag); -+ } -+ -+ if (!tag.hasKey("map", ObjectType.NUMBER)) { // This if is from CB. as usual, no documentation from CB. I'm guessing it just wants to avoid possibly overwriting it. seems fine. -+ tag.setInt("map", data.getInt("Damage")); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:potion", new DataWalkerItems("Potion")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:arrow", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "inBlockState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:enderman", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "carriedBlockState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:falling_block", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "BlockState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:falling_block", new DataWalkerTileEntities("TileEntityData")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:spectral_arrow", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "inBlockState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:chest_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:chest_minecart", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:commandblock_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:commandblock_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "LastOutput")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:furnace_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:hopper_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:hopper_minecart", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:spawner_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:spawner_minecart", (final MapType data, final long fromVersion, final long toVersion) -> { -+ return MCTypeRegistry.UNTAGGED_SPAWNER.convert(data, fromVersion, toVersion); -+ }); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 3, "minecraft:tnt_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "DisplayState")); -+ -+ // V4 -+ MCTypeRegistry.BLOCK_NAME.addConverter(new DataConverter<>(VERSION, 4) { -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ if (data instanceof Number) { -+ return HelperBlockFlatteningV1450.getNameForId(((Number)data).intValue()); -+ } else if (data instanceof String) { -+ return HelperBlockFlatteningV1450.getNewBlockName((String)data); // structure hook ensured data is namespaced -+ } -+ return null; -+ } -+ }); -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new ConverterFlattenItemStack()); -+ -+ // V5 -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:spawn_egg", new ConverterFlattenSpawnEgg(VERSION, 5)); -+ /* This datafixer has been disabled because the collar colour handler did not change from 1.12 -> 1.13 at all. -+ // So clearly somebody fucked up. This fixes wolf colours incorrectly converting between versions -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:wolf", new DataConverter<>(VERSION, 5) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Number colour = data.getNumber("CollarColor"); -+ -+ if (colour != null) { -+ data.setByte("CollarColor", (byte)(15 - colour.intValue())); -+ } -+ -+ return null; -+ } -+ }); -+ */ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:banner", new DataConverter<>(VERSION, 5) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Number base = data.getNumber("Base"); -+ if (base != null) { -+ data.setInt("Base", 15 - base.intValue()); -+ } -+ -+ final ListType patterns = data.getList("Patterns", ObjectType.MAP); -+ if (patterns != null) { -+ for (int i = 0, len = patterns.size(); i < len; ++i) { -+ final MapType pattern = patterns.getMap(i); -+ final Number colour = pattern.getNumber("Color"); -+ if (colour != null) { -+ pattern.setInt("Color", 15 - colour.intValue()); -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.LEVEL.addStructureConverter(new DataConverter<>(VERSION, 5) { -+ private final Splitter SPLITTER = Splitter.on(';').limit(5); -+ private final Splitter LAYER_SPLITTER = Splitter.on(','); -+ private final Splitter OLD_AMOUNT_SPLITTER = Splitter.on('x').limit(2); -+ private final Splitter AMOUNT_SPLITTER = Splitter.on('*').limit(2); -+ private final Splitter BLOCK_SPLITTER = Splitter.on(':').limit(3); -+ -+ // idk man i just copy and pasted this one -+ private String fixGeneratorSettings(final String generatorSettings) { -+ if (generatorSettings.isEmpty()) { -+ return "minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block;1;village"; -+ } else { -+ Iterator iterator = SPLITTER.split(generatorSettings).iterator(); -+ String string2 = (String)iterator.next(); -+ int j; -+ String string4; -+ if (iterator.hasNext()) { -+ j = NumberUtils.toInt(string2, 0); -+ string4 = (String)iterator.next(); -+ } else { -+ j = 0; -+ string4 = string2; -+ } -+ -+ if (j >= 0 && j <= 3) { -+ StringBuilder stringBuilder = new StringBuilder(); -+ Splitter splitter = j < 3 ? OLD_AMOUNT_SPLITTER : AMOUNT_SPLITTER; -+ stringBuilder.append((String) StreamSupport.stream(LAYER_SPLITTER.split(string4).spliterator(), false).map((stringx) -> { -+ List list = splitter.splitToList(stringx); -+ int k; -+ String string3; -+ if (list.size() == 2) { -+ k = NumberUtils.toInt((String)list.get(0)); -+ string3 = (String)list.get(1); -+ } else { -+ k = 1; -+ string3 = (String)list.get(0); -+ } -+ -+ List list2 = BLOCK_SPLITTER.splitToList(string3); -+ int l = ((String)list2.get(0)).equals("minecraft") ? 1 : 0; -+ String string5 = (String)list2.get(l); -+ int m = j == 3 ? EntityBlockStateFix.getBlockId("minecraft:" + string5) : NumberUtils.toInt(string5, 0); -+ int n = l + 1; -+ int o = list2.size() > n ? NumberUtils.toInt((String)list2.get(n), 0) : 0; -+ return (k == 1 ? "" : k + "*") + BlockStateData.getTag(m << 4 | o).get("Name").asString(""); -+ }).collect(Collectors.joining(","))); -+ -+ while(iterator.hasNext()) { -+ stringBuilder.append(';').append((String)iterator.next()); -+ } -+ -+ return stringBuilder.toString(); -+ } else { -+ return "minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block;1;village"; -+ } -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"flat".equalsIgnoreCase(data.getString("generatorName"))) { -+ return null; -+ } -+ -+ final String generatorOptions = data.getString("generatorOptions"); -+ if (generatorOptions == null) { -+ return null; -+ } -+ -+ data.setString("generatorOptions", this.fixGeneratorSettings(generatorOptions)); -+ -+ return null; -+ } -+ }); -+ -+ // V6 -+ MCTypeRegistry.STATS.addStructureConverter(ConverterFlattenStats.makeStatsConverter()); -+ MCTypeRegistry.OBJECTIVE.addStructureConverter(ConverterFlattenStats.makeObjectiveConverter()); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:jukebox", new DataConverter<>(VERSION, 6) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int record = data.getInt("Record"); -+ if (record <= 0) { -+ return null; -+ } -+ -+ data.remove("Record"); -+ -+ final String newItemId = ConverterFlattenItemStack.flattenItem(HelperItemNameV102.getNameFromId(record), 0); -+ if (newItemId == null) { -+ return null; -+ } -+ -+ final MapType recordItem = Types.NBT.createEmptyMap(); -+ data.setMap("RecordItem", recordItem); -+ -+ recordItem.setString("id", newItemId); -+ recordItem.setByte("Count", (byte)1); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.STATS.addStructureWalker(VERSION, 6, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType stats = data.getMap("stats"); -+ if (stats == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertKeys(MCTypeRegistry.BLOCK_NAME, stats, "minecraft:mined", fromVersion, toVersion); -+ -+ WalkerUtils.convertKeys(MCTypeRegistry.ITEM_NAME, stats, "minecraft:crafted", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ITEM_NAME, stats, "minecraft:used", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ITEM_NAME, stats, "minecraft:broken", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ITEM_NAME, stats, "minecraft:picked_up", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ITEM_NAME, stats, "minecraft:dropped", fromVersion, toVersion); -+ -+ WalkerUtils.convertKeys(MCTypeRegistry.ENTITY_NAME, stats, "minecraft:killed", fromVersion, toVersion); -+ WalkerUtils.convertKeys(MCTypeRegistry.ENTITY_NAME, stats, "minecraft:killed_by", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.OBJECTIVE.addStructureHook(VERSION, 6, new DataHook<>() { -+ @Override -+ public MapType preHook(final MapType data, final long fromVersion, final long toVersion) { -+ // unpack -+ final String criteriaName = data.getString("CriteriaName"); -+ String type; -+ String id; -+ -+ if (criteriaName != null) { -+ final int index = criteriaName.indexOf(':'); -+ if (index < 0) { -+ type = "_special"; -+ id = criteriaName; -+ } else { -+ try { -+ type = ResourceLocation.bySeparator(criteriaName.substring(0, index), '.').toString(); -+ id = ResourceLocation.bySeparator(criteriaName.substring(index + 1), '.').toString(); -+ } catch (final Exception ex) { -+ type = "_special"; -+ id = criteriaName; -+ } -+ } -+ } else { -+ type = null; -+ id = null; -+ } -+ -+ if (type != null && id != null) { -+ final MapType criteriaType = Types.NBT.createEmptyMap(); -+ data.setMap("CriteriaType", criteriaType); -+ -+ criteriaType.setString("type", type); -+ criteriaType.setString("id", id); -+ } -+ -+ return null; -+ } -+ -+ @Override -+ public MapType postHook(final MapType data, final long fromVersion, final long toVersion) { -+ // repack -+ final MapType criteriaType = data.getMap("CriteriaType"); -+ -+ final String newName; -+ if (criteriaType == null) { -+ newName = null; -+ } else { -+ final String type = criteriaType.getString("type"); -+ final String id = criteriaType.getString("id"); -+ if (type != null && id != null) { -+ if ("_special".equals(type)) { -+ newName = id; -+ } else { -+ newName = packWithDot(type) + ":" + packWithDot(id); -+ } -+ } else { -+ newName = null; -+ } -+ } -+ -+ if (newName != null) { -+ data.remove("CriteriaType"); -+ data.setString("CriteriaName", newName); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.OBJECTIVE.addStructureWalker(VERSION, 6, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "DisplayName", fromVersion, toVersion); -+ -+ final MapType criteriaType = data.getMap("CriteriaType"); -+ if (criteriaType == null) { -+ return null; -+ } -+ -+ final String type = criteriaType.getString("type"); -+ -+ if (type == null) { -+ return null; -+ } -+ -+ switch (type) { -+ case "minecraft:mined": { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, criteriaType, "id", fromVersion, toVersion); -+ break; -+ } -+ -+ case "minecraft:crafted": -+ case "minecraft:used": -+ case "minecraft:broken": -+ case "minecraft:picked_up": -+ case "minecraft:dropped": { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_NAME, criteriaType, "id", fromVersion, toVersion); -+ break; -+ } -+ -+ case "minecraft:killed": -+ case "minecraft:killed_by": { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY_NAME, criteriaType, "id", fromVersion, toVersion); -+ break; -+ } -+ } -+ -+ return null; -+ }); -+ -+ -+ // V7 -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureConverter(new DataConverter<>(VERSION, 7) { -+ private static void convertToBlockState(final MapType data, final String path) { -+ final Number number = data.getNumber(path); -+ if (number == null) { -+ return; -+ } -+ -+ data.setMap(path, HelperBlockFlatteningV1450.getNBTForId(number.intValue() << 4).copy()); // copy to avoid problems with later state datafixers -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType children = data.getList("Children", ObjectType.MAP); -+ if (children == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = children.size(); i < len; ++i) { -+ final MapType child = children.getMap(i); -+ -+ final String id = child.getString("id"); -+ -+ switch (id) { -+ case "ViF": -+ convertToBlockState(child, "CA"); -+ convertToBlockState(child, "CB"); -+ break; -+ case "ViDF": -+ convertToBlockState(child, "CA"); -+ convertToBlockState(child, "CB"); -+ convertToBlockState(child, "CC"); -+ convertToBlockState(child, "CD"); -+ break; -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ // convert villagers to trade with pumpkins and not the carved pumpkin -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", new DataConverter<>(VERSION, 7) { -+ private static void convertPumpkin(final MapType data, final String path) { -+ final MapType item = data.getMap(path); -+ if (item == null) { -+ return; -+ } -+ -+ final String id = item.getString("id"); -+ -+ if (id.equals("minecraft:carved_pumpkin")) { -+ item.setString("id", "minecraft:pumpkin"); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType offers = data.getMap("Offers"); -+ if (offers != null) { -+ final ListType recipes = offers.getList("Recipes", ObjectType.MAP); -+ if (recipes != null) { -+ for (int i = 0, len = recipes.size(); i < len; ++i) { -+ final MapType recipe = recipes.getMap(i); -+ -+ convertPumpkin(recipe, "buy"); -+ convertPumpkin(recipe, "buyB"); -+ convertPumpkin(recipe, "sell"); -+ } -+ } -+ } -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureWalker(VERSION, 7, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final ListType list = data.getListUnchecked("Children"); -+ if (list == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final MapType child = list.getMap(i, null); -+ if (child == null) { -+ continue; -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CA", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CB", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CC", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CD", fromVersion, toVersion); -+ } -+ -+ return null; -+ }); -+ } -+ -+ private V1451() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1456.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1456.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1ea9da33a49891da1e12fd1e870118c6e74c7464 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1456.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1456 { -+ -+ private static final int VERSION = MCVersions.V17W49B + 1; -+ -+ private static byte direction2dTo3d(final byte old) { -+ switch (old) { -+ case 0: -+ return 3; -+ case 1: -+ return 4; -+ case 2: -+ default: -+ return 2; -+ case 3: -+ return 5; -+ } -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:item_frame", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setByte("Facing", direction2dTo3d(data.getByte("Facing"))); -+ return null; -+ } -+ }); -+ } -+ -+ private V1456() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1458.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1458.java -new file mode 100644 -index 0000000000000000000000000000000000000000..84104a80ee0c0b408dda258a84cdca8c03997093 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1458.java -@@ -0,0 +1,142 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1458 { -+ -+ public static final int VERSION = MCVersions.V17W50A + 1; -+ -+ public static MapType updateCustomName(final MapType data) { -+ final String customName = data.getString("CustomName", ""); -+ -+ if (customName.isEmpty()) { -+ data.remove("CustomName"); -+ } else { -+ data.setString("CustomName", ComponentUtils.createPlainTextComponent(customName)); -+ } -+ -+ return null; -+ } -+ -+ static void named(final int version, final String id) { -+ MCTypeRegistry.TILE_ENTITY.addWalker(version, id, new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "CustomName")); -+ } -+ -+ static void namedInventory(final int version, final String id) { -+ named(version, id); -+ MCTypeRegistry.TILE_ENTITY.addWalker(version, id, new DataWalkerItemLists("Items")); -+ } -+ -+ public static void register() { -+ // From CB -+ MCTypeRegistry.PLAYER.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ return updateCustomName(data); -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if ("minecraft:commandblock_minecart".equals(data.getString("id"))) { -+ return null; -+ } -+ -+ return updateCustomName(data); -+ } -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final MapType display = tag.getMap("display"); -+ if (display == null) { -+ return null; -+ } -+ -+ final String name = display.getString("Name"); -+ if (name != null) { -+ display.setString("Name", ComponentUtils.createPlainTextComponent(name)); -+ } /* In 1.20.5, Mojang removed this branch (ItemCustomNameToComponentFix) */ /*else { -+ final String localisedName = display.getString("LocName"); -+ if (localisedName != null) { -+ display.setString("Name", ComponentUtils.createTranslatableComponent(localisedName)); -+ display.remove("LocName"); -+ } -+ }*/ -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if ("minecraft:command_block".equals(data.getString("id"))) { -+ return null; -+ } -+ -+ return updateCustomName(data); -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "Passengers", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "CustomName", fromVersion, toVersion); -+ -+ return MCTypeRegistry.ENTITY_EQUIPMENT.convert(data, fromVersion, toVersion); -+ }); -+ -+ // Note: This is not present in Vanilla, but since we have the converter from CB it makes sense that we -+ // would walk the CustomName field for Player if we are converting it -+ MCTypeRegistry.PLAYER.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data.getMap("RootVehicle"), "Entity", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "ender_pearls", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Inventory", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "EnderItems", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "ShoulderEntityLeft", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "ShoulderEntityRight", fromVersion, toVersion); -+ -+ final MapType recipeBook = data.getMap("recipeBook"); -+ if (recipeBook != null) { -+ WalkerUtils.convertList(MCTypeRegistry.RECIPE, recipeBook, "recipes", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.RECIPE, recipeBook, "toBeDisplayed", fromVersion, toVersion); -+ } -+ -+ // "From CB" -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "CustomName", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ named(VERSION, "minecraft:beacon"); -+ named(VERSION, "minecraft:banner"); -+ namedInventory(VERSION, "minecraft:brewing_stand"); -+ namedInventory(VERSION, "minecraft:chest"); -+ namedInventory(VERSION, "minecraft:trapped_chest"); -+ namedInventory(VERSION, "minecraft:dispenser"); -+ namedInventory(VERSION, "minecraft:dropper"); -+ named(VERSION, "minecraft:enchanting_table"); -+ namedInventory(VERSION, "minecraft:furnace"); -+ namedInventory(VERSION, "minecraft:hopper"); -+ namedInventory(VERSION, "minecraft:shulker_box"); -+ } -+ -+ private V1458() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1460.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1460.java -new file mode 100644 -index 0000000000000000000000000000000000000000..dca03108730af672445463326aabc156e6ae16ca ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1460.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.block_name.DataWalkerBlockNames; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import net.minecraft.resources.ResourceLocation; -+import java.util.HashMap; -+import java.util.Locale; -+import java.util.Map; -+ -+public final class V1460 { -+ -+ private static final Map MOTIVE_REMAP = new HashMap<>(); -+ -+ static { -+ MOTIVE_REMAP.put("donkeykong", "donkey_kong"); -+ MOTIVE_REMAP.put("burningskull", "burning_skull"); -+ MOTIVE_REMAP.put("skullandroses", "skull_and_roses"); -+ } -+ -+ private static final int VERSION = MCVersions.V18W01A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:painting", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ String motive = data.getString("Motive"); -+ if (motive != null) { -+ motive = motive.toLowerCase(Locale.ROOT); -+ data.setString("Motive", NamespaceUtil.correctNamespace(MOTIVE_REMAP.getOrDefault(motive, motive))); -+ } -+ return null; -+ } -+ }); -+ -+ // No idea why so many type redefines exist here in Vanilla. nothing about the data structure changed, it's literally a copy of -+ // the existing types. -+ } -+ -+ private V1460() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1466.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1466.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b4d308812e8b86cca7a0fde5db133b5357895959 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1466.java -@@ -0,0 +1,142 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V1466 { -+ -+ private static final int VERSION = MCVersions.V18W06A; -+ -+ private static short packOffsetCoordinates(final int x, final int y, final int z) { -+ return (short)((x & 15) | ((y & 15) << 4) | ((z & 15) << 8)); -+ } -+ -+ public static void register() { -+ // There is a rather critical change I've made to this converter: changing the chunk status determination. -+ // In Vanilla, this is determined by whether the terrain has been populated and whether the chunk is lit. -+ // For reference, here is the full status progression (at the time of 18w06a): -+ // empty -> base -> carved -> decorated -> lighted -> mobs_spawned -> finalized -> fullchunk -> postprocessed -+ // So one of those must be picked. -+ // If the chunk is lit and terrain is populated, the Vanilla converter will set the status to "mobs_spawned." -+ // If it is anything else, it will be "empty" -+ // I've changed it to the following: if terrain is populated, it is set to at least decorated. If it is populated -+ // and lit, it is set to "mobs_spawned" -+ // But what if it is not populated? If it is not populated, ignore the lit field - obviously that's just broken. -+ // It can't be lit and not populated. -+ // Let's take a look at chunk generation logic for a chunk that is not populated, or even near a populated chunk. -+ // It actually will generate a chunk up to the "carved" stage. It generates the base terrain, (i.e using noise -+ // to figure out where stone is, dirt, grass) and it will generate caves. Nothing else though. No populators. -+ // So "carved" is the correct stage to use, not empty. Setting it to empty would clobber chunk data, when we don't -+ // need to. If it is populated, at least set it to decorated. If it is lit and populated, set it to mobs_spawned. Else, -+ // it is carved. -+ // This change also fixes the random light check "bug" (really this is Mojang's fault for fucking up the status conversion here) -+ // caused by spigot, which would not set the lit value for some chunks. Now those chunks will not be regenerated. -+ -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ final boolean terrainPopulated = level.getBoolean("TerrainPopulated"); -+ final boolean lightPopulated = level.getBoolean("LightPopulated") || level.getNumber("LightPopulated") == null; -+ final String newStatus = !terrainPopulated ? "carved" : (lightPopulated ? "mobs_spawned" : "decorated"); -+ -+ level.setString("Status", newStatus); -+ level.setBoolean("hasLegacyStructureData", true); -+ -+ // convert biome byte[] into int[] -+ final byte[] biomes = level.getBytes("Biomes"); -+ if (biomes != null) { -+ final int[] newBiomes = new int[256]; -+ for (int i = 0, len = Math.min(newBiomes.length, biomes.length); i < len; ++i) { -+ newBiomes[i] = biomes[i] & 255; -+ } -+ level.setInts("Biomes", newBiomes); -+ } -+ -+ // ProtoChunks have their own dedicated tick list, so we must convert the TileTicks to that. -+ final ListType ticks = level.getList("TileTicks", ObjectType.MAP); -+ if (ticks != null) { -+ final ListType sections = Types.NBT.createEmptyList(); -+ final ListType[] sectionAccess = new ListType[16]; -+ for (int i = 0; i < sectionAccess.length; ++i) { -+ sections.addList(sectionAccess[i] = Types.NBT.createEmptyList()); -+ } -+ level.setList("ToBeTicked", sections); -+ -+ for (int i = 0, len = ticks.size(); i < len; ++i) { -+ final MapType tick = ticks.getMap(i); -+ -+ final int x = tick.getInt("x"); -+ final int y = tick.getInt("y"); -+ final int z = tick.getInt("z"); -+ final short coordinate = packOffsetCoordinates(x, y, z); -+ -+ sectionAccess[y >> 4].addShort(coordinate); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ -+ MCTypeRegistry.CHUNK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, level, "Entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TILE_ENTITY, level, "TileEntities", fromVersion, toVersion); -+ -+ final ListType tileTicks = level.getList("TileTicks", ObjectType.MAP); -+ if (tileTicks != null) { -+ for (int i = 0, len = tileTicks.size(); i < len; ++i) { -+ final MapType tileTick = tileTicks.getMap(i); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, tileTick, "i", fromVersion, toVersion); -+ } -+ } -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, section, "Palette", fromVersion, toVersion); -+ } -+ } -+ -+ WalkerUtils.convertValues(MCTypeRegistry.STRUCTURE_FEATURE, level.getMap("Structures"), "Starts", fromVersion, toVersion); -+ -+ return null; -+ }); -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final ListType list = data.getList("Children", ObjectType.MAP); -+ if (list != null) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final MapType child = list.getMap(i); -+ -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CA", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CB", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CC", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, child, "CD", fromVersion, toVersion); -+ } -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.BIOME, data, "biome", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ private V1466() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V147.java b/ca/spottedleaf/dataconverter/minecraft/versions/V147.java -new file mode 100644 -index 0000000000000000000000000000000000000000..02df67a0bb6d7dc3f7e6b7de5c0978295661c72f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V147.java -@@ -0,0 +1,26 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V147 { -+ -+ private static final int VERSION = MCVersions.V15W46A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("ArmorStand", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getBoolean("Silent") && !data.getBoolean("Marker")) { -+ data.remove("Silent"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V147() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1470.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1470.java -new file mode 100644 -index 0000000000000000000000000000000000000000..42cf72340be7e1ef84f794a569f2f00e5e56429e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1470.java -@@ -0,0 +1,27 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+ -+public final class V1470 { -+ -+ private static final int VERSION = MCVersions.V18W08A; -+ -+ public static void register() { -+ //registerMob("minecraft:turtle"); // is now simple in 1.21.5 -+ //registerMob("minecraft:cod_mob"); // is now simple in 1.21.5 -+ //registerMob("minecraft:tropical_fish"); // is now simple in 1.21.5 -+ //registerMob("minecraft:salmon_mob"); // is now simple in 1.21.5 -+ //registerMob("minecraft:puffer_fish"); // is now simple in 1.21.5 -+ //registerMob("minecraft:phantom"); // is now simple in 1.21.5 -+ //registerMob("minecraft:dolphin"); // is now simple in 1.21.5 -+ //registerMob("minecraft:drowned"); // is now simple in 1.21.5 -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:trident", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "inBlockState")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:trident", new DataWalkerItems("Trident")); -+ } -+ -+ private V1470() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1474.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1474.java -new file mode 100644 -index 0000000000000000000000000000000000000000..244baa4f38102ecbfdb7fe0b14bf0be1816a59a2 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1474.java -@@ -0,0 +1,34 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1474 { -+ -+ private static final int VERSION = MCVersions.V18W10B; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:shulker", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getInt("Color") == 10) { -+ data.setByte("Color", (byte)16); -+ } -+ return null; -+ } -+ }); -+ // data hooks ensure the inputs are namespaced -+ ConverterAbstractBlockRename.register(VERSION, (final String old) -> { -+ return "minecraft:purple_shulker_box".equals(old) ? "minecraft:shulker_box" : null; -+ }); -+ ConverterAbstractItemRename.register(VERSION, (final String old) -> { -+ return "minecraft:purple_shulker_box".equals(old) ? "minecraft:shulker_box" : null; -+ }); -+ } -+ -+ private V1474() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1475.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1475.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2ae50eea847671f3995688901c79caf520440d7a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1475.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V1475 { -+ -+ private static final int VERSION = MCVersions.V18W10B + 1; -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:flowing_water", "minecraft:water", -+ "minecraft:flowing_lava", "minecraft:lava" -+ ) -+ )::get); -+ } -+ -+ private V1475() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1480.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1480.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7180c1168bffb9fe70d18fe7414a5372518413a8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1480.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1480 { -+ -+ private static final int VERSION = MCVersions.V18W14A + 1; -+ -+ public static final Map RENAMED_IDS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:blue_coral", "minecraft:tube_coral_block") -+ .put("minecraft:pink_coral", "minecraft:brain_coral_block") -+ .put("minecraft:purple_coral", "minecraft:bubble_coral_block") -+ .put("minecraft:red_coral", "minecraft:fire_coral_block") -+ .put("minecraft:yellow_coral", "minecraft:horn_coral_block") -+ .put("minecraft:blue_coral_plant", "minecraft:tube_coral") -+ .put("minecraft:pink_coral_plant", "minecraft:brain_coral") -+ .put("minecraft:purple_coral_plant", "minecraft:bubble_coral") -+ .put("minecraft:red_coral_plant", "minecraft:fire_coral") -+ .put("minecraft:yellow_coral_plant", "minecraft:horn_coral") -+ .put("minecraft:blue_coral_fan", "minecraft:tube_coral_fan") -+ .put("minecraft:pink_coral_fan", "minecraft:brain_coral_fan") -+ .put("minecraft:purple_coral_fan", "minecraft:bubble_coral_fan") -+ .put("minecraft:red_coral_fan", "minecraft:fire_coral_fan") -+ .put("minecraft:yellow_coral_fan", "minecraft:horn_coral_fan") -+ .put("minecraft:blue_dead_coral", "minecraft:dead_tube_coral") -+ .put("minecraft:pink_dead_coral", "minecraft:dead_brain_coral") -+ .put("minecraft:purple_dead_coral", "minecraft:dead_bubble_coral") -+ .put("minecraft:red_dead_coral", "minecraft:dead_fire_coral") -+ .put("minecraft:yellow_dead_coral", "minecraft:dead_horn_coral") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, RENAMED_IDS::get); -+ ConverterAbstractItemRename.register(VERSION, RENAMED_IDS::get); -+ } -+ -+ private V1480() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1483.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1483.java -new file mode 100644 -index 0000000000000000000000000000000000000000..56d9babebba8b8ba6be07ea413e9c04ffea84023 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1483.java -@@ -0,0 +1,30 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V1483 { -+ -+ private static final int VERSION = MCVersions.V18W16A; -+ -+ public static void register() { -+ ConverterAbstractEntityRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:puffer_fish", "minecraft:pufferfish" -+ ) -+ )::get); -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:puffer_fish_spawn_egg", "minecraft:pufferfish_spawn_egg" -+ ) -+ )::get); -+ -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:puffer_fish", "minecraft:pufferfish"); -+ } -+ -+ private V1483() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1484.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1484.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cdc8ab8b0e1fc88cba8fd1d3000180288fe8d5fd ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1484.java -@@ -0,0 +1,75 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1484 { -+ -+ private static final int VERSION = MCVersions.V18W19A; -+ -+ public static void register() { -+ final Map renamed = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:sea_grass", "minecraft:seagrass", -+ "minecraft:tall_sea_grass", "minecraft:tall_seagrass" -+ ) -+ ); -+ -+ ConverterAbstractItemRename.register(VERSION, renamed::get); -+ ConverterAbstractBlockRename.register(VERSION, renamed::get); -+ -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ -+ if (level == null) { -+ return null; -+ } -+ -+ final MapType heightmaps = level.getMap("Heightmaps"); -+ -+ if (heightmaps == null) { -+ return null; -+ } -+ -+ final Object liquid = heightmaps.getGeneric("LIQUID"); -+ if (liquid != null) { -+ heightmaps.remove("LIQUID"); -+ heightmaps.setGeneric("WORLD_SURFACE_WG", liquid); -+ } -+ -+ final Object solid = heightmaps.getGeneric("SOLID"); -+ if (solid != null) { -+ heightmaps.remove("SOLID"); -+ heightmaps.setGeneric("OCEAN_FLOOR_WG", solid); -+ heightmaps.setGeneric("OCEAN_FLOOR", solid); -+ } -+ -+ final Object light = heightmaps.getGeneric("LIGHT"); -+ if (light != null) { -+ heightmaps.remove("LIGHT"); -+ heightmaps.setGeneric("LIGHT_BLOCKING", light); -+ } -+ -+ final Object rain = heightmaps.getGeneric("RAIN"); -+ if (rain != null) { -+ heightmaps.remove("RAIN"); -+ heightmaps.setGeneric("MOTION_BLOCKING", rain); -+ heightmaps.setGeneric("MOTION_BLOCKING_NO_LEAVES", rain); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1484() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1486.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1486.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a9e42da41064ea293a71dbf2d681a857b2e1812e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1486.java -@@ -0,0 +1,39 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1486 { -+ -+ private static final int VERSION = MCVersions.V18W19B + 1; -+ -+ public static final Map RENAMED_ENTITY_IDS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:salmon_mob", "minecraft:salmon") -+ .put("minecraft:cod_mob", "minecraft:cod") -+ .build() -+ ); -+ public static final Map RENAMED_ITEM_IDS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:salmon_mob_spawn_egg", "minecraft:salmon_spawn_egg") -+ .put("minecraft:cod_mob_spawn_egg", "minecraft:cod_spawn_egg") -+ .build() -+ ); -+ -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:cod_mob", "minecraft:cod"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:salmon_mob", "minecraft:salmon"); -+ -+ ConverterAbstractEntityRename.register(VERSION, RENAMED_ENTITY_IDS::get); -+ ConverterAbstractItemRename.register(VERSION, RENAMED_ITEM_IDS::get); -+ } -+ -+ private V1486() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1487.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1487.java -new file mode 100644 -index 0000000000000000000000000000000000000000..884049818efdf273443fb3d1c2d7250564fbdbf7 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1487.java -@@ -0,0 +1,27 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1487 { -+ -+ private static final int VERSION = MCVersions.V18W19B + 2; -+ -+ public static void register() { -+ final Map remap = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:prismarine_bricks_slab", "minecraft:prismarine_brick_slab", -+ "minecraft:prismarine_bricks_stairs", "minecraft:prismarine_brick_stairs" -+ ) -+ ); -+ -+ ConverterAbstractItemRename.register(VERSION, remap::get); -+ ConverterAbstractBlockRename.register(VERSION, remap::get); -+ } -+ -+ private V1487() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1488.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1488.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a291dc5b9dbc4362038fcfb6fbb0de405b693c11 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1488.java -@@ -0,0 +1,99 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.google.common.collect.ImmutableMap; -+ -+import java.util.HashMap; -+ -+public final class V1488 { -+ -+ private static final int VERSION = MCVersions.V18W19B + 3; -+ -+ private static boolean isIglooPiece(final MapType piece) { -+ return "Iglu".equals(piece.getString("id")); -+ } -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:kelp_top", "minecraft:kelp", -+ "minecraft:kelp", "minecraft:kelp_plant" -+ ) -+ )::get); -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:kelp_top", "minecraft:kelp" -+ ) -+ )::get); -+ -+ // Don't ask me why in V1458 they wrote the converter to NOT do command blocks and THEN in THIS version -+ // to ONLY do command blocks. I don't know. -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:command_block", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ return V1458.updateCustomName(data); -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:commandblock_minecart", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ return V1458.updateCustomName(data); -+ } -+ }); -+ -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType children = data.getList("Children", ObjectType.MAP); -+ boolean isIgloo; -+ if (children != null) { -+ isIgloo = true; -+ for (int i = 0, len = children.size(); i < len; ++i) { -+ if (!isIglooPiece(children.getMap(i))) { -+ isIgloo = false; -+ break; -+ } -+ } -+ } else { -+ isIgloo = false; -+ } -+ -+ if (isIgloo) { -+ data.remove("Children"); -+ data.setString("id", "Igloo"); -+ return null; -+ } -+ -+ if (children != null) { -+ for (int i = 0; i < children.size();) { -+ final MapType child = children.getMap(i); -+ if (isIglooPiece(child)) { -+ children.remove(i); -+ continue; -+ } -+ ++i; -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:command_block", -+ new DataWalkerTypePaths<>(MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND, "Command") -+ ); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:command_block", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "CustomName", "LastOutput")); -+ } -+ -+ private V1488() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1490.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1490.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1e99de15732bdd283835a9531f76e29ddab91f46 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1490.java -@@ -0,0 +1,30 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+ -+import java.util.HashMap; -+ -+public final class V1490 { -+ -+ private static final int VERSION = MCVersions.V18W20A + 1; -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:melon_block", "minecraft:melon" -+ ) -+ )::get); -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:melon_block", "minecraft:melon", -+ "minecraft:melon", "minecraft:melon_slice", -+ "minecraft:speckled_melon", "minecraft:glistering_melon_slice" -+ ) -+ )::get); -+ } -+ -+ private V1490() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1492.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1492.java -new file mode 100644 -index 0000000000000000000000000000000000000000..aa18e481f2d54d20784fe6af27846ec0d297f9c1 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1492.java -@@ -0,0 +1,151 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.google.common.collect.ImmutableMap; -+import com.mojang.datafixers.util.Pair; -+ -+public final class V1492 { -+ -+ private static final ImmutableMap>> RENAMES = ImmutableMap.>>builder() -+ .put("EndCity", Pair.of( -+ "ECP", -+ ImmutableMap.builder() -+ .put("second_floor", "second_floor_1") -+ .put("third_floor", "third_floor_1") -+ .put("third_floor_c", "third_floor_2") -+ .build() -+ ) -+ ) -+ -+ .put("Mansion", Pair.of( -+ "WMP", -+ ImmutableMap.builder() -+ .put("carpet_south", "carpet_south_1") -+ .put("carpet_west", "carpet_west_1") -+ .put("indoors_door", "indoors_door_1") -+ .put("indoors_wall", "indoors_wall_1") -+ .build() -+ ) -+ ) -+ -+ .put("Igloo", Pair.of( -+ "Iglu", -+ ImmutableMap.builder() -+ .put("minecraft:igloo/igloo_bottom", "minecraft:igloo/bottom") -+ .put("minecraft:igloo/igloo_middle", "minecraft:igloo/middle") -+ .put("minecraft:igloo/igloo_top", "minecraft:igloo/top") -+ .build() -+ ) -+ ) -+ .put("Ocean_Ruin", Pair.of( -+ "ORP", -+ ImmutableMap.builder() -+ .put("minecraft:ruin/big_ruin1_brick", "minecraft:underwater_ruin/big_brick_1") -+ .put("minecraft:ruin/big_ruin2_brick", "minecraft:underwater_ruin/big_brick_2") -+ .put("minecraft:ruin/big_ruin3_brick", "minecraft:underwater_ruin/big_brick_3") -+ .put("minecraft:ruin/big_ruin8_brick", "minecraft:underwater_ruin/big_brick_8") -+ .put("minecraft:ruin/big_ruin1_cracked", "minecraft:underwater_ruin/big_cracked_1") -+ .put("minecraft:ruin/big_ruin2_cracked", "minecraft:underwater_ruin/big_cracked_2") -+ .put("minecraft:ruin/big_ruin3_cracked", "minecraft:underwater_ruin/big_cracked_3") -+ .put("minecraft:ruin/big_ruin8_cracked", "minecraft:underwater_ruin/big_cracked_8") -+ .put("minecraft:ruin/big_ruin1_mossy", "minecraft:underwater_ruin/big_mossy_1") -+ .put("minecraft:ruin/big_ruin2_mossy", "minecraft:underwater_ruin/big_mossy_2") -+ .put("minecraft:ruin/big_ruin3_mossy", "minecraft:underwater_ruin/big_mossy_3") -+ .put("minecraft:ruin/big_ruin8_mossy", "minecraft:underwater_ruin/big_mossy_8") -+ .put("minecraft:ruin/big_ruin_warm4", "minecraft:underwater_ruin/big_warm_4") -+ .put("minecraft:ruin/big_ruin_warm5", "minecraft:underwater_ruin/big_warm_5") -+ .put("minecraft:ruin/big_ruin_warm6", "minecraft:underwater_ruin/big_warm_6") -+ .put("minecraft:ruin/big_ruin_warm7", "minecraft:underwater_ruin/big_warm_7") -+ .put("minecraft:ruin/ruin1_brick", "minecraft:underwater_ruin/brick_1") -+ .put("minecraft:ruin/ruin2_brick", "minecraft:underwater_ruin/brick_2") -+ .put("minecraft:ruin/ruin3_brick", "minecraft:underwater_ruin/brick_3") -+ .put("minecraft:ruin/ruin4_brick", "minecraft:underwater_ruin/brick_4") -+ .put("minecraft:ruin/ruin5_brick", "minecraft:underwater_ruin/brick_5") -+ .put("minecraft:ruin/ruin6_brick", "minecraft:underwater_ruin/brick_6") -+ .put("minecraft:ruin/ruin7_brick", "minecraft:underwater_ruin/brick_7") -+ .put("minecraft:ruin/ruin8_brick", "minecraft:underwater_ruin/brick_8") -+ .put("minecraft:ruin/ruin1_cracked", "minecraft:underwater_ruin/cracked_1") -+ .put("minecraft:ruin/ruin2_cracked", "minecraft:underwater_ruin/cracked_2") -+ .put("minecraft:ruin/ruin3_cracked", "minecraft:underwater_ruin/cracked_3") -+ .put("minecraft:ruin/ruin4_cracked", "minecraft:underwater_ruin/cracked_4") -+ .put("minecraft:ruin/ruin5_cracked", "minecraft:underwater_ruin/cracked_5") -+ .put("minecraft:ruin/ruin6_cracked", "minecraft:underwater_ruin/cracked_6") -+ .put("minecraft:ruin/ruin7_cracked", "minecraft:underwater_ruin/cracked_7") -+ .put("minecraft:ruin/ruin8_cracked", "minecraft:underwater_ruin/cracked_8") -+ .put("minecraft:ruin/ruin1_mossy", "minecraft:underwater_ruin/mossy_1") -+ .put("minecraft:ruin/ruin2_mossy", "minecraft:underwater_ruin/mossy_2") -+ .put("minecraft:ruin/ruin3_mossy", "minecraft:underwater_ruin/mossy_3") -+ .put("minecraft:ruin/ruin4_mossy", "minecraft:underwater_ruin/mossy_4") -+ .put("minecraft:ruin/ruin5_mossy", "minecraft:underwater_ruin/mossy_5") -+ .put("minecraft:ruin/ruin6_mossy", "minecraft:underwater_ruin/mossy_6") -+ .put("minecraft:ruin/ruin7_mossy", "minecraft:underwater_ruin/mossy_7") -+ .put("minecraft:ruin/ruin8_mossy", "minecraft:underwater_ruin/mossy_8") -+ .put("minecraft:ruin/ruin_warm1", "minecraft:underwater_ruin/warm_1") -+ .put("minecraft:ruin/ruin_warm2", "minecraft:underwater_ruin/warm_2") -+ .put("minecraft:ruin/ruin_warm3", "minecraft:underwater_ruin/warm_3") -+ .put("minecraft:ruin/ruin_warm4", "minecraft:underwater_ruin/warm_4") -+ .put("minecraft:ruin/ruin_warm5", "minecraft:underwater_ruin/warm_5") -+ .put("minecraft:ruin/ruin_warm6", "minecraft:underwater_ruin/warm_6") -+ .put("minecraft:ruin/ruin_warm7", "minecraft:underwater_ruin/warm_7") -+ .put("minecraft:ruin/ruin_warm8", "minecraft:underwater_ruin/warm_8") -+ .put("minecraft:ruin/big_brick_1", "minecraft:underwater_ruin/big_brick_1") -+ .put("minecraft:ruin/big_brick_2", "minecraft:underwater_ruin/big_brick_2") -+ .put("minecraft:ruin/big_brick_3", "minecraft:underwater_ruin/big_brick_3") -+ .put("minecraft:ruin/big_brick_8", "minecraft:underwater_ruin/big_brick_8") -+ .put("minecraft:ruin/big_mossy_1", "minecraft:underwater_ruin/big_mossy_1") -+ .put("minecraft:ruin/big_mossy_2", "minecraft:underwater_ruin/big_mossy_2") -+ .put("minecraft:ruin/big_mossy_3", "minecraft:underwater_ruin/big_mossy_3") -+ .put("minecraft:ruin/big_mossy_8", "minecraft:underwater_ruin/big_mossy_8") -+ .put("minecraft:ruin/big_cracked_1", "minecraft:underwater_ruin/big_cracked_1") -+ .put("minecraft:ruin/big_cracked_2", "minecraft:underwater_ruin/big_cracked_2") -+ .put("minecraft:ruin/big_cracked_3", "minecraft:underwater_ruin/big_cracked_3") -+ .put("minecraft:ruin/big_cracked_8", "minecraft:underwater_ruin/big_cracked_8") -+ .put("minecraft:ruin/big_warm_4", "minecraft:underwater_ruin/big_warm_4") -+ .put("minecraft:ruin/big_warm_5", "minecraft:underwater_ruin/big_warm_5") -+ .put("minecraft:ruin/big_warm_6", "minecraft:underwater_ruin/big_warm_6") -+ .put("minecraft:ruin/big_warm_7", "minecraft:underwater_ruin/big_warm_7") -+ .build() -+ ) -+ ) -+ -+ .build(); -+ -+ private static final int VERSION = MCVersions.V18W20B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType children = data.getList("Children", ObjectType.MAP); -+ if (children == null) { -+ return null; -+ } -+ -+ final String id = data.getString("id"); -+ -+ final Pair> renames = RENAMES.get(id); -+ if (renames == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = children.size(); i < len; ++i) { -+ final MapType child = children.getMap(i); -+ -+ if (renames.getFirst().equals(child.getString("id"))) { -+ final String template = child.getString("Template", ""); -+ child.setString("Template", renames.getSecond().getOrDefault(template, template)); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1492() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1494.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1494.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ef35ea5c1e471794721bd26834db14ea63ddd17f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1494.java -@@ -0,0 +1,88 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+ -+public final class V1494 { -+ -+ private static final int VERSION = MCVersions.V18W20C + 1; -+ -+ private static final Int2ObjectOpenHashMap ENCH_ID_TO_NAME = new Int2ObjectOpenHashMap<>(); -+ static { -+ ENCH_ID_TO_NAME.put(0, "minecraft:protection"); -+ ENCH_ID_TO_NAME.put(1, "minecraft:fire_protection"); -+ ENCH_ID_TO_NAME.put(2, "minecraft:feather_falling"); -+ ENCH_ID_TO_NAME.put(3, "minecraft:blast_protection"); -+ ENCH_ID_TO_NAME.put(4, "minecraft:projectile_protection"); -+ ENCH_ID_TO_NAME.put(5, "minecraft:respiration"); -+ ENCH_ID_TO_NAME.put(6, "minecraft:aqua_affinity"); -+ ENCH_ID_TO_NAME.put(7, "minecraft:thorns"); -+ ENCH_ID_TO_NAME.put(8, "minecraft:depth_strider"); -+ ENCH_ID_TO_NAME.put(9, "minecraft:frost_walker"); -+ ENCH_ID_TO_NAME.put(10, "minecraft:binding_curse"); -+ ENCH_ID_TO_NAME.put(16, "minecraft:sharpness"); -+ ENCH_ID_TO_NAME.put(17, "minecraft:smite"); -+ ENCH_ID_TO_NAME.put(18, "minecraft:bane_of_arthropods"); -+ ENCH_ID_TO_NAME.put(19, "minecraft:knockback"); -+ ENCH_ID_TO_NAME.put(20, "minecraft:fire_aspect"); -+ ENCH_ID_TO_NAME.put(21, "minecraft:looting"); -+ ENCH_ID_TO_NAME.put(22, "minecraft:sweeping"); -+ ENCH_ID_TO_NAME.put(32, "minecraft:efficiency"); -+ ENCH_ID_TO_NAME.put(33, "minecraft:silk_touch"); -+ ENCH_ID_TO_NAME.put(34, "minecraft:unbreaking"); -+ ENCH_ID_TO_NAME.put(35, "minecraft:fortune"); -+ ENCH_ID_TO_NAME.put(48, "minecraft:power"); -+ ENCH_ID_TO_NAME.put(49, "minecraft:punch"); -+ ENCH_ID_TO_NAME.put(50, "minecraft:flame"); -+ ENCH_ID_TO_NAME.put(51, "minecraft:infinity"); -+ ENCH_ID_TO_NAME.put(61, "minecraft:luck_of_the_sea"); -+ ENCH_ID_TO_NAME.put(62, "minecraft:lure"); -+ ENCH_ID_TO_NAME.put(65, "minecraft:loyalty"); -+ ENCH_ID_TO_NAME.put(66, "minecraft:impaling"); -+ ENCH_ID_TO_NAME.put(67, "minecraft:riptide"); -+ ENCH_ID_TO_NAME.put(68, "minecraft:channeling"); -+ ENCH_ID_TO_NAME.put(70, "minecraft:mending"); -+ ENCH_ID_TO_NAME.put(71, "minecraft:vanishing_curse"); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final ListType enchants = tag.getList("ench", ObjectType.MAP); -+ if (enchants != null) { -+ tag.remove("ench"); -+ tag.setList("Enchantments", enchants); -+ -+ for (int i = 0, len = enchants.size(); i < len; ++i) { -+ final MapType enchant = enchants.getMap(i); -+ enchant.setString("id", ENCH_ID_TO_NAME.getOrDefault(enchant.getInt("id"), "null")); -+ } -+ } -+ -+ final ListType storedEnchants = tag.getList("StoredEnchantments", ObjectType.MAP); -+ if (storedEnchants != null) { -+ for (int i = 0, len = storedEnchants.size(); i < len; ++i) { -+ final MapType enchant = storedEnchants.getMap(i); -+ enchant.setString("id", ENCH_ID_TO_NAME.getOrDefault(enchant.getInt("id"), "null")); -+ } -+ } -+ -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1494() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1496.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1496.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4b34a890a96b67cd14fc576a051f6f69f1697e93 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1496.java -@@ -0,0 +1,370 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.mojang.datafixers.DataFixUtils; -+import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; -+import it.unimi.dsi.fastutil.ints.IntIterator; -+import it.unimi.dsi.fastutil.ints.IntOpenHashSet; -+import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -+import net.minecraft.util.datafix.PackedBitStorage; -+import java.util.Arrays; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V1496 { -+ -+ private static final int VERSION = MCVersions.V18W21B; -+ -+ private static final int[][] DIRECTIONS = new int[][] { -+ new int[] {-1, 0, 0}, -+ new int[] {1, 0, 0}, -+ new int[] {0, -1, 0}, -+ new int[] {0, 1, 0}, -+ new int[] {0, 0, -1}, -+ new int[] {0, 0, 1} -+ }; -+ -+ private static final Object2IntOpenHashMap LEAVES_TO_ID = new Object2IntOpenHashMap<>(); -+ static { -+ LEAVES_TO_ID.put("minecraft:acacia_leaves", 0); -+ LEAVES_TO_ID.put("minecraft:birch_leaves", 1); -+ LEAVES_TO_ID.put("minecraft:dark_oak_leaves", 2); -+ LEAVES_TO_ID.put("minecraft:jungle_leaves", 3); -+ LEAVES_TO_ID.put("minecraft:oak_leaves", 4); -+ LEAVES_TO_ID.put("minecraft:spruce_leaves", 5); -+ } -+ -+ private static final Set LOGS = new HashSet<>( -+ Arrays.asList( -+ "minecraft:acacia_bark", -+ "minecraft:birch_bark", -+ "minecraft:dark_oak_bark", -+ "minecraft:jungle_bark", -+ "minecraft:oak_bark", -+ "minecraft:spruce_bark", -+ "minecraft:acacia_log", -+ "minecraft:birch_log", -+ "minecraft:dark_oak_log", -+ "minecraft:jungle_log", -+ "minecraft:oak_log", -+ "minecraft:spruce_log", -+ "minecraft:stripped_acacia_log", -+ "minecraft:stripped_birch_log", -+ "minecraft:stripped_dark_oak_log", -+ "minecraft:stripped_jungle_log", -+ "minecraft:stripped_oak_log", -+ "minecraft:stripped_spruce_log" -+ ) -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ final ListType sectionsNBT = level.getList("Sections", ObjectType.MAP); -+ if (sectionsNBT == null) { -+ return null; -+ } -+ -+ int newSides = 0; -+ -+ final LeavesSection[] sections = new LeavesSection[16]; -+ boolean skippable = true; -+ for (int i = 0, len = sectionsNBT.size(); i < len; ++i) { -+ final LeavesSection section = new LeavesSection(sectionsNBT.getMap(i)); -+ sections[section.sectionY] = section; -+ -+ skippable &= section.isSkippable(); -+ } -+ -+ if (skippable) { -+ return null; -+ } -+ -+ final IntOpenHashSet[] positionsByDistance = new IntOpenHashSet[7]; -+ for (int i = 0; i < positionsByDistance.length; ++i) { -+ positionsByDistance[i] = new IntOpenHashSet(); -+ } -+ -+ for (final LeavesSection section : sections) { -+ if (section == null || section.isSkippable()) { -+ continue; -+ } -+ -+ for (int index = 0; index < 4096; ++index) { -+ final int block = section.getBlock(index); -+ if (section.isLog(block)) { -+ positionsByDistance[0].add(section.getSectionY() << 12 | index); -+ } else if (section.isLeaf(block)) { -+ int x = getX(index); -+ int z = getZ(index); -+ newSides |= getSideMask(x == 0, x == 15, z == 0, z == 15); -+ } -+ } -+ } -+ -+ // this is basically supposed to recalculate the distances, because a higher cap was added -+ for (int distance = 1; distance < 7; ++distance) { -+ final IntOpenHashSet positionsLess = positionsByDistance[distance - 1]; -+ final IntOpenHashSet positionsEqual = positionsByDistance[distance]; -+ -+ for (final IntIterator iterator = positionsLess.iterator(); iterator.hasNext();) { -+ final int position = iterator.nextInt(); -+ final int fromX = getX(position); -+ final int fromY = getY(position); -+ final int fromZ = getZ(position); -+ -+ for (final int[] direction : DIRECTIONS) { -+ final int toX = fromX + direction[0]; -+ final int toY = fromY + direction[1]; -+ final int toZ = fromZ + direction[2]; -+ -+ if (!(toX >= 0 && toX <= 15 && toZ >= 0 && toZ <= 15 && toY >= 0 && toY <= 255)) { -+ continue; -+ } -+ -+ final LeavesSection toSection = sections[toY >> 4]; -+ if (toSection == null || toSection.isSkippable()) { -+ continue; -+ } -+ -+ final int sectionLocalIndex = getIndex(toX, toY & 15, toZ); -+ final int toBlock = toSection.getBlock(sectionLocalIndex); -+ -+ if (toSection.isLeaf(toBlock)) { -+ final int newDistance = toSection.getDistance(toBlock); -+ if (newDistance > distance) { -+ toSection.setDistance(sectionLocalIndex, toBlock, distance); -+ positionsEqual.add(getIndex(toX, toY, toZ)); -+ } -+ } -+ } -+ } -+ } -+ -+ // done updating blocks, now just update the blockstates and palette -+ for (int i = 0, len = sectionsNBT.size(); i < len; ++i) { -+ final MapType sectionNBT = sectionsNBT.getMap(i); -+ final int y = sectionNBT.getInt("Y"); -+ final LeavesSection section = sections[y]; -+ -+ section.writeInto(sectionNBT); -+ } -+ -+ // if sides changed during process, update it now -+ if (newSides != 0) { -+ MapType upgradeData = level.getMap("UpgradeData"); -+ if (upgradeData == null) { -+ level.setMap("UpgradeData", upgradeData = Types.NBT.createEmptyMap()); -+ } -+ -+ upgradeData.setByte("Sides", (byte)(upgradeData.getByte("Sides") | newSides)); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ public static int getIndex(final int x, final int y, final int z) { -+ return y << 8 | z << 4 | x; -+ } -+ -+ public static int getX(final int index) { -+ return index & 15; -+ } -+ -+ public static int getY(final int index) { -+ return index >> 8 & 255; -+ } -+ -+ public static int getZ(final int index) { -+ return index >> 4 & 15; -+ } -+ -+ public static int getSideMask(final boolean noLeft, final boolean noRight, final boolean noBack, final boolean noForward) { -+ final int ret; -+ -+ if (noBack) { -+ if (noRight) { -+ ret = 2; -+ } else if (noLeft) { -+ ret = 128; -+ } else { -+ ret = 1; -+ } -+ } else if (noForward) { -+ if (noLeft) { -+ ret = 32; -+ } else if (noRight) { -+ ret = 8; -+ } else { -+ ret = 16; -+ } -+ } else if (noRight) { -+ ret = 4; -+ } else if (noLeft) { -+ ret = 64; -+ } else { -+ ret = 0; -+ } -+ -+ return ret; -+ } -+ -+ private V1496() {} -+ -+ public abstract static class Section { -+ protected final ListType palette; -+ protected final int sectionY; -+ protected PackedBitStorage storage; -+ -+ public Section(final MapType section) { -+ this.palette = section.getList("Palette", ObjectType.MAP); -+ this.sectionY = section.getInt("Y"); -+ this.readStorage(section); -+ } -+ -+ protected void readStorage(final MapType section) { -+ if (this.initSkippable()) { -+ this.storage = null; -+ } else { -+ final long[] states = section.getLongs("BlockStates"); -+ final int bits = Math.max(4, DataFixUtils.ceillog2(this.palette.size())); -+ this.storage = new PackedBitStorage(bits, 4096, states); -+ } -+ } -+ -+ public void writeInto(final MapType section) { -+ if (this.isSkippable()) { -+ return; -+ } -+ -+ section.setList("Palette", this.palette); -+ section.setLongs("BlockStates", this.storage.getRaw()); -+ } -+ -+ public boolean isSkippable() { -+ return this.storage == null; -+ } -+ -+ public int getBlock(final int index) { -+ return this.storage.get(index); -+ } -+ -+ protected int getStateId(final String name, final boolean persistent, final int distance) { -+ return LEAVES_TO_ID.getInt(name) << 5 | (persistent ? 16 : 0) | distance; -+ } -+ -+ protected int getSectionY() { -+ return this.sectionY; -+ } -+ -+ protected abstract boolean initSkippable(); -+ } -+ -+ public static final class LeavesSection extends Section { -+ private IntOpenHashSet leaveIds; -+ private IntOpenHashSet logIds; -+ private Int2IntOpenHashMap stateToIdMap; -+ -+ public LeavesSection(final MapType section) { -+ super(section); -+ } -+ -+ @Override -+ protected boolean initSkippable() { -+ this.leaveIds = new IntOpenHashSet(); -+ this.logIds = new IntOpenHashSet(); -+ this.stateToIdMap = new Int2IntOpenHashMap(); -+ this.stateToIdMap.defaultReturnValue(-1); -+ -+ for(int i = 0; i < this.palette.size(); ++i) { -+ final MapType blockState = this.palette.getMap(i); -+ final String name = blockState.getString("Name", ""); -+ if (LEAVES_TO_ID.containsKey(name)) { -+ final MapType properties = blockState.getMap("Properties"); -+ final boolean notDecayable = properties != null && "false".equals(properties.getString("decayable")); -+ -+ this.leaveIds.add(i); -+ this.stateToIdMap.put(this.getStateId(name, notDecayable, 7), i); -+ this.palette.setMap(i, this.makeNewLeafTag(name, notDecayable, 7)); -+ } -+ -+ if (LOGS.contains(name)) { -+ this.logIds.add(i); -+ } -+ } -+ -+ return this.leaveIds.isEmpty() && this.logIds.isEmpty(); -+ } -+ -+ private MapType makeNewLeafTag(final String name, final boolean notDecayable, final int distance) { -+ final MapType properties = Types.NBT.createEmptyMap(); -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setString("Name", name); -+ ret.setMap("Properties", properties); -+ -+ properties.setString("persistent", Boolean.toString(notDecayable)); -+ properties.setString("distance", Integer.toString(distance)); -+ -+ return ret; -+ } -+ -+ public boolean isLog(final int id) { -+ return this.logIds.contains(id); -+ } -+ -+ public boolean isLeaf(final int id) { -+ return this.leaveIds.contains(id); -+ } -+ -+ // only call for logs or leaves, will throw otherwise! -+ private int getDistance(final int id) { -+ if (this.isLog(id)) { -+ return 0; -+ } -+ -+ return Integer.parseInt(this.palette.getMap(id).getMap("Properties").getString("distance")); -+ } -+ -+ private void setDistance(final int index, final int id, final int distance) { -+ final MapType state = this.palette.getMap(id); -+ final String name = state.getString("Name"); -+ final boolean persistent = "true".equals(state.getMap("Properties").getString("persistent")); -+ final int newState = this.getStateId(name, persistent, distance); -+ int newStateId; -+ if ((newStateId = this.stateToIdMap.get(newState)) == -1) { -+ newStateId = this.palette.size(); -+ this.leaveIds.add(newStateId); -+ this.stateToIdMap.put(newState, newStateId); -+ this.palette.addMap(this.makeNewLeafTag(name, persistent, distance)); -+ } -+ -+ if (1 << this.storage.getBits() <= newStateId) { -+ // need to widen storage -+ final PackedBitStorage newStorage = new PackedBitStorage(this.storage.getBits() + 1, 4096); -+ -+ for(int i = 0; i < 4096; ++i) { -+ newStorage.set(i, this.storage.get(i)); -+ } -+ -+ this.storage = newStorage; -+ } -+ -+ this.storage.set(index, newStateId); -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1500.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1500.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3ee4c5cab7e8020b3432ef9f614f92c1dda5606e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1500.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1500 { -+ -+ private static final int VERSION = MCVersions.V18W22C + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("DUMMY", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setBoolean("keepPacked", true); -+ return null; -+ } -+ }); -+ } -+ -+ private V1500() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1501.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1501.java -new file mode 100644 -index 0000000000000000000000000000000000000000..dbfb51b74c54a9a479de49ecb295854fc69aef64 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1501.java -@@ -0,0 +1,78 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterAbstractAdvancementsRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1501 { -+ -+ private static final int VERSION = MCVersions.V1_13_PRE1; -+ -+ private static final Map RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:recipes/brewing/speckled_melon", "minecraft:recipes/brewing/glistering_melon_slice") -+ .put("minecraft:recipes/building_blocks/black_stained_hardened_clay", "minecraft:recipes/building_blocks/black_terracotta") -+ .put("minecraft:recipes/building_blocks/blue_stained_hardened_clay", "minecraft:recipes/building_blocks/blue_terracotta") -+ .put("minecraft:recipes/building_blocks/brown_stained_hardened_clay", "minecraft:recipes/building_blocks/brown_terracotta") -+ .put("minecraft:recipes/building_blocks/cyan_stained_hardened_clay", "minecraft:recipes/building_blocks/cyan_terracotta") -+ .put("minecraft:recipes/building_blocks/gray_stained_hardened_clay", "minecraft:recipes/building_blocks/gray_terracotta") -+ .put("minecraft:recipes/building_blocks/green_stained_hardened_clay", "minecraft:recipes/building_blocks/green_terracotta") -+ .put("minecraft:recipes/building_blocks/light_blue_stained_hardened_clay", "minecraft:recipes/building_blocks/light_blue_terracotta") -+ .put("minecraft:recipes/building_blocks/light_gray_stained_hardened_clay", "minecraft:recipes/building_blocks/light_gray_terracotta") -+ .put("minecraft:recipes/building_blocks/lime_stained_hardened_clay", "minecraft:recipes/building_blocks/lime_terracotta") -+ .put("minecraft:recipes/building_blocks/magenta_stained_hardened_clay", "minecraft:recipes/building_blocks/magenta_terracotta") -+ .put("minecraft:recipes/building_blocks/orange_stained_hardened_clay", "minecraft:recipes/building_blocks/orange_terracotta") -+ .put("minecraft:recipes/building_blocks/pink_stained_hardened_clay", "minecraft:recipes/building_blocks/pink_terracotta") -+ .put("minecraft:recipes/building_blocks/purple_stained_hardened_clay", "minecraft:recipes/building_blocks/purple_terracotta") -+ .put("minecraft:recipes/building_blocks/red_stained_hardened_clay", "minecraft:recipes/building_blocks/red_terracotta") -+ .put("minecraft:recipes/building_blocks/white_stained_hardened_clay", "minecraft:recipes/building_blocks/white_terracotta") -+ .put("minecraft:recipes/building_blocks/yellow_stained_hardened_clay", "minecraft:recipes/building_blocks/yellow_terracotta") -+ .put("minecraft:recipes/building_blocks/acacia_wooden_slab", "minecraft:recipes/building_blocks/acacia_slab") -+ .put("minecraft:recipes/building_blocks/birch_wooden_slab", "minecraft:recipes/building_blocks/birch_slab") -+ .put("minecraft:recipes/building_blocks/dark_oak_wooden_slab", "minecraft:recipes/building_blocks/dark_oak_slab") -+ .put("minecraft:recipes/building_blocks/jungle_wooden_slab", "minecraft:recipes/building_blocks/jungle_slab") -+ .put("minecraft:recipes/building_blocks/oak_wooden_slab", "minecraft:recipes/building_blocks/oak_slab") -+ .put("minecraft:recipes/building_blocks/spruce_wooden_slab", "minecraft:recipes/building_blocks/spruce_slab") -+ .put("minecraft:recipes/building_blocks/brick_block", "minecraft:recipes/building_blocks/bricks") -+ .put("minecraft:recipes/building_blocks/chiseled_stonebrick", "minecraft:recipes/building_blocks/chiseled_stone_bricks") -+ .put("minecraft:recipes/building_blocks/end_bricks", "minecraft:recipes/building_blocks/end_stone_bricks") -+ .put("minecraft:recipes/building_blocks/lit_pumpkin", "minecraft:recipes/building_blocks/jack_o_lantern") -+ .put("minecraft:recipes/building_blocks/magma", "minecraft:recipes/building_blocks/magma_block") -+ .put("minecraft:recipes/building_blocks/melon_block", "minecraft:recipes/building_blocks/melon") -+ .put("minecraft:recipes/building_blocks/mossy_stonebrick", "minecraft:recipes/building_blocks/mossy_stone_bricks") -+ .put("minecraft:recipes/building_blocks/nether_brick", "minecraft:recipes/building_blocks/nether_bricks") -+ .put("minecraft:recipes/building_blocks/pillar_quartz_block", "minecraft:recipes/building_blocks/quartz_pillar") -+ .put("minecraft:recipes/building_blocks/red_nether_brick", "minecraft:recipes/building_blocks/red_nether_bricks") -+ .put("minecraft:recipes/building_blocks/snow", "minecraft:recipes/building_blocks/snow_block") -+ .put("minecraft:recipes/building_blocks/smooth_red_sandstone", "minecraft:recipes/building_blocks/cut_red_sandstone") -+ .put("minecraft:recipes/building_blocks/smooth_sandstone", "minecraft:recipes/building_blocks/cut_sandstone") -+ .put("minecraft:recipes/building_blocks/stonebrick", "minecraft:recipes/building_blocks/stone_bricks") -+ .put("minecraft:recipes/building_blocks/stone_stairs", "minecraft:recipes/building_blocks/cobblestone_stairs") -+ .put("minecraft:recipes/building_blocks/string_to_wool", "minecraft:recipes/building_blocks/white_wool_from_string") -+ .put("minecraft:recipes/decorations/fence", "minecraft:recipes/decorations/oak_fence") -+ .put("minecraft:recipes/decorations/purple_shulker_box", "minecraft:recipes/decorations/shulker_box") -+ .put("minecraft:recipes/decorations/slime", "minecraft:recipes/decorations/slime_block") -+ .put("minecraft:recipes/decorations/snow_layer", "minecraft:recipes/decorations/snow") -+ .put("minecraft:recipes/misc/bone_meal_from_block", "minecraft:recipes/misc/bone_meal_from_bone_block") -+ .put("minecraft:recipes/misc/bone_meal_from_bone", "minecraft:recipes/misc/bone_meal") -+ .put("minecraft:recipes/misc/gold_ingot_from_block", "minecraft:recipes/misc/gold_ingot_from_gold_block") -+ .put("minecraft:recipes/misc/iron_ingot_from_block", "minecraft:recipes/misc/iron_ingot_from_iron_block") -+ .put("minecraft:recipes/redstone/fence_gate", "minecraft:recipes/redstone/oak_fence_gate") -+ .put("minecraft:recipes/redstone/noteblock", "minecraft:recipes/redstone/note_block") -+ .put("minecraft:recipes/redstone/trapdoor", "minecraft:recipes/redstone/oak_trapdoor") -+ .put("minecraft:recipes/redstone/wooden_button", "minecraft:recipes/redstone/oak_button") -+ .put("minecraft:recipes/redstone/wooden_door", "minecraft:recipes/redstone/oak_door") -+ .put("minecraft:recipes/redstone/wooden_pressure_plate", "minecraft:recipes/redstone/oak_pressure_plate") -+ .put("minecraft:recipes/transportation/boat", "minecraft:recipes/transportation/oak_boat") -+ .put("minecraft:recipes/transportation/golden_rail", "minecraft:recipes/transportation/powered_rail") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractAdvancementsRename.register(VERSION, RENAMES::get); -+ } -+ -+ private V1501() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1502.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1502.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cd07718649f0e2ca66f1ec3b0aba81611333ba09 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1502.java -@@ -0,0 +1,77 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.recipe.ConverterAbstractRecipeRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1502 { -+ -+ private static final int VERSION = MCVersions.V1_13_PRE2; -+ -+ private static final Map RECIPES_UPDATES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:acacia_wooden_slab", "minecraft:acacia_slab") -+ .put("minecraft:birch_wooden_slab", "minecraft:birch_slab") -+ .put("minecraft:black_stained_hardened_clay", "minecraft:black_terracotta") -+ .put("minecraft:blue_stained_hardened_clay", "minecraft:blue_terracotta") -+ .put("minecraft:boat", "minecraft:oak_boat") -+ .put("minecraft:bone_meal_from_block", "minecraft:bone_meal_from_bone_block") -+ .put("minecraft:bone_meal_from_bone", "minecraft:bone_meal") -+ .put("minecraft:brick_block", "minecraft:bricks") -+ .put("minecraft:brown_stained_hardened_clay", "minecraft:brown_terracotta") -+ .put("minecraft:chiseled_stonebrick", "minecraft:chiseled_stone_bricks") -+ .put("minecraft:cyan_stained_hardened_clay", "minecraft:cyan_terracotta") -+ .put("minecraft:dark_oak_wooden_slab", "minecraft:dark_oak_slab") -+ .put("minecraft:end_bricks", "minecraft:end_stone_bricks") -+ .put("minecraft:fence_gate", "minecraft:oak_fence_gate") -+ .put("minecraft:fence", "minecraft:oak_fence") -+ .put("minecraft:golden_rail", "minecraft:powered_rail") -+ .put("minecraft:gold_ingot_from_block", "minecraft:gold_ingot_from_gold_block") -+ .put("minecraft:gray_stained_hardened_clay", "minecraft:gray_terracotta") -+ .put("minecraft:green_stained_hardened_clay", "minecraft:green_terracotta") -+ .put("minecraft:iron_ingot_from_block", "minecraft:iron_ingot_from_iron_block") -+ .put("minecraft:jungle_wooden_slab", "minecraft:jungle_slab") -+ .put("minecraft:light_blue_stained_hardened_clay", "minecraft:light_blue_terracotta") -+ .put("minecraft:light_gray_stained_hardened_clay", "minecraft:light_gray_terracotta") -+ .put("minecraft:lime_stained_hardened_clay", "minecraft:lime_terracotta") -+ .put("minecraft:lit_pumpkin", "minecraft:jack_o_lantern") -+ .put("minecraft:magenta_stained_hardened_clay", "minecraft:magenta_terracotta") -+ .put("minecraft:magma", "minecraft:magma_block") -+ .put("minecraft:melon_block", "minecraft:melon") -+ .put("minecraft:mossy_stonebrick", "minecraft:mossy_stone_bricks") -+ .put("minecraft:noteblock", "minecraft:note_block") -+ .put("minecraft:oak_wooden_slab", "minecraft:oak_slab") -+ .put("minecraft:orange_stained_hardened_clay", "minecraft:orange_terracotta") -+ .put("minecraft:pillar_quartz_block", "minecraft:quartz_pillar") -+ .put("minecraft:pink_stained_hardened_clay", "minecraft:pink_terracotta") -+ .put("minecraft:purple_shulker_box", "minecraft:shulker_box") -+ .put("minecraft:purple_stained_hardened_clay", "minecraft:purple_terracotta") -+ .put("minecraft:red_nether_brick", "minecraft:red_nether_bricks") -+ .put("minecraft:red_stained_hardened_clay", "minecraft:red_terracotta") -+ .put("minecraft:slime", "minecraft:slime_block") -+ .put("minecraft:smooth_red_sandstone", "minecraft:cut_red_sandstone") -+ .put("minecraft:smooth_sandstone", "minecraft:cut_sandstone") -+ .put("minecraft:snow_layer", "minecraft:snow") -+ .put("minecraft:snow", "minecraft:snow_block") -+ .put("minecraft:speckled_melon", "minecraft:glistering_melon_slice") -+ .put("minecraft:spruce_wooden_slab", "minecraft:spruce_slab") -+ .put("minecraft:stonebrick", "minecraft:stone_bricks") -+ .put("minecraft:stone_stairs", "minecraft:cobblestone_stairs") -+ .put("minecraft:string_to_wool", "minecraft:white_wool_from_string") -+ .put("minecraft:trapdoor", "minecraft:oak_trapdoor") -+ .put("minecraft:white_stained_hardened_clay", "minecraft:white_terracotta") -+ .put("minecraft:wooden_button", "minecraft:oak_button") -+ .put("minecraft:wooden_door", "minecraft:oak_door") -+ .put("minecraft:wooden_pressure_plate", "minecraft:oak_pressure_plate") -+ .put("minecraft:yellow_stained_hardened_clay", "minecraft:yellow_terracotta") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractRecipeRename.register(VERSION, RECIPES_UPDATES::get); -+ } -+ -+ private V1502() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java -new file mode 100644 -index 0000000000000000000000000000000000000000..36e32a8ff987e4006784c5cba369c736903fa222 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java -@@ -0,0 +1,221 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+import ca.spottedleaf.dataconverter.types.json.JsonMapType; -+import ca.spottedleaf.dataconverter.types.json.JsonTypeUtil; -+import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; -+import com.google.common.base.Splitter; -+import com.google.common.collect.ImmutableMap; -+import com.google.common.collect.Lists; -+import com.google.common.collect.Maps; -+import com.google.gson.JsonParser; -+import com.mojang.datafixers.util.Pair; -+import com.mojang.serialization.Dynamic; -+import com.mojang.serialization.DynamicOps; -+import net.minecraft.nbt.CompoundTag; -+import net.minecraft.nbt.NbtOps; -+import net.minecraft.nbt.Tag; -+import net.minecraft.util.GsonHelper; -+import java.util.ArrayList; -+import java.util.Collections; -+import java.util.HashMap; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Locale; -+import java.util.Map; -+import java.util.stream.Collectors; -+ -+public final class V1506 { -+ -+ private static final int VERSION = MCVersions.V1_13_PRE4 + 2; -+ -+ static final Map MAP = new HashMap<>(); -+ static { -+ MAP.put("0", "minecraft:ocean"); -+ MAP.put("1", "minecraft:plains"); -+ MAP.put("2", "minecraft:desert"); -+ MAP.put("3", "minecraft:mountains"); -+ MAP.put("4", "minecraft:forest"); -+ MAP.put("5", "minecraft:taiga"); -+ MAP.put("6", "minecraft:swamp"); -+ MAP.put("7", "minecraft:river"); -+ MAP.put("8", "minecraft:nether"); -+ MAP.put("9", "minecraft:the_end"); -+ MAP.put("10", "minecraft:frozen_ocean"); -+ MAP.put("11", "minecraft:frozen_river"); -+ MAP.put("12", "minecraft:snowy_tundra"); -+ MAP.put("13", "minecraft:snowy_mountains"); -+ MAP.put("14", "minecraft:mushroom_fields"); -+ MAP.put("15", "minecraft:mushroom_field_shore"); -+ MAP.put("16", "minecraft:beach"); -+ MAP.put("17", "minecraft:desert_hills"); -+ MAP.put("18", "minecraft:wooded_hills"); -+ MAP.put("19", "minecraft:taiga_hills"); -+ MAP.put("20", "minecraft:mountain_edge"); -+ MAP.put("21", "minecraft:jungle"); -+ MAP.put("22", "minecraft:jungle_hills"); -+ MAP.put("23", "minecraft:jungle_edge"); -+ MAP.put("24", "minecraft:deep_ocean"); -+ MAP.put("25", "minecraft:stone_shore"); -+ MAP.put("26", "minecraft:snowy_beach"); -+ MAP.put("27", "minecraft:birch_forest"); -+ MAP.put("28", "minecraft:birch_forest_hills"); -+ MAP.put("29", "minecraft:dark_forest"); -+ MAP.put("30", "minecraft:snowy_taiga"); -+ MAP.put("31", "minecraft:snowy_taiga_hills"); -+ MAP.put("32", "minecraft:giant_tree_taiga"); -+ MAP.put("33", "minecraft:giant_tree_taiga_hills"); -+ MAP.put("34", "minecraft:wooded_mountains"); -+ MAP.put("35", "minecraft:savanna"); -+ MAP.put("36", "minecraft:savanna_plateau"); -+ MAP.put("37", "minecraft:badlands"); -+ MAP.put("38", "minecraft:wooded_badlands_plateau"); -+ MAP.put("39", "minecraft:badlands_plateau"); -+ MAP.put("40", "minecraft:small_end_islands"); -+ MAP.put("41", "minecraft:end_midlands"); -+ MAP.put("42", "minecraft:end_highlands"); -+ MAP.put("43", "minecraft:end_barrens"); -+ MAP.put("44", "minecraft:warm_ocean"); -+ MAP.put("45", "minecraft:lukewarm_ocean"); -+ MAP.put("46", "minecraft:cold_ocean"); -+ MAP.put("47", "minecraft:deep_warm_ocean"); -+ MAP.put("48", "minecraft:deep_lukewarm_ocean"); -+ MAP.put("49", "minecraft:deep_cold_ocean"); -+ MAP.put("50", "minecraft:deep_frozen_ocean"); -+ MAP.put("127", "minecraft:the_void"); -+ MAP.put("129", "minecraft:sunflower_plains"); -+ MAP.put("130", "minecraft:desert_lakes"); -+ MAP.put("131", "minecraft:gravelly_mountains"); -+ MAP.put("132", "minecraft:flower_forest"); -+ MAP.put("133", "minecraft:taiga_mountains"); -+ MAP.put("134", "minecraft:swamp_hills"); -+ MAP.put("140", "minecraft:ice_spikes"); -+ MAP.put("149", "minecraft:modified_jungle"); -+ MAP.put("151", "minecraft:modified_jungle_edge"); -+ MAP.put("155", "minecraft:tall_birch_forest"); -+ MAP.put("156", "minecraft:tall_birch_hills"); -+ MAP.put("157", "minecraft:dark_forest_hills"); -+ MAP.put("158", "minecraft:snowy_taiga_mountains"); -+ MAP.put("160", "minecraft:giant_spruce_taiga"); -+ MAP.put("161", "minecraft:giant_spruce_taiga_hills"); -+ MAP.put("162", "minecraft:modified_gravelly_mountains"); -+ MAP.put("163", "minecraft:shattered_savanna"); -+ MAP.put("164", "minecraft:shattered_savanna_plateau"); -+ MAP.put("165", "minecraft:eroded_badlands"); -+ MAP.put("166", "minecraft:modified_wooded_badlands_plateau"); -+ MAP.put("167", "minecraft:modified_badlands_plateau"); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.LEVEL.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String generatorOptions = data.getString("generatorOptions"); -+ final String generatorName = data.getString("generatorName"); -+ if ("flat".equalsIgnoreCase(generatorName)) { -+ data.setMap("generatorOptions", V1506.convert(generatorOptions == null ? "" : generatorOptions)); -+ } else if ("buffet".equalsIgnoreCase(generatorName) && generatorOptions != null) { -+ data.setGeneric("generatorOptions", Types.JSON.convertFromBaseToGeneric(JsonParser.parseString(generatorOptions), data.getTypeUtil())); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private static MapType convert(final String param0) { -+ final Dynamic dynamic = convert(param0, NbtOps.INSTANCE); -+ -+ return new NBTMapType((CompoundTag)dynamic.getValue()); -+ } -+ -+ // Yeah I ain't touching that. This is basically magic value hell. -+ private static Dynamic convert(final String generatorSettings, final DynamicOps ops) { -+ final Iterator splitSettings = Splitter.on(';').split(generatorSettings).iterator(); -+ String biome = "minecraft:plains"; -+ final Map> structures = Maps.newHashMap(); -+ final List> layers; -+ if (!generatorSettings.isEmpty() && splitSettings.hasNext()) { -+ layers = getLayersInfoFromString(splitSettings.next()); -+ if (!layers.isEmpty()) { -+ // biome is next -+ if (splitSettings.hasNext()) { -+ biome = MAP.getOrDefault(splitSettings.next(), "minecraft:plains"); -+ } -+ -+ // structures is next -+ if (splitSettings.hasNext()) { -+ final String[] structuresSplit = splitSettings.next().toLowerCase(Locale.ROOT).split(","); -+ -+ for (final String structureString : structuresSplit) { -+ final String[] structureInfo = structureString.split("\\(", 2); -+ if (!structureInfo[0].isEmpty()) { -+ structures.put(structureInfo[0], Maps.newHashMap()); -+ if (structureInfo.length > 1 && structureInfo[1].endsWith(")") && structureInfo[1].length() > 1) { -+ // I can't even guess the mappings for these. Not worth my time, it will work regardless of the mappings -+ final String[] var7 = structureInfo[1].substring(0, structureInfo[1].length() - 1).split(" "); -+ -+ for (final String var8 : var7) { -+ String[] var9 = var8.split("=", 2); -+ if (var9.length == 2) { -+ structures.get(structureInfo[0]).put(var9[0], var9[1]); -+ } -+ } -+ } -+ } -+ } -+ } else { -+ structures.put("village", Maps.newHashMap()); -+ } -+ } -+ } else { -+ layers = Lists.newArrayList(); -+ layers.add(Pair.of(1, "minecraft:bedrock")); -+ layers.add(Pair.of(2, "minecraft:dirt")); -+ layers.add(Pair.of(1, "minecraft:grass_block")); -+ structures.put("village", Maps.newHashMap()); -+ } -+ -+ final T layerTag = ops.createList(layers.stream().map((param1x) -> ops.createMap(ImmutableMap.of(ops.createString("height"), ops.createInt(param1x.getFirst()), ops.createString("block"), ops.createString(param1x.getSecond()))))); -+ final T structuresTag = ops.createMap(structures.entrySet().stream().map((param1x) -> Pair.of(ops.createString(param1x.getKey().toLowerCase(Locale.ROOT)), ops.createMap(param1x.getValue().entrySet().stream().map((param1xx) -> Pair.of(ops.createString(param1xx.getKey()), ops.createString(param1xx.getValue()))).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond))))).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond))); -+ return new Dynamic<>(ops, ops.createMap(ImmutableMap.of(ops.createString("layers"), layerTag, ops.createString("biome"), ops.createString(biome), ops.createString("structures"), structuresTag))); -+ } -+ -+ private static Pair getLayerInfoFromString(final String layerString) { -+ final String[] split = layerString.split("\\*", 2); -+ int layerCount; -+ if (split.length == 2) { -+ try { -+ layerCount = Integer.parseInt(split[0]); -+ } catch (final NumberFormatException ex) { -+ return null; -+ } -+ } else { -+ layerCount = 1; -+ } -+ -+ final String blockName = split[split.length - 1]; -+ return Pair.of(layerCount, blockName); -+ } -+ -+ private static List> getLayersInfoFromString(final String layersString) { -+ final List> ret = new ArrayList<>(); -+ final String[] layers = layersString.split(","); -+ -+ for (final String layerString : layers) { -+ final Pair layer = getLayerInfoFromString(layerString); -+ if (layer == null) { -+ return Collections.emptyList(); -+ } -+ -+ ret.add(layer); -+ } -+ -+ return ret; -+ } -+ -+ private V1506() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1510.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1510.java -new file mode 100644 -index 0000000000000000000000000000000000000000..dfc9d1e89983c73e06ce3c8a22c29f49af4a935c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1510.java -@@ -0,0 +1,111 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.recipe.ConverterAbstractRecipeRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.stats.ConverterAbstractStatsRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1510 { -+ -+ public static final Map RENAMED_ENTITY_IDS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:commandblock_minecart", "minecraft:command_block_minecart") -+ .put("minecraft:ender_crystal", "minecraft:end_crystal") -+ .put("minecraft:snowman", "minecraft:snow_golem") -+ .put("minecraft:evocation_illager", "minecraft:evoker") -+ .put("minecraft:evocation_fangs", "minecraft:evoker_fangs") -+ .put("minecraft:illusion_illager", "minecraft:illusioner") -+ .put("minecraft:vindication_illager", "minecraft:vindicator") -+ .put("minecraft:villager_golem", "minecraft:iron_golem") -+ .put("minecraft:xp_orb", "minecraft:experience_orb") -+ .put("minecraft:xp_bottle", "minecraft:experience_bottle") -+ .put("minecraft:eye_of_ender_signal", "minecraft:eye_of_ender") -+ .put("minecraft:fireworks_rocket", "minecraft:firework_rocket") -+ .build() -+ ); -+ -+ public static final Map RENAMED_BLOCKS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:portal", "minecraft:nether_portal") -+ .put("minecraft:oak_bark", "minecraft:oak_wood") -+ .put("minecraft:spruce_bark", "minecraft:spruce_wood") -+ .put("minecraft:birch_bark", "minecraft:birch_wood") -+ .put("minecraft:jungle_bark", "minecraft:jungle_wood") -+ .put("minecraft:acacia_bark", "minecraft:acacia_wood") -+ .put("minecraft:dark_oak_bark", "minecraft:dark_oak_wood") -+ .put("minecraft:stripped_oak_bark", "minecraft:stripped_oak_wood") -+ .put("minecraft:stripped_spruce_bark", "minecraft:stripped_spruce_wood") -+ .put("minecraft:stripped_birch_bark", "minecraft:stripped_birch_wood") -+ .put("minecraft:stripped_jungle_bark", "minecraft:stripped_jungle_wood") -+ .put("minecraft:stripped_acacia_bark", "minecraft:stripped_acacia_wood") -+ .put("minecraft:stripped_dark_oak_bark", "minecraft:stripped_dark_oak_wood") -+ .put("minecraft:mob_spawner", "minecraft:spawner") -+ .build() -+ ); -+ -+ public static final Map RENAMED_ITEMS = new HashMap<>( -+ ImmutableMap.builder() -+ .putAll(RENAMED_BLOCKS) -+ .put("minecraft:clownfish", "minecraft:tropical_fish") -+ .put("minecraft:chorus_fruit_popped", "minecraft:popped_chorus_fruit") -+ .put("minecraft:evocation_illager_spawn_egg", "minecraft:evoker_spawn_egg") -+ .put("minecraft:vindication_illager_spawn_egg", "minecraft:vindicator_spawn_egg") -+ .build() -+ ); -+ -+ private static final Map RECIPES_UPDATES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:acacia_bark", "minecraft:acacia_wood") -+ .put("minecraft:birch_bark", "minecraft:birch_wood") -+ .put("minecraft:dark_oak_bark", "minecraft:dark_oak_wood") -+ .put("minecraft:jungle_bark", "minecraft:jungle_wood") -+ .put("minecraft:oak_bark", "minecraft:oak_wood") -+ .put("minecraft:spruce_bark", "minecraft:spruce_wood") -+ .build() -+ ); -+ -+ private static final int VERSION = MCVersions.V1_13_PRE4 + 6; -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, RENAMED_BLOCKS::get); -+ ConverterAbstractItemRename.register(VERSION, RENAMED_ITEMS::get); -+ ConverterAbstractRecipeRename.register(VERSION, RECIPES_UPDATES::get); -+ -+ ConverterAbstractEntityRename.register(VERSION, (String input) -> { -+ if (input.startsWith("minecraft:bred_")) { -+ input = "minecraft:".concat(input.substring("minecraft:bred_".length())); -+ } -+ -+ return RENAMED_ENTITY_IDS.get(input); -+ }); -+ -+ ConverterAbstractStatsRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:swim_one_cm", "minecraft:walk_on_water_one_cm", -+ "minecraft:dive_one_cm", "minecraft:walk_under_water_one_cm" -+ ) -+ )::get); -+ -+ -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:commandblock_minecart", "minecraft:command_block_minecart"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:ender_crystal", "minecraft:end_crystal"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:snowman", "minecraft:snow_golem"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:evocation_illager", "minecraft:evoker"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:evocation_fangs", "minecraft:evoker_fangs"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:illusion_illager", "minecraft:illusioner"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:vindication_illager", "minecraft:vindicator"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:villager_golem", "minecraft:iron_golem"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:xp_orb", "minecraft:experience_orb"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:xp_bottle", "minecraft:experience_bottle"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:eye_of_ender_signal", "minecraft:eye_of_ender"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:fireworks_rocket", "minecraft:firework_rocket"); -+ } -+ -+ private V1510() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1514.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1514.java -new file mode 100644 -index 0000000000000000000000000000000000000000..308c29fece597117694b759b72b5161a43d160cf ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1514.java -@@ -0,0 +1,68 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1514 { -+ -+ private static final int VERSION = MCVersions.V1_13_PRE7 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.OBJECTIVE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String displayName = data.getString("DisplayName"); -+ if (displayName == null) { -+ return null; -+ } -+ -+ final String update = ComponentUtils.createPlainTextComponent(displayName); -+ -+ data.setString("DisplayName", update); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TEAM.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String displayName = data.getString("DisplayName"); -+ if (displayName == null) { -+ return null; -+ } -+ -+ final String update = ComponentUtils.createPlainTextComponent(displayName); -+ -+ data.setString("DisplayName", update); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.OBJECTIVE.addStructureConverter(new DataConverter<>(VERSION) { -+ private static String getRenderType(String string) { -+ return string.equals("health") ? "hearts" : "integer"; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String renderType = data.getString("RenderType"); -+ if (renderType != null) { -+ return null; -+ } -+ -+ final String criteriaName = data.getString("CriteriaName", ""); -+ -+ data.setString("RenderType", getRenderType(criteriaName)); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1514() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1515.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1515.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d2093732e06ddccdd8a34bbfcaee6ede3aae96d0 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1515.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1515 { -+ -+ private static final int VERSION = MCVersions.V1_13_PRE7 + 2; -+ -+ public static final Map RENAMED_BLOCK_IDS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:tube_coral_fan", "minecraft:tube_coral_wall_fan") -+ .put("minecraft:brain_coral_fan", "minecraft:brain_coral_wall_fan") -+ .put("minecraft:bubble_coral_fan", "minecraft:bubble_coral_wall_fan") -+ .put("minecraft:fire_coral_fan", "minecraft:fire_coral_wall_fan") -+ .put("minecraft:horn_coral_fan", "minecraft:horn_coral_wall_fan") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, RENAMED_BLOCK_IDS::get); -+ } -+ -+ private V1515() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1624.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1624.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d1df382e095032950a1dc4c256b62b39b9fe96a4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1624.java -@@ -0,0 +1,110 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.mojang.logging.LogUtils; -+import it.unimi.dsi.fastutil.ints.IntOpenHashSet; -+import org.slf4j.Logger; -+ -+public final class V1624 { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final int VERSION = MCVersions.V18W32A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ -+ if (level == null) { -+ return null; -+ } -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections == null) { -+ return null; -+ } -+ -+ final IntOpenHashSet positionsToLook = new IntOpenHashSet(); -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final TrappedChestSection section = new TrappedChestSection(sections.getMap(i)); -+ if (section.isSkippable()) { -+ continue; -+ } -+ -+ for (int index = 0; index < 4096; ++index) { -+ if (section.isTrappedChest(section.getBlock(index))) { -+ positionsToLook.add(section.getSectionY() << 12 | index); -+ } -+ } -+ } -+ -+ final int chunkX = level.getInt("xPos"); -+ final int chunkZ = level.getInt("zPos"); -+ -+ final ListType tileEntities = level.getList("TileEntities", ObjectType.MAP); -+ -+ if (tileEntities != null) { -+ for (int i = 0, len = tileEntities.size(); i < len; ++i) { -+ final MapType tile = tileEntities.getMap(i); -+ -+ final int x = tile.getInt("x"); -+ final int y = tile.getInt("y"); -+ final int z = tile.getInt("z"); -+ -+ final int index = V1496.getIndex(x - (chunkX << 4), y, z - (chunkZ << 4)); -+ if (!positionsToLook.contains(index)) { -+ continue; -+ } -+ -+ final String id = tile.getString("id"); -+ if (!"minecraft:chest".equals(id)) { -+ LOGGER.warn("Block Entity ({},{},{}) was expected to be a chest (V1624)", x, y, z); -+ } -+ -+ tile.setString("id", "minecraft:trapped_chest"); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1624() {} -+ -+ public static final class TrappedChestSection extends V1496.Section { -+ -+ private IntOpenHashSet chestIds; -+ -+ public TrappedChestSection(final MapType section) { -+ super(section); -+ } -+ -+ @Override -+ protected boolean initSkippable() { -+ this.chestIds = new IntOpenHashSet(); -+ -+ for (int i = 0; i < this.palette.size(); ++i) { -+ final MapType blockState = this.palette.getMap(i); -+ final String name = blockState.getString("Name"); -+ if ("minecraft:trapped_chest".equals(name)) { -+ this.chestIds.add(i); -+ } -+ } -+ -+ return this.chestIds.isEmpty(); -+ } -+ -+ public boolean isTrappedChest(final int id) { -+ return this.chestIds.contains(id); -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V165.java b/ca/spottedleaf/dataconverter/minecraft/versions/V165.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c4476d08e1c0103a1f0beeb5144061aab01f5077 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V165.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V165 { -+ -+ private static final int VERSION = MCVersions.V1_9_PRE2; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"minecraft:written_book".equals(data.getString("id"))) { -+ return null; -+ } -+ -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final ListType pages = tag.getList("pages", ObjectType.STRING); -+ if (pages == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = pages.size(); i < len; ++i) { -+ final String page = pages.getString(i); -+ -+ pages.setString(i, ComponentUtils.convertFromLenient(page)); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V165() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1800.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1800.java -new file mode 100644 -index 0000000000000000000000000000000000000000..90967b33222ba7052d036c19cf08ca84a7dc7ef4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1800.java -@@ -0,0 +1,31 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1800 { -+ -+ private static final int VERSION = MCVersions.V1_13_2 + 169; -+ -+ public static final Map RENAMED_ITEM_IDS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:cactus_green", "minecraft:green_dye") -+ .put("minecraft:rose_red", "minecraft:red_dye") -+ .put("minecraft:dandelion_yellow", "minecraft:yellow_dye") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, RENAMED_ITEM_IDS::get); -+ -+ //registerMob("minecraft:panda"); // simple as of 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:pillager", new DataWalkerItemLists("Inventory")); -+ } -+ -+ private V1800() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1801.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1801.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e47ebb269f6e579274e2f1172c9180172e1064f7 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1801.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V1801 { -+ -+ private static final int VERSION = MCVersions.V1_13_2 + 170; -+ -+ public static void register() { -+ //registerMob("minecraft:illager_beast"); // changed to simple in 1.21.5 -+ } -+ -+ private V1801() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1802.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1802.java -new file mode 100644 -index 0000000000000000000000000000000000000000..aeae0c62efa1e189fe4b0da585c8a2a101bb5ede ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1802.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V1802 { -+ -+ private static final int VERSION = MCVersions.V1_13_2 + 171; -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:stone_slab", "minecraft:smooth_stone_slab", -+ "minecraft:sign", "minecraft:oak_sign", "minecraft:wall_sign", "minecraft:oak_wall_sign" -+ ) -+ )::get); -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>(ImmutableMap.of( -+ "minecraft:stone_slab", "minecraft:smooth_stone_slab", -+ "minecraft:sign", "minecraft:oak_sign" -+ ) -+ )::get); -+ } -+ -+ private V1802() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1803.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1803.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e12ae00288dcfc955d205b225dd8c5cf53d7afcb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1803.java -@@ -0,0 +1,46 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V1803 { -+ -+ public static final int VERSION = MCVersions.V1_13_2 + 172; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ -+ if (tag == null) { -+ return null; -+ } -+ -+ final MapType display = tag.getMap("display"); -+ -+ if (display == null) { -+ return null; -+ } -+ -+ final ListType lore = display.getList("Lore", ObjectType.STRING); -+ if (lore == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = lore.size(); i < len; ++i) { -+ lore.setString(i, ComponentUtils.createPlainTextComponent(lore.getString(i))); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1803() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1904.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1904.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b4b1bdaddb5a9ee6fc6e1bb6a1df09cbcd6fdf86 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1904.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1904 { -+ -+ private static final int VERSION = MCVersions.V18W43C + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:ocelot", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int catType = data.getInt("CatType"); -+ -+ if (catType == 0) { -+ final String owner = data.getString("Owner"); -+ final String ownerUUID = data.getString("OwnerUUID"); -+ if ((owner != null && owner.length() > 0) || (ownerUUID != null && ownerUUID.length() > 0)) { -+ data.setBoolean("Trusting", true); -+ } -+ } else if (catType > 0 && catType < 4) { -+ data.setString("id", "minecraft:cat"); -+ data.setString("OwnerUUID", data.getString("OwnerUUID", "")); -+ } -+ -+ return null; -+ } -+ }); -+ -+ //registerMob("minecraft:cat"); // changed to simple in 1.21.5 -+ } -+ -+ private V1904() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1905.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1905.java -new file mode 100644 -index 0000000000000000000000000000000000000000..feba11bb1c4c3aeee4dcfbe51f4ca15d35c2d542 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1905.java -@@ -0,0 +1,34 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1905 { -+ -+ private static final int VERSION = MCVersions.V18W43C + 2; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ -+ if (level == null) { -+ return null; -+ } -+ -+ final String status = level.getString("Status"); -+ -+ if ("postprocessed".equals(status)) { -+ level.setString("Status", "fullchunk"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1905() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1906.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1906.java -new file mode 100644 -index 0000000000000000000000000000000000000000..fd60eb21ae8ced56a28b2515bd33a59f1eea44fd ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1906.java -@@ -0,0 +1,21 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+ -+public final class V1906 { -+ -+ private static final int VERSION = MCVersions.V18W43C + 3; -+ -+ public static void register() { -+ V1458.namedInventory(VERSION, "minecraft:barrel"); -+ V1458.namedInventory(VERSION, "minecraft:smoker"); -+ V1458.namedInventory(VERSION, "minecraft:blast_furnace"); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:lectern", new DataWalkerItems("Book")); -+ } -+ -+ private V1906() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1909.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1909.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ede4d0bfc0fe0e4a3a6fb906037a4c964baac6e6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1909.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+ -+public final class V1909 { -+ -+ private static final int VERSION = MCVersions.V18W45A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:jigsaw", new DataWalkerTypePaths<>(MCTypeRegistry.FLAT_BLOCK_STATE, "final_state")); -+ } -+ -+ private V1909() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1911.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1911.java -new file mode 100644 -index 0000000000000000000000000000000000000000..db9981030c0d4d826ba595d8465825023acfce20 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1911.java -@@ -0,0 +1,49 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V1911 { -+ -+ private static final int VERSION = MCVersions.V18W46A + 1; -+ -+ private static final Map CHUNK_STATUS_REMAP = new HashMap<>( -+ ImmutableMap.builder() -+ .put("structure_references", "empty") -+ .put("biomes", "empty") -+ .put("base", "surface") -+ .put("carved", "carvers") -+ .put("liquid_carved", "liquid_carvers") -+ .put("decorated", "features") -+ .put("lighted", "light") -+ .put("mobs_spawned", "spawn") -+ .put("finalized", "heightmaps") -+ .put("fullchunk", "full") -+ .build() -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ -+ if (level == null) { -+ return null; -+ } -+ -+ final String status = level.getString("Status", "empty"); -+ level.setString("Status", CHUNK_STATUS_REMAP.getOrDefault(status, "empty")); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1911() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1914.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1914.java -new file mode 100644 -index 0000000000000000000000000000000000000000..fad451b5dd46774fe086f2459ff88077a900a15a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1914.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1914 { -+ -+ private static final int VERSION = MCVersions.V18W48A; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:chest", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String lootTable = data.getString("LootTable"); -+ -+ if ("minecraft:chests/village_blacksmith".equals(lootTable)) { -+ data.setString("LootTable", "minecraft:chests/village/village_weaponsmith"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1914() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1917.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1917.java -new file mode 100644 -index 0000000000000000000000000000000000000000..51c0dee566eb1220c1544591655f30d0f4fd49b8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1917.java -@@ -0,0 +1,25 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1917 { -+ -+ private static final int VERSION = MCVersions.V18W49A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:cat", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getInt("CatType") == 9) { -+ data.setInt("CatType", 10); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V1917() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1918.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1918.java -new file mode 100644 -index 0000000000000000000000000000000000000000..74fab9ff2379fae494f48a19804b154c3162519c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1918.java -@@ -0,0 +1,65 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V1918 { -+ -+ private static final int VERSION = MCVersions.V18W49A + 2; -+ -+ private static String getProfessionString(final int professionId, final int careerId) { -+ if (professionId == 0) { -+ if (careerId == 2) { -+ return "minecraft:fisherman"; -+ } else if (careerId == 3) { -+ return "minecraft:shepherd"; -+ } else { -+ return careerId == 4 ? "minecraft:fletcher" : "minecraft:farmer"; -+ } -+ } else if (professionId == 1) { -+ return careerId == 2 ? "minecraft:cartographer" : "minecraft:librarian"; -+ } else if (professionId == 2) { -+ return "minecraft:cleric"; -+ } else if (professionId == 3) { -+ if (careerId == 2) { -+ return "minecraft:weaponsmith"; -+ } else { -+ return careerId == 3 ? "minecraft:toolsmith" : "minecraft:armorer"; -+ } -+ } else if (professionId == 4) { -+ return careerId == 2 ? "minecraft:leatherworker" : "minecraft:butcher"; -+ } else { -+ return professionId == 5 ? "minecraft:nitwit" : "minecraft:none"; -+ } -+ } -+ -+ public static void register() { -+ final DataConverter converter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int profession = data.getInt("Profession"); -+ final int career = data.getInt("Career"); -+ final int careerLevel = data.getInt("CareerLevel", 1); -+ data.remove("Profession"); -+ data.remove("Career"); -+ data.remove("CareerLevel"); -+ -+ final MapType villagerData = Types.NBT.createEmptyMap(); -+ data.setMap("VillagerData", villagerData); -+ villagerData.setString("type", "minecraft:plains"); -+ villagerData.setString("profession", getProfessionString(profession, career)); -+ villagerData.setInt("level", careerLevel); -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", converter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:zombie_villager", converter); -+ } -+ -+ private V1918() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1920.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1920.java -new file mode 100644 -index 0000000000000000000000000000000000000000..74f06a170cad432383a314b06833f9334a9cbd6c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1920.java -@@ -0,0 +1,75 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public final class V1920 { -+ -+ private static final int VERSION = MCVersions.V18W50A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ final MapType structures = level.getMap("Structures"); -+ if (structures == null) { -+ return null; -+ } -+ -+ final MapType starts = structures.getMap("Starts"); -+ if (starts != null) { -+ final MapType village = starts.getMap("New_Village"); -+ if (village != null) { -+ starts.remove("New_Village"); -+ starts.setMap("Village", village); -+ } else { -+ starts.remove("Village"); -+ } -+ } -+ -+ final MapType references = structures.getMap("References"); -+ if (references != null) { -+ final MapType newVillage = references.getMap("New_Village"); -+ // I believe Mojang had a typo here, removing Village from references only made sense -+ // if the new village didn't exist. DFU removes it whether or not it exists, but still relocates -+ // New_Village to Village first. It doesn't make sense to me to relocate it just to remove it, so it -+ // must be a typo. -+ if (newVillage == null) { -+ references.remove("Village"); -+ } else { -+ references.remove("New_Village"); -+ references.setMap("Village", newVillage); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ -+ if ("minecraft:new_village".equals(NamespaceUtil.correctNamespace(id))) { -+ data.setString("id", "minecraft:village"); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:campfire", new DataWalkerItemLists("Items")); -+ } -+ -+ private V1920() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1925.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1925.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8bc7155c186fdf52cc6c3ff45f04f9374bb9c87e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1925.java -@@ -0,0 +1,35 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V1925 { -+ -+ private static final int VERSION = MCVersions.V19W03C + 1; -+ -+ public static void register() { -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ ret.setMap("data", root); -+ -+ return ret; -+ } -+ return null; -+ } -+ }); -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.TEXT_COMPONENT, root.getMap("data"), "banners", "Name", fromVersion, toVersion); -+ return null; -+ }); -+ } -+ -+ private V1925() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1928.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1928.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e43f828bb527e449e5c46c6da8ac980106e4940c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1928.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V1928 { -+ -+ private static final int VERSION = MCVersions.V19W04B + 1; -+ -+ public static void register() { -+ ConverterAbstractEntityRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:illager_beast", "minecraft:ravager" -+ ) -+ )::get); -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:illager_beast_spawn_egg", "minecraft:ravager_spawn_egg" -+ ) -+ )::get); -+ -+ //registerMob("minecraft:ravager"); // changed to simple in 1.21.5 -+ } -+ -+ private V1928() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1929.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1929.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cf63fd07bdb1736f5367d4fd217159d3aa383e6e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1929.java -@@ -0,0 +1,32 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1929 { -+ -+ private static final int VERSION = MCVersions.V19W04B + 2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:wandering_trader", (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Inventory", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.VILLAGER_TRADE, data.getMap("Offers"), "Recipes", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:trader_llama", (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, data, "SaddleItem", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, data, "DecorItem", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Items", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ private V1929() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1931.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1931.java -new file mode 100644 -index 0000000000000000000000000000000000000000..06f467533d4139886510b61fd8aa6a190d4eb59c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1931.java -@@ -0,0 +1,15 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V1931 { -+ -+ private static final int VERSION = MCVersions.V19W06A; -+ -+ public static void register() { -+ //registerMob("minecraft:fox"); // changed to simple in 1.21.5 -+ } -+ -+ private V1931() {} -+ -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1936.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1936.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c6f99547735f0056609de2fd7c9e69c439c8a271 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1936.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1936 { -+ -+ private static final int VERSION = MCVersions.V19W09A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String chatOpacity = data.getString("chatOpacity"); -+ if (chatOpacity != null) { -+ // Vanilla uses createDouble here, but options is always string -> string. I presume they made -+ // a mistake with this converter. -+ data.setString("textBackgroundOpacity", Double.toString(calculateBackground(chatOpacity))); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private static double calculateBackground(final String opacity) { -+ try { -+ final double d = 0.9D * Double.parseDouble(opacity) + 0.1D; -+ return d / 2.0D; -+ } catch (final NumberFormatException ex) { -+ return 0.5D; -+ } -+ } -+ -+ private V1936() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1946.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1946.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2039be46ea37229b07bbfacb16506db7307cc576 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1946.java -@@ -0,0 +1,41 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V1946 { -+ -+ private static final int VERSION = MCVersions.V19W14B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.POI_CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType sections = Types.NBT.createEmptyMap(); -+ data.setMap("Sections", sections); -+ -+ for (int y = 0; y < 16; ++y) { -+ final String key = Integer.toString(y); -+ final Object records = data.getGeneric(key); -+ -+ if (records == null) { -+ continue; -+ } -+ -+ data.remove(key); -+ -+ final MapType section = Types.NBT.createEmptyMap(); -+ section.setGeneric("Records", records); -+ sections.setMap(key, section); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1946() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1948.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1948.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b879d83bf8fa3b99ecdda552a71b4936ca93e7ce ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1948.java -@@ -0,0 +1,39 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1948 { -+ -+ private static final int VERSION = MCVersions.V1_14_PRE2; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:white_banner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final MapType display = tag.getMap("display"); -+ if (display == null) { -+ return null; -+ } -+ -+ final String name = display.getString("Name"); -+ if (name == null) { -+ return null; -+ } -+ -+ display.setString("Name", name.replace("\"translate\":\"block.minecraft.illager_banner\"", "\"translate\":\"block.minecraft.ominous_banner\"")); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1948() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1953.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1953.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3178487686defc7d30afe4f5bc3043da569bafae ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1953.java -@@ -0,0 +1,26 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1953 { -+ -+ private static final int VERSION = MCVersions.V1_14 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:banner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String name = data.getString("CustomName"); -+ if (name != null) { -+ data.setString("CustomName", name.replace("\"translate\":\"block.minecraft.illager_banner\"", "\"translate\":\"block.minecraft.ominous_banner\"")); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V1953() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1955.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1955.java -new file mode 100644 -index 0000000000000000000000000000000000000000..701c426b4aa3b35a490ebab734c3d4bd50ea10af ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1955.java -@@ -0,0 +1,93 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import net.minecraft.util.Mth; -+ -+public final class V1955 { -+ -+ private static final int VERSION = MCVersions.V1_14_1_PRE1; -+ -+ private static final int[] LEVEL_XP_THRESHOLDS = new int[] { -+ 0, -+ 10, -+ 50, -+ 100, -+ 150 -+ }; -+ -+ private static int getMinXpPerLevel(final int level) { -+ return LEVEL_XP_THRESHOLDS[Mth.clamp(level - 1, 0, LEVEL_XP_THRESHOLDS.length - 1)]; -+ } -+ -+ private static void addLevel(final MapType data, final int level) { -+ MapType villagerData = data.getMap("VillagerData"); -+ if (villagerData == null) { -+ villagerData = Types.NBT.createEmptyMap(); -+ data.setMap("VillagerData", villagerData); -+ } -+ villagerData.setInt("level", level); -+ } -+ -+ private static void addXpFromLevel(final MapType data, final int level) { -+ data.setInt("Xp", getMinXpPerLevel(level)); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType villagerData = data.getMap("VillagerData"); -+ int level = villagerData == null ? 0 : villagerData.getInt("level"); -+ if (level == 0 || level == 1) { -+ // count recipes -+ final MapType offers = data.getMap("Offers"); -+ final ListType recipes = offers == null ? null : offers.getList("Recipes", ObjectType.MAP); -+ final int recipeCount; -+ if (recipes != null) { -+ recipeCount = recipes.size(); -+ } else { -+ recipeCount = 0; -+ } -+ -+ level = Mth.clamp(recipeCount / 2, 1, 5); -+ if (level > 1) { -+ addLevel(data, level); -+ } -+ } -+ -+ if (!data.hasKey("Xp", ObjectType.NUMBER)) { -+ addXpFromLevel(data, level); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:zombie_villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Number xp = data.getNumber("Xp"); -+ if (xp == null) { -+ final int level; -+ final MapType villagerData = data.getMap("VillagerData"); -+ if (villagerData == null) { -+ level = 1; -+ } else { -+ level = villagerData.getInt("level", 1); -+ } -+ -+ data.setInt("Xp", getMinXpPerLevel(level)); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V1955() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1961.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1961.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e49e4c902c6fa6d5794ac0c22508c96d82c6ff7a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1961.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V1961 { -+ -+ private static final int VERSION = MCVersions.V1_14_2_PRE3 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ level.remove("isLightOn"); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1961() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V1963.java b/ca/spottedleaf/dataconverter/minecraft/versions/V1963.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e13c694cd9a992c0129fdec3a3c90ef3dad1ff17 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V1963.java -@@ -0,0 +1,39 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V1963 { -+ -+ private static final int VERSION = MCVersions.V1_14_2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType gossips = data.getList("Gossips", ObjectType.MAP); -+ if (gossips == null) { -+ return null; -+ } -+ -+ for (int i = 0; i < gossips.size();) { -+ final MapType gossip = gossips.getMap(i); -+ if ("golem".equals(gossip.getString("Type"))) { -+ gossips.remove(i); -+ continue; -+ } -+ -+ ++i; -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V1963() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2100.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2100.java -new file mode 100644 -index 0000000000000000000000000000000000000000..90d2fcf77e746081043a32503049df7b127e00a7 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2100.java -@@ -0,0 +1,47 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterAbstractAdvancementsRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.recipe.ConverterAbstractRecipeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2100 { -+ -+ private static final int VERSION = MCVersions.V1_14_4 + 124; -+ private static final Map RECIPE_RENAMES = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:sugar", "minecraft:sugar_from_sugar_cane" -+ ) -+ ); -+ private static final Map ADVANCEMENT_RENAMES = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:recipes/misc/sugar", "minecraft:recipes/misc/sugar_from_sugar_cane" -+ ) -+ ); -+ -+ public static void register() { -+ ConverterAbstractRecipeRename.register(VERSION, RECIPE_RENAMES::get); -+ ConverterAbstractAdvancementsRename.register(VERSION, ADVANCEMENT_RENAMES::get); -+ -+ //registerMob("minecraft:bee"); // changed in 1.21.5 to simple -+ //registerMob("minecraft:bee_stinger"); // changed in 1.21.5 to simple -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:beehive", (data, fromVersion, toVersion) -> { -+ final ListType bees = data.getList("Bees", ObjectType.MAP); -+ if (bees != null) { -+ for (int i = 0, len = bees.size(); i < len; ++i) { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, bees.getMap(i), "EntityData", fromVersion, toVersion); -+ } -+ } -+ -+ return null; -+ }); -+ } -+ -+ private V2100() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2202.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2202.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ce20aaa8ef06c69ec85ddf0e5bdf17f57fa5ce70 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2202.java -@@ -0,0 +1,49 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2202 { -+ -+ private static final int VERSION = MCVersions.V19W35A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ final int[] oldBiomes = level.getInts("Biomes"); -+ -+ if (oldBiomes == null || oldBiomes.length != 256) { -+ return null; -+ } -+ -+ final int[] newBiomes = new int[1024]; -+ level.setInts("Biomes", newBiomes); -+ -+ for (int i = 0; i < 4; ++i) { -+ for (int j = 0; j < 4; ++j) { -+ int k = (j << 2) + 2; -+ int l = (i << 2) + 2; -+ int m = l << 4 | k; -+ newBiomes[i << 2 | j] = oldBiomes[m]; -+ } -+ } -+ -+ for (int i = 1; i < 64; ++i) { -+ System.arraycopy(newBiomes, 0, newBiomes, i * 16, 16); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2202() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2209.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2209.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7439d0e948f144d93a1fa7b57c2b478a54835d6d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2209.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.poi.ConverterAbstractPOIRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2209 { -+ -+ private static final int VERSION = MCVersions.V19W40A + 1; -+ -+ public static void register() { -+ final Map renamedIds = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:bee_hive", "minecraft:beehive" -+ ) -+ ); -+ -+ ConverterAbstractBlockRename.register(VERSION, renamedIds::get); -+ ConverterAbstractItemRename.register(VERSION, renamedIds::get); -+ ConverterAbstractPOIRename.register(VERSION, renamedIds::get); -+ } -+ -+ private V2209() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2211.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2211.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3b888aadf7f4abfd9feff25aa785d84782d14ba0 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2211.java -@@ -0,0 +1,31 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V2211 { -+ -+ private static final int VERSION = MCVersions.V19W41A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!data.hasKey("references", ObjectType.NUMBER)) { -+ return null; -+ } -+ -+ final int references = data.getInt("references"); -+ if (references <= 0) { -+ data.setInt("references", 1); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V2211() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2218.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2218.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3fc4c20e117edd06056145d58d822eb5c2c16e61 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2218.java -@@ -0,0 +1,33 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2218 { -+ -+ private static final int VERSION = MCVersions.V1_15_PRE1; -+ -+ public static void register() { -+ MCTypeRegistry.POI_CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType sections = data.getMap("Sections"); -+ if (sections == null) { -+ return null; -+ } -+ -+ for (final String key : sections.keys()) { -+ final MapType section = sections.getMap(key); -+ -+ section.remove("Valid"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2218() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2501.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2501.java -new file mode 100644 -index 0000000000000000000000000000000000000000..02dec41330c7e463f8b9869752ddae1601ac3763 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2501.java -@@ -0,0 +1,67 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V2501 { -+ -+ private static final int VERSION = MCVersions.V1_15_2 + 271; -+ -+ private static void registerFurnace(final String id) { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, id, (data, fromVersion, toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Items", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "CustomName", fromVersion, toVersion); -+ -+ WalkerUtils.convertKeys(MCTypeRegistry.RECIPE, data, "RecipesUsed", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ public static void register() { -+ final DataConverter converter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int recipesUsedSize = data.getInt("RecipesUsedSize"); -+ data.remove("RecipesUsedSize"); -+ -+ if (recipesUsedSize <= 0) { -+ return null; -+ } -+ -+ final MapType newRecipes = Types.NBT.createEmptyMap(); -+ data.setMap("RecipesUsed", newRecipes); -+ -+ for (int i = 0; i < recipesUsedSize; ++i) { -+ final String recipeKey = data.getString("RecipeLocation" + i); -+ data.remove("RecipeLocation" + i); -+ final int recipeAmount = data.getInt("RecipeAmount" + i); -+ data.remove("RecipeAmount" + i); -+ -+ if (i <= 0 || recipeKey == null) { -+ continue; -+ } -+ -+ newRecipes.setInt(recipeKey, recipeAmount); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:furnace", converter); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:blast_furnace", converter); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:smoker", converter); -+ -+ registerFurnace("minecraft:furnace"); -+ registerFurnace("minecraft:smoker"); -+ registerFurnace("minecraft:blast_furnace"); -+ } -+ -+ private V2501() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2502.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2502.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a2f0495c05e670d100cb90d526c1785ab172b5a2 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2502.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V2502 { -+ -+ private static final int VERSION = MCVersions.V1_15_2 + 272; -+ -+ public static void register() { -+ //registerMob("minecraft:hoglin"); changed to simple in 1.21.5 -+ } -+ -+ private V2502() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2503.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2503.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a1fca94f01bc9c18de17e4b40a98c57a4f965f7c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2503.java -@@ -0,0 +1,73 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterAbstractAdvancementsRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.google.common.collect.ImmutableMap; -+import com.google.common.collect.ImmutableSet; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V2503 { -+ -+ private static final int VERSION = MCVersions.V1_15_2 + 273; -+ -+ private static final Set WALL_BLOCKS = new HashSet<>( -+ ImmutableSet.of( -+ "minecraft:andesite_wall", -+ "minecraft:brick_wall", -+ "minecraft:cobblestone_wall", -+ "minecraft:diorite_wall", -+ "minecraft:end_stone_brick_wall", -+ "minecraft:granite_wall", -+ "minecraft:mossy_cobblestone_wall", -+ "minecraft:mossy_stone_brick_wall", -+ "minecraft:nether_brick_wall", -+ "minecraft:prismarine_wall", -+ "minecraft:red_nether_brick_wall", -+ "minecraft:red_sandstone_wall", -+ "minecraft:sandstone_wall", -+ "minecraft:stone_brick_wall" -+ ) -+ ); -+ -+ private static void changeWallProperty(final MapType properties, final String path) { -+ final String property = properties.getString(path); -+ if (property != null) { -+ properties.setString(path, "true".equals(property) ? "low" : "none"); -+ } -+ } -+ -+ public static void register() { -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!WALL_BLOCKS.contains(data.getString("Name"))) { -+ return null; -+ } -+ -+ final MapType properties = data.getMap("Properties"); -+ if (properties == null) { -+ return null; -+ } -+ -+ changeWallProperty(properties, "east"); -+ changeWallProperty(properties, "west"); -+ changeWallProperty(properties, "north"); -+ changeWallProperty(properties, "south"); -+ -+ return null; -+ } -+ }); -+ ConverterAbstractAdvancementsRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:recipes/misc/composter", "minecraft:recipes/decorations/composter" -+ ) -+ )::get); -+ } -+ -+ private V2503() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2505.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2505.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c7c4ddf11e841b23c17fc95fdcb878dffecb07d8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2505.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V2505 { -+ -+ private static final int VERSION = MCVersions.V20W06A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType brain = data.getMap("Brain"); -+ if (brain == null) { -+ return null; -+ } -+ -+ final MapType memories = brain.getMap("memories"); -+ if (memories == null) { -+ return null; -+ } -+ -+ for (final String key : memories.keys()) { -+ final Object value = memories.getGeneric(key); -+ -+ final MapType wrapped = Types.NBT.createEmptyMap(); -+ wrapped.setGeneric("value", value); -+ -+ memories.setMap(key, wrapped); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:piglin", new DataWalkerItemLists("Inventory")); -+ } -+ -+ private V2505() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2508.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2508.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f9e9d88e4cca15d2d4fdcbc0dbcae4c35c02284a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2508.java -@@ -0,0 +1,27 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2508 { -+ -+ private static final int VERSION = MCVersions.V20W08A + 1; -+ -+ public static void register() { -+ final Map remap = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:warped_fungi", "minecraft:warped_fungus", -+ "minecraft:crimson_fungi", "minecraft:crimson_fungus" -+ ) -+ ); -+ -+ ConverterAbstractBlockRename.register(VERSION, remap::get); -+ ConverterAbstractItemRename.register(VERSION, remap::get); -+ } -+ -+ private V2508() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2509.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2509.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3c8780f626b10918851a222afd8406d82e3754c0 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2509.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2509 { -+ -+ private static final int VERSION = MCVersions.V20W08A + 2; -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:zombie_pigman_spawn_egg", "minecraft:zombified_piglin_spawn_egg" -+ ) -+ )::get); -+ ConverterAbstractEntityRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:zombie_pigman", "minecraft:zombified_piglin" -+ ) -+ )::get); -+ -+ //registerMob("minecraft:zombified_piglin"); // changed to simple in 1.21.5 -+ } -+ -+ private V2509() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2511.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2511.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0fe1e7b2c8c6e197c89643da0f2cda9fcf779dff ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2511.java -@@ -0,0 +1,99 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V2511 { -+ -+ private static final int VERSION = MCVersions.V20W09A + 1; -+ -+ private static int[] createUUIDArray(final long most, final long least) { -+ return new int[] { -+ (int)(most >>> 32), -+ (int)most, -+ (int)(least >>> 32), -+ (int)least -+ }; -+ } -+ -+ private static void setUUID(final MapType data, final long most, final long least) { -+ if (most != 0L && least != 0L) { -+ data.setInts("OwnerUUID", createUUIDArray(most, least)); -+ } -+ } -+ -+ public static void register() { -+ final DataConverter throwableConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType owner = data.getMap("owner"); -+ data.remove("owner"); -+ if (owner == null) { -+ return null; -+ } -+ -+ setUUID(data, owner.getLong("M"), owner.getLong("L")); -+ -+ return null; -+ } -+ }; -+ final DataConverter potionConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType potion = data.getMap("Potion"); -+ data.remove("Potion"); -+ -+ data.setMap("Item", potion == null ? Types.NBT.createEmptyMap() : potion); -+ -+ return null; -+ } -+ }; -+ final DataConverter llamaSpitConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType owner = data.getMap("Owner"); -+ data.remove("Owner"); -+ if (owner == null) { -+ return null; -+ } -+ -+ setUUID(data, owner.getLong("OwnerUUIDMost"), owner.getLong("OwnerUUIDLeast")); -+ -+ return null; -+ } -+ }; -+ final DataConverter arrowConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ setUUID(data, data.getLong("OwnerUUIDMost"), data.getLong("OwnerUUIDLeast")); -+ -+ data.remove("OwnerUUIDMost"); -+ data.remove("OwnerUUIDLeast"); -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:egg", throwableConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:ender_pearl", throwableConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:experience_bottle", throwableConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:snowball", throwableConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:potion", throwableConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:potion", potionConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:llama_spit", llamaSpitConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:arrow", arrowConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:spectral_arrow", arrowConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trident", arrowConverter); -+ -+ // Vanilla uses version step 1, but there's no need to add a step here. -+ // Note: Originally we have had this walker on step 0, as Vanilla accidentally left this walker out -+ // until 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:potion", new DataWalkerItems("Item")); -+ } -+ -+ private V2511() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2514.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2514.java -new file mode 100644 -index 0000000000000000000000000000000000000000..167109fb53b45901e944ae3eb4a690956fe18e8f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2514.java -@@ -0,0 +1,590 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.common.collect.Sets; -+import java.util.Set; -+import java.util.UUID; -+ -+public final class V2514 { -+ -+ private static final int VERSION = MCVersions.V20W11A + 1; -+ -+ private static final Set ABSTRACT_HORSES = Sets.newHashSet(); -+ private static final Set TAMEABLE_ANIMALS = Sets.newHashSet(); -+ private static final Set ANIMALS = Sets.newHashSet(); -+ private static final Set MOBS = Sets.newHashSet(); -+ private static final Set LIVING_ENTITIES = Sets.newHashSet(); -+ private static final Set PROJECTILES = Sets.newHashSet(); -+ static { -+ ABSTRACT_HORSES.add("minecraft:donkey"); -+ ABSTRACT_HORSES.add("minecraft:horse"); -+ ABSTRACT_HORSES.add("minecraft:llama"); -+ ABSTRACT_HORSES.add("minecraft:mule"); -+ ABSTRACT_HORSES.add("minecraft:skeleton_horse"); -+ ABSTRACT_HORSES.add("minecraft:trader_llama"); -+ ABSTRACT_HORSES.add("minecraft:zombie_horse"); -+ -+ TAMEABLE_ANIMALS.add("minecraft:cat"); -+ TAMEABLE_ANIMALS.add("minecraft:parrot"); -+ TAMEABLE_ANIMALS.add("minecraft:wolf"); -+ -+ ANIMALS.add("minecraft:bee"); -+ ANIMALS.add("minecraft:chicken"); -+ ANIMALS.add("minecraft:cow"); -+ ANIMALS.add("minecraft:fox"); -+ ANIMALS.add("minecraft:mooshroom"); -+ ANIMALS.add("minecraft:ocelot"); -+ ANIMALS.add("minecraft:panda"); -+ ANIMALS.add("minecraft:pig"); -+ ANIMALS.add("minecraft:polar_bear"); -+ ANIMALS.add("minecraft:rabbit"); -+ ANIMALS.add("minecraft:sheep"); -+ ANIMALS.add("minecraft:turtle"); -+ ANIMALS.add("minecraft:hoglin"); -+ -+ MOBS.add("minecraft:bat"); -+ MOBS.add("minecraft:blaze"); -+ MOBS.add("minecraft:cave_spider"); -+ MOBS.add("minecraft:cod"); -+ MOBS.add("minecraft:creeper"); -+ MOBS.add("minecraft:dolphin"); -+ MOBS.add("minecraft:drowned"); -+ MOBS.add("minecraft:elder_guardian"); -+ MOBS.add("minecraft:ender_dragon"); -+ MOBS.add("minecraft:enderman"); -+ MOBS.add("minecraft:endermite"); -+ MOBS.add("minecraft:evoker"); -+ MOBS.add("minecraft:ghast"); -+ MOBS.add("minecraft:giant"); -+ MOBS.add("minecraft:guardian"); -+ MOBS.add("minecraft:husk"); -+ MOBS.add("minecraft:illusioner"); -+ MOBS.add("minecraft:magma_cube"); -+ MOBS.add("minecraft:pufferfish"); -+ MOBS.add("minecraft:zombified_piglin"); -+ MOBS.add("minecraft:salmon"); -+ MOBS.add("minecraft:shulker"); -+ MOBS.add("minecraft:silverfish"); -+ MOBS.add("minecraft:skeleton"); -+ MOBS.add("minecraft:slime"); -+ MOBS.add("minecraft:snow_golem"); -+ MOBS.add("minecraft:spider"); -+ MOBS.add("minecraft:squid"); -+ MOBS.add("minecraft:stray"); -+ MOBS.add("minecraft:tropical_fish"); -+ MOBS.add("minecraft:vex"); -+ MOBS.add("minecraft:villager"); -+ MOBS.add("minecraft:iron_golem"); -+ MOBS.add("minecraft:vindicator"); -+ MOBS.add("minecraft:pillager"); -+ MOBS.add("minecraft:wandering_trader"); -+ MOBS.add("minecraft:witch"); -+ MOBS.add("minecraft:wither"); -+ MOBS.add("minecraft:wither_skeleton"); -+ MOBS.add("minecraft:zombie"); -+ MOBS.add("minecraft:zombie_villager"); -+ MOBS.add("minecraft:phantom"); -+ MOBS.add("minecraft:ravager"); -+ MOBS.add("minecraft:piglin"); -+ -+ LIVING_ENTITIES.add("minecraft:armor_stand"); -+ -+ PROJECTILES.add("minecraft:arrow"); -+ PROJECTILES.add("minecraft:dragon_fireball"); -+ PROJECTILES.add("minecraft:firework_rocket"); -+ PROJECTILES.add("minecraft:fireball"); -+ PROJECTILES.add("minecraft:llama_spit"); -+ PROJECTILES.add("minecraft:small_fireball"); -+ PROJECTILES.add("minecraft:snowball"); -+ PROJECTILES.add("minecraft:spectral_arrow"); -+ PROJECTILES.add("minecraft:egg"); -+ PROJECTILES.add("minecraft:ender_pearl"); -+ PROJECTILES.add("minecraft:experience_bottle"); -+ PROJECTILES.add("minecraft:potion"); -+ PROJECTILES.add("minecraft:trident"); -+ PROJECTILES.add("minecraft:wither_skull"); -+ } -+ -+ static int[] createUUIDArray(final long most, final long least) { -+ return new int[] { -+ (int)(most >>> 32), -+ (int)most, -+ (int)(least >>> 32), -+ (int)least -+ }; -+ } -+ -+ static int[] createUUIDFromString(final MapType data, final String path) { -+ if (data == null) { -+ return null; -+ } -+ -+ final String uuidString = data.getString(path); -+ if (uuidString == null) { -+ return null; -+ } -+ -+ try { -+ final UUID uuid = UUID.fromString(uuidString); -+ return createUUIDArray(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()); -+ } catch (final IllegalArgumentException ignore) { -+ return null; -+ } -+ } -+ -+ static int[] createUUIDFromLongs(final MapType data, final String most, final String least) { -+ if (data == null) { -+ return null; -+ } -+ -+ final long mostBits = data.getLong(most); -+ final long leastBits = data.getLong(least); -+ -+ return (mostBits != 0 || leastBits != 0) ? createUUIDArray(mostBits, leastBits) : null; -+ } -+ -+ static void replaceUUIDString(final MapType data, final String oldPath, final String newPath) { -+ final int[] newUUID = createUUIDFromString(data, oldPath); -+ if (newUUID != null) { -+ data.remove(oldPath); -+ data.setInts(newPath, newUUID); -+ } -+ } -+ -+ static void replaceUUIDMLTag(final MapType data, final String oldPath, final String newPath) { -+ final int[] uuid = createUUIDFromLongs(data.getMap(oldPath), "M", "L"); -+ if (uuid != null) { -+ data.remove(oldPath); -+ data.setInts(newPath, uuid); -+ } -+ } -+ -+ static void replaceUUIDLeastMost(final MapType data, final String prefix, final String newPath) { -+ final String mostPath = prefix.concat("Most"); -+ final String leastPath = prefix.concat("Least"); -+ -+ final int[] uuid = createUUIDFromLongs(data, mostPath, leastPath); -+ if (uuid != null) { -+ data.remove(mostPath); -+ data.remove(leastPath); -+ data.setInts(newPath, uuid); -+ } -+ } -+ -+ private static void updatePiglin(final MapType data) { -+ final MapType brain = data.getMap("Brain"); -+ if (brain == null) { -+ return; -+ } -+ -+ final MapType memories = brain.getMap("memories"); -+ if (memories == null) { -+ return; -+ } -+ -+ final MapType angryAt = memories.getMap("minecraft:angry_at"); -+ -+ replaceUUIDString(angryAt, "value", "value"); -+ } -+ -+ private static void updateEvokerFangs(final MapType data) { -+ replaceUUIDLeastMost(data, "OwnerUUID", "Owner"); -+ } -+ -+ private static void updateZombieVillager(final MapType data) { -+ replaceUUIDLeastMost(data, "ConversionPlayer", "ConversionPlayer"); -+ } -+ -+ private static void updateAreaEffectCloud(final MapType data) { -+ replaceUUIDLeastMost(data, "OwnerUUID", "Owner"); -+ } -+ -+ private static void updateShulkerBullet(final MapType data) { -+ replaceUUIDMLTag(data, "Owner", "Owner"); -+ replaceUUIDMLTag(data, "Target", "Target"); -+ } -+ -+ private static void updateItem(final MapType data) { -+ replaceUUIDMLTag(data, "Owner", "Owner"); -+ replaceUUIDMLTag(data, "Thrower", "Thrower"); -+ } -+ -+ private static void updateFox(final MapType data) { -+ final ListType trustedUUIDS = data.getList("TrustedUUIDs", ObjectType.MAP); -+ if (trustedUUIDS == null) { -+ return; -+ } -+ -+ final ListType newUUIDs = Types.NBT.createEmptyList(); -+ data.remove("TrustedUUIDs"); -+ data.setList("Trusted", newUUIDs); -+ -+ for (int i = 0, len = trustedUUIDS.size(); i < len; ++i) { -+ final MapType uuid = trustedUUIDS.getMap(i); -+ final int[] newUUID = createUUIDFromLongs(uuid, "M", "L"); -+ if (newUUID != null) { -+ newUUIDs.addIntArray(newUUID); -+ } -+ } -+ } -+ -+ private static void updateHurtBy(final MapType data) { -+ replaceUUIDString(data, "HurtBy", "HurtBy"); -+ } -+ -+ private static void updateAnimalOwner(final MapType data) { -+ updateAnimal(data); -+ -+ replaceUUIDString(data, "OwnerUUID", "Owner"); -+ } -+ -+ private static void updateAnimal(final MapType data) { -+ updateMob(data); -+ -+ replaceUUIDLeastMost(data, "LoveCause", "LoveCause"); -+ } -+ -+ private static void updateMob(final MapType data) { -+ updateLivingEntity(data); -+ -+ final MapType leash = data.getMap("Leash"); -+ if (leash == null) { -+ return; -+ } -+ -+ replaceUUIDLeastMost(leash, "UUID", "UUID"); -+ } -+ -+ private static void updateLivingEntity(final MapType data) { -+ final ListType attributes = data.getList("Attributes", ObjectType.MAP); -+ if (attributes == null) { -+ return; -+ } -+ -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ final MapType attribute = attributes.getMap(i); -+ -+ final ListType modifiers = attribute.getList("Modifiers", ObjectType.MAP); -+ if (modifiers == null) { -+ continue; -+ } -+ -+ for (int k = 0; k < modifiers.size(); ++k) { -+ replaceUUIDLeastMost(modifiers.getMap(k), "UUID", "UUID"); -+ } -+ } -+ } -+ -+ private static void updateProjectile(final MapType data) { -+ final Object ownerUUID = data.getGeneric("OwnerUUID"); -+ if (ownerUUID != null) { -+ data.remove("OwnerUUID"); -+ data.setGeneric("Owner", ownerUUID); -+ } -+ } -+ -+ private static void updateEntityUUID(final MapType data) { -+ replaceUUIDLeastMost(data, "UUID", "UUID"); -+ } -+ -+ public static void register() { -+ // Entity UUID fixes -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateEntityUUID(data); -+ return null; -+ } -+ }); -+ -+ final DataConverter animalOwnerConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateAnimalOwner(data); -+ return null; -+ } -+ }; -+ final DataConverter animalConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateAnimal(data); -+ return null; -+ } -+ }; -+ final DataConverter mobConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateMob(data); -+ return null; -+ } -+ }; -+ final DataConverter livingEntityConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateLivingEntity(data); -+ return null; -+ } -+ }; -+ final DataConverter projectileConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateProjectile(data); -+ return null; -+ } -+ }; -+ for (final String id : ABSTRACT_HORSES) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, animalOwnerConverter); -+ } -+ for (final String id : TAMEABLE_ANIMALS) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, animalOwnerConverter); -+ } -+ for (final String id : ANIMALS) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, animalConverter); -+ } -+ for (final String id : MOBS) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, mobConverter); -+ } -+ for (final String id : LIVING_ENTITIES) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, livingEntityConverter); -+ } -+ for (final String id : PROJECTILES) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, projectileConverter); -+ } -+ -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:bee", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateHurtBy(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:zombified_piglin", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateHurtBy(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:fox", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateFox(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:item", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateItem(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:shulker_bullet", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateShulkerBullet(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:area_effect_cloud", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateAreaEffectCloud(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:zombie_villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateZombieVillager(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:evoker_fangs", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateEvokerFangs(data); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:piglin", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updatePiglin(data); -+ return null; -+ } -+ }); -+ -+ -+ // Update TE -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:conduit", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ replaceUUIDMLTag(data, "target_uuid", "Target"); -+ return null; -+ } -+ }); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:skull", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType owner = data.getMap("Owner"); -+ if (owner == null) { -+ return null; -+ } -+ -+ data.remove("Owner"); -+ -+ replaceUUIDString(owner, "Id", "Id"); -+ -+ data.setMap("SkullOwner", owner); -+ -+ return null; -+ } -+ }); -+ -+ // Player UUID -+ MCTypeRegistry.PLAYER.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateLivingEntity(data); -+ updateEntityUUID(data); -+ -+ final MapType rootVehicle = data.getMap("RootVehicle"); -+ if (rootVehicle == null) { -+ return null; -+ } -+ -+ replaceUUIDLeastMost(rootVehicle, "Attach", "Attach"); -+ -+ return null; -+ } -+ }); -+ -+ // Level.dat -+ MCTypeRegistry.LEVEL.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ replaceUUIDString(data, "WanderingTraderId", "WanderingTraderId"); -+ -+ final MapType dimensionData = data.getMap("DimensionData"); -+ if (dimensionData != null) { -+ for (final String key : dimensionData.keys()) { -+ final MapType dimension = dimensionData.getMap(key); -+ -+ final MapType dragonFight = dimension.getMap("DragonFight"); -+ if (dragonFight == null) { -+ continue; -+ } -+ -+ replaceUUIDLeastMost(dragonFight, "DragonUUID", "Dragon"); -+ } -+ } -+ -+ final MapType customBossEvents = data.getMap("CustomBossEvents"); -+ if (customBossEvents != null) { -+ for (final String key : customBossEvents.keys()) { -+ final MapType customBossEvent = customBossEvents.getMap(key); -+ -+ final ListType players = customBossEvent.getList("Players", ObjectType.MAP); -+ if (players == null) { -+ continue; -+ } -+ -+ final ListType newPlayers = Types.NBT.createEmptyList(); -+ customBossEvent.setList("Players", newPlayers); -+ -+ for (int i = 0, len = players.size(); i < len; ++i) { -+ final int[] newUUID = createUUIDFromLongs(players.getMap(i), "M", "L"); -+ if (newUUID != null) { -+ newPlayers.addIntArray(newUUID); -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.SAVED_DATA_RAIDS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ final ListType raids = data.getList("Raids", ObjectType.MAP); -+ if (raids == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = raids.size(); i < len; ++i) { -+ final MapType raid = raids.getMap(i); -+ -+ final ListType heros = raid.getList("HeroesOfTheVillage", ObjectType.MAP); -+ -+ if (heros == null) { -+ continue; -+ } -+ -+ final ListType newHeros = Types.NBT.createEmptyList(); -+ raid.setList("HeroesOfTheVillage", newHeros); -+ -+ for (int k = 0, klen = heros.size(); k < klen; ++k) { -+ final MapType uuidOld = heros.getMap(i); -+ final int[] uuidNew = createUUIDFromLongs(uuidOld, "UUIDMost", "UUIDLeast"); -+ if (uuidNew != null) { -+ newHeros.addIntArray(uuidNew); -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ updateAttributeModifiers(tag); -+ -+ if ("minecraft:player_head".equals(data.getString("id"))) { -+ updateSkullOwner(tag); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private static void updateAttributeModifiers(final MapType tag) { -+ final ListType attributes = tag.getList("AttributeModifiers", ObjectType.MAP); -+ if (attributes == null) { -+ return; -+ } -+ -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ replaceUUIDLeastMost(attributes.getMap(i), "UUID", "UUID"); -+ } -+ } -+ -+ private static void updateSkullOwner(final MapType tag) { -+ replaceUUIDString(tag.getMap("SkullOwner"), "Id", "Id"); -+ } -+ -+ private V2514() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2516.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2516.java -new file mode 100644 -index 0000000000000000000000000000000000000000..50f8e258ecc71e2c7e88ae8ccd83494da9ca9dfd ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2516.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V2516 { -+ -+ private static final int VERSION = MCVersions.V20W12A + 1; -+ -+ public static void register() { -+ final DataConverter gossipUUIDConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType gossips = data.getList("Gossips", ObjectType.MAP); -+ -+ if (gossips == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = gossips.size(); i < len; ++i) { -+ V2514.replaceUUIDLeastMost(gossips.getMap(i), "Target", "Target"); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", gossipUUIDConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:zombie_villager", gossipUUIDConverter); -+ } -+ -+ private V2516() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2518.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2518.java -new file mode 100644 -index 0000000000000000000000000000000000000000..df2c6cd50b2b0bfc062210a48d7e4b25a6cf0cb0 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2518.java -@@ -0,0 +1,65 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2518 { -+ -+ private static final int VERSION = MCVersions.V20W12A + 3; -+ -+ private static final Map FACING_RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("down", "down_south") -+ .put("up", "up_north") -+ .put("north", "north_up") -+ .put("south", "south_up") -+ .put("west", "west_up") -+ .put("east", "east_up") -+ .build() -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:jigsaw", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String type = data.getString("attachement_type", "minecraft:empty"); -+ final String pool = data.getString("target_pool", "minecraft:empty"); -+ data.remove("attachement_type"); -+ data.remove("target_pool"); -+ -+ data.setString("name", type); -+ data.setString("target", type); -+ data.setString("pool", pool); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"minecraft:jigsaw".equals(data.getString("Name"))) { -+ return null; -+ } -+ -+ final MapType properties = data.getMap("Properties"); -+ if (properties == null) { -+ return null; -+ } -+ -+ final String facing = properties.getString("facing", "north"); -+ properties.remove("facing"); -+ properties.setString("orientation", FACING_RENAMES.getOrDefault(facing, facing)); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2518() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2519.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2519.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e270ccada1c13a4c71b227cf0096dc3094ceff6f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2519.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V2519 { -+ -+ private static final int VERSION = MCVersions.V20W12A + 4; -+ -+ public static void register() { -+ //registerMob("minecraft:strider"); // changed to simple in 1.21.5 -+ } -+ -+ private V2519() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2522.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2522.java -new file mode 100644 -index 0000000000000000000000000000000000000000..89258da61bccb3668730adad70c0383de001a5a3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2522.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V2522 { -+ -+ private static final int VERSION = MCVersions.V20W13B + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:zoglin"); // changed to simple in 1.21.5 -+ } -+ -+ private V2522() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2523.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2523.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7777d83d63dc177f0bac72290ed2e5c3cbd028be ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2523.java -@@ -0,0 +1,41 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.attributes.ConverterAbstractOldAttributesRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2523 { -+ -+ private static final int VERSION = MCVersions.V20W13B + 2; -+ -+ private static final Map RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("generic.maxHealth", "minecraft:generic.max_health") -+ .put("Max Health", "minecraft:generic.max_health") -+ .put("zombie.spawnReinforcements", "minecraft:zombie.spawn_reinforcements") -+ .put("Spawn Reinforcements Chance", "minecraft:zombie.spawn_reinforcements") -+ .put("horse.jumpStrength", "minecraft:horse.jump_strength") -+ .put("Jump Strength", "minecraft:horse.jump_strength") -+ .put("generic.followRange", "minecraft:generic.follow_range") -+ .put("Follow Range", "minecraft:generic.follow_range") -+ .put("generic.knockbackResistance", "minecraft:generic.knockback_resistance") -+ .put("Knockback Resistance", "minecraft:generic.knockback_resistance") -+ .put("generic.movementSpeed", "minecraft:generic.movement_speed") -+ .put("Movement Speed", "minecraft:generic.movement_speed") -+ .put("generic.flyingSpeed", "minecraft:generic.flying_speed") -+ .put("Flying Speed", "minecraft:generic.flying_speed") -+ .put("generic.attackDamage", "minecraft:generic.attack_damage") -+ .put("generic.attackKnockback", "minecraft:generic.attack_knockback") -+ .put("generic.attackSpeed", "minecraft:generic.attack_speed") -+ .put("generic.armorToughness", "minecraft:generic.armor_toughness") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractOldAttributesRename.register(VERSION, RENAMES::get); -+ } -+ -+ private V2523() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2527.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2527.java -new file mode 100644 -index 0000000000000000000000000000000000000000..00268930307bc539e81ba364d66824f4b0a858b1 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2527.java -@@ -0,0 +1,123 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.mojang.datafixers.DataFixUtils; -+import net.minecraft.util.Mth; -+ -+public final class V2527 { -+ -+ private static final int VERSION = MCVersions.V20W16A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType level = data.getMap("Level"); -+ -+ if (level == null) { -+ return null; -+ } -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ final ListType palette = section.getList("Palette", ObjectType.MAP); -+ -+ if (palette == null) { -+ continue; -+ } -+ -+ final int bits = Math.max(4, DataFixUtils.ceillog2(palette.size())); -+ -+ if (Mth.isPowerOfTwo(bits)) { -+ // fits perfectly -+ continue; -+ } -+ -+ final long[] states = section.getLongs("BlockStates"); -+ if (states == null) { -+ // wat -+ continue; -+ } -+ -+ section.setLongs("BlockStates", addPadding(4096, bits, states)); -+ } -+ } -+ -+ final MapType heightMaps = level.getMap("Heightmaps"); -+ if (heightMaps != null) { -+ for (final String key : heightMaps.keys()) { -+ final long[] old = heightMaps.getLongs(key); -+ heightMaps.setLongs(key, addPadding(256, 9, old)); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ public static long[] addPadding(final int indices, final int bits, final long[] old) { -+ int k = old.length; -+ if (k == 0) { -+ return old; -+ } else { -+ long l = (1L << bits) - 1L; -+ int m = 64 / bits; -+ int n = (indices + m - 1) / m; -+ long[] padded = new long[n]; -+ int o = 0; -+ int p = 0; -+ long q = 0L; -+ int r = 0; -+ long s = old[0]; -+ long t = k > 1 ? old[1] : 0L; -+ -+ for(int u = 0; u < indices; ++u) { -+ int v = u * bits; -+ int w = v >> 6; -+ int x = (u + 1) * bits - 1 >> 6; -+ int y = v ^ w << 6; -+ if (w != r) { -+ s = t; -+ t = w + 1 < k ? old[w + 1] : 0L; -+ r = w; -+ } -+ -+ long ab; -+ int ac; -+ if (w == x) { -+ ab = s >>> y & l; -+ } else { -+ ac = 64 - y; -+ ab = (s >>> y | t << ac) & l; -+ } -+ -+ ac = p + bits; -+ if (ac >= 64) { -+ padded[o++] = q; -+ q = ab; -+ p = bits; -+ } else { -+ q |= ab << p; -+ p = ac; -+ } -+ } -+ -+ if (q != 0L) { -+ padded[o] = q; -+ } -+ -+ return padded; -+ } -+ } -+ -+ private V2527() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2528.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2528.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e7197d098b3d6269d3a4fd9be0432d85f0504dfd ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2528.java -@@ -0,0 +1,30 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2528 { -+ -+ private static final int VERSION = MCVersions.V20W16A + 2; -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:soul_fire_torch", "minecraft:soul_torch", -+ "minecraft:soul_fire_lantern", "minecraft:soul_lantern" -+ ) -+ )::get); -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:soul_fire_torch", "minecraft:soul_torch", -+ "minecraft:soul_fire_wall_torch", "minecraft:soul_wall_torch", -+ "minecraft:soul_fire_lantern", "minecraft:soul_lantern" -+ ) -+ )::get); -+ } -+ -+ private V2528() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2529.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2529.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5ea1926080fe5cbf976c3c5886b0e2a2451b252d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2529.java -@@ -0,0 +1,25 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2529 { -+ -+ private static final int VERSION = MCVersions.V20W17A; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:strider", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getBoolean("NoGravity")) { -+ data.setBoolean("NoGravity", false); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V2529() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2531.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2531.java -new file mode 100644 -index 0000000000000000000000000000000000000000..57ceb6e6a67f7fbc94e90c0327da9e353c612877 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2531.java -@@ -0,0 +1,63 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2531 { -+ -+ private static final int VERSION = MCVersions.V20W17A + 2; -+ -+ private static boolean isConnected(final String facing) { -+ return !"none".equals(facing); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"minecraft:redstone_wire".equals(data.getString("Name"))) { -+ return null; -+ } -+ -+ final MapType properties = data.getMap("Properties"); -+ -+ if (properties == null) { -+ return null; -+ } -+ -+ -+ final String east = properties.getString("east", "none"); -+ final String west = properties.getString("west", "none"); -+ final String north = properties.getString("north", "none"); -+ final String south = properties.getString("south", "none"); -+ -+ final boolean connectedX = isConnected(east) || isConnected(west); -+ final boolean connectedZ = isConnected(north) || isConnected(south); -+ -+ final String newEast = !isConnected(east) && !connectedZ ? "side" : east; -+ final String newWest = !isConnected(west) && !connectedZ ? "side" : west; -+ final String newNorth = !isConnected(north) && !connectedX ? "side" : north; -+ final String newSouth = !isConnected(south) && !connectedX ? "side" : south; -+ -+ if (properties.hasKey("east")) { -+ properties.setString("east", newEast); -+ } -+ if (properties.hasKey("west")) { -+ properties.setString("west", newWest); -+ } -+ if (properties.hasKey("north")) { -+ properties.setString("north", newNorth); -+ } -+ if (properties.hasKey("south")) { -+ properties.setString("south", newSouth); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2531() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2533.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2533.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c89985ccfb271f84888dbe7975a0918d7ef7f38a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2533.java -@@ -0,0 +1,42 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V2533 { -+ -+ private static final int VERSION = MCVersions.V20W18A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:villager", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType attributes = data.getList("Attributes", ObjectType.MAP); -+ -+ if (attributes == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ final MapType attribute = attributes.getMap(i); -+ -+ if (!"generic.follow_range".equals(attribute.getString("Name"))) { -+ continue; -+ } -+ -+ if (attribute.getDouble("Base") == 16.0) { -+ attribute.setDouble("Base", 48.0); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2533() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2535.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2535.java -new file mode 100644 -index 0000000000000000000000000000000000000000..21d79dfdfc0062bf66a904c66fd1445e953127d6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2535.java -@@ -0,0 +1,34 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V2535 { -+ -+ private static final int VERSION = MCVersions.V20W19A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:shulker", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // Mojang uses doubles for whatever reason... rotation is in FLOAT. by using double here -+ // the entity load will just ignore rotation and set it to 0... -+ final ListType rotation = data.getList("Rotation", ObjectType.FLOAT); -+ -+ if (rotation == null || rotation.size() == 0) { -+ return null; -+ } -+ -+ rotation.setFloat(0, rotation.getFloat(0) - 180.0F); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2535() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2537.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2537.java -new file mode 100644 -index 0000000000000000000000000000000000000000..28709ea1eb0e8966321a4a959350778bb2ea5fed ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2537.java -@@ -0,0 +1,61 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2537 { -+ -+ private static final int VERSION = MCVersions.V20W20B; -+ -+ private static void convertDimension(final MapType data, final String path) { -+ if (data == null) { -+ return; -+ } -+ -+ final Number dimension = data.getNumber(path); -+ if (dimension == null) { -+ return; -+ } -+ -+ final String newDimension; -+ switch (dimension.intValue()) { -+ case -1: { -+ newDimension = "minecraft:the_nether"; -+ break; -+ } -+ case 1: { -+ newDimension = "minecraft:the_end"; -+ break; -+ } -+ default: { -+ newDimension = "minecraft:overworld"; -+ break; -+ } -+ } -+ -+ data.setString(path, newDimension); -+ return; -+ } -+ -+ public static void register() { -+ MCTypeRegistry.PLAYER.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertDimension(data, "Dimension"); -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ convertDimension(root.getMap("data"), "dimension"); -+ return null; -+ } -+ }); -+ } -+ -+ private V2537() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2538.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2538.java -new file mode 100644 -index 0000000000000000000000000000000000000000..69097398c3d2b8c04d9adefa2268803bcbaffa32 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2538.java -@@ -0,0 +1,43 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2538 { -+ -+ private static final int VERSION = MCVersions.V20W20B + 1; -+ private static final String[] MERGE_KEYS = new String[] { -+ "RandomSeed", -+ "generatorName", -+ "generatorOptions", -+ "generatorVersion", -+ "legacy_custom_options", -+ "MapFeatures", -+ "BonusChest" -+ }; -+ -+ public static void register() { -+ MCTypeRegistry.LEVEL.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType worldGenSettings = data.getOrCreateMap("WorldGenSettings"); -+ -+ for (final String key : MERGE_KEYS) { -+ final Object value = data.getGeneric(key); -+ if (value == null) { -+ continue; -+ } -+ -+ data.remove(key); -+ worldGenSettings.setGeneric(key, value); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2538() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2550.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2550.java -new file mode 100644 -index 0000000000000000000000000000000000000000..704ffd7fb6fa965d573040cb4fa2b32d31921aa3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2550.java -@@ -0,0 +1,346 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.common.collect.ImmutableMap; -+import org.apache.commons.lang3.math.NumberUtils; -+import java.util.HashMap; -+import java.util.Locale; -+import java.util.Map; -+ -+public final class V2550 { -+ -+ private static final int VERSION = MCVersions.V20W20B + 13; -+ -+ private static final Map DEFAULTS = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:village", new StructureFeatureConfiguration(32, 8, 10387312)) -+ .put("minecraft:desert_pyramid", new StructureFeatureConfiguration(32, 8, 14357617)) -+ .put("minecraft:igloo", new StructureFeatureConfiguration(32, 8, 14357618)) -+ .put("minecraft:jungle_pyramid", new StructureFeatureConfiguration(32, 8, 14357619)) -+ .put("minecraft:swamp_hut", new StructureFeatureConfiguration(32, 8, 14357620)) -+ .put("minecraft:pillager_outpost", new StructureFeatureConfiguration(32, 8, 165745296)) -+ .put("minecraft:monument", new StructureFeatureConfiguration(32, 5, 10387313)) -+ .put("minecraft:endcity", new StructureFeatureConfiguration(20, 11, 10387313)) -+ .put("minecraft:mansion", new StructureFeatureConfiguration(80, 20, 10387319)) -+ .build() -+ ); -+ -+ private static record StructureFeatureConfiguration(int spacing, int separation, int salt) { -+ -+ public MapType serialize() { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setInt("spacing", this.spacing); -+ ret.setInt("separation", this.separation); -+ ret.setInt("salt", this.salt); -+ -+ return ret; -+ } -+ } -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final long seed = data.getLong("RandomSeed"); -+ String generatorName = data.getString("generatorName"); -+ if (generatorName != null) { -+ generatorName = generatorName.toLowerCase(Locale.ROOT); -+ } -+ String legacyCustomOptions = data.getString("legacy_custom_options"); -+ if (legacyCustomOptions == null) { -+ legacyCustomOptions = "customized".equals(generatorName) ? data.getString("generatorOptions") : null; -+ } -+ -+ final MapType generator; -+ boolean caves = false; -+ -+ if ("customized".equals(generatorName) || generatorName == null) { -+ generator = defaultOverworld(seed); -+ } else { -+ switch (generatorName) { -+ case "flat": { -+ final MapType generatorOptions = data.getMap("generatorOptions"); -+ -+ final MapType structures = fixFlatStructures(generatorOptions); -+ final MapType settings = Types.NBT.createEmptyMap(); -+ generator = Types.NBT.createEmptyMap(); -+ generator.setString("type", "minecraft:flat"); -+ generator.setMap("settings", settings); -+ -+ settings.setMap("structures", structures); -+ -+ ListType layers = generatorOptions.getList("layers", ObjectType.MAP); -+ if (layers == null) { -+ layers = Types.NBT.createEmptyList(); -+ -+ final int[] heights = new int[] { 1, 2, 1 }; -+ final String[] blocks = new String[] { "minecraft:bedrock", "minecraft:dirt", "minecraft:grass_block" }; -+ for (int i = 0; i < 3; ++i) { -+ final MapType layer = Types.NBT.createEmptyMap(); -+ layer.setInt("height", heights[i]); -+ layer.setString("block", blocks[i]); -+ layers.addMap(layer); -+ } -+ } -+ -+ settings.setList("layers", layers); -+ settings.setString("biome", generatorOptions.getString("biome", "minecraft:plains")); -+ -+ break; -+ } -+ -+ case "debug_all_block_states": { -+ generator = Types.NBT.createEmptyMap(); -+ generator.setString("type", "minecraft:debug"); -+ break; -+ } -+ -+ case "buffet": { -+ final MapType generatorOptions = data.getMap("generatorOptions"); -+ final MapType chunkGenerator = generatorOptions == null ? null : generatorOptions.getMap("chunk_generator"); -+ final String chunkGeneratorType = chunkGenerator == null ? null : chunkGenerator.getString("type"); -+ -+ final String newType; -+ if ("minecraft:caves".equals(chunkGeneratorType)) { -+ newType = "minecraft:caves"; -+ caves = true; -+ } else if ("minecraft:floating_islands".equals(chunkGeneratorType)) { -+ newType = "minecraft:floating_islands"; -+ } else { -+ newType = "minecraft:overworld"; -+ } -+ -+ MapType biomeSource = generatorOptions == null ? null : generatorOptions.getMap("biome_source"); -+ if (biomeSource == null) { -+ biomeSource = Types.NBT.createEmptyMap(); -+ biomeSource.setString("type", "minecraft:fixed"); -+ } -+ -+ if ("minecraft:fixed".equals(biomeSource.getString("type"))) { -+ final MapType options = biomeSource.getMap("options"); -+ final ListType biomes = options == null ? null : options.getList("biomes", ObjectType.STRING); -+ final String biome = biomes == null || biomes.size() == 0 ? "minecraft:ocean" : biomes.getString(0); -+ biomeSource.remove("options"); -+ biomeSource.setString("biome", biome); -+ } -+ -+ generator = noise(seed, newType, biomeSource); -+ break; -+ } -+ -+ default: { -+ boolean defaultGen = generatorName.equals("default"); -+ boolean default11Gen = generatorName.equals("default_1_1") || defaultGen && data.getInt("generatorVersion") == 0; -+ boolean amplified = generatorName.equals("amplified"); -+ boolean largeBiomes = generatorName.equals("largebiomes"); -+ -+ generator = noise(seed, amplified ? "minecraft:amplified" : "minecraft:overworld", -+ vanillaBiomeSource(seed, default11Gen, largeBiomes)); -+ break; -+ } -+ } -+ } -+ -+ final boolean mapFeatures = data.getBoolean("MapFeatures", true); -+ final boolean bonusChest = data.getBoolean("BonusChest", false); -+ -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setLong("seed", seed); -+ ret.setBoolean("generate_features", mapFeatures); -+ ret.setBoolean("bonus_chest", bonusChest); -+ ret.setMap("dimensions", vanillaLevels(seed, generator, caves)); -+ if (legacyCustomOptions != null) { -+ ret.setString("legacy_custom_options", legacyCustomOptions); -+ } -+ -+ return ret; -+ } -+ }); -+ } -+ -+ public static MapType noise(final long seed, final String worldType, final MapType biomeSource) { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setString("type", "minecraft:noise"); -+ ret.setMap("biome_source", biomeSource); -+ ret.setLong("seed", seed); -+ ret.setString("settings", worldType); -+ -+ return ret; -+ } -+ -+ public static MapType vanillaBiomeSource(final long seed, final boolean default11Gen, final boolean largeBiomes) { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setString("type", "minecraft:vanilla_layered"); -+ ret.setLong("seed", seed); -+ ret.setBoolean("large_biomes", largeBiomes); -+ if (default11Gen) { -+ ret.setBoolean("legacy_biome_init_layer", default11Gen); -+ } -+ -+ return ret; -+ } -+ -+ public static MapType fixFlatStructures(final MapType generatorOptions) { -+ int distance = 32; -+ int spread = 3; -+ int count = 128; -+ boolean stronghold = false; -+ final Map newStructures = new HashMap<>(); -+ -+ if (generatorOptions == null) { -+ stronghold = true; -+ newStructures.put("minecraft:village", DEFAULTS.get("minecraft:village")); -+ } -+ -+ final MapType oldStructures = generatorOptions == null ? null : generatorOptions.getMap("structures"); -+ if (oldStructures != null) { -+ for (final String structureName : oldStructures.keys()) { -+ final MapType structureValues = oldStructures.getMap(structureName); -+ if (structureValues == null) { -+ continue; -+ } -+ -+ for (final String structureValueKey : structureValues.keys()) { -+ final String structureValue = structureValues.getString(structureValueKey); -+ -+ if ("stronghold".equals(structureName)) { -+ stronghold = true; -+ switch (structureValueKey) { -+ case "distance": -+ distance = getInt(structureValue, distance, 1); -+ break; -+ case "spread": -+ spread = getInt(structureValue, spread, 1); -+ break; -+ case "count": -+ count = getInt(structureValue, count, 1); -+ break; -+ } -+ } else { -+ switch (structureValueKey) { -+ case "distance": -+ switch (structureName) { -+ case "village": -+ setSpacing(newStructures, "minecraft:village", structureValue, 9); -+ break; -+ case "biome_1": -+ setSpacing(newStructures, "minecraft:desert_pyramid", structureValue, 9); -+ setSpacing(newStructures, "minecraft:igloo", structureValue, 9); -+ setSpacing(newStructures, "minecraft:jungle_pyramid", structureValue, 9); -+ setSpacing(newStructures, "minecraft:swamp_hut", structureValue, 9); -+ setSpacing(newStructures, "minecraft:pillager_outpost", structureValue, 9); -+ break; -+ case "endcity": -+ setSpacing(newStructures, "minecraft:endcity", structureValue, 1); -+ break; -+ case "mansion": -+ setSpacing(newStructures, "minecraft:mansion", structureValue, 1); -+ break; -+ default: -+ break; -+ } -+ case "separation": -+ if ("oceanmonument".equals(structureName)) { -+ final StructureFeatureConfiguration structure = newStructures.getOrDefault("minecraft:monument", DEFAULTS.get("minecraft:monument")); -+ final int newSpacing = getInt(structureValue, structure.separation, 1); -+ newStructures.put("minecraft:monument", new StructureFeatureConfiguration(newSpacing, structure.separation, structure.salt)); -+ } -+ -+ break; -+ case "spacing": -+ if ("oceanmonument".equals(structureName)) { -+ setSpacing(newStructures, "minecraft:monument", structureValue, 1); -+ } -+ -+ break; -+ } -+ } -+ } -+ } -+ } -+ -+ final MapType ret = Types.NBT.createEmptyMap(); -+ final MapType structuresSerialized = Types.NBT.createEmptyMap(); -+ ret.setMap("structures", structuresSerialized); -+ for (final String key : newStructures.keySet()) { -+ structuresSerialized.setMap(key, newStructures.get(key).serialize()); -+ } -+ -+ if (stronghold) { -+ final MapType strongholdData = Types.NBT.createEmptyMap(); -+ ret.setMap("stronghold", strongholdData); -+ -+ strongholdData.setInt("distance", distance); -+ strongholdData.setInt("spread", spread); -+ strongholdData.setInt("count", count); -+ } -+ -+ return ret; -+ } -+ -+ public static MapType vanillaLevels(final long seed, final MapType generator, final boolean caves) { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ final MapType overworld = Types.NBT.createEmptyMap(); -+ final MapType nether = Types.NBT.createEmptyMap(); -+ final MapType end = Types.NBT.createEmptyMap(); -+ -+ ret.setMap("minecraft:overworld", overworld); -+ ret.setMap("minecraft:the_nether", nether); -+ ret.setMap("minecraft:the_end", end); -+ -+ // overworld -+ overworld.setString("type", caves ? "minecraft:overworld_caves" : "minecraft:overworld"); -+ overworld.setMap("generator", generator); -+ -+ // nether -+ nether.setString("type", "minecraft:the_nether"); -+ final MapType netherBiomeSource = Types.NBT.createEmptyMap(); -+ netherBiomeSource.setString("type", "minecraft:multi_noise"); -+ netherBiomeSource.setLong("seed", seed); -+ netherBiomeSource.setString("preset", "minecraft:nether"); -+ -+ nether.setMap("generator", noise(seed, "minecraft:nether", netherBiomeSource)); -+ -+ // end -+ end.setString("type", "minecraft:the_end"); -+ final MapType endBiomeSource = Types.NBT.createEmptyMap(); -+ endBiomeSource.setString("type", "minecraft:the_end"); -+ endBiomeSource.setLong("seed", seed); -+ end.setMap("generator", noise(seed,"minecraft:end", endBiomeSource)); -+ -+ return ret; -+ } -+ -+ public static MapType defaultOverworld(final long seed) { -+ return noise(seed, "minecraft:overworld", vanillaBiomeSource(seed, false, false)); -+ } -+ -+ private static int getInt(final String value, final int dfl) { -+ return NumberUtils.toInt(value, dfl); -+ } -+ -+ private static int getInt(final String value, final int dfl, final int minVal) { -+ return Math.max(minVal, getInt(value, dfl)); -+ } -+ -+ private static void setSpacing(final Map structures, final String structureName, -+ final String value, final int minVal) { -+ final StructureFeatureConfiguration structure = structures.getOrDefault(structureName, DEFAULTS.get(structureName)); -+ final int newSpacing = getInt(value, structure.spacing, minVal); -+ -+ structures.put(structureName, new StructureFeatureConfiguration(newSpacing, structure.separation, structure.salt)); -+ } -+ -+ private V2550() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2551.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2551.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8d31193df65ec1abc6aa26c0fd2dd454316c4f60 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2551.java -@@ -0,0 +1,103 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V2551 { -+ -+ private static final int VERSION = MCVersions.V20W20B + 14; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType dimensions = data.getMap("dimensions"); -+ -+ if (dimensions == null) { -+ return null; -+ } -+ -+ for (final String dimension : dimensions.keys()) { -+ final MapType dimensionData = dimensions.getMap(dimension); -+ if (dimensionData == null) { -+ continue; -+ } -+ -+ final MapType generator = dimensionData.getMap("generator"); -+ if (generator == null) { -+ continue; -+ } -+ -+ final String type = generator.getString("type"); -+ if (type == null) { -+ continue; -+ } -+ -+ switch (type) { -+ case "minecraft:flat": { -+ final MapType settings = generator.getMap("settings"); -+ if (settings == null) { -+ continue; -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.BIOME, settings, "biome", fromVersion, toVersion); -+ -+ final ListType layers = settings.getList("layers", ObjectType.MAP); -+ if (layers != null) { -+ for (int i = 0, len = layers.size(); i < len; ++i) { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, layers.getMap(i), "block", fromVersion, toVersion); -+ } -+ } -+ -+ break; -+ } -+ case "minecraft:noise": { -+ final MapType settings = generator.getMap("settings"); -+ if (settings != null) { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, settings, "default_block", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, settings, "default_fluid", fromVersion, toVersion); -+ } -+ -+ final MapType biomeSource = generator.getMap("biome_source"); -+ if (biomeSource != null) { -+ final String biomeSourceType = biomeSource.getString("type", ""); -+ switch (biomeSourceType) { -+ case "minecraft:fixed": { -+ WalkerUtils.convert(MCTypeRegistry.BIOME, biomeSource, "biome", fromVersion, toVersion); -+ break; -+ } -+ -+ case "minecraft:multi_noise": { -+ // Vanilla's schema is wrong. It should be DSL.fields("biomes", DSL.list(DSL.fields("biome"))) -+ // But it just contains the list part. That obviously can never be the case, because -+ // the root object is a compound, not a list. -+ -+ final ListType biomes = biomeSource.getList("biomes", ObjectType.MAP); -+ if (biomes != null) { -+ for (int i = 0, len = biomes.size(); i < len; ++i) { -+ WalkerUtils.convert(MCTypeRegistry.BIOME, biomes.getMap(i), "biome", fromVersion, toVersion); -+ } -+ } -+ break; -+ } -+ -+ case "minecraft:checkerboard": { -+ WalkerUtils.convertList(MCTypeRegistry.BIOME, biomeSource, "biomes", fromVersion, toVersion); -+ break; -+ } -+ } -+ } -+ -+ break; -+ } -+ } -+ } -+ -+ return null; -+ }); -+ } -+ -+ private V2551() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2552.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2552.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9e6c7dc40d509cf424976831382425ab7eceb024 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2552.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2552 { -+ -+ private static final int VERSION = MCVersions.V20W20B + 15; -+ -+ public static void register() { -+ ConverterAbstractStringValueTypeRename.register(VERSION, MCTypeRegistry.BIOME, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:nether", "minecraft:nether_wastes" -+ ) -+ )::get); -+ } -+ -+ private V2552() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2553.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2553.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f019774923bf08fc0f7dc7cafd5fb66fdd7427f8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2553.java -@@ -0,0 +1,77 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2553 { -+ -+ private static final int VERSION = MCVersions.V20W20B + 16; -+ -+ public static final Map BIOME_RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:extreme_hills", "minecraft:mountains") -+ .put("minecraft:swampland", "minecraft:swamp") -+ .put("minecraft:hell", "minecraft:nether_wastes") -+ .put("minecraft:sky", "minecraft:the_end") -+ .put("minecraft:ice_flats", "minecraft:snowy_tundra") -+ .put("minecraft:ice_mountains", "minecraft:snowy_mountains") -+ .put("minecraft:mushroom_island", "minecraft:mushroom_fields") -+ .put("minecraft:mushroom_island_shore", "minecraft:mushroom_field_shore") -+ .put("minecraft:beaches", "minecraft:beach") -+ .put("minecraft:forest_hills", "minecraft:wooded_hills") -+ .put("minecraft:smaller_extreme_hills", "minecraft:mountain_edge") -+ .put("minecraft:stone_beach", "minecraft:stone_shore") -+ .put("minecraft:cold_beach", "minecraft:snowy_beach") -+ .put("minecraft:roofed_forest", "minecraft:dark_forest") -+ .put("minecraft:taiga_cold", "minecraft:snowy_taiga") -+ .put("minecraft:taiga_cold_hills", "minecraft:snowy_taiga_hills") -+ .put("minecraft:redwood_taiga", "minecraft:giant_tree_taiga") -+ .put("minecraft:redwood_taiga_hills", "minecraft:giant_tree_taiga_hills") -+ .put("minecraft:extreme_hills_with_trees", "minecraft:wooded_mountains") -+ .put("minecraft:savanna_rock", "minecraft:savanna_plateau") -+ .put("minecraft:mesa", "minecraft:badlands") -+ .put("minecraft:mesa_rock", "minecraft:wooded_badlands_plateau") -+ .put("minecraft:mesa_clear_rock", "minecraft:badlands_plateau") -+ .put("minecraft:sky_island_low", "minecraft:small_end_islands") -+ .put("minecraft:sky_island_medium", "minecraft:end_midlands") -+ .put("minecraft:sky_island_high", "minecraft:end_highlands") -+ .put("minecraft:sky_island_barren", "minecraft:end_barrens") -+ .put("minecraft:void", "minecraft:the_void") -+ .put("minecraft:mutated_plains", "minecraft:sunflower_plains") -+ .put("minecraft:mutated_desert", "minecraft:desert_lakes") -+ .put("minecraft:mutated_extreme_hills", "minecraft:gravelly_mountains") -+ .put("minecraft:mutated_forest", "minecraft:flower_forest") -+ .put("minecraft:mutated_taiga", "minecraft:taiga_mountains") -+ .put("minecraft:mutated_swampland", "minecraft:swamp_hills") -+ .put("minecraft:mutated_ice_flats", "minecraft:ice_spikes") -+ .put("minecraft:mutated_jungle", "minecraft:modified_jungle") -+ .put("minecraft:mutated_jungle_edge", "minecraft:modified_jungle_edge") -+ .put("minecraft:mutated_birch_forest", "minecraft:tall_birch_forest") -+ .put("minecraft:mutated_birch_forest_hills", "minecraft:tall_birch_hills") -+ .put("minecraft:mutated_roofed_forest", "minecraft:dark_forest_hills") -+ .put("minecraft:mutated_taiga_cold", "minecraft:snowy_taiga_mountains") -+ .put("minecraft:mutated_redwood_taiga", "minecraft:giant_spruce_taiga") -+ .put("minecraft:mutated_redwood_taiga_hills", "minecraft:giant_spruce_taiga_hills") -+ .put("minecraft:mutated_extreme_hills_with_trees", "minecraft:modified_gravelly_mountains") -+ .put("minecraft:mutated_savanna", "minecraft:shattered_savanna") -+ .put("minecraft:mutated_savanna_rock", "minecraft:shattered_savanna_plateau") -+ .put("minecraft:mutated_mesa", "minecraft:eroded_badlands") -+ .put("minecraft:mutated_mesa_rock", "minecraft:modified_wooded_badlands_plateau") -+ .put("minecraft:mutated_mesa_clear_rock", "minecraft:modified_badlands_plateau") -+ .put("minecraft:warm_deep_ocean", "minecraft:deep_warm_ocean") -+ .put("minecraft:lukewarm_deep_ocean", "minecraft:deep_lukewarm_ocean") -+ .put("minecraft:cold_deep_ocean", "minecraft:deep_cold_ocean") -+ .put("minecraft:frozen_deep_ocean", "minecraft:deep_frozen_ocean") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractStringValueTypeRename.register(VERSION, MCTypeRegistry.BIOME, BIOME_RENAMES::get); -+ } -+ -+ private V2553() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2558.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2558.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cfb17deec6d53fc99a6562dce1fcc2f6dea8e26b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2558.java -@@ -0,0 +1,48 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.options.ConverterAbstractOptionsRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2558 { -+ -+ private static final int VERSION = MCVersions.V1_16_PRE2 + 1; -+ -+ public static void register() { -+ ConverterAbstractOptionsRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "key_key.swapHands", "key_key.swapOffhand" -+ ) -+ )::get); -+ -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ MapType dimensions = data.getMap("dimensions"); -+ if (dimensions == null) { -+ dimensions = Types.NBT.createEmptyMap(); -+ data.setMap("dimensions", dimensions); -+ } -+ -+ if (dimensions.isEmpty()) { -+ data.setMap("dimensions", recreateSettings(data)); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private static MapType recreateSettings(final MapType data) { -+ final long seed = data.getLong("seed"); -+ -+ return V2550.vanillaLevels(seed, V2550.defaultOverworld(seed), false); -+ } -+ -+ private V2558() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2568.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2568.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a50146d1dba4d62da3bb54a5869ae879f573f0e5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2568.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V2568 { -+ -+ private static final int VERSION = MCVersions.V1_16_1 + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:piglin_brute"); // changed to simple in 1.21.5 -+ } -+ -+ private V2568() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2671.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2671.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ad6c4c4427fc17d7ad743115773cb48dad1b415d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2671.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V2671 { -+ -+ private static final int VERSION = MCVersions.V1_16_5 + 85; -+ -+ public static void register() { -+ //registerMob("minecraft:goat"); // changed to simple in 1.21.5 -+ } -+ -+ private V2671() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2679.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2679.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9f8b0cdc05116ebf07eee98e6288b2d7d9eb0e8b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2679.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2679 { -+ -+ private static final int VERSION = MCVersions.V1_16_5 + 93; -+ -+ public static void register() { -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"minecraft:cauldron".equals(data.getString("Name"))) { -+ return null; -+ } -+ -+ final MapType properties = data.getMap("Properties"); -+ -+ if (properties == null) { -+ return null; -+ } -+ -+ if (properties.getString("level", "0").equals("0")) { -+ data.remove("Properties"); -+ return null; -+ } else { -+ data.setString("Name", "minecraft:water_cauldron"); -+ return null; -+ } -+ } -+ }); -+ } -+ -+ private V2679() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2680.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2680.java -new file mode 100644 -index 0000000000000000000000000000000000000000..87cbe1c717635908a30c57028346a1abeb21e6a6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2680.java -@@ -0,0 +1,27 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2680 { -+ -+ private static final int VERSION = MCVersions.V1_16_5 + 94; -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:grass_path", "minecraft:dirt_path" -+ ) -+ )::get); -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:grass_path", "minecraft:dirt_path" -+ ) -+ )::get); -+ } -+ -+ private V2680() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2684.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2684.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0c996642f561d2471a506a34f5efe6dae5cd1fb3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2684.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.game_event.GameEventListenerWalker; -+ -+public final class V2684 { -+ -+ private static final int VERSION = MCVersions.V20W48A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:sculk_sensor", new GameEventListenerWalker()); -+ } -+ -+ private V2684() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2686.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2686.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4cfb211c6e557a7f2a3535c8430049e4c720eae9 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2686.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V2686 { -+ -+ private static final int VERSION = MCVersions.V20W49A + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:axolotl"); // changed to simple in 1.21.5 -+ } -+ -+ private V2686() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2688.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2688.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f971b5284950db483fb9b80599572b27a59755b5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2688.java -@@ -0,0 +1,18 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+ -+public final class V2688 { -+ -+ private static final int VERSION = MCVersions.V20W51A + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:glow_squid"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:glow_item_frame", new DataWalkerItems("Item")); -+ } -+ -+ private V2688() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2690.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2690.java -new file mode 100644 -index 0000000000000000000000000000000000000000..39ffcec6e78229dd62abfd42c1ac64c3ccccc6dc ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2690.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2690 { -+ -+ private static final int VERSION = MCVersions.V21W05A; -+ -+ private static final Map RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:weathered_copper_block", "minecraft:oxidized_copper_block") -+ .put("minecraft:semi_weathered_copper_block", "minecraft:weathered_copper_block") -+ .put("minecraft:lightly_weathered_copper_block", "minecraft:exposed_copper_block") -+ .put("minecraft:weathered_cut_copper", "minecraft:oxidized_cut_copper") -+ .put("minecraft:semi_weathered_cut_copper", "minecraft:weathered_cut_copper") -+ .put("minecraft:lightly_weathered_cut_copper", "minecraft:exposed_cut_copper") -+ .put("minecraft:weathered_cut_copper_stairs", "minecraft:oxidized_cut_copper_stairs") -+ .put("minecraft:semi_weathered_cut_copper_stairs", "minecraft:weathered_cut_copper_stairs") -+ .put("minecraft:lightly_weathered_cut_copper_stairs", "minecraft:exposed_cut_copper_stairs") -+ .put("minecraft:weathered_cut_copper_slab", "minecraft:oxidized_cut_copper_slab") -+ .put("minecraft:semi_weathered_cut_copper_slab", "minecraft:weathered_cut_copper_slab") -+ .put("minecraft:lightly_weathered_cut_copper_slab", "minecraft:exposed_cut_copper_slab") -+ .put("minecraft:waxed_semi_weathered_copper", "minecraft:waxed_weathered_copper") -+ .put("minecraft:waxed_lightly_weathered_copper", "minecraft:waxed_exposed_copper") -+ .put("minecraft:waxed_semi_weathered_cut_copper", "minecraft:waxed_weathered_cut_copper") -+ .put("minecraft:waxed_lightly_weathered_cut_copper", "minecraft:waxed_exposed_cut_copper") -+ .put("minecraft:waxed_semi_weathered_cut_copper_stairs", "minecraft:waxed_weathered_cut_copper_stairs") -+ .put("minecraft:waxed_lightly_weathered_cut_copper_stairs", "minecraft:waxed_exposed_cut_copper_stairs") -+ .put("minecraft:waxed_semi_weathered_cut_copper_slab", "minecraft:waxed_weathered_cut_copper_slab") -+ .put("minecraft:waxed_lightly_weathered_cut_copper_slab", "minecraft:waxed_exposed_cut_copper_slab") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, RENAMES::get); -+ ConverterAbstractBlockRename.register(VERSION, RENAMES::get); -+ } -+ -+ private V2690() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2691.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2691.java -new file mode 100644 -index 0000000000000000000000000000000000000000..bb87bcedfc2ed8d19b266e925beca0f54b50a0ab ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2691.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2691 { -+ -+ private static final int VERSION = MCVersions.V21W05A + 1; -+ -+ private static final Map RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:waxed_copper", "minecraft:waxed_copper_block") -+ .put("minecraft:oxidized_copper_block", "minecraft:oxidized_copper") -+ .put("minecraft:weathered_copper_block", "minecraft:weathered_copper") -+ .put("minecraft:exposed_copper_block", "minecraft:exposed_copper") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, RENAMES::get); -+ ConverterAbstractBlockRename.register(VERSION, RENAMES::get); -+ } -+ -+ private V2691() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2693.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2693.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a242e8e9a7a7c80c00ec0d64542b3d7dc3103e24 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2693.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.AddFlagIfAbsent; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V2693 { -+ -+ private static final int VERSION = MCVersions.V21W05B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new AddFlagIfAbsent(VERSION, "has_increased_height_already", false)); -+ } -+ -+ private V2693() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2696.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2696.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ce568002e54924e001c12271f0bde7183bc23c61 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2696.java -@@ -0,0 +1,42 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2696 { -+ -+ private static final int VERSION = MCVersions.V21W07A + 1; -+ -+ private static final Map RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:grimstone", "minecraft:deepslate") -+ .put("minecraft:grimstone_slab", "minecraft:cobbled_deepslate_slab") -+ .put("minecraft:grimstone_stairs", "minecraft:cobbled_deepslate_stairs") -+ .put("minecraft:grimstone_wall", "minecraft:cobbled_deepslate_wall") -+ .put("minecraft:polished_grimstone", "minecraft:polished_deepslate") -+ .put("minecraft:polished_grimstone_slab", "minecraft:polished_deepslate_slab") -+ .put("minecraft:polished_grimstone_stairs", "minecraft:polished_deepslate_stairs") -+ .put("minecraft:polished_grimstone_wall", "minecraft:polished_deepslate_wall") -+ .put("minecraft:grimstone_tiles", "minecraft:deepslate_tiles") -+ .put("minecraft:grimstone_tile_slab", "minecraft:deepslate_tile_slab") -+ .put("minecraft:grimstone_tile_stairs", "minecraft:deepslate_tile_stairs") -+ .put("minecraft:grimstone_tile_wall", "minecraft:deepslate_tile_wall") -+ .put("minecraft:grimstone_bricks", "minecraft:deepslate_bricks") -+ .put("minecraft:grimstone_brick_slab", "minecraft:deepslate_brick_slab") -+ .put("minecraft:grimstone_brick_stairs", "minecraft:deepslate_brick_stairs") -+ .put("minecraft:grimstone_brick_wall", "minecraft:deepslate_brick_wall") -+ .put("minecraft:chiseled_grimstone", "minecraft:chiseled_deepslate") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, RENAMES::get); -+ ConverterAbstractBlockRename.register(VERSION, RENAMES::get); -+ } -+ -+ private V2696() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2700.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2700.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e6a2f29b20aa6d7cd431fc63c2d8ed70dc9a2ab8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2700.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2700 { -+ -+ private static final int VERSION = MCVersions.V21W10A + 1; -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:cave_vines_head", "minecraft:cave_vines", -+ "minecraft:cave_vines_body", "minecraft:cave_vines_plant" -+ ) -+ )::get); -+ } -+ -+ private V2700() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2701.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2701.java -new file mode 100644 -index 0000000000000000000000000000000000000000..58535aa2e949bfca9b73bdc1b8f4f5f0a5b4384e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2701.java -@@ -0,0 +1,205 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.google.common.collect.Sets; -+import java.util.Set; -+import java.util.regex.Matcher; -+import java.util.regex.Pattern; -+ -+public final class V2701 { -+ -+ private static final int VERSION = MCVersions.V21W10A + 2; -+ -+ private static final Pattern INDEX_PATTERN = Pattern.compile("\\[(\\d+)\\]"); -+ -+ private static final Set PIECE_TYPE = Sets.newHashSet( -+ "minecraft:jigsaw", -+ "minecraft:nvi", -+ "minecraft:pcp", -+ "minecraft:bastionremnant", -+ "minecraft:runtime" -+ ); -+ private static final Set FEATURES = Sets.newHashSet( -+ "minecraft:tree", -+ "minecraft:flower", -+ "minecraft:block_pile", -+ "minecraft:random_patch" -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.STRUCTURE_FEATURE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType children = data.getList("Children", ObjectType.MAP); -+ -+ if (children == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = children.size(); i < len; ++i) { -+ final MapType child = children.getMap(i); -+ -+ if (!PIECE_TYPE.contains(child.getString("id"))) { -+ continue; -+ } -+ -+ final String poolElement = child.getString("pool_element"); -+ if (!"minecraft:feature_pool_element".equals(poolElement)) { -+ continue; -+ } -+ -+ final MapType feature = child.getMap("feature"); -+ if (feature == null) { -+ continue; -+ } -+ -+ final String replacement = convertToString(feature); -+ -+ if (replacement != null) { -+ child.setString("feature", replacement); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private static String getNestedString(final MapType root, final String... paths) { -+ if (paths.length == 0) { -+ throw new IllegalArgumentException("Missing path"); -+ } -+ -+ Object current = root.getGeneric(paths[0]); -+ -+ for (int i = 1; i < paths.length; ++i) { -+ final String path = paths[i]; -+ -+ final Matcher indexMatcher = INDEX_PATTERN.matcher(path); -+ if (!indexMatcher.matches()) { -+ current = (current instanceof MapType) ? ((MapType)current).getGeneric(path) : null; -+ if (current == null) { -+ break; -+ } -+ continue; -+ } -+ -+ final int index = Integer.parseInt(indexMatcher.group(1)); -+ if (!(current instanceof ListType)) { -+ current = null; -+ break; -+ } else { -+ final ListType list = (ListType)current; -+ if (index >= 0 && index < list.size()) { -+ current = list.getGeneric(index); -+ } else { -+ current = null; -+ break; -+ } -+ } -+ } -+ -+ return current instanceof String ? (String)current : ""; -+ } -+ -+ private static String convertToString(final MapType feature) { -+ return getReplacement( -+ getNestedString(feature, "type"), -+ getNestedString(feature, "name"), -+ getNestedString(feature, "config", "state_provider", "type"), -+ getNestedString(feature, "config", "state_provider", "state", "Name"), -+ getNestedString(feature, "config", "state_provider", "entries", "[0]", "data", "Name"), -+ getNestedString(feature, "config", "foliage_placer", "type"), -+ getNestedString(feature, "config", "leaves_provider", "state", "Name") -+ ); -+ } -+ -+ private static String getReplacement(final String type, final String name, final String stateType, final String stateName, -+ final String firstEntryName, final String foliageName, final String leavesName) { -+ final String actualType; -+ if (!type.isEmpty()) { -+ actualType = type; -+ } else { -+ if (name.isEmpty()) { -+ return null; -+ } -+ -+ if ("minecraft:normal_tree".equals(name)) { -+ actualType = "minecraft:tree"; -+ } else { -+ actualType = name; -+ } -+ } -+ -+ if (FEATURES.contains(actualType)) { -+ if ("minecraft:random_patch".equals(actualType)) { -+ if ("minecraft:simple_state_provider".equals(stateType)) { -+ if ("minecraft:sweet_berry_bush".equals(stateName)) { -+ return "minecraft:patch_berry_bush"; -+ } -+ -+ if ("minecraft:cactus".equals(stateName)) { -+ return "minecraft:patch_cactus"; -+ } -+ } else if ("minecraft:weighted_state_provider".equals(stateType) && ("minecraft:grass".equals(firstEntryName) || "minecraft:fern".equals(firstEntryName))) { -+ return "minecraft:patch_taiga_grass"; -+ } -+ } else if ("minecraft:block_pile".equals(actualType)) { -+ if (!"minecraft:simple_state_provider".equals(stateType) && !"minecraft:rotated_block_provider".equals(stateType)) { -+ if ("minecraft:weighted_state_provider".equals(stateType)) { -+ if ("minecraft:packed_ice".equals(firstEntryName) || "minecraft:blue_ice".equals(firstEntryName)) { -+ return "minecraft:pile_ice"; -+ } -+ -+ if ("minecraft:jack_o_lantern".equals(firstEntryName) || "minecraft:pumpkin".equals(firstEntryName)) { -+ return "minecraft:pile_pumpkin"; -+ } -+ } -+ } else { -+ if ("minecraft:hay_block".equals(stateName)) { -+ return "minecraft:pile_hay"; -+ } -+ -+ if ("minecraft:melon".equals(stateName)) { -+ return "minecraft:pile_melon"; -+ } -+ -+ if ("minecraft:snow".equals(stateName)) { -+ return "minecraft:pile_snow"; -+ } -+ } -+ } else { -+ if ("minecraft:flower".equals(actualType)) { -+ return "minecraft:flower_plain"; -+ } -+ -+ if ("minecraft:tree".equals(actualType)) { -+ if ("minecraft:acacia_foliage_placer".equals(foliageName)) { -+ return "minecraft:acacia"; -+ } -+ -+ if ("minecraft:blob_foliage_placer".equals(foliageName) && "minecraft:oak_leaves".equals(leavesName)) { -+ return "minecraft:oak"; -+ } -+ -+ if ("minecraft:pine_foliage_placer".equals(foliageName)) { -+ return "minecraft:pine"; -+ } -+ -+ if ("minecraft:spruce_foliage_placer".equals(foliageName)) { -+ return "minecraft:spruce"; -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ -+ private V2701() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2702.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2702.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e8af14493078e2e458d0679404ae6bce46289519 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2702.java -@@ -0,0 +1,35 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2702 { -+ -+ private static final int VERSION = MCVersions.V21W10A + 3; -+ -+ public static void register() { -+ final DataConverter arrowConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.hasKey("pickup")) { -+ return null; -+ } -+ -+ final boolean player = data.getBoolean("player", true); -+ data.remove("player"); -+ -+ data.setByte("pickup", player ? (byte)1 : (byte)0); -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:arrow", arrowConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:spectral_arrow", arrowConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trident", arrowConverter); -+ } -+ -+ private V2702() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2707.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2707.java -new file mode 100644 -index 0000000000000000000000000000000000000000..45c809b9e62437afdf17d47b0bea7b574e4cbd34 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2707.java -@@ -0,0 +1,18 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.AddFlagIfAbsent; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V2707 { -+ -+ private static final int VERSION = MCVersions.V21W14A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new AddFlagIfAbsent(VERSION, "has_increased_height_already", true)); -+ -+ //registerMob("minecraft:marker"); // changed to simple in 1.21.5 -+ } -+ -+ private V2707() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2710.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2710.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0967c8c794869a972c1283cab6b3f3cef1d77aec ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2710.java -@@ -0,0 +1,21 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.stats.ConverterAbstractStatsRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2710 { -+ -+ private static final int VERSION = MCVersions.V21W15A + 1; -+ -+ public static void register() { -+ ConverterAbstractStatsRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:play_one_minute", "minecraft:play_time" -+ ) -+ )::get); -+ } -+ -+ private V2710() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2717.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2717.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e0d6b2f6b00e0bfce205efa889de1765ef22793a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2717.java -@@ -0,0 +1,25 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2717 { -+ -+ private static final int VERSION = MCVersions.V1_17_PRE1 + 1; -+ -+ public static void register() { -+ final Map rename = new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:azalea_leaves_flowers", "minecraft:flowering_azalea_leaves" -+ ) -+ ); -+ ConverterAbstractItemRename.register(VERSION, rename::get); -+ ConverterAbstractBlockRename.register(VERSION, rename::get); -+ } -+ -+ private V2717() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2825.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2825.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cd00c9398791967be6dd10f7183c61902431b27a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2825.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.AddFlagIfAbsent; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V2825 { -+ -+ private static final int VERSION = MCVersions.V1_17_1 + 95; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new AddFlagIfAbsent(VERSION, "has_increased_height_already", false)); -+ } -+ -+ private V2825() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2831.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2831.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a133c1eaf04cbd5a6a701ee2c4ad11553dd84343 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2831.java -@@ -0,0 +1,64 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V2831 { -+ -+ private static final int VERSION = MCVersions.V1_17_1 + 101; -+ -+ public static void register() { -+ MCTypeRegistry.UNTAGGED_SPAWNER.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, root, "SpawnPotentials", "data", "entity", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, root.getMap("SpawnData"), "entity", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.UNTAGGED_SPAWNER.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType spawnData = root.getMap("SpawnData"); -+ if (spawnData != null) { -+ final MapType wrapped = Types.NBT.createEmptyMap(); -+ root.setMap("SpawnData", wrapped); -+ -+ wrapped.setMap("entity", spawnData); -+ } -+ -+ final ListType spawnPotentials = root.getList("SpawnPotentials", ObjectType.MAP); -+ if (spawnPotentials != null) { -+ for (int i = 0, len = spawnPotentials.size(); i < len; ++i) { -+ final MapType spawnPotential = spawnPotentials.getMap(i); -+ -+ // new format of weighted list (SpawnPotentials): -+ // root.data -> data -+ // root.weight -> weight -+ -+ final MapType entity = spawnPotential.getMap("Entity"); -+ final int weight = spawnPotential.getInt("Weight", 1); -+ spawnPotential.remove("Entity"); -+ spawnPotential.remove("Weight"); -+ spawnPotential.setInt("weight", weight); -+ -+ final MapType data = Types.NBT.createEmptyMap(); -+ spawnPotential.setMap("data", data); -+ -+ data.setMap("entity", entity); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2831() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2832.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2832.java -new file mode 100644 -index 0000000000000000000000000000000000000000..53f8474cdd9331d1cc293c360d3f4f14640eedd3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2832.java -@@ -0,0 +1,917 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.mojang.logging.LogUtils; -+import it.unimi.dsi.fastutil.ints.Int2IntLinkedOpenHashMap; -+import it.unimi.dsi.fastutil.ints.IntIterator; -+import it.unimi.dsi.fastutil.ints.IntOpenHashSet; -+import org.apache.commons.lang3.mutable.MutableBoolean; -+import org.slf4j.Logger; -+import java.util.Arrays; -+import java.util.BitSet; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V2832 { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final int VERSION = MCVersions.V1_17_1 + 102; -+ -+ private static final String[] BIOMES_BY_ID = new String[256]; // rip datapacks -+ static { -+ BIOMES_BY_ID[0] = "minecraft:ocean"; -+ BIOMES_BY_ID[1] = "minecraft:plains"; -+ BIOMES_BY_ID[2] = "minecraft:desert"; -+ BIOMES_BY_ID[3] = "minecraft:mountains"; -+ BIOMES_BY_ID[4] = "minecraft:forest"; -+ BIOMES_BY_ID[5] = "minecraft:taiga"; -+ BIOMES_BY_ID[6] = "minecraft:swamp"; -+ BIOMES_BY_ID[7] = "minecraft:river"; -+ BIOMES_BY_ID[8] = "minecraft:nether_wastes"; -+ BIOMES_BY_ID[9] = "minecraft:the_end"; -+ BIOMES_BY_ID[10] = "minecraft:frozen_ocean"; -+ BIOMES_BY_ID[11] = "minecraft:frozen_river"; -+ BIOMES_BY_ID[12] = "minecraft:snowy_tundra"; -+ BIOMES_BY_ID[13] = "minecraft:snowy_mountains"; -+ BIOMES_BY_ID[14] = "minecraft:mushroom_fields"; -+ BIOMES_BY_ID[15] = "minecraft:mushroom_field_shore"; -+ BIOMES_BY_ID[16] = "minecraft:beach"; -+ BIOMES_BY_ID[17] = "minecraft:desert_hills"; -+ BIOMES_BY_ID[18] = "minecraft:wooded_hills"; -+ BIOMES_BY_ID[19] = "minecraft:taiga_hills"; -+ BIOMES_BY_ID[20] = "minecraft:mountain_edge"; -+ BIOMES_BY_ID[21] = "minecraft:jungle"; -+ BIOMES_BY_ID[22] = "minecraft:jungle_hills"; -+ BIOMES_BY_ID[23] = "minecraft:jungle_edge"; -+ BIOMES_BY_ID[24] = "minecraft:deep_ocean"; -+ BIOMES_BY_ID[25] = "minecraft:stone_shore"; -+ BIOMES_BY_ID[26] = "minecraft:snowy_beach"; -+ BIOMES_BY_ID[27] = "minecraft:birch_forest"; -+ BIOMES_BY_ID[28] = "minecraft:birch_forest_hills"; -+ BIOMES_BY_ID[29] = "minecraft:dark_forest"; -+ BIOMES_BY_ID[30] = "minecraft:snowy_taiga"; -+ BIOMES_BY_ID[31] = "minecraft:snowy_taiga_hills"; -+ BIOMES_BY_ID[32] = "minecraft:giant_tree_taiga"; -+ BIOMES_BY_ID[33] = "minecraft:giant_tree_taiga_hills"; -+ BIOMES_BY_ID[34] = "minecraft:wooded_mountains"; -+ BIOMES_BY_ID[35] = "minecraft:savanna"; -+ BIOMES_BY_ID[36] = "minecraft:savanna_plateau"; -+ BIOMES_BY_ID[37] = "minecraft:badlands"; -+ BIOMES_BY_ID[38] = "minecraft:wooded_badlands_plateau"; -+ BIOMES_BY_ID[39] = "minecraft:badlands_plateau"; -+ BIOMES_BY_ID[40] = "minecraft:small_end_islands"; -+ BIOMES_BY_ID[41] = "minecraft:end_midlands"; -+ BIOMES_BY_ID[42] = "minecraft:end_highlands"; -+ BIOMES_BY_ID[43] = "minecraft:end_barrens"; -+ BIOMES_BY_ID[44] = "minecraft:warm_ocean"; -+ BIOMES_BY_ID[45] = "minecraft:lukewarm_ocean"; -+ BIOMES_BY_ID[46] = "minecraft:cold_ocean"; -+ BIOMES_BY_ID[47] = "minecraft:deep_warm_ocean"; -+ BIOMES_BY_ID[48] = "minecraft:deep_lukewarm_ocean"; -+ BIOMES_BY_ID[49] = "minecraft:deep_cold_ocean"; -+ BIOMES_BY_ID[50] = "minecraft:deep_frozen_ocean"; -+ BIOMES_BY_ID[127] = "minecraft:the_void"; -+ BIOMES_BY_ID[129] = "minecraft:sunflower_plains"; -+ BIOMES_BY_ID[130] = "minecraft:desert_lakes"; -+ BIOMES_BY_ID[131] = "minecraft:gravelly_mountains"; -+ BIOMES_BY_ID[132] = "minecraft:flower_forest"; -+ BIOMES_BY_ID[133] = "minecraft:taiga_mountains"; -+ BIOMES_BY_ID[134] = "minecraft:swamp_hills"; -+ BIOMES_BY_ID[140] = "minecraft:ice_spikes"; -+ BIOMES_BY_ID[149] = "minecraft:modified_jungle"; -+ BIOMES_BY_ID[151] = "minecraft:modified_jungle_edge"; -+ BIOMES_BY_ID[155] = "minecraft:tall_birch_forest"; -+ BIOMES_BY_ID[156] = "minecraft:tall_birch_hills"; -+ BIOMES_BY_ID[157] = "minecraft:dark_forest_hills"; -+ BIOMES_BY_ID[158] = "minecraft:snowy_taiga_mountains"; -+ BIOMES_BY_ID[160] = "minecraft:giant_spruce_taiga"; -+ BIOMES_BY_ID[161] = "minecraft:giant_spruce_taiga_hills"; -+ BIOMES_BY_ID[162] = "minecraft:modified_gravelly_mountains"; -+ BIOMES_BY_ID[163] = "minecraft:shattered_savanna"; -+ BIOMES_BY_ID[164] = "minecraft:shattered_savanna_plateau"; -+ BIOMES_BY_ID[165] = "minecraft:eroded_badlands"; -+ BIOMES_BY_ID[166] = "minecraft:modified_wooded_badlands_plateau"; -+ BIOMES_BY_ID[167] = "minecraft:modified_badlands_plateau"; -+ BIOMES_BY_ID[168] = "minecraft:bamboo_jungle"; -+ BIOMES_BY_ID[169] = "minecraft:bamboo_jungle_hills"; -+ BIOMES_BY_ID[170] = "minecraft:soul_sand_valley"; -+ BIOMES_BY_ID[171] = "minecraft:crimson_forest"; -+ BIOMES_BY_ID[172] = "minecraft:warped_forest"; -+ BIOMES_BY_ID[173] = "minecraft:basalt_deltas"; -+ BIOMES_BY_ID[174] = "minecraft:dripstone_caves"; -+ BIOMES_BY_ID[175] = "minecraft:lush_caves"; -+ BIOMES_BY_ID[177] = "minecraft:meadow"; -+ BIOMES_BY_ID[178] = "minecraft:grove"; -+ BIOMES_BY_ID[179] = "minecraft:snowy_slopes"; -+ BIOMES_BY_ID[180] = "minecraft:snowcapped_peaks"; -+ BIOMES_BY_ID[181] = "minecraft:lofty_peaks"; -+ BIOMES_BY_ID[182] = "minecraft:stony_peaks"; -+ } -+ -+ private static final String[] HEIGHTMAP_TYPES = new String[] { -+ "WORLD_SURFACE_WG", -+ "WORLD_SURFACE", -+ "WORLD_SURFACE_IGNORE_SNOW", -+ "OCEAN_FLOOR_WG", -+ "OCEAN_FLOOR", -+ "MOTION_BLOCKING", -+ "MOTION_BLOCKING_NO_LEAVES" -+ }; -+ -+ private static final Set STATUS_IS_OR_AFTER_SURFACE = new HashSet<>(Arrays.asList( -+ "surface", -+ "carvers", -+ "liquid_carvers", -+ "features", -+ "light", -+ "spawn", -+ "heightmaps", -+ "full" -+ )); -+ private static final Set STATUS_IS_OR_AFTER_NOISE = new HashSet<>(Arrays.asList( -+ "noise", -+ "surface", -+ "carvers", -+ "liquid_carvers", -+ "features", -+ "light", -+ "spawn", -+ "heightmaps", -+ "full" -+ )); -+ private static final Set BLOCKS_BEFORE_FEATURE_STATUS = new HashSet<>(Arrays.asList( -+ "minecraft:air", -+ "minecraft:basalt", -+ "minecraft:bedrock", -+ "minecraft:blackstone", -+ "minecraft:calcite", -+ "minecraft:cave_air", -+ "minecraft:coarse_dirt", -+ "minecraft:crimson_nylium", -+ "minecraft:dirt", -+ "minecraft:end_stone", -+ "minecraft:grass_block", -+ "minecraft:gravel", -+ "minecraft:ice", -+ "minecraft:lava", -+ "minecraft:mycelium", -+ "minecraft:nether_wart_block", -+ "minecraft:netherrack", -+ "minecraft:orange_terracotta", -+ "minecraft:packed_ice", -+ "minecraft:podzol", -+ "minecraft:powder_snow", -+ "minecraft:red_sand", -+ "minecraft:red_sandstone", -+ "minecraft:sand", -+ "minecraft:sandstone", -+ "minecraft:snow_block", -+ "minecraft:soul_sand", -+ "minecraft:soul_soil", -+ "minecraft:stone", -+ "minecraft:terracotta", -+ "minecraft:warped_nylium", -+ "minecraft:warped_wart_block", -+ "minecraft:water", -+ "minecraft:white_terracotta" -+ )); -+ -+ private static int getObjectsPerValue(final long[] val) { -+ return (4096 + val.length - 1) / (val.length); // expression is invalid if it returns > 64 -+ } -+ -+ private static long[] resize(final long[] val, final int oldBitsPerObject, final int newBitsPerObject) { -+ final long oldMask = (1L << oldBitsPerObject) - 1; // works even if bitsPerObject == 64 -+ final long newMask = (1L << newBitsPerObject) - 1; -+ final int oldObjectsPerValue = 64 / oldBitsPerObject; -+ final int newObjectsPerValue = 64 / newBitsPerObject; -+ -+ if (newBitsPerObject == oldBitsPerObject) { -+ return val; -+ } -+ -+ final int items = 4096; -+ -+ final long[] ret = new long[(items + newObjectsPerValue - 1) / newObjectsPerValue]; -+ -+ final int expectedSize = ((items + oldObjectsPerValue - 1) / oldObjectsPerValue); -+ if (val.length != expectedSize) { -+ throw new IllegalStateException("Expected size: " + expectedSize + ", got: " + val.length); -+ } -+ -+ int shift = 0; -+ int idx = 0; -+ long newCurr = 0L; -+ -+ int currItem = 0; -+ for (int i = 0; i < val.length; ++i) { -+ final long oldCurr = val[i]; -+ -+ for (int objIdx = 0; currItem < items && objIdx + oldBitsPerObject <= 64; objIdx += oldBitsPerObject, ++currItem) { -+ final long value = (oldCurr >> objIdx) & oldMask; -+ -+ if ((value & newMask) != value) { -+ throw new IllegalStateException("Old data storage has values that cannot be moved into new palette (would erase data)!"); -+ } -+ -+ newCurr |= value << shift; -+ shift += newBitsPerObject; -+ -+ if (shift + newBitsPerObject > 64) { // will next write overflow? -+ // must move to next idx -+ ret[idx++] = newCurr; -+ shift = 0; -+ newCurr = 0L; -+ } -+ } -+ } -+ -+ // don't forget to write the last one -+ if (shift != 0) { -+ ret[idx] = newCurr; -+ } -+ -+ return ret; -+ } -+ -+ private static void fixLithiumChunks(final MapType data) { -+ // See https://github.com/CaffeineMC/lithium-fabric/issues/279 -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return; -+ } -+ -+ final int chunkX = level.getInt("xPos"); -+ final int chunkZ = level.getInt("zPos"); -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections == null) { -+ return; -+ } -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ final int sectionY = section.getInt("Y"); -+ -+ final ListType palette = section.getList("Palette", ObjectType.MAP); -+ final long[] blockStates = section.getLongs("BlockStates"); -+ -+ if (palette == null || blockStates == null) { -+ continue; -+ } -+ -+ final int expectedBits = Math.max(4, ceilLog2(palette.size())); -+ final int gotObjectsPerValue = getObjectsPerValue(blockStates); -+ final int gotBits = 64 / gotObjectsPerValue; -+ -+ if (expectedBits == gotBits) { -+ continue; -+ } -+ -+ try { -+ section.setLongs("BlockStates", resize(blockStates, gotBits, expectedBits)); -+ } catch (final Exception ex) { -+ LOGGER.error("Failed to rewrite mismatched palette and data storage for section y: " + sectionY -+ + " for chunk [" + chunkX + "," + chunkZ + "], palette entries: " + palette.size() + ", data storage size: " -+ + blockStates.length, -+ ex -+ ); -+ } -+ } -+ } -+ -+ public static void register() { -+ // See V2551 for the layout of world gen settings -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // converters were added to older versions note whether the world has increased height already or not -+ final boolean noHeightFlag = !data.hasKey("has_increased_height_already"); -+ final boolean hasIncreasedHeight = data.getBoolean("has_increased_height_already", true); -+ data.remove("has_increased_height_already"); -+ -+ final MapType dimensions = data.getMap("dimensions"); -+ if (dimensions == null) { -+ // wat -+ return null; -+ } -+ -+ // only care about overworld -+ final MapType overworld = dimensions.getMap("minecraft:overworld"); -+ if (overworld == null) { -+ // wat -+ return null; -+ } -+ -+ final MapType generator = overworld.getMap("generator"); -+ if (generator == null) { -+ // wat -+ return null; -+ } -+ -+ final String type = generator.getString("type", ""); -+ switch (type) { -+ case "minecraft:noise": { -+ final MapType biomeSource = generator.getMap("biome_source"); -+ final String sourceType = biomeSource.getString("type"); -+ -+ boolean largeBiomes = false; -+ -+ if ("minecraft:vanilla_layered".equals(sourceType) || (noHeightFlag && "minecraft:multi_noise".equals(sourceType))) { -+ largeBiomes = biomeSource.getBoolean("large_biomes"); -+ -+ final MapType newBiomeSource = Types.NBT.createEmptyMap(); -+ generator.setMap("biome_source", newBiomeSource); -+ -+ newBiomeSource.setString("preset", "minecraft:overworld"); -+ newBiomeSource.setString("type", "minecraft:multi_noise"); -+ } -+ -+ if (largeBiomes) { -+ if ("minecraft:overworld".equals(generator.getString("settings"))) { -+ generator.setString("settings", "minecraft:large_biomes"); -+ } -+ } -+ -+ break; -+ } -+ case "minecraft:flat": { -+ if (!hasIncreasedHeight) { -+ final MapType settings = generator.getMap("settings"); -+ if (settings == null) { -+ break; -+ } -+ -+ updateLayers(settings.getList("layers", ObjectType.MAP)); -+ } -+ break; -+ } -+ default: -+ // do nothing -+ break; -+ } -+ -+ return null; -+ } -+ }); -+ -+ -+ // It looks like DFU will only support worlds in the old height format or the new one, any custom one isn't supported -+ // and by not supported I mean it will just treat it as the old format... maybe at least throw in that case? -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // The below covers padPaletteEntries - this was written BEFORE that code was added to the datafixer - -+ // and this still works, so I'm keeping it. Don't fix what isn't broken. -+ fixLithiumChunks(data); // See https://github.com/CaffeineMC/lithium-fabric/issues/279 -+ -+ final MapType level = data.getMap("Level"); -+ -+ if (level == null) { -+ return null; -+ } -+ -+ final MapType context = data.getMap("__context"); // Passed through by ChunkStorage -+ final String dimension = context == null ? "" : context.getString("dimension", ""); -+ final String generator = context == null ? "" : context.getString("generator", ""); -+ final boolean isOverworld = "minecraft:overworld".equals(dimension); -+ final int minSection = isOverworld ? -4 : 0; -+ final MutableBoolean isAlreadyExtended = new MutableBoolean(); -+ -+ final MapType[] newBiomes = createBiomeSections(level, isOverworld, minSection, isAlreadyExtended); -+ final MapType wrappedEmptyBlockPalette = getEmptyBlockPalette(); -+ -+ ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections == null) { -+ level.setList("Sections", sections = Types.NBT.createEmptyList()); -+ } -+ -+ // must update sections for two things: -+ // 1. the biomes are now stored per section, so we must insert the biomes palette into each section (and create them if they don't exist) -+ // 2. each section must now have block states (or at least DFU is ensuring they do, but current code does not require) -+ V2841.SimplePaletteReader bottomSection = null; -+ final Set allBlocks = new HashSet<>(); -+ final IntOpenHashSet existingSections = new IntOpenHashSet(); -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ final int y = section.getInt("Y"); -+ final int sectionIndex = y - minSection; -+ -+ existingSections.add(y); -+ -+ // add in relevant biome section -+ if (sectionIndex >= 0 && sectionIndex < newBiomes.length) { -+ // exclude out of bounds sections (i.e the light sections above and below the world) -+ section.setMap("biomes", newBiomes[sectionIndex]); -+ } -+ -+ // update palette -+ final ListType palette = section.getList("Palette", ObjectType.MAP); -+ final long[] blockStates = section.getLongs("BlockStates"); -+ -+ section.remove("Palette"); -+ section.remove("BlockStates"); -+ -+ if (palette != null) { -+ for (int j = 0, len2 = palette.size(); j < len2; ++j) { -+ allBlocks.add(V2841.getBlockId(palette.getMap(j))); -+ } -+ } -+ -+ final MapType palettedContainer; -+ if (palette != null && blockStates != null) { -+ // only if both exist, same as DFU, same as legacy chunk loading code -+ section.setMap("block_states", palettedContainer = wrapPaletteOptimised(palette, blockStates)); -+ } else { -+ section.setMap("block_states", palettedContainer = wrappedEmptyBlockPalette.copy()); // must write a palette now, copy so that later edits do not edit them all -+ } -+ -+ if (section.getInt("Y", Integer.MAX_VALUE) == 0) { -+ bottomSection = new V2841.SimplePaletteReader(palettedContainer.getList("palette", ObjectType.MAP), palettedContainer.getLongs("data")); -+ } -+ } -+ -+ // all existing sections updated, now we must create new sections just for the biomes migration -+ for (int sectionIndex = 0; sectionIndex < newBiomes.length; ++sectionIndex) { -+ final int sectionY = sectionIndex + minSection; -+ if (!existingSections.add(sectionY)) { -+ // exists already -+ continue; -+ } -+ -+ final MapType newSection = Types.NBT.createEmptyMap(); -+ sections.addMap(newSection); -+ -+ newSection.setByte("Y", (byte)sectionY); -+ // must write a palette now, copy so that later edits do not edit them all -+ newSection.setMap("block_states", wrappedEmptyBlockPalette.copy()); -+ -+ newSection.setGeneric("biomes", newBiomes[sectionIndex]); -+ } -+ -+ // update status so interpolation can take place -+ predictChunkStatusBeforeSurface(level, allBlocks); -+ -+ // done with sections, update the rest of the chunk -+ updateChunkData(level, isOverworld, isAlreadyExtended.getValue(), "minecraft:noise".equals(generator), bottomSection); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType dimensions = data.getMap("dimensions"); -+ -+ if (dimensions == null) { -+ return null; -+ } -+ -+ for (final String dimension : dimensions.keys()) { -+ final MapType dimensionData = dimensions.getMap(dimension); -+ if (dimensionData == null) { -+ continue; -+ } -+ -+ final MapType generator = dimensionData.getMap("generator"); -+ if (generator == null) { -+ continue; -+ } -+ -+ final String type = generator.getString("type"); -+ if (type == null) { -+ continue; -+ } -+ -+ switch (type) { -+ case "minecraft:flat": { -+ final MapType settings = generator.getMap("settings"); -+ if (settings == null) { -+ continue; -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.BIOME, settings, "biome", fromVersion, toVersion); -+ -+ WalkerUtils.convertListPath(MCTypeRegistry.BLOCK_NAME, settings, "layers", "block", fromVersion, toVersion); -+ -+ break; -+ } -+ case "minecraft:noise": { -+ final MapType settings = generator.getMap("settings"); -+ if (settings != null) { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, settings, "default_block", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, settings, "default_fluid", fromVersion, toVersion); -+ } -+ -+ final MapType biomeSource = generator.getMap("biome_source"); -+ if (biomeSource != null) { -+ final String biomeSourceType = biomeSource.getString("type", ""); -+ switch (biomeSourceType) { -+ case "minecraft:fixed": { -+ WalkerUtils.convert(MCTypeRegistry.BIOME, biomeSource, "biome", fromVersion, toVersion); -+ break; -+ } -+ -+ case "minecraft:multi_noise": { -+ WalkerUtils.convert(MCTypeRegistry.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST, biomeSource, "preset", fromVersion, toVersion); -+ -+ // Vanilla's schema is _still_ wrong. It should be DSL.fields("biomes", DSL.list(DSL.fields("biome"))) -+ // But it just contains the list part. That obviously can never be the case, because -+ // the root object is a compound, not a list. -+ WalkerUtils.convertListPath(MCTypeRegistry.BIOME, biomeSource, "biomes", "biome", fromVersion, toVersion); -+ break; -+ } -+ -+ case "minecraft:checkerboard": { -+ WalkerUtils.convertList(MCTypeRegistry.BIOME, biomeSource, "biomes", fromVersion, toVersion); -+ break; -+ } -+ } -+ } -+ -+ break; -+ } -+ } -+ } -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.CHUNK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, level, "Entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TILE_ENTITY, level, "TileEntities", fromVersion, toVersion); -+ -+ final ListType tileTicks = level.getList("TileTicks", ObjectType.MAP); -+ if (tileTicks != null) { -+ for (int i = 0, len = tileTicks.size(); i < len; ++i) { -+ final MapType tileTick = tileTicks.getMap(i); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, tileTick, "i", fromVersion, toVersion); -+ } -+ } -+ -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ WalkerUtils.convertList(MCTypeRegistry.BIOME, section.getMap("biomes"), "palette", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, section.getMap("block_states"), "palette", fromVersion, toVersion); -+ } -+ } -+ -+ WalkerUtils.convertValues(MCTypeRegistry.STRUCTURE_FEATURE, level.getMap("Structures"), "Starts", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ private static void predictChunkStatusBeforeSurface(final MapType level, final Set chunkBlocks) { -+ final String status = level.getString("Status", "empty"); -+ if (STATUS_IS_OR_AFTER_SURFACE.contains(status)) { -+ return; -+ } -+ -+ chunkBlocks.remove("minecraft:air"); -+ final boolean chunkNotEmpty = !chunkBlocks.isEmpty(); -+ chunkBlocks.removeAll(BLOCKS_BEFORE_FEATURE_STATUS); -+ final boolean chunkFeatureStatus = !chunkBlocks.isEmpty(); -+ -+ final String update; -+ if (chunkFeatureStatus) { -+ update = "liquid_carvers"; -+ } else if (!"noise".equals(status) && !chunkNotEmpty) { -+ update = "biomes".equals(status) ? "structure_references" : status; -+ } else { -+ update = "noise"; -+ } -+ -+ level.setString("Status", update); -+ } -+ -+ private static MapType getEmptyBlockPalette() { -+ final MapType airBlockState = Types.NBT.createEmptyMap(); -+ airBlockState.setString("Name", "minecraft:air"); -+ -+ final ListType emptyBlockPalette = Types.NBT.createEmptyList(); -+ emptyBlockPalette.addMap(airBlockState); -+ -+ return V2832.wrapPalette(emptyBlockPalette); -+ } -+ -+ private static void shiftUpgradeData(final MapType upgradeData, final int shift) { -+ if (upgradeData == null) { -+ return; -+ } -+ -+ final MapType indices = upgradeData.getMap("Indices"); -+ if (indices == null) { -+ return; -+ } -+ -+ RenameHelper.renameKeys(indices, (final String input) -> { -+ return Integer.toString(Integer.parseInt(input) + shift); -+ }); -+ } -+ -+ private static void updateChunkData(final MapType level, final boolean wantExtendedHeight, final boolean isAlreadyExtended, -+ final boolean onNoiseGenerator, final V2841.SimplePaletteReader bottomSection) { -+ level.remove("Biomes"); -+ if (!wantExtendedHeight) { -+ padCarvingMasks(level, 16, 0); -+ return; -+ } -+ -+ if (isAlreadyExtended) { -+ padCarvingMasks(level, 24, 0); -+ return; -+ } -+ -+ offsetHeightmaps(level); -+ // Difference from DFU: Still convert the Lights data. Just because it's being removed in a later version doesn't mean -+ // that it should be removed here. -+ // Generally, converters act only on the current version to bring it to the next. This principle allows the converter -+ // for the next version to assume that it acts on its current version, not some in-between of the current version -+ // and some future version that did not exist at the time it was written. This allows converters to be written and tested -+ // only with knowledge of the current version and the next version. -+ addEmptyListPadding(level, "Lights"); -+ addEmptyListPadding(level, "LiquidsToBeTicked"); -+ addEmptyListPadding(level, "PostProcessing"); -+ addEmptyListPadding(level, "ToBeTicked"); -+ shiftUpgradeData(level.getMap("UpgradeData"), 4); // https://bugs.mojang.com/browse/MC-238076 - fixed now, Mojang fix is identical. No change required. -+ padCarvingMasks(level, 24, 4); -+ -+ if (!onNoiseGenerator) { -+ return; -+ } -+ -+ final String status = level.getString("Status"); -+ if (status == null || "empty".equals(status)) { -+ return; -+ } -+ -+ final MapType blendingData = Types.NBT.createEmptyMap(); -+ level.setMap("blending_data", blendingData); -+ -+ blendingData.setBoolean("old_noise", STATUS_IS_OR_AFTER_NOISE.contains(status)); -+ -+ if (bottomSection == null) { -+ return; -+ } -+ -+ final BitSet missingBedrock = new BitSet(256); -+ boolean hasBedrock = status.equals("noise"); -+ -+ for (int z = 0; z <= 15; ++z) { -+ for (int x = 0; x <= 15; ++x) { -+ final MapType state = bottomSection.getState(x, 0, z); -+ final String blockId = V2841.getBlockId(state); -+ final boolean isBedrock = state != null && "minecraft:bedrock".equals(blockId); -+ final boolean isAir = state != null && "minecraft:air".equals(blockId); -+ if (isAir) { -+ missingBedrock.set((z << 4) | x); -+ } -+ -+ hasBedrock |= isBedrock; -+ } -+ } -+ -+ if (hasBedrock && missingBedrock.cardinality() != missingBedrock.size()) { -+ final String targetStatus = "full".equals(status) ? "heightmaps" : status; -+ -+ final MapType belowZeroRetrogen = Types.NBT.createEmptyMap(); -+ level.setMap("below_zero_retrogen", belowZeroRetrogen); -+ -+ belowZeroRetrogen.setString("target_status", targetStatus); -+ belowZeroRetrogen.setLongs("missing_bedrock", missingBedrock.toLongArray()); -+ -+ level.setString("Status", "empty"); -+ } -+ -+ level.setBoolean("isLightOn", false); -+ } -+ -+ private static void padCarvingMasks(final MapType level, final int newSize, final int offset) { -+ final MapType carvingMasks = level.getMap("CarvingMasks"); -+ if (carvingMasks == null) { -+ // if empty, DFU still writes -+ level.setMap("CarvingMasks", Types.NBT.createEmptyMap()); -+ return; -+ } -+ -+ for (final String key : carvingMasks.keys()) { -+ final long[] old = BitSet.valueOf(carvingMasks.getBytes(key)).toLongArray(); -+ final long[] newVal = new long[64 * newSize]; -+ -+ System.arraycopy(old, 0, newVal, 64 * offset, old.length); -+ -+ carvingMasks.setLongs(key, newVal); // no CME: key exists already -+ } -+ } -+ -+ private static void addEmptyListPadding(final MapType level, final String path) { -+ ListType list = level.getListUnchecked(path); -+ if (list != null && list.size() == 24) { -+ return; -+ } -+ -+ if (list == null) { -+ // difference from DFU: Don't create the damn thing! -+ return; -+ } -+ -+ -+ // offset the section array to the new format -+ for (int i = 0; i < 4; ++i) { -+ // always create new copies, so that modifying one doesn't modify ALL of them! -+ list.addList(0, Types.NBT.createEmptyList()); // add below -+ list.addList(Types.NBT.createEmptyList()); // add above -+ } -+ } -+ -+ private static void offsetHeightmaps(final MapType level) { -+ final MapType heightmaps = level.getMap("Heightmaps"); -+ if (heightmaps == null) { -+ return; -+ } -+ -+ for (final String key : HEIGHTMAP_TYPES) { -+ offsetHeightmap(heightmaps.getLongs(key)); -+ } -+ } -+ -+ private static void offsetHeightmap(final long[] heightmap) { -+ if (heightmap == null) { -+ return; -+ } -+ -+ // heightmaps are configured to have 9 bits per value, with 256 total values -+ // heightmaps are also relative to the lowest position -+ for (int idx = 0, len = heightmap.length; idx < len; ++idx) { -+ long curr = heightmap[idx]; -+ long next = 0L; -+ -+ for (int objIdx = 0; objIdx + 9 <= 64; objIdx += 9) { -+ final long value = (curr >> objIdx) & 511L; -+ if (value != 0L) { -+ final long offset = Math.min(511L, value + 64L); -+ -+ next |= (offset << objIdx); -+ } -+ } -+ -+ heightmap[idx] = next; -+ } -+ } -+ -+ private static MapType[] createBiomeSections(final MapType level, final boolean wantExtendedHeight, -+ final int minSection, final MutableBoolean isAlreadyExtended) { -+ final MapType[] ret = new MapType[wantExtendedHeight ? 24 : 16]; -+ -+ final int[] biomes = level.getInts("Biomes"); -+ -+ if (biomes != null && biomes.length == 1536) { // magic value for 24 sections of biomes (24 * 4^3) -+ isAlreadyExtended.setValue(true); -+ for (int sectionIndex = 0; sectionIndex < 24; ++sectionIndex) { -+ ret[sectionIndex] = createBiomeSection(biomes, sectionIndex * 64, -1); // -1 is all 1s -+ } -+ } else if (biomes != null && biomes.length == 1024) { // magic value for 24 sections of biomes (16 * 4^3) -+ for (int sectionY = 0; sectionY < 16; ++sectionY) { -+ ret[sectionY - minSection] = createBiomeSection(biomes, sectionY * 64, -1); // -1 is all 1s -+ } -+ -+ if (wantExtendedHeight) { -+ // must set the new sections at top and bottom -+ final MapType bottomCopy = createBiomeSection(biomes, 0, 15); // just want the biomes at y = 0 -+ final MapType topCopy = createBiomeSection(biomes, 1008, 15); // just want the biomes at y = 252 -+ -+ for (int sectionIndex = 0; sectionIndex < 4; ++sectionIndex) { -+ ret[sectionIndex] = bottomCopy.copy(); // copy palette so that later possible modifications don't trash all sections -+ } -+ -+ for (int sectionIndex = 20; sectionIndex < 24; ++sectionIndex) { -+ ret[sectionIndex] = topCopy.copy(); // copy palette so that later possible modifications don't trash all sections -+ } -+ } -+ } else { -+ final ListType palette = Types.NBT.createEmptyList(); -+ palette.addString("minecraft:plains"); -+ -+ for (int i = 0; i < ret.length; ++i) { -+ ret[i] = wrapPalette(palette.copy()); // copy palette so that later possible modifications don't trash all sections -+ } -+ } -+ -+ return ret; -+ } -+ -+ private static MapType createBiomeSection(final int[] biomes, final int offset, final int mask) { -+ final Int2IntLinkedOpenHashMap paletteId = new Int2IntLinkedOpenHashMap(); -+ -+ for (int idx = 0; idx < 64; ++idx) { -+ final int biome = biomes[offset + (idx & mask)]; -+ paletteId.putIfAbsent(biome, paletteId.size()); -+ } -+ -+ final ListType paletteString = Types.NBT.createEmptyList(); -+ for (final IntIterator iterator = paletteId.keySet().iterator(); iterator.hasNext();) { -+ final int biomeId = iterator.nextInt(); -+ final String biome = biomeId >= 0 && biomeId < BIOMES_BY_ID.length ? BIOMES_BY_ID[biomeId] : null; -+ paletteString.addString(biome == null ? "minecraft:plains" : biome); -+ } -+ -+ final int bitsPerObject = ceilLog2(paletteString.size()); -+ if (bitsPerObject == 0) { -+ return wrapPalette(paletteString); -+ } -+ -+ // manually create packed integer data -+ final int objectsPerValue = 64 / bitsPerObject; -+ final long[] packed = new long[(64 + objectsPerValue - 1) / objectsPerValue]; -+ -+ int shift = 0; -+ int idx = 0; -+ long curr = 0; -+ -+ for (int biome_idx = 0; biome_idx < 64; ++biome_idx) { -+ final int biome = biomes[offset + (biome_idx & mask)]; -+ -+ curr |= ((long)paletteId.get(biome)) << shift; -+ -+ shift += bitsPerObject; -+ -+ if (shift + bitsPerObject > 64) { // will next write overflow? -+ // must move to next idx -+ packed[idx++] = curr; -+ shift = 0; -+ curr = 0L; -+ } -+ } -+ -+ // don't forget to write the last one -+ if (shift != 0) { -+ packed[idx] = curr; -+ } -+ -+ return wrapPalette(paletteString, packed); -+ } -+ -+ private static MapType wrapPalette(final ListType palette) { -+ return wrapPalette(palette, null); -+ } -+ -+ private static MapType wrapPalette(final ListType palette, final long[] blockStates) { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ ret.setList("palette", palette); -+ if (blockStates != null) { -+ ret.setLongs("data", blockStates); -+ } -+ -+ return ret; -+ } -+ -+ private static MapType wrapPaletteOptimised(final ListType palette, final long[] blockStates) { -+ if (palette.size() == 1) { -+ return wrapPalette(palette); -+ } -+ -+ return wrapPalette(palette, blockStates); -+ } -+ -+ public static int ceilLog2(final int value) { -+ return value == 0 ? 0 : Integer.SIZE - Integer.numberOfLeadingZeros(value - 1); // see doc of numberOfLeadingZeros -+ } -+ -+ private static void updateLayers(final ListType layers) { -+ if (layers == null) { -+ return; -+ } -+ -+ layers.addMap(0, createEmptyLayer()); // add at the bottom -+ } -+ -+ private static MapType createEmptyLayer() { -+ final MapType ret = Types.NBT.createEmptyMap(); -+ ret.setInt("height", 64); -+ ret.setString("block", "minecraft:air"); -+ -+ return ret; -+ } -+ -+ private V2832() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2833.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2833.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0db6fcec914d25680ac936cfb67a22f950b66d47 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2833.java -@@ -0,0 +1,31 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2833 { -+ -+ private static final int VERSION = MCVersions.V1_17_1 + 103; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType dimensions = data.getMap("dimensions"); -+ -+ for (final String dimensionKey : dimensions.keys()) { -+ final MapType dimension = dimensions.getMap(dimensionKey); -+ if (!dimension.hasKey("type")) { -+ throw new IllegalStateException("Unable load old custom worlds."); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2833() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2838.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2838.java -new file mode 100644 -index 0000000000000000000000000000000000000000..356963228d884a0a74e6d7c9922b4ced627bbfb0 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2838.java -@@ -0,0 +1,62 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2838 { -+ -+ private static final int VERSION = MCVersions.V21W40A; -+ -+ public static final Map BIOME_UPDATE = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:badlands_plateau", "minecraft:badlands") -+ .put("minecraft:bamboo_jungle_hills", "minecraft:bamboo_jungle") -+ .put("minecraft:birch_forest_hills", "minecraft:birch_forest") -+ .put("minecraft:dark_forest_hills", "minecraft:dark_forest") -+ .put("minecraft:desert_hills", "minecraft:desert") -+ .put("minecraft:desert_lakes", "minecraft:desert") -+ .put("minecraft:giant_spruce_taiga_hills", "minecraft:old_growth_spruce_taiga") -+ .put("minecraft:giant_spruce_taiga", "minecraft:old_growth_spruce_taiga") -+ .put("minecraft:giant_tree_taiga_hills", "minecraft:old_growth_pine_taiga") -+ .put("minecraft:giant_tree_taiga", "minecraft:old_growth_pine_taiga") -+ .put("minecraft:gravelly_mountains", "minecraft:windswept_gravelly_hills") -+ .put("minecraft:jungle_edge", "minecraft:sparse_jungle") -+ .put("minecraft:jungle_hills", "minecraft:jungle") -+ .put("minecraft:modified_badlands_plateau", "minecraft:badlands") -+ .put("minecraft:modified_gravelly_mountains", "minecraft:windswept_gravelly_hills") -+ .put("minecraft:modified_jungle_edge", "minecraft:sparse_jungle") -+ .put("minecraft:modified_jungle", "minecraft:jungle") -+ .put("minecraft:modified_wooded_badlands_plateau", "minecraft:wooded_badlands") -+ .put("minecraft:mountain_edge", "minecraft:windswept_hills") -+ .put("minecraft:mountains", "minecraft:windswept_hills") -+ .put("minecraft:mushroom_field_shore", "minecraft:mushroom_fields") -+ .put("minecraft:shattered_savanna", "minecraft:windswept_savanna") -+ .put("minecraft:shattered_savanna_plateau", "minecraft:windswept_savanna") -+ .put("minecraft:snowy_mountains", "minecraft:snowy_plains") -+ .put("minecraft:snowy_taiga_hills", "minecraft:snowy_taiga") -+ .put("minecraft:snowy_taiga_mountains", "minecraft:snowy_taiga") -+ .put("minecraft:snowy_tundra", "minecraft:snowy_plains") -+ .put("minecraft:stone_shore", "minecraft:stony_shore") -+ .put("minecraft:swamp_hills", "minecraft:swamp") -+ .put("minecraft:taiga_hills", "minecraft:taiga") -+ .put("minecraft:taiga_mountains", "minecraft:taiga") -+ .put("minecraft:tall_birch_forest", "minecraft:old_growth_birch_forest") -+ .put("minecraft:tall_birch_hills", "minecraft:old_growth_birch_forest") -+ .put("minecraft:wooded_badlands_plateau", "minecraft:wooded_badlands") -+ .put("minecraft:wooded_hills", "minecraft:forest") -+ .put("minecraft:wooded_mountains", "minecraft:windswept_forest") -+ .put("minecraft:lofty_peaks", "minecraft:jagged_peaks") -+ .put("minecraft:snowcapped_peaks", "minecraft:frozen_peaks") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractStringValueTypeRename.register(VERSION, MCTypeRegistry.BIOME, BIOME_UPDATE::get); -+ } -+ -+ private V2838() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2841.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2841.java -new file mode 100644 -index 0000000000000000000000000000000000000000..52ae7b4dbd1387327cb709c5939fa55cf1f10f7c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2841.java -@@ -0,0 +1,210 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import ca.spottedleaf.dataconverter.util.IntegerUtil; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+import java.util.Arrays; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V2841 { -+ -+ private static final int VERSION = MCVersions.V21W42A + 1; -+ -+ private static final Set ALWAYS_WATERLOGGED = new HashSet<>( -+ Arrays.asList( -+ "minecraft:bubble_column", -+ "minecraft:kelp", -+ "minecraft:kelp_plant", -+ "minecraft:seagrass", -+ "minecraft:tall_seagrass" -+ ) -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType level = root.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ { -+ // Why it's renamed here and not the next data version is beyond me. -+ final MapType liquidTicks = level.getMap("LiquidTicks"); -+ if (liquidTicks != null) { -+ level.remove("LiquidTicks"); -+ level.setMap("fluid_ticks", liquidTicks); -+ } -+ } -+ -+ final Int2ObjectOpenHashMap sectionBlocks = new Int2ObjectOpenHashMap<>(); -+ final ListType sections = level.getList("Sections", ObjectType.MAP); -+ int minSection = 0; // TODO wtf is this -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ final int sectionY = section.getInt("Y"); -+ if (sectionY < minSection && section.hasKey("biomes")) { -+ minSection = sectionY; -+ } -+ -+ final MapType blockStates = section.getMap("block_states"); -+ if (blockStates == null) { -+ continue; -+ } -+ -+ sectionBlocks.put(sectionY, new SimplePaletteReader(section.getList("palette", ObjectType.MAP), section.getLongs("data"))); -+ } -+ } -+ -+ level.setByte("yPos", (byte)minSection); // TODO ??????????????????????????????????????? -+ -+ if (level.hasKey("fluid_ticks") || level.hasKey("TileTicks")) { -+ return null; -+ } -+ -+ final int sectionX = level.getInt("xPos"); -+ final int sectionZ = level.getInt("zPos"); -+ -+ final ListType fluidTicks = level.getList("LiquidsToBeTicked", ObjectType.LIST); -+ final ListType blockTicks = level.getList("ToBeTicked", ObjectType.LIST); -+ level.remove("LiquidsToBeTicked"); -+ level.remove("ToBeTicked"); -+ -+ level.setList("fluid_ticks", migrateTickList(fluidTicks, false, sectionBlocks, sectionX, minSection, sectionZ)); -+ level.setList("TileTicks", migrateTickList(blockTicks, true, sectionBlocks, sectionX, minSection, sectionZ)); -+ -+ return null; -+ } -+ }); -+ } -+ -+ public static ListType migrateTickList(final ListType ticks, final boolean blockTicks, final Int2ObjectOpenHashMap sectionBlocks, -+ final int sectionX, final int minSection, final int sectionZ) { -+ final ListType ret = Types.NBT.createEmptyList(); -+ -+ if (ticks == null) { -+ return ret; -+ } -+ -+ for (int sectionIndex = 0, totalSections = ticks.size(); sectionIndex < totalSections; ++sectionIndex) { -+ final int sectionY = sectionIndex + minSection; -+ final ListType sectionTicks = ticks.getList(sectionIndex); -+ final SimplePaletteReader palette = sectionBlocks.get(sectionY); -+ -+ for (int i = 0, len = sectionTicks.size(); i < len; ++i) { -+ final int localIndex = sectionTicks.getShort(i) & 0xFFFF; -+ final MapType blockState = palette == null ? null : palette.getState(localIndex); -+ final String subjectId = blockTicks ? getBlockId(blockState) : getLiquidId(blockState); -+ -+ ret.addMap(createNewTick(subjectId, localIndex, sectionX, sectionY, sectionZ)); -+ } -+ } -+ -+ return ret; -+ } -+ -+ public static MapType createNewTick(final String subjectId, final int localIndex, final int sectionX, final int sectionY, final int sectionZ) { -+ final int newX = (localIndex & 15) + (sectionX << 4); -+ final int newZ = ((localIndex >> 4) & 15) + (sectionZ << 4); -+ final int newY = ((localIndex >> 8) & 15) + (sectionY << 4); -+ -+ final MapType ret = Types.NBT.createEmptyMap(); -+ -+ ret.setString("i", subjectId); -+ ret.setInt("x", newX); -+ ret.setInt("y", newY); -+ ret.setInt("z", newZ); -+ ret.setInt("t", 0); -+ ret.setInt("p", 0); -+ -+ return ret; -+ } -+ -+ public static String getBlockId(final MapType blockState) { -+ return blockState == null ? "minecraft:air" : blockState.getString("Name", "minecraft:air"); -+ } -+ -+ private static String getLiquidId(final MapType blockState) { -+ if (blockState == null) { -+ return "minecraft:empty"; -+ } -+ -+ final String name = blockState.getString("Name"); -+ if (ALWAYS_WATERLOGGED.contains(name)) { -+ return "minecraft:water"; -+ } -+ -+ final MapType properties = blockState.getMap("Properties"); -+ // Correctly read block state properties as strings - https://github.com/PaperMC/DataConverter/issues/6 -+ if ("minecraft:water".equals(name)) { -+ return properties != null && "0".equals(properties.getString("level")) ? "minecraft:water" : "minecraft:flowing_water"; -+ } else if ("minecraft:lava".equals(name)) { -+ return properties != null && "0".equals(properties.getString("level")) ? "minecraft:lava" : "minecraft:flowing_lava"; -+ } -+ -+ return (properties != null && "true".equals(properties.getString("waterlogged"))) ? "minecraft:water" : "minecraft:empty"; -+ } -+ -+ private V2841() {} -+ -+ public static final class SimplePaletteReader { -+ -+ public final ListType palette; -+ public final long[] data; -+ private final int bitsPerValue; -+ private final long mask; -+ private final int valuesPerLong; -+ -+ public SimplePaletteReader(final ListType palette, final long[] data) { -+ this.palette = palette == null ? null : (palette.size() == 0 ? null : palette); -+ this.data = data; -+ this.bitsPerValue = Math.max(4, IntegerUtil.ceilLog2(this.palette == null ? 0 : this.palette.size())); -+ this.mask = (1L << this.bitsPerValue) - 1L; -+ this.valuesPerLong = (int)(64L / this.bitsPerValue); -+ } -+ -+ public MapType getState(final int x, final int y, final int z) { -+ final int index = x | (z << 4) | (y << 8); -+ return this.getState(index); -+ } -+ -+ public MapType getState(final int index) { -+ final ListType palette = this.palette; -+ if (palette == null) { -+ return null; -+ } -+ -+ final int paletteSize = palette.size(); -+ if (paletteSize == 1) { -+ return palette.getMap(0); -+ } -+ -+ // x86 div computes mod. no loss here using mod -+ // if needed, can compute magic mul and shift for div values using IntegerUtil -+ final int dataIndex = index / this.valuesPerLong; -+ final int localIndex = (index % this.valuesPerLong) * this.bitsPerValue; -+ final long[] data = this.data; -+ if (dataIndex < 0 || dataIndex >= data.length) { -+ return null; -+ } -+ -+ final long value = data[dataIndex]; -+ final int paletteIndex = (int)((value >>> localIndex) & this.mask); -+ if (paletteIndex < 0 || paletteIndex >= paletteSize) { -+ return null; -+ } -+ -+ return palette.getMap(paletteIndex); -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2842.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2842.java -new file mode 100644 -index 0000000000000000000000000000000000000000..82581d4d4f68842a7def842c50dd94980064e14f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2842.java -@@ -0,0 +1,78 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V2842 { -+ -+ private static final int VERSION = MCVersions.V21W42A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType level = root.getMap("Level"); -+ root.remove("Level"); -+ -+ if (!root.isEmpty()) { -+ for (final String key : root.keys()) { -+ if (level.hasKey(key)) { -+ // Don't clobber Level's data -+ continue; -+ } -+ level.setGeneric(key, root.getGeneric(key)); -+ } -+ } -+ -+ // Rename top level first -+ RenameHelper.renameSingle(level, "TileEntities", "block_entities"); -+ RenameHelper.renameSingle(level, "TileTicks", "block_ticks"); -+ RenameHelper.renameSingle(level, "Entities", "entities"); -+ RenameHelper.renameSingle(level, "Sections", "sections"); -+ RenameHelper.renameSingle(level, "Structures", "structures"); -+ -+ // 2nd level -+ final MapType structures = level.getMap("structures"); -+ if (structures != null) { -+ RenameHelper.renameSingle(structures, "Starts", "starts"); -+ } -+ -+ return level; // Level is now root tag. -+ } -+ }); -+ -+ MCTypeRegistry.CHUNK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TILE_ENTITY, data, "block_entities", fromVersion, toVersion); -+ -+ final ListType blockTicks = data.getList("block_ticks", ObjectType.MAP); -+ if (blockTicks != null) { -+ for (int i = 0, len = blockTicks.size(); i < len; ++i) { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, blockTicks.getMap(i), "i", fromVersion, toVersion); -+ } -+ } -+ -+ final ListType sections = data.getList("sections", ObjectType.MAP); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ WalkerUtils.convertList(MCTypeRegistry.BIOME, section.getMap("biomes"), "palette", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, section.getMap("block_states"), "palette", fromVersion, toVersion); -+ } -+ } -+ -+ WalkerUtils.convertValues(MCTypeRegistry.STRUCTURE_FEATURE, data.getMap("structures"), "starts", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ private V2842() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2843.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2843.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c3e916a84e67d3d9243e5be2ea6985edd17c7151 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2843.java -@@ -0,0 +1,101 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V2843 { -+ -+ private static final int VERSION = MCVersions.V21W42A + 3; -+ -+ public static void register() { -+ ConverterAbstractStringValueTypeRename.register(VERSION, MCTypeRegistry.BIOME, -+ new HashMap<>( -+ Map.of("minecraft:deep_warm_ocean", "minecraft:warm_ocean") -+ )::get -+ ); -+ -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ private static void moveOutOfBoundTicks(final ListType ticks, final MapType chunkRoot, final int chunkX, final int chunkZ, final String intoKey) { -+ if (ticks == null) { -+ return; -+ } -+ -+ ListType outOfBounds = null; -+ for (int i = 0, len = ticks.size(); i < len; ++i) { -+ final MapType tick = ticks.getMap(i); -+ final int x = tick.getInt("x"); -+ final int z = tick.getInt("z"); -+ // anything > 1 is lost, anything less than 1 stays. -+ if (Math.max(Math.abs(chunkX - (x >> 4)), Math.abs(chunkZ - (z >> 4))) == 1) { -+ // DFU doesn't remove, so neither do we. -+ if (outOfBounds == null) { -+ outOfBounds = Types.NBT.createEmptyList(); -+ } -+ outOfBounds.addMap(tick.copy()); -+ } -+ } -+ -+ if (outOfBounds != null) { -+ MapType upgradeData = chunkRoot.getMap("UpgradeData"); -+ if (upgradeData == null) { -+ chunkRoot.setMap("UpgradeData", upgradeData = Types.NBT.createEmptyMap()); -+ } -+ upgradeData.setList(intoKey, outOfBounds); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // After renames, so use new names -+ final int x = data.getInt("xPos"); -+ final int z = data.getInt("zPos"); -+ -+ moveOutOfBoundTicks(data.getList("block_ticks", ObjectType.MAP), data, x, z, "neighbor_block_ticks"); -+ moveOutOfBoundTicks(data.getList("fluid_ticks", ObjectType.MAP), data, x, z, "neighbor_fluid_ticks"); -+ -+ return null; -+ } -+ }); -+ -+ // DFU is missing schema for UpgradeData block names -+ MCTypeRegistry.CHUNK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TILE_ENTITY, data, "block_entities", fromVersion, toVersion); -+ -+ WalkerUtils.convertListPath(MCTypeRegistry.BLOCK_NAME, data, "block_ticks", "i", fromVersion, toVersion); -+ -+ // Even though UpgradeData will retrieve the block from the World when the type no longer exists, -+ // the type from the world may not match what was actually queued. So, even though it may look like we -+ // can skip the walker here, we actually don't if we want to be thorough. -+ WalkerUtils.convertListPath(MCTypeRegistry.BLOCK_NAME, data.getMap("UpgradeData"), "neighbor_block_ticks", "i", fromVersion, toVersion); -+ -+ final ListType sections = data.getListUnchecked("sections"); -+ if (sections != null) { -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i, null); -+ if (section == null) { -+ continue; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.BIOME, section.getMap("biomes"), "palette", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, section.getMap("block_states"), "palette", fromVersion, toVersion); -+ } -+ } -+ -+ WalkerUtils.convertValues(MCTypeRegistry.STRUCTURE_FEATURE, data.getMap("structures"), "starts", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ private V2843() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2846.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2846.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e32224267d53d82ba15942141a5cb7a19eb380f2 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2846.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterAbstractAdvancementsRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V2846 { -+ -+ private static final int VERSION = MCVersions.V21W44A + 1; -+ -+ public static void register() { -+ ConverterAbstractAdvancementsRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:husbandry/play_jukebox_in_meadows", "minecraft:adventure/play_jukebox_in_meadows", -+ "minecraft:adventure/caves_and_cliff", "minecraft:adventure/fall_from_world_height", -+ "minecraft:adventure/ride_strider_in_overworld_lava", "minecraft:nether/ride_strider_in_overworld_lava" -+ ) -+ )::get); -+ } -+ -+ private V2846() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2852.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2852.java -new file mode 100644 -index 0000000000000000000000000000000000000000..843e54be50563a647c946ca032a59a8606f0a246 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2852.java -@@ -0,0 +1,31 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2852 { -+ -+ private static final int VERSION = MCVersions.V1_18_PRE5 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType dimensions = data.getMap("dimensions"); -+ -+ for (final String dimensionKey : dimensions.keys()) { -+ final MapType dimension = dimensions.getMap(dimensionKey); -+ if (!dimension.hasKey("type")) { -+ throw new IllegalStateException("Unable load old custom worlds."); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2852() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2967.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2967.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9f5771a22c25d4c37a7c6181e9f81151bb6fe7aa ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2967.java -@@ -0,0 +1,58 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V2967 { -+ -+ private static final int VERSION = MCVersions.V22W05A; -+ -+ public static void register() { -+ MCTypeRegistry.WORLD_GEN_SETTINGS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType dimensions = data.getMap("dimensions"); -+ -+ if (dimensions == null) { -+ return null; -+ } -+ -+ for (final String dimension : dimensions.keys()) { -+ final MapType dimensionData = dimensions.getMap(dimension); -+ if (dimensionData == null) { -+ continue; -+ } -+ -+ final MapType generator = dimensionData.getMap("generator"); -+ if (generator == null) { -+ continue; -+ } -+ -+ final MapType settings = generator.getMap("settings"); -+ if (settings == null) { -+ continue; -+ } -+ -+ final MapType structures = settings.getMap("structures"); -+ if (structures == null) { -+ continue; -+ } -+ -+ for (final String structureKey : structures.keys()) { -+ structures.getMap(structureKey).setString("type", "minecraft:random_spread"); -+ } -+ -+ final MapType stronghold = structures.getMap("stronghold"); -+ stronghold.setString("type", "minecraft:concentric_rings"); -+ structures.setMap("minecraft:stronghold", stronghold.copy()); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2967() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V2970.java b/ca/spottedleaf/dataconverter/minecraft/versions/V2970.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9dab902eb5c2d581516c6fab9afa579997c2faa6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V2970.java -@@ -0,0 +1,209 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.google.common.collect.ImmutableMap; -+import com.mojang.logging.LogUtils; -+import it.unimi.dsi.fastutil.objects.Object2IntMap; -+import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -+import org.slf4j.Logger; -+import java.util.HashMap; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Locale; -+import java.util.Map; -+ -+public final class V2970 { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final int VERSION = MCVersions.V22W07A + 1; -+ private static final Map CONVERSION_MAP = new HashMap<>( -+ ImmutableMap.builder() -+ .put("mineshaft", BiomeRemap.create(Map.of(List.of("minecraft:badlands", "minecraft:eroded_badlands", "minecraft:wooded_badlands"), "minecraft:mineshaft_mesa"), "minecraft:mineshaft")) -+ .put("shipwreck", BiomeRemap.create(Map.of(List.of("minecraft:beach", "minecraft:snowy_beach"), "minecraft:shipwreck_beached"), "minecraft:shipwreck")) -+ .put("ocean_ruin", BiomeRemap.create(Map.of(List.of("minecraft:warm_ocean", "minecraft:lukewarm_ocean", "minecraft:deep_lukewarm_ocean"), "minecraft:ocean_ruin_warm"), "minecraft:ocean_ruin_cold")) -+ .put("village", BiomeRemap.create(Map.of(List.of("minecraft:desert"), "minecraft:village_desert", List.of("minecraft:savanna"), "minecraft:village_savanna", List.of("minecraft:snowy_plains"), "minecraft:village_snowy", List.of("minecraft:taiga"), "minecraft:village_taiga"), "minecraft:village_plains")) -+ .put("ruined_portal", BiomeRemap.create(Map.of(List.of("minecraft:desert"), "minecraft:ruined_portal_desert", List.of("minecraft:badlands", "minecraft:eroded_badlands", "minecraft:wooded_badlands", "minecraft:windswept_hills", "minecraft:windswept_forest", "minecraft:windswept_gravelly_hills", "minecraft:savanna_plateau", "minecraft:windswept_savanna", "minecraft:stony_shore", "minecraft:meadow", "minecraft:frozen_peaks", "minecraft:jagged_peaks", "minecraft:stony_peaks", "minecraft:snowy_slopes"), "minecraft:ruined_portal_mountain", List.of("minecraft:bamboo_jungle", "minecraft:jungle", "minecraft:sparse_jungle"), "minecraft:ruined_portal_jungle", List.of("minecraft:deep_frozen_ocean", "minecraft:deep_cold_ocean", "minecraft:deep_ocean", "minecraft:deep_lukewarm_ocean", "minecraft:frozen_ocean", "minecraft:ocean", "minecraft:cold_ocean", "minecraft:lukewarm_ocean", "minecraft:warm_ocean"), "minecraft:ruined_portal_ocean"), "minecraft:ruined_portal")) // Fix MC-248814, ruined_portal_standard->ruined_portal -+ .put("pillager_outpost", BiomeRemap.create("minecraft:pillager_outpost")) -+ .put("mansion", BiomeRemap.create("minecraft:mansion")) -+ .put("jungle_pyramid", BiomeRemap.create("minecraft:jungle_pyramid")) -+ .put("desert_pyramid", BiomeRemap.create("minecraft:desert_pyramid")) -+ .put("igloo", BiomeRemap.create("minecraft:igloo")) -+ .put("swamp_hut", BiomeRemap.create("minecraft:swamp_hut")) -+ .put("stronghold", BiomeRemap.create("minecraft:stronghold")) -+ .put("monument", BiomeRemap.create("minecraft:monument")) -+ .put("fortress", BiomeRemap.create("minecraft:fortress")) -+ .put("endcity", BiomeRemap.create("minecraft:end_city")) -+ .put("buried_treasure", BiomeRemap.create("minecraft:buried_treasure")) -+ .put("nether_fossil", BiomeRemap.create("minecraft:nether_fossil")) -+ .put("bastion_remnant", BiomeRemap.create("minecraft:bastion_remnant")) -+ .build() -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ private static Object2IntOpenHashMap countBiomes(final MapType chunk) { -+ final ListType sections = chunk.getList("sections", ObjectType.MAP); -+ if (sections == null) { -+ return null; -+ } -+ -+ final Object2IntOpenHashMap ret = new Object2IntOpenHashMap<>(); -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ final MapType biomes = section.getMap("biomes"); -+ -+ if (biomes == null) { -+ continue; -+ } -+ -+ final ListType palette = biomes.getList("palette", ObjectType.STRING); -+ -+ if (palette == null) { -+ continue; -+ } -+ -+ for (int k = 0, len2 = palette.size(); k < len2; ++k) { -+ ret.addTo(palette.getString(k), 1); -+ } -+ } -+ -+ return ret; -+ } -+ -+ private static String getStructureConverted(String id, final Object2IntOpenHashMap biomeCount) { -+ id = id.toLowerCase(Locale.ROOT); -+ final BiomeRemap remap = CONVERSION_MAP.get(id); -+ if (remap == null) { -+ return null; -+ } -+ if (remap.biomeToNewStructure == null || biomeCount == null) { -+ return remap.dfl; -+ } -+ -+ final Object2IntOpenHashMap remapCount = new Object2IntOpenHashMap<>(); -+ -+ for (final Iterator> iterator = biomeCount.object2IntEntrySet().fastIterator(); iterator.hasNext();) { -+ final Object2IntMap.Entry entry = iterator.next(); -+ final String remappedStructure = remap.biomeToNewStructure.get(entry.getKey()); -+ if (remappedStructure != null) { -+ remapCount.addTo(remappedStructure, entry.getIntValue()); -+ } -+ } -+ -+ String converted = remap.dfl; -+ int maxCount = 0; -+ -+ for (final Iterator> iterator = remapCount.object2IntEntrySet().fastIterator(); iterator.hasNext();) { -+ final Object2IntMap.Entry entry = iterator.next(); -+ final int count = entry.getIntValue(); -+ if (count > maxCount) { -+ maxCount = count; -+ converted = entry.getKey(); -+ } -+ } -+ -+ return converted; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType structures = data.getMap("structures"); -+ if (structures == null || structures.isEmpty()) { -+ return null; -+ } -+ -+ final Object2IntOpenHashMap biomeCounts = countBiomes(data); -+ -+ final MapType starts = structures.getMap("starts"); -+ final MapType references = structures.getMap("References"); -+ -+ if (starts != null) { -+ final MapType newStarts = data.getTypeUtil().createEmptyMap(); -+ structures.setMap("starts", newStarts); -+ -+ for (final String key : starts.keys()) { -+ final MapType value = starts.getMap(key); -+ if ("INVALID".equals(value.getString("id", "INVALID"))) { -+ continue; -+ } -+ -+ final String remapped = getStructureConverted(key, biomeCounts); -+ -+ if (remapped == null) { -+ LOGGER.warn("Encountered unknown structure in dataconverter: " + key); -+ continue; -+ } -+ -+ value.setString("id", remapped); -+ newStarts.setMap(remapped, value); -+ } -+ } -+ -+ // This TRULY is a guess, no idea what biomes the referent has. -+ if (references != null) { -+ final MapType newReferences = data.getTypeUtil().createEmptyMap(); -+ structures.setMap("References", newReferences); -+ for (final String key : references.keys()) { -+ final long[] value = references.getLongs(key); -+ if (value.length == 0) { -+ continue; -+ } -+ -+ final String newKey = getStructureConverted(key, biomeCounts); -+ if (newKey == null) { -+ LOGGER.warn("Encountered unknown structure reference in dataconverter: " + key); -+ continue; -+ } -+ -+ newReferences.setLongs(newKey, value); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V2970() {} -+ -+ private static final class BiomeRemap { -+ -+ public final Map biomeToNewStructure; -+ public final String dfl; -+ -+ private BiomeRemap(final Map biomeToNewStructure, final String dfl) { -+ this.biomeToNewStructure = biomeToNewStructure; -+ this.dfl = dfl; -+ } -+ -+ public static BiomeRemap create(final String newId) { -+ return new BiomeRemap(null, newId); -+ } -+ -+ public static BiomeRemap create(final Map, String> biomeMap, final String newId) { -+ final Map biomeToNewStructure = new HashMap<>(); -+ -+ for (final Map.Entry, String> entry : biomeMap.entrySet()) { -+ final List biomes = entry.getKey(); -+ final String newBiomeStructure = entry.getValue(); -+ -+ for (int i = 0, len = biomes.size(); i < len; ++i) { -+ final String biome = biomes.get(i); -+ if (biomeToNewStructure.putIfAbsent(biome, newBiomeStructure) != null) { -+ throw new IllegalStateException("Duplicate biome remap: " + biome + " -> " + newBiomeStructure + ", but already mapped to " + biomeToNewStructure.get(biome)); -+ } -+ } -+ } -+ -+ return new BiomeRemap(biomeToNewStructure, newId); -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3077.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3077.java -new file mode 100644 -index 0000000000000000000000000000000000000000..61d77841d0ce4ecb22922c8777886917ac54e39f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3077.java -@@ -0,0 +1,40 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3077 { -+ -+ private static final int VERSION = MCVersions.V1_18_2 + 102; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final boolean isLightOn = data.getBoolean("isLightOn"); -+ if (isLightOn) { -+ return null; -+ } -+ -+ final ListType sections = data.getList("sections", ObjectType.MAP); -+ if (sections == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ section.remove("BlockLight"); -+ section.remove("SkyLight"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3077() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3078.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3078.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e7e13f2b60c80a04749763e05875212655ff42cf ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3078.java -@@ -0,0 +1,19 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.game_event.GameEventListenerWalker; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3078 { -+ -+ private static final int VERSION = MCVersions.V1_18_2 + 103; -+ -+ public static void register() { -+ //registerMob("minecraft:frog"); // changed to simple in 1.21.5 -+ //registerMob("minecraft:tadpole"); // changed to simple in 1.21.5 -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:sculk_shrieker", new GameEventListenerWalker()); -+ } -+ -+ private V3078() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3081.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3081.java -new file mode 100644 -index 0000000000000000000000000000000000000000..776b0f7d507e8fa7f62f25bd251c97c86eea3961 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3081.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.game_event.GameEventListenerWalker; -+ -+public final class V3081 { -+ -+ private static final int VERSION = MCVersions.V22W11A + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:warden"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:warden", new GameEventListenerWalker()); -+ } -+ -+ private V3081() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3082.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3082.java -new file mode 100644 -index 0000000000000000000000000000000000000000..79768b25a32a5333f8cb6ec6e8c422478a6891df ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3082.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3082 { -+ -+ private static final int VERSION = MCVersions.V22W11A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:chest_boat", new DataWalkerItemLists("Items")); -+ } -+ -+ private V3082() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3083.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3083.java -new file mode 100644 -index 0000000000000000000000000000000000000000..35df14855a519c6bed1bc01f6b2bda491bf29441 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3083.java -@@ -0,0 +1,19 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.game_event.GameEventListenerWalker; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3083 { -+ -+ private static final int VERSION = MCVersions.V22W12A + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:allay"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:allay", new DataWalkerItemLists("Inventory")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:allay", new GameEventListenerWalker()); -+ } -+ -+ private V3083() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3084.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3084.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6a096226995e89285054b4ab35ed3e14ae4da694 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3084.java -@@ -0,0 +1,42 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3084 { -+ -+ private static final int VERSION = MCVersions.V22W12A + 2; -+ -+ private static final Map GAME_EVENT_RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("minecraft:block_press", "minecraft:block_activate") -+ .put("minecraft:block_switch", "minecraft:block_activate") -+ .put("minecraft:block_unpress", "minecraft:block_deactivate") -+ .put("minecraft:block_unswitch", "minecraft:block_deactivate") -+ .put("minecraft:drinking_finish", "minecraft:drink") -+ .put("minecraft:elytra_free_fall", "minecraft:elytra_glide") -+ .put("minecraft:entity_damaged", "minecraft:entity_damage") -+ .put("minecraft:entity_dying", "minecraft:entity_die") -+ .put("minecraft:entity_killed", "minecraft:entity_die") -+ .put("minecraft:mob_interact", "minecraft:entity_interact") -+ .put("minecraft:ravager_roar", "minecraft:entity_roar") -+ .put("minecraft:ring_bell", "minecraft:block_change") -+ .put("minecraft:shulker_close", "minecraft:container_close") -+ .put("minecraft:shulker_open", "minecraft:container_open") -+ .put("minecraft:wolf_shaking", "minecraft:entity_shake") -+ .build() -+ ); -+ -+ public static void register() { -+ ConverterAbstractStringValueTypeRename.register(VERSION, MCTypeRegistry.GAME_EVENT_NAME, (final String name) -> { -+ return GAME_EVENT_RENAMES.get(NamespaceUtil.correctNamespace(name)); -+ }); -+ } -+ -+ private V3084() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3086.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3086.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f06412a417ba12111c9e8f30b747ed3ad6dcbcb6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3086.java -@@ -0,0 +1,54 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterCriteriaRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterEntityToVariant; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.google.common.collect.ImmutableMap; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3086 { -+ -+ private static final int VERSION = MCVersions.V22W13A + 1; -+ -+ private static final Int2ObjectOpenHashMap CAT_ID_CONVERSION = new Int2ObjectOpenHashMap<>(); -+ static { -+ CAT_ID_CONVERSION.defaultReturnValue("minecraft:tabby"); -+ CAT_ID_CONVERSION.put(0, "minecraft:tabby"); -+ CAT_ID_CONVERSION.put(1, "minecraft:black"); -+ CAT_ID_CONVERSION.put(2, "minecraft:red"); -+ CAT_ID_CONVERSION.put(3, "minecraft:siamese"); -+ CAT_ID_CONVERSION.put(4, "minecraft:british"); -+ CAT_ID_CONVERSION.put(5, "minecraft:calico"); -+ CAT_ID_CONVERSION.put(6, "minecraft:persian"); -+ CAT_ID_CONVERSION.put(7, "minecraft:ragdoll"); -+ CAT_ID_CONVERSION.put(8, "minecraft:white"); -+ CAT_ID_CONVERSION.put(9, "minecraft:jellie"); -+ CAT_ID_CONVERSION.put(10, "minecraft:all_black"); -+ } -+ -+ private static final Map CAT_ADVANCEMENTS_CONVERSION = new HashMap<>( -+ ImmutableMap.builder() -+ .put("textures/entity/cat/tabby.png", "minecraft:tabby") -+ .put("textures/entity/cat/black.png", "minecraft:black") -+ .put("textures/entity/cat/red.png", "minecraft:red") -+ .put("textures/entity/cat/siamese.png", "minecraft:siamese") -+ .put("textures/entity/cat/british_shorthair.png", "minecraft:british") -+ .put("textures/entity/cat/calico.png", "minecraft:calico") -+ .put("textures/entity/cat/persian.png", "minecraft:persian") -+ .put("textures/entity/cat/ragdoll.png", "minecraft:ragdoll") -+ .put("textures/entity/cat/white.png", "minecraft:white") -+ .put("textures/entity/cat/jellie.png", "minecraft:jellie") -+ .put("textures/entity/cat/all_black.png", "minecraft:all_black") -+ .build() -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:cat", new ConverterEntityToVariant(VERSION, "CatType", CAT_ID_CONVERSION::get)); -+ MCTypeRegistry.ADVANCEMENTS.addStructureConverter(new ConverterCriteriaRename(VERSION, "minecraft:husbandry/complete_catalogue", CAT_ADVANCEMENTS_CONVERSION::get)); -+ } -+ -+ private V3086() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3087.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3087.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b296229502491b54f6352ee1f9db0023296b36ec ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3087.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterEntityToVariant; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+ -+public final class V3087 { -+ -+ private static final int VERSION = MCVersions.V22W13A + 2; -+ -+ private static final Int2ObjectOpenHashMap FROG_ID_CONVERSION = new Int2ObjectOpenHashMap<>(); -+ static { -+ FROG_ID_CONVERSION.put(0, "minecraft:temperate"); -+ FROG_ID_CONVERSION.put(1, "minecraft:warm"); -+ FROG_ID_CONVERSION.put(2, "minecraft:cold"); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:frog", new ConverterEntityToVariant(VERSION, "Variant", FROG_ID_CONVERSION::get)); -+ } -+ -+ private V3087() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3088.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3088.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2752dfd1a7ff896e2ed736846980da5adde6e657 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3088.java -@@ -0,0 +1,25 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.chunk.ConverterAddBlendingData; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V3088 { -+ -+ // this class originally targeted 3079 but was changed to target a later version without changing the converter, zero clue why -+ // this class then targeted 3088 but was changed to target 3441 -+ // to maintain integrity of the data version, I chose to extract the converter to a separate class and use it in both versions -+ // the reason it is important to never change old converters once released is that it creates _two_ versions under the same id. -+ // Consider the case where a user force upgrades their world, but does not load the chunk. Then, consider the case where -+ // the user does not force upgrade their world. Then, Mojang comes along and makes a decision like this and now both -+ // players load the chunk - they went through a different conversion process, which ultimately creates two versions. -+ // Unfortunately this fix doesn't exactly resolve it, as anyone running Mojang's converters will now be different -+ // from DataConverter's. It's broadly a dumb situation all around that could be avoided if Mojang wasn't being careless here. -+ private static final int VERSION = MCVersions.V22W14A; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new ConverterAddBlendingData(VERSION)); -+ } -+ -+ private V3088() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3090.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3090.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e9ad7b4f734ae2c1a19d7a0c5dd7a3cca0e4084f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3090.java -@@ -0,0 +1,25 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3090 { -+ -+ private static final int VERSION = MCVersions.V22W15A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:painting", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "Motive", "variant"); -+ RenameHelper.renameSingle(data, "Facing", "facing"); -+ return null; -+ } -+ }); -+ } -+ -+ private V3090() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3093.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3093.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c1cb70feb6815eebe2d2b547cf75841837332240 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3093.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3093 { -+ -+ private static final int VERSION = MCVersions.V22W17A; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:goat", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setBoolean("HasLeftHorn", true); -+ data.setBoolean("HasRightHorn", true); -+ return null; -+ } -+ }); -+ } -+ -+ private V3093() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3094.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3094.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a856d65f411b3fe91eebb429a7dab58dff9520ba ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3094.java -@@ -0,0 +1,44 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3094 { -+ -+ private static final int VERSION = MCVersions.V22W17A + 1; -+ -+ private static final String[] SOUND_VARIANT_TO_INSTRUMENT = new String[] { -+ "minecraft:ponder_goat_horn", -+ "minecraft:sing_goat_horn", -+ "minecraft:seek_goat_horn", -+ "minecraft:feel_goat_horn", -+ "minecraft:admire_goat_horn", -+ "minecraft:call_goat_horn", -+ "minecraft:yearn_goat_horn", -+ "minecraft:dream_goat_horn" -+ }; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:goat_horn", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ -+ if (tag == null) { -+ return null; -+ } -+ -+ final int soundVariant = tag.getInt("SoundVariant"); -+ tag.remove("SoundVariant"); -+ -+ tag.setString("instrument", SOUND_VARIANT_TO_INSTRUMENT[soundVariant < 0 || soundVariant >= SOUND_VARIANT_TO_INSTRUMENT.length ? 0 : soundVariant]); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3094() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3097.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3097.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a86aee0c6acd1afeb647df4c8d27c333a78f1c47 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3097.java -@@ -0,0 +1,63 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterCriteriaRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterEntityVariantRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.poi.ConverterPoiDelete; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Map; -+import java.util.Set; -+ -+public final class V3097 { -+ -+ private static final int VERSION = MCVersions.V22W19A + 1; -+ -+ public static void register() { -+ final DataConverter removeFilteredBookText = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ tag.remove("filtered_title"); -+ tag.remove("filtered_pages"); -+ -+ return null; -+ } -+ }; -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:writable_book", removeFilteredBookText); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:written_book", removeFilteredBookText); -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:sign", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.remove("FilteredText1"); -+ data.remove("FilteredText2"); -+ data.remove("FilteredText3"); -+ data.remove("FilteredText4"); -+ -+ return null; -+ } -+ }); -+ -+ final Map britishRenamer = new HashMap<>(Map.of( -+ "minecraft:british", "minecraft:british_shorthair" -+ )); -+ final Set poiRemove = new HashSet<>(Set.of( -+ "minecraft:unemployed", -+ "minecraft:nitwit" -+ )); -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:cat", new ConverterEntityVariantRename(VERSION, britishRenamer::get)); -+ MCTypeRegistry.ADVANCEMENTS.addStructureConverter(new ConverterCriteriaRename(VERSION, "minecraft:husbandry/complete_catalogue", britishRenamer::get)); -+ MCTypeRegistry.POI_CHUNK.addStructureConverter(new ConverterPoiDelete(VERSION, poiRemove::contains)); -+ } -+ -+ private V3097() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3108.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3108.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7393cf136f6753c3d58bdd33d5087a2dc0de7db3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3108.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3108 { -+ -+ private static final int VERSION = MCVersions.V1_19_1_PRE1 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType context = data.getMap("__context"); -+ if ("minecraft:overworld".equals(context == null ? null : context.getString("dimension"))) { -+ return null; -+ } -+ -+ data.remove("blending_data"); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3108() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3201.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3201.java -new file mode 100644 -index 0000000000000000000000000000000000000000..bd4b0f27e73e2ea26e1fa2237061055e8a7ded82 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3201.java -@@ -0,0 +1,35 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3201 { -+ -+ private static final int VERSION = MCVersions.V1_19_2 + 81; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ private static void fixList(final MapType data, final String target) { -+ if (data == null) { -+ return; -+ } -+ final String curr = data.getString(target); -+ if (curr == null) { -+ return; -+ } -+ data.setString(target, curr.replace("\"programer_art\"", "\"programmer_art\"")); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ fixList(data, "resourcePacks"); -+ fixList(data, "incompatibleResourcePacks"); -+ return null; -+ } -+ }); -+ } -+ -+ private V3201() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3202.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3202.java -new file mode 100644 -index 0000000000000000000000000000000000000000..697b2fd839312f97877703a8d60b35c59c95ede3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3202.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V3202 { -+ -+ private static final int VERSION = MCVersions.V1_19_2 + 82; -+ -+ public static void register() { -+ V99.registerSign(VERSION, "minecraft:hanging_sign"); -+ } -+ -+ private V3202() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3203.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3203.java -new file mode 100644 -index 0000000000000000000000000000000000000000..bc8339de34a9edb1396479d70e5e76757e0264f8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3203.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3203 { -+ -+ private static final int VERSION = MCVersions.V1_19_2 + 83; -+ -+ public static void register() { -+ //registerMob("minecraft:camel"); // changed to simple in 1.21.5 -+ } -+ -+ private V3203() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3204.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3204.java -new file mode 100644 -index 0000000000000000000000000000000000000000..87053c0c1de258770e7630830307ab484915aad8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3204.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3204 { -+ -+ private static final int VERSION = MCVersions.V1_19_2 + 84; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:chiseled_bookshelf", new DataWalkerItemLists("Items")); -+ } -+ -+ private V3204() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java -new file mode 100644 -index 0000000000000000000000000000000000000000..85270a36c5f75b1c6be49e461b302c3339c95750 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java -@@ -0,0 +1,18 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterFlattenSpawnEgg; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V3209 { -+ -+ private static final int VERSION = MCVersions.V22W45A + 1; -+ -+ public static void register() { -+ // Note: This converter reads entity id from its sub data, but we need no breakpoint because entity ids are not -+ // remapped this version -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:pig_spawn_egg", new ConverterFlattenSpawnEgg(VERSION, 0)); -+ } -+ -+ private V3209() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3214.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3214.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c7ef09ed0c145d0e5adef04e9e969c837904c5ce ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3214.java -@@ -0,0 +1,30 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3214 { -+ -+ private static final int VERSION = MCVersions.V1_19_3_PRE3 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String value = data.getString("ao"); -+ -+ if ("0".equals(value)) { -+ data.setString("ao", "false"); -+ } else if ("1".equals(value) || "2".equals(value)) { -+ data.setString("ao", "true"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3214() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3319.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3319.java -new file mode 100644 -index 0000000000000000000000000000000000000000..98944037c86cefb42f89674a2eb1abe20a90c800 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3319.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3319 { -+ -+ private static final int VERSION = MCVersions.V1_19_3 + 101; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setString("onboardAccessibility", "false"); -+ return null; -+ } -+ }); -+ } -+ -+ private V3319() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3322.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3322.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5e09176559a30272ef86754f29265afe686ea2ad ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3322.java -@@ -0,0 +1,84 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V3322 { -+ -+ private static final int VERSION = MCVersions.V23W04A + 1; -+ -+ private static final Set EFFECT_ITEM_TYPES = new HashSet<>( -+ Set.of( -+ "minecraft:potion", -+ "minecraft:splash_potion", -+ "minecraft:lingering_potion", -+ "minecraft:tipped_arrow" -+ ) -+ ); -+ -+ private static void updateEffectList(final MapType root, final String path) { -+ if (root == null) { -+ return; -+ } -+ -+ final ListType effects = root.getList(path, ObjectType.MAP); -+ -+ if (effects == null) { -+ return; -+ } -+ -+ for (int i = 0, len = effects.size(); i < len; ++i) { -+ final MapType data = effects.getMap(i); -+ final MapType factorData = data.getMap("FactorCalculationData"); -+ if (factorData == null) { -+ continue; -+ } -+ -+ final int timestamp = factorData.getInt("effect_changed_timestamp", -1); -+ factorData.remove("effect_changed_timestamp"); -+ -+ final int duration = data.getInt("Duration", -1); -+ -+ final int ticksActive = timestamp - duration; -+ factorData.setInt("ticks_active", ticksActive); -+ } -+ } -+ -+ public static void register() { -+ final DataConverter entityEffectFix = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateEffectList(data, "Effects"); -+ updateEffectList(data, "ActiveEffects"); -+ updateEffectList(data, "CustomPotionEffects"); -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.PLAYER.addStructureConverter(entityEffectFix); -+ MCTypeRegistry.ENTITY.addStructureConverter(entityEffectFix); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ if (!EFFECT_ITEM_TYPES.contains(id)) { -+ return null; -+ } -+ -+ updateEffectList(data.getMap("tag"), "CustomPotionEffects"); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3322() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3325.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3325.java -new file mode 100644 -index 0000000000000000000000000000000000000000..eeba493c110f645b8f95e8229a256a6b90e03e85 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3325.java -@@ -0,0 +1,19 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+ -+public final class V3325 { -+ -+ private static final int VERSION = MCVersions.V23W05A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:item_display", new DataWalkerItems("item")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:block_display", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "block_state")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:text_display", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "text")); -+ } -+ -+ private V3325() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3326.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3326.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9e72885b5f7f15b3a02a99ab3fb054f7f6375aa8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3326.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3326 { -+ -+ private static final int VERSION = MCVersions.V23W06A; -+ -+ public static void register() { -+ //registerMob("minecraft:sniffer"); // changed to simple in 1.21.5 -+ } -+ -+ private V3326() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3327.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3327.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7051d4f01b6f43f3d435d21d65b83ba702ffda41 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3327.java -@@ -0,0 +1,19 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerListPaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+ -+public final class V3327 { -+ -+ private static final int VERSION = MCVersions.V23W06A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:decorated_pot", new DataWalkerListPaths<>(MCTypeRegistry.ITEM_NAME, "shards")); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:decorated_pot", new DataWalkerItems("item")); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:suspicious_sand", new DataWalkerItems("item")); -+ } -+ -+ private V3327() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3328.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3328.java -new file mode 100644 -index 0000000000000000000000000000000000000000..75a3cbc8e6749abd4bceff710d2f7c3ca6df9d70 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3328.java -@@ -0,0 +1,15 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V3328 { -+ -+ private static final int VERSION = MCVersions.V23W06A + 2; -+ -+ public static void register() { -+ // registers simple entity "minecraft:interaction" -+ } -+ -+ private V3328() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3438.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3438.java -new file mode 100644 -index 0000000000000000000000000000000000000000..203dfd16e37870b549e92ddd1483adeebbdbd9a4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3438.java -@@ -0,0 +1,46 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.tileentity.ConverterAbstractTileEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3438 { -+ -+ public static final int VERSION = MCVersions.V1_19_4 + 101; -+ -+ public static void register() { -+ // brushable block rename -+ MCTypeRegistry.TILE_ENTITY.copyWalkers(VERSION, "minecraft:suspicious_sand", "minecraft:brushable_block"); -+ -+ ConverterAbstractTileEntityRename.register(VERSION, new HashMap<>(Map.of( -+ "minecraft:suspicious_sand", "minecraft:brushable_block" -+ ))::get); -+ -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:brushable_block", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "loot_table", "LootTable"); -+ RenameHelper.renameSingle(data, "loot_table_seed", "LootTableSeed"); -+ return null; -+ } -+ }); -+ -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ Map.of( -+ "minecraft:pottery_shard_archer", "minecraft:archer_pottery_shard", -+ "minecraft:pottery_shard_prize", "minecraft:prize_pottery_shard", -+ "minecraft:pottery_shard_arms_up", "minecraft:arms_up_pottery_shard", -+ "minecraft:pottery_shard_skull", "minecraft:skull_pottery_shard" -+ ) -+ )::get); -+ } -+ -+ private V3438() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3439.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3439.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d449c62b7be3748dfc34c11cf4d929974c9a5191 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3439.java -@@ -0,0 +1,119 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3439 { -+ -+ private static final int VERSION = MCVersions.V1_19_4 + 102; -+ -+ private static void handleSignText(final MapType text, final long fromVersion, final long toVersion) { -+ if (text == null) { -+ return; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, text, "messages", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, text, "filtered_messages", fromVersion, toVersion); -+ } -+ -+ static void registerSign(final int version, final String id) { -+ MCTypeRegistry.TILE_ENTITY.addWalker(version, id, (final MapType data, final long fromVersion, final long toVersion) -> { -+ handleSignText(data.getMap("front_text"), fromVersion, toVersion); -+ handleSignText(data.getMap("back_text"), fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ public static void register() { -+ final DataConverter signTileUpdater = new DataConverter<>(VERSION) { -+ private static final String DEFAULT_COLOR = "black"; -+ -+ private static ListType migrateToList(final MapType root, final String prefix) { -+ if (root == null) { -+ return null; -+ } -+ -+ final ListType ret = root.getTypeUtil().createEmptyList(); -+ -+ ret.addString(root.getString(prefix.concat("1"), ComponentUtils.EMPTY)); -+ ret.addString(root.getString(prefix.concat("2"), ComponentUtils.EMPTY)); -+ ret.addString(root.getString(prefix.concat("3"), ComponentUtils.EMPTY)); -+ ret.addString(root.getString(prefix.concat("4"), ComponentUtils.EMPTY)); -+ -+ return ret; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ // front text -+ final MapType frontText = data.getTypeUtil().createEmptyMap(); -+ data.setMap("front_text", frontText); -+ -+ final ListType frontMessages = migrateToList(data, "Text"); -+ frontText.setList("messages", frontMessages); -+ -+ ListType frontFilteredMessages = null; -+ -+ for (int i = 0; i < 4; ++i) { -+ final String filtered = data.getString("FilteredText" + i); -+ if (filtered == null) { -+ if (frontFilteredMessages != null) { -+ frontFilteredMessages.addString(frontMessages.getString(i)); -+ } -+ continue; -+ } -+ -+ if (frontFilteredMessages == null) { -+ frontFilteredMessages = data.getTypeUtil().createEmptyList(); -+ for (int k = 0; k < i; ++k) { -+ frontFilteredMessages.addString(frontMessages.getString(k)); -+ } -+ } -+ -+ frontFilteredMessages.addString(filtered); -+ } -+ -+ if (frontFilteredMessages != null) { -+ frontText.setList("filtered_messages", frontFilteredMessages); -+ } -+ -+ frontText.setString("color", data.getString("Color", DEFAULT_COLOR)); -+ frontText.setBoolean("has_glowing_text", data.getBoolean("GlowingText", false)); -+ frontText.setBoolean("_filtered_correct", true); -+ -+ // back text -+ final MapType backText = data.getTypeUtil().createEmptyMap(); -+ data.setMap("back_text", backText); -+ -+ final ListType blankMessages = data.getTypeUtil().createEmptyList(); -+ backText.setList("messages", blankMessages); -+ -+ for (int i = 0; i < 4; ++i) { -+ blankMessages.addString(ComponentUtils.EMPTY); -+ } -+ -+ backText.setString("color", DEFAULT_COLOR); -+ backText.setBoolean("has_glowing_text", false); -+ -+ // misc -+ data.setBoolean("is_waxed", false); -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:sign", signTileUpdater); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:hanging_sign", signTileUpdater); -+ -+ registerSign(VERSION, "minecraft:sign"); -+ // in 1.21.6 this was changed to a subversion. I don't see why we need that change. -+ registerSign(VERSION, "minecraft:hanging_sign"); -+ } -+ -+ private V3439() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3440.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3440.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5cc9844fb342731e997b449e9b711c3b6d8e5762 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3440.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.ConverterAbstractStringValueTypeRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.leveldat.ConverterRemoveFeatureFlag; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+import java.util.Arrays; -+import java.util.HashSet; -+ -+public final class V3440 { -+ -+ private static final int VERSION = MCVersions.V1_19_4 + 103; -+ -+ public static void register() { -+ // Note: MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST is namespaced string -+ ConverterAbstractStringValueTypeRename.register(VERSION, MCTypeRegistry.MULTI_NOISE_BIOME_SOURCE_PARAMETER_LIST, (final String in) -> { -+ return "minecraft:overworld_update_1_20".equals(NamespaceUtil.correctNamespace(in)) ? "minecraft:overworld" : null; -+ }); -+ MCTypeRegistry.LIGHTWEIGHT_LEVEL.addStructureConverter(new ConverterRemoveFeatureFlag(VERSION, new HashSet<>( -+ Arrays.asList( -+ "minecraft:update_1_20" -+ ) -+ ))); -+ } -+ -+ private V3440() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3441.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3441.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2cf41561b4a229ba4d60540f85ba0a8946bb9753 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3441.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.chunk.ConverterAddBlendingData; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V3441 { -+ -+ private static final int VERSION = MCVersions.V1_19_4 + 104; -+ -+ public static void register() { -+ // See V3088 for why this converter is duplicated here and in V3088 -+ MCTypeRegistry.CHUNK.addStructureConverter(new ConverterAddBlendingData(VERSION)); -+ } -+ -+ private V3441() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3447.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3447.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5db4a5222bf80f01c128d97ec849b89003837beb ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3447.java -@@ -0,0 +1,49 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3447 { -+ -+ private static final int VERSION = MCVersions.V23W14A + 2; -+ -+ public static void register() { -+ final String[] targets = new String[] { -+ "minecraft:angler_pottery_shard", -+ "minecraft:archer_pottery_shard", -+ "minecraft:arms_up_pottery_shard", -+ "minecraft:blade_pottery_shard", -+ "minecraft:brewer_pottery_shard", -+ "minecraft:burn_pottery_shard", -+ "minecraft:danger_pottery_shard", -+ "minecraft:explorer_pottery_shard", -+ "minecraft:friend_pottery_shard", -+ "minecraft:heart_pottery_shard", -+ "minecraft:heartbreak_pottery_shard", -+ "minecraft:howl_pottery_shard", -+ "minecraft:miner_pottery_shard", -+ "minecraft:mourner_pottery_shard", -+ "minecraft:plenty_pottery_shard", -+ "minecraft:prize_pottery_shard", -+ "minecraft:sheaf_pottery_shard", -+ "minecraft:shelter_pottery_shard", -+ "minecraft:skull_pottery_shard", -+ "minecraft:snort_pottery_shard" -+ }; -+ // shard->sherd -+ final Map rename = new HashMap<>(targets.length); -+ -+ for (final String target : targets) { -+ final String replace = target.replace("_pottery_shard", "_pottery_sherd"); -+ if (rename.put(target, replace) != null) { -+ throw new IllegalArgumentException("Duplicate target " + target); -+ } -+ } -+ -+ ConverterAbstractItemRename.register(VERSION, rename::get); -+ } -+ -+ private V3447() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3448.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3448.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b9d7e81938320a30fb881a6be9e377aea4c75cec ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3448.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerListPaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3448 { -+ -+ private static final int VERSION = MCVersions.V23W14A + 3; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:decorated_pot", new DataWalkerListPaths<>(MCTypeRegistry.ITEM_NAME, "sherds")); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:decorated_pot", new DataWalkerItems("item")); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:decorated_pot", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "shards", "sherds"); -+ return null; -+ } -+ }); -+ } -+ -+ private V3448() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3450.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3450.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9e7f34a40280a7704c4a4d1c03a7dda8e030aff5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3450.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.chunk.ConverterRenameStatus; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3450 { -+ -+ private static final int VERSION = MCVersions.V23W16A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new ConverterRenameStatus(VERSION, new HashMap<>( -+ Map.of( -+ "minecraft:liquid_carvers", "minecraft:carvers", -+ "minecraft:heightmaps", "minecraft:spawn" -+ ) -+ )::get)); -+ } -+ -+ private V3450() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3451.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3451.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7383d49edd6998ce93b13e135dcad43145c4e23a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3451.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3451 { -+ -+ private static final int VERSION = MCVersions.V23W16A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.remove("isLightOn"); -+ -+ final ListType sections = data.getList("sections", ObjectType.MAP); -+ if (sections == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = sections.size(); i < len; ++i) { -+ final MapType section = sections.getMap(i); -+ -+ section.remove("BlockLight"); -+ section.remove("SkyLight"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3451() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3459.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3459.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6ef8c0f17c49405e38f299891c98791905e572de ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3459.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3459 { -+ -+ private static final int VERSION = MCVersions.V1_20_PRE5 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.LEVEL.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.hasKey("DragonFight")) { -+ return null; -+ } -+ -+ final MapType dimensionData = data.getMap("DimensionData"); -+ if (dimensionData == null) { -+ return null; -+ } -+ -+ final MapType endData = dimensionData.getMap("1"); -+ if (endData != null) { -+ final MapType dragonFight = endData.getMap("DragonFight", endData.getTypeUtil().createEmptyMap()).copy(); -+ V3807.flattenBlockPos(dragonFight, "ExitPortalLocation"); -+ data.setMap("DragonFight", dragonFight); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3459() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3564.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3564.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8448981de260b7af33ea8ed62866b6fb95f544e5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3564.java -@@ -0,0 +1,94 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3564 { -+ -+ private static final int VERSION = MCVersions.V1_20_1 + 99; -+ -+ public static void register() { -+ final DataConverter converter = new DataConverter<>(VERSION) { -+ -+ private static final String[] LEGACY_FIELDS = new String[] { -+ "Text1", -+ "Text2", -+ "Text3", -+ "Text4", -+ -+ "FilteredText1", -+ "FilteredText2", -+ "FilteredText3", -+ "FilteredText4", -+ -+ "Color", -+ -+ "GlowingText" -+ }; -+ -+ -+ private static void updateText(final MapType text) { -+ if (text == null) { -+ return; -+ } -+ -+ if (text.getBoolean("_filtered_correct", false)) { -+ text.remove("_filtered_correct"); -+ return; -+ } -+ -+ final ListType filteredMessages = text.getList("filtered_messages", ObjectType.STRING); -+ -+ if (filteredMessages == null || filteredMessages.size() == 0) { -+ return; -+ } -+ -+ // should treat null here as empty list -+ final ListType messages = text.getList("messages", ObjectType.STRING); -+ -+ final ListType newFilteredList = filteredMessages.getTypeUtil().createEmptyList(); -+ boolean newFilteredIsEmpty = true; -+ -+ for (int i = 0, len = filteredMessages.size(); i < len; ++i) { -+ final String filtered = filteredMessages.getString(i); -+ final String message = messages != null && i < messages.size() ? messages.getString(i) : ComponentUtils.EMPTY; -+ -+ final String newFiltered = ComponentUtils.EMPTY.equals(filtered) ? message : filtered; -+ -+ newFilteredList.addString(newFiltered); -+ -+ newFilteredIsEmpty = newFilteredIsEmpty && ComponentUtils.EMPTY.equals(newFiltered); -+ } -+ -+ if (newFilteredIsEmpty) { -+ text.remove("filtered_messages"); -+ } else { -+ text.setList("filtered_messages", newFilteredList); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ updateText(data.getMap("front_text")); -+ updateText(data.getMap("back_text")); -+ -+ for (final String toRemove : LEGACY_FIELDS) { -+ data.remove(toRemove); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:sign", converter); -+ // I don't know why this was moved to a sub version, but we don't need to do that. -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:hanging_sign", converter); -+ } -+ -+ private V3564() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3565.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3565.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d0e6bcd9c4b48743a522ea2b79fa97fe27eb8cc8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3565.java -@@ -0,0 +1,32 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3565 { -+ -+ private static final int VERSION = MCVersions.V1_20_1 + 100; -+ -+ public static void register() { -+ MCTypeRegistry.SAVED_DATA_RANDOM_SEQUENCES.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType oldData = root.getMap("data"); -+ if (oldData == null) { -+ return null; -+ } -+ -+ final MapType newData = root.getTypeUtil().createEmptyMap(); -+ root.setMap("data", newData); -+ -+ newData.setMap("sequences", oldData); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3565() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3566.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3566.java -new file mode 100644 -index 0000000000000000000000000000000000000000..cae496fd174ac38b36885bdfa36805cd5c8321be ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3566.java -@@ -0,0 +1,58 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3566 { -+ -+ private static final int VERSION = MCVersions.V1_20_1 + 101; -+ -+ public static void register() { -+ MCTypeRegistry.SAVED_DATA_SCOREBOARD.addStructureConverter(new DataConverter<>(VERSION) { -+ -+ private static final Map SLOT_RENAMES = new HashMap<>( -+ ImmutableMap.builder() -+ .put("slot_0", "list") -+ .put("slot_1", "sidebar") -+ .put("slot_2", "below_name") -+ .put("slot_3", "sidebar.team.black") -+ .put("slot_4", "sidebar.team.dark_blue") -+ .put("slot_5", "sidebar.team.dark_green") -+ .put("slot_6", "sidebar.team.dark_aqua") -+ .put("slot_7", "sidebar.team.dark_red") -+ .put("slot_8", "sidebar.team.dark_purple") -+ .put("slot_9", "sidebar.team.gold") -+ .put("slot_10", "sidebar.team.gray") -+ .put("slot_11", "sidebar.team.dark_gray") -+ .put("slot_12", "sidebar.team.blue") -+ .put("slot_13", "sidebar.team.green") -+ .put("slot_14", "sidebar.team.aqua") -+ .put("slot_15", "sidebar.team.red") -+ .put("slot_16", "sidebar.team.light_purple") -+ .put("slot_17", "sidebar.team.yellow") -+ .put("slot_18", "sidebar.team.white") -+ .build() -+ ); -+ -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ RenameHelper.renameKeys(data.getMap("DisplaySlots"), SLOT_RENAMES::get); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3566() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3568.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3568.java -new file mode 100644 -index 0000000000000000000000000000000000000000..96a7c836b278a150164c7632a5b88c14a2978d52 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3568.java -@@ -0,0 +1,245 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Map; -+import java.util.Set; -+ -+public final class V3568 { -+ -+ private static final int VERSION = MCVersions.V23W31A + 1; -+ -+ private static final String[] EFFECT_ID_MAP = new String[34]; -+ static { -+ EFFECT_ID_MAP[1] = "minecraft:speed"; -+ EFFECT_ID_MAP[2] = "minecraft:slowness"; -+ EFFECT_ID_MAP[3] = "minecraft:haste"; -+ EFFECT_ID_MAP[4] = "minecraft:mining_fatigue"; -+ EFFECT_ID_MAP[5] = "minecraft:strength"; -+ EFFECT_ID_MAP[6] = "minecraft:instant_health"; -+ EFFECT_ID_MAP[7] = "minecraft:instant_damage"; -+ EFFECT_ID_MAP[8] = "minecraft:jump_boost"; -+ EFFECT_ID_MAP[9] = "minecraft:nausea"; -+ EFFECT_ID_MAP[10] = "minecraft:regeneration"; -+ EFFECT_ID_MAP[11] = "minecraft:resistance"; -+ EFFECT_ID_MAP[12] = "minecraft:fire_resistance"; -+ EFFECT_ID_MAP[13] = "minecraft:water_breathing"; -+ EFFECT_ID_MAP[14] = "minecraft:invisibility"; -+ EFFECT_ID_MAP[15] = "minecraft:blindness"; -+ EFFECT_ID_MAP[16] = "minecraft:night_vision"; -+ EFFECT_ID_MAP[17] = "minecraft:hunger"; -+ EFFECT_ID_MAP[18] = "minecraft:weakness"; -+ EFFECT_ID_MAP[19] = "minecraft:poison"; -+ EFFECT_ID_MAP[20] = "minecraft:wither"; -+ EFFECT_ID_MAP[21] = "minecraft:health_boost"; -+ EFFECT_ID_MAP[22] = "minecraft:absorption"; -+ EFFECT_ID_MAP[23] = "minecraft:saturation"; -+ EFFECT_ID_MAP[24] = "minecraft:glowing"; -+ EFFECT_ID_MAP[25] = "minecraft:levitation"; -+ EFFECT_ID_MAP[26] = "minecraft:luck"; -+ EFFECT_ID_MAP[27] = "minecraft:unluck"; -+ EFFECT_ID_MAP[28] = "minecraft:slow_falling"; -+ EFFECT_ID_MAP[29] = "minecraft:conduit_power"; -+ EFFECT_ID_MAP[30] = "minecraft:dolphins_grace"; -+ EFFECT_ID_MAP[31] = "minecraft:bad_omen"; -+ EFFECT_ID_MAP[32] = "minecraft:hero_of_the_village"; -+ EFFECT_ID_MAP[33] = "minecraft:darkness"; -+ } -+ private static final Set EFFECT_ITEMS = -+ new HashSet<>( -+ Set.of( -+ "minecraft:potion", -+ "minecraft:splash_potion", -+ "minecraft:lingering_potion", -+ "minecraft:tipped_arrow" -+ ) -+ ); -+ -+ private static String readLegacyEffect(final MapType data, final String path) { -+ final Number id = data.getNumber(path); -+ if (id == null) { -+ return null; -+ } -+ -+ final int castedId = id.intValue(); -+ return castedId >= 0 && castedId < EFFECT_ID_MAP.length ? EFFECT_ID_MAP[castedId] : null; -+ } -+ -+ private static void convertLegacyEffect(final MapType data, final String legacyPath, final String newPath) { -+ final Number id = data.getNumber(legacyPath); -+ data.remove(legacyPath); -+ -+ if (id == null) { -+ return; -+ } -+ -+ final int castedId = id.intValue(); -+ final String newId = castedId >= 0 && castedId < EFFECT_ID_MAP.length ? EFFECT_ID_MAP[castedId] : null; -+ -+ if (newId == null) { -+ return; -+ } -+ -+ data.setString(newPath, newId); -+ } -+ -+ private static final Map MOB_EFFECT_RENAMES = new HashMap<>(); -+ static { -+ MOB_EFFECT_RENAMES.put("Ambient", "ambient"); -+ MOB_EFFECT_RENAMES.put("Amplifier", "amplifier"); -+ MOB_EFFECT_RENAMES.put("Duration", "duration"); -+ MOB_EFFECT_RENAMES.put("ShowParticles", "show_particles"); -+ MOB_EFFECT_RENAMES.put("ShowIcon", "show_icon"); -+ MOB_EFFECT_RENAMES.put("FactorCalculationData", "factor_calculation_data"); -+ MOB_EFFECT_RENAMES.put("HiddenEffect", "hidden_effect"); -+ } -+ -+ private static void convertMobEffect(final MapType mobEffect) { -+ if (mobEffect == null) { -+ return; -+ } -+ -+ convertLegacyEffect(mobEffect, "Id", "id"); -+ -+ for (final Map.Entry rename : MOB_EFFECT_RENAMES.entrySet()) { -+ RenameHelper.renameSingle(mobEffect, rename.getKey(), rename.getValue()); -+ } -+ -+ convertMobEffect(mobEffect.getMap("hidden_effect")); -+ } -+ -+ private static void convertMobEffectList(final MapType data, final String oldPath, final String newPath) { -+ final ListType effects = data.getList(oldPath, ObjectType.MAP); -+ if (effects == null) { -+ return; -+ } -+ -+ for (int i = 0, len = effects.size(); i < len; ++i) { -+ convertMobEffect(effects.getMap(i)); -+ } -+ -+ data.remove(oldPath); -+ data.setList(newPath, effects); -+ } -+ -+ private static void removeAndSet(final MapType data, final String toRemovePath, -+ final String toSetPath, final Object toSet) { -+ data.remove(toRemovePath); -+ if (toSet != null) { -+ data.setGeneric(toSetPath, toSet); -+ } -+ } -+ -+ private static void updateSuspiciousStew(final MapType from, final MapType into) { -+ removeAndSet(into, "EffectId", "id", readLegacyEffect(from, "EffectId")); -+ removeAndSet(into, "EffectDuration", "duration", from.getGeneric("EffectDuration")); -+ } -+ -+ public static void register() { -+ final DataConverter beaconConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertLegacyEffect(data, "Primary", "primary_effect"); -+ convertLegacyEffect(data, "Secondary", "secondary_effect"); -+ -+ return null; -+ } -+ }; -+ -+ final DataConverter mooshroomConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType newEffect = data.getTypeUtil().createEmptyMap(); -+ updateSuspiciousStew(data, newEffect); -+ -+ data.remove("EffectId"); -+ data.remove("EffectDuration"); -+ -+ if (!newEffect.isEmpty()) { -+ final ListType stewEffects = data.getTypeUtil().createEmptyList(); -+ data.setList("stew_effects", stewEffects); -+ -+ stewEffects.addMap(newEffect); -+ } -+ -+ return null; -+ } -+ }; -+ final DataConverter arrowConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertMobEffectList(data, "CustomPotionEffects", "custom_potion_effects"); -+ return null; -+ } -+ }; -+ final DataConverter areaEffectCloudConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertMobEffectList(data, "Effects", "effects"); -+ return null; -+ } -+ }; -+ final DataConverter livingEntityConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertMobEffectList(data, "ActiveEffects", "active_effects"); -+ return null; -+ } -+ }; -+ -+ final DataConverter itemConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final String id = root.getString("id"); -+ -+ final MapType tag = root.getMap("tag"); -+ -+ if (tag == null) { -+ return null; -+ } -+ -+ if ("minecraft:suspicious_stew".equals(id)) { -+ RenameHelper.renameSingle(tag, "Effects", "effects"); -+ -+ final ListType effects = tag.getList("effects", ObjectType.MAP); -+ -+ if (effects != null) { -+ for (int i = 0, len = effects.size(); i < len; ++i) { -+ final MapType effect = effects.getMap(i); -+ updateSuspiciousStew(effect, effect); -+ } -+ } -+ -+ return null; -+ } -+ -+ if (EFFECT_ITEMS.contains(id)) { -+ convertMobEffectList(tag, "CustomPotionEffects", "custom_potion_effects"); -+ return null; -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:beacon", beaconConverter); -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:mooshroom", mooshroomConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:arrow", arrowConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:area_effect_cloud", areaEffectCloudConverter); -+ MCTypeRegistry.ENTITY.addStructureConverter(livingEntityConverter); -+ -+ MCTypeRegistry.PLAYER.addStructureConverter(livingEntityConverter); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(itemConverter); -+ } -+ -+ private V3568() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3682.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3682.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ba7e9c7c17a36222e384c78f6a260a97490a3610 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3682.java -@@ -0,0 +1,16 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V3682 { -+ -+ private static final int VERSION = MCVersions.V23W41A + 1; -+ -+ public static void register() { -+ V1458.namedInventory(VERSION, "minecraft:crafter"); -+ } -+ -+ private V3682() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3683.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3683.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d91b8d638af2d104de989bdf727f74914727fbd8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3683.java -@@ -0,0 +1,33 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3683 { -+ -+ private static final int VERSION = MCVersions.V23W41A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:tnt", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "Fuse", "fuse"); -+ -+ final MapType defaultState = data.getTypeUtil().createEmptyMap(); -+ data.setMap("block_state", defaultState); -+ -+ defaultState.setString("Name", "minecraft:tnt"); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:tnt", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "block_state")); -+ } -+ -+ private V3683() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3685.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3685.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4393d5395259f9aaf941ad15352ac6615f44841a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3685.java -@@ -0,0 +1,64 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+ -+public final class V3685 { -+ -+ private static final int VERSION = MCVersions.V23W42A + 1; -+ -+ private static String getType(final MapType arrow) { -+ return "minecraft:empty".equals(arrow.getString("Potion", "minecraft:empty")) ? "minecraft:arrow" : "minecraft:tipped_arrow"; -+ } -+ -+ private static MapType createItem(final TypeUtil util, final String id, final int count) { -+ final MapType ret = util.createEmptyMap(); -+ -+ ret.setString("id", id); -+ ret.setInt("Count", count); -+ -+ return ret; -+ } -+ -+ private static void registerArrowEntity(final String id) { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "inBlockState")); -+ // new: item -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerItems("item")); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trident", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "Trident", "item"); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:arrow", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setMap("item", createItem(data.getTypeUtil(), getType(data), 1)); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:spectral_arrow", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setMap("item", createItem(data.getTypeUtil(), "minecraft:spectral_arrow", 1)); -+ return null; -+ } -+ }); -+ -+ registerArrowEntity("minecraft:trident"); -+ registerArrowEntity("minecraft:spectral_arrow"); -+ registerArrowEntity("minecraft:arrow"); -+ } -+ -+ private V3685() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3689.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3689.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b3a8af24d80ed3fa9f205eb8d97bbd1defb9cbc8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3689.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3689 { -+ -+ private static final int VERSION = MCVersions.V23W44A + 1; -+ -+ public static void register() { -+ //registerMob("minecraft:breeze"); // changed to simple in 1.21.5 -+ // minecraft:wind_charge is a simple entity -+ // minecraft:breeze_wind_charge is a simple entity -+ -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:trial_spawner", (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, data, "spawn_potentials", "data", "entity", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data.getMap("spawn_data"), "entity", fromVersion, toVersion); -+ return null; -+ }); -+ } -+ -+ private V3689() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3692.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3692.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1fc62f9cadb990790420376d5c80b14775b71a48 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3692.java -@@ -0,0 +1,25 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.blockname.ConverterAbstractBlockRename; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3692 { -+ -+ private static final int VERSION = MCVersions.V23W46A + 1; -+ -+ private static final Map GRASS_RENAME = new HashMap<>( -+ Map.of( -+ "minecraft:grass", "minecraft:short_grass" -+ ) -+ ); -+ -+ public static void register() { -+ ConverterAbstractBlockRename.register(VERSION, GRASS_RENAME::get); -+ ConverterAbstractItemRename.register(VERSION, GRASS_RENAME::get); -+ } -+ -+ private V3692() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3799.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3799.java -new file mode 100644 -index 0000000000000000000000000000000000000000..546d69f22b52f00cf2fa9bacc5fda6d2f116f148 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3799.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V3799 { -+ -+ private static final int VERSION = MCVersions.V1_20_4 + 99; -+ -+ public static void register() { -+ //V100.registerEquipment(VERSION, "minecraft:armadillo"); // changed to simple in 1.21.5 -+ } -+ -+ private V3799() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3800.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3800.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a40397feb5962bd5f4a44cc85bb359f5f99ff03a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3800.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3800 { -+ -+ private static final int VERSION = MCVersions.V1_20_4 + 100; -+ -+ public static void register() { -+ final Map renames = new HashMap<>( -+ Map.of( -+ "minecraft:scute", "minecraft:turtle_scute" -+ ) -+ ); -+ -+ ConverterAbstractItemRename.register(VERSION, renames::get); -+ } -+ -+ private V3800() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3803.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3803.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7ff5e2f1a386d75b6d0d6fc3160f2241bf74b262 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3803.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterEnchantmentsRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3803 { -+ -+ private static final int VERSION = MCVersions.V23W51B + 1; -+ -+ public static void register() { -+ final Map renames = new HashMap<>( -+ Map.of( -+ "minecraft:sweeping", "minecraft:sweeping_edge" -+ ) -+ ); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new ConverterEnchantmentsRename(VERSION, renames::get)); -+ } -+ -+ private V3803() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3807.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3807.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b329a8086c695c1c16ece6dd40c0cbfdc3d04835 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3807.java -@@ -0,0 +1,72 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3807 { -+ -+ private static final int VERSION = MCVersions.V24W04A + 1; -+ -+ public static void flattenBlockPos(final MapType data, final String path) { -+ if (data == null) { -+ return; -+ } -+ -+ final MapType pos = data.getMap(path); -+ if (pos == null) { -+ return; -+ } -+ -+ final Number x = pos.getNumber("X"); -+ final Number y = pos.getNumber("Y"); -+ final Number z = pos.getNumber("Z"); -+ -+ if (x == null || y == null || z == null) { -+ return; -+ } -+ -+ data.setInts(path, new int[] { x.intValue(), y.intValue(), z.intValue() }); -+ } -+ -+ public static void register() { -+ // Step 0 -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:vault", (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root.getMap("config"), "key_item", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root.getMap("server_data"), "items_to_eject", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root.getMap("shared_data"), "display_item", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Step 1 -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureConverter(new DataConverter<>(VERSION, 1) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ -+ if (data == null) { -+ return null; -+ } -+ -+ final ListType banners = data.getList("banners", ObjectType.MAP); -+ -+ if (banners == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = banners.size(); i < len; ++i) { -+ V3807.flattenBlockPos(banners.getMap(i), "Pos"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3807() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3808.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3808.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c7c4f912d9baf6df0392aee3c73f8f0a8ad938c3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3808.java -@@ -0,0 +1,79 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3808 { -+ -+ private static final int VERSION = MCVersions.V24W04A + 2; -+ -+ public static void register() { -+ class BodyArmorConverter extends DataConverter { -+ private final String path; -+ private final boolean clearArmor; -+ -+ public BodyArmorConverter(final int toVersion, final String path, final boolean clearArmor) { -+ this(toVersion, 0, path, clearArmor); -+ } -+ -+ public BodyArmorConverter(final int toVersion, final int versionStep, final String path, final boolean clearArmor) { -+ super(toVersion, versionStep); -+ -+ this.path = path; -+ this.clearArmor = clearArmor; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType prev = data.getMap(this.path); -+ -+ if (prev == null) { -+ return null; -+ } -+ -+ data.remove(this.path); -+ -+ data.setMap("body_armor_item", prev); -+ data.setFloat("body_armor_drop_chance", 2.0F); -+ -+ if (this.clearArmor) { -+ final ListType armor = data.getList("ArmorItems", ObjectType.MAP); -+ if (armor != null && armor.size() > 2) { -+ armor.setMap(2, data.getTypeUtil().createEmptyMap()); -+ } -+ -+ final ListType chances = data.getList("ArmorDropChances", ObjectType.FLOAT); -+ if (chances != null && chances.size() > 2) { -+ chances.setFloat(2, 0.085F); -+ } -+ } -+ -+ return null; -+ } -+ } -+ -+ // Step 0 -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:horse", new BodyArmorConverter(VERSION, "ArmorItem", true)); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:horse", new DataWalkerItems("SaddleItem")); -+ -+ // Step 1 -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:llama", new BodyArmorConverter(VERSION, 1, "DecorItem", false)); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 1, "minecraft:llama", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 1, "minecraft:llama", new DataWalkerItems("SaddleItem")); -+ -+ // Step 2 -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trader_llama", new BodyArmorConverter(VERSION, 2, "DecorItem", false)); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 2, "minecraft:trader_llama", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, 2, "minecraft:trader_llama", new DataWalkerItems("SaddleItem")); -+ } -+ -+ private V3808() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3809.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3809.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a5d3efbf4b32e813a66c2be700123a6f4cae4f28 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3809.java -@@ -0,0 +1,41 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3809 { -+ -+ private static final int VERSION = MCVersions.V24W05A; -+ -+ public static void register() { -+ final DataConverter slotConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType items = data.getList("Items", ObjectType.MAP); -+ if (items == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = items.size(); i < len; ++i) { -+ final MapType item = items.getMap(i); -+ -+ final int slot = item.getInt("Slot", 2); -+ item.setByte("Slot", (byte)(slot - 2)); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:llama", slotConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trader_llama", slotConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:mule", slotConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:donkey", slotConverter); -+ } -+ -+ private V3809() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3812.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3812.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8465ca45a23c940bcab16450598562cf8c037051 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3812.java -@@ -0,0 +1,48 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public final class V3812 { -+ -+ private static final int VERSION = MCVersions.V24W05B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:wolf", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ boolean doubleHealth = false; -+ -+ final ListType attributes = data.getList("Attributes", ObjectType.MAP); -+ if (attributes != null) { -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ final MapType attribute = attributes.getMap(i); -+ -+ if (!"minecraft:generic.max_health".equals(NamespaceUtil.correctNamespace(attribute.getString("Name")))) { -+ continue; -+ } -+ -+ final double base = attribute.getDouble("Base", 0.0D); -+ if (base == 20.0D) { -+ attribute.setDouble("Base", 40.0D); -+ doubleHealth = true; -+ } -+ } -+ } -+ -+ if (doubleHealth) { -+ data.setFloat("Health", data.getFloat("Health", 0.0F) * 2.0F); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3812() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3813.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3813.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8169c681b04f0d6dfd21c890ae4123d638ca4513 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3813.java -@@ -0,0 +1,137 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+ -+public final class V3813 { -+ -+ private static final int VERSION = MCVersions.V24W05B + 2; -+ -+ private static final String[] PATROLLING_MOBS = new String[] { -+ "minecraft:witch", -+ "minecraft:ravager", -+ "minecraft:pillager", -+ "minecraft:illusioner", -+ "minecraft:evoker", -+ "minecraft:vindicator" -+ }; -+ -+ public static void register() { -+ class RootPositionConverter extends DataConverter { -+ private final RenamePair[] convert; -+ -+ public RootPositionConverter(final int toVersion, final RenamePair[] convert) { -+ this(toVersion, 0, convert); -+ } -+ -+ public RootPositionConverter(final int toVersion, final int versionStep, final RenamePair[] convert) { -+ super(toVersion, versionStep); -+ this.convert = convert; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ for (final RenamePair rename : this.convert) { -+ V3807.flattenBlockPos(data, rename.from); -+ RenameHelper.renameSingle(data, rename.from, rename.to); -+ } -+ return null; -+ } -+ } -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:bee", new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("HivePos", "hive_pos"), -+ new RenamePair("FlowerPos", "flower_pos") -+ })); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:end_crystal", new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("BeamTarget", "beam_target"), -+ })); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:wandering_trader", new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("WanderTarget", "wander_target"), -+ })); -+ -+ final RootPositionConverter patrolConverter = new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("PatrolTarget", "patrol_target"), -+ }); -+ for (final String id : PATROLLING_MOBS) { -+ MCTypeRegistry.ENTITY.addConverterForId(id, patrolConverter); -+ } -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("Leash", "leash"), -+ })); -+ -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:beehive", new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("FlowerPos", "flower_pos"), -+ })); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:end_gateway", new RootPositionConverter(VERSION, new RenamePair[] { -+ new RenamePair("ExitPortal", "exit_portal"), -+ })); -+ -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ -+ if (data == null) { -+ return null; -+ } -+ -+ final ListType frames = data.getList("frames", ObjectType.MAP); -+ if (frames != null) { -+ for (int i = 0, len = frames.size(); i < len; ++i) { -+ final MapType frame = frames.getMap(i); -+ -+ V3807.flattenBlockPos(frame, "Pos"); -+ -+ RenameHelper.renameSingle(frame, "Pos", "pos"); -+ RenameHelper.renameSingle(frame, "Rotation", "rotation"); -+ RenameHelper.renameSingle(frame, "EntityId", "entity_id"); -+ } -+ } -+ -+ final ListType banners = data.getList("banners", ObjectType.MAP); -+ for (int i = 0, len = banners.size(); i < len; ++i) { -+ final MapType banner = banners.getMap(i); -+ -+ RenameHelper.renameSingle(banner, "Pos", "pos"); -+ RenameHelper.renameSingle(banner, "Color", "color"); -+ RenameHelper.renameSingle(banner, "Name", "name"); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:compass", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ -+ if (tag == null) { -+ return null; -+ } -+ -+ V3807.flattenBlockPos(tag, "LodestonePos"); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.TEXT_COMPONENT, root.getMap("data"), "banners", "name", fromVersion, toVersion); -+ return null; -+ }); -+ } -+ -+ private V3813() {} -+ -+ private static record RenamePair(String from, String to) {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3814.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3814.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c4cc52620afb728533efe988bf2066ffc947f2d6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3814.java -@@ -0,0 +1,21 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.attributes.ConverterAbstractOldAttributesRename; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3814 { -+ -+ private static final int VERSION = MCVersions.V24W05B + 3; -+ -+ public static void register() { -+ final Map renames = new HashMap<>( -+ Map.of("minecraft:horse.jump_strength", "minecraft:generic.jump_strength") -+ ); -+ -+ ConverterAbstractOldAttributesRename.register(VERSION, renames::get); -+ } -+ -+ private V3814() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3816.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3816.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b339e9559a3b5cadfab5e0c79327acace4df04b8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3816.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V3816 { -+ -+ private static final int VERSION = MCVersions.V24W06A + 1; -+ -+ public static void register() { -+ //V100.registerEquipment(VERSION, "minecraft:bogged"); // changed to simple in 1.21.5 -+ } -+ -+ private V3816() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3818.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3818.java -new file mode 100644 -index 0000000000000000000000000000000000000000..96f21374468614655e8c25e314e18c92eba7b41a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3818.java -@@ -0,0 +1,361 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterItemStackToDataComponents; -+import ca.spottedleaf.dataconverter.minecraft.converters.particle.ConverterParticleToNBT; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.Types; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V3818 { -+ -+ private static final int VERSION = MCVersions.V24W07A + 1; -+ -+ private static final String[] BANNER_COLOURS = new String[] { -+ "white", -+ "orange", -+ "magenta", -+ "light_blue", -+ "yellow", -+ "lime", -+ "pink", -+ "gray", -+ "light_gray", -+ "cyan", -+ "purple", -+ "blue", -+ "brown", -+ "green", -+ "red", -+ "black", -+ }; -+ -+ public static String getBannerColour(final int id) { -+ return id >= 0 && id < BANNER_COLOURS.length ? BANNER_COLOURS[id] : BANNER_COLOURS[0]; -+ } -+ -+ public static void register() { -+ // Step 0 -+ // Note: No breakpoint needed, nothing nests hotbar -+ MCTypeRegistry.HOTBAR.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ for (final String key : data.keys()) { -+ final ListType itemList = data.getList(key, ObjectType.MAP); -+ if (itemList != null) { -+ for (int i = 0, len = itemList.size(); i < len; ++i) { -+ final MapType item = itemList.getMap(i); -+ -+ final String id = item.getString("id"); -+ final int count = item.getInt("Count"); -+ -+ if ("minecraft:air".equals(id) || count <= 0) { -+ itemList.setMap(i, item.getTypeUtil().createEmptyMap()); -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:beehive", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "Bees", "bees"); -+ -+ final ListType bees = data.getList("bees", ObjectType.MAP); -+ if (bees != null) { -+ for (int i = 0, len = bees.size(); i < len; ++i) { -+ final MapType bee = bees.getMap(i); -+ -+ RenameHelper.renameSingle(bee, "EntityData", "entity_data"); -+ RenameHelper.renameSingle(bee, "TicksInHive", "ticks_in_hive"); -+ RenameHelper.renameSingle(bee, "MinOccupationTicks", "min_ticks_in_hive"); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:beehive", (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, root, "bees", "entity_data", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Step 1 -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:banner", new DataConverter<>(VERSION, 1) { -+ private static final Map PATTERN_UPDATE = new HashMap<>(); -+ static { -+ PATTERN_UPDATE.put("b", "minecraft:base"); -+ PATTERN_UPDATE.put("bl", "minecraft:square_bottom_left"); -+ PATTERN_UPDATE.put("br", "minecraft:square_bottom_right"); -+ PATTERN_UPDATE.put("tl", "minecraft:square_top_left"); -+ PATTERN_UPDATE.put("tr", "minecraft:square_top_right"); -+ PATTERN_UPDATE.put("bs", "minecraft:stripe_bottom"); -+ PATTERN_UPDATE.put("ts", "minecraft:stripe_top"); -+ PATTERN_UPDATE.put("ls", "minecraft:stripe_left"); -+ PATTERN_UPDATE.put("rs", "minecraft:stripe_right"); -+ PATTERN_UPDATE.put("cs", "minecraft:stripe_center"); -+ PATTERN_UPDATE.put("ms", "minecraft:stripe_middle"); -+ PATTERN_UPDATE.put("drs", "minecraft:stripe_downright"); -+ PATTERN_UPDATE.put("dls", "minecraft:stripe_downleft"); -+ PATTERN_UPDATE.put("ss", "minecraft:small_stripes"); -+ PATTERN_UPDATE.put("cr", "minecraft:cross"); -+ PATTERN_UPDATE.put("sc", "minecraft:straight_cross"); -+ PATTERN_UPDATE.put("bt", "minecraft:triangle_bottom"); -+ PATTERN_UPDATE.put("tt", "minecraft:triangle_top"); -+ PATTERN_UPDATE.put("bts", "minecraft:triangles_bottom"); -+ PATTERN_UPDATE.put("tts", "minecraft:triangles_top"); -+ PATTERN_UPDATE.put("ld", "minecraft:diagonal_left"); -+ PATTERN_UPDATE.put("rd", "minecraft:diagonal_up_right"); -+ PATTERN_UPDATE.put("lud", "minecraft:diagonal_up_left"); -+ PATTERN_UPDATE.put("rud", "minecraft:diagonal_right"); -+ PATTERN_UPDATE.put("mc", "minecraft:circle"); -+ PATTERN_UPDATE.put("mr", "minecraft:rhombus"); -+ PATTERN_UPDATE.put("vh", "minecraft:half_vertical"); -+ PATTERN_UPDATE.put("hh", "minecraft:half_horizontal"); -+ PATTERN_UPDATE.put("vhr", "minecraft:half_vertical_right"); -+ PATTERN_UPDATE.put("hhb", "minecraft:half_horizontal_bottom"); -+ PATTERN_UPDATE.put("bo", "minecraft:border"); -+ PATTERN_UPDATE.put("cbo", "minecraft:curly_border"); -+ PATTERN_UPDATE.put("gra", "minecraft:gradient"); -+ PATTERN_UPDATE.put("gru", "minecraft:gradient_up"); -+ PATTERN_UPDATE.put("bri", "minecraft:bricks"); -+ PATTERN_UPDATE.put("glb", "minecraft:globe"); -+ PATTERN_UPDATE.put("cre", "minecraft:creeper"); -+ PATTERN_UPDATE.put("sku", "minecraft:skull"); -+ PATTERN_UPDATE.put("flo", "minecraft:flower"); -+ PATTERN_UPDATE.put("moj", "minecraft:mojang"); -+ PATTERN_UPDATE.put("pig", "minecraft:piglin"); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType patterns = data.getList("Patterns", ObjectType.MAP); -+ if (patterns != null) { -+ for (int i = 0, len = patterns.size(); i < len; ++i) { -+ final MapType pattern = patterns.getMap(i); -+ -+ final String patternName = pattern.getString("Pattern"); -+ if (patternName != null) { -+ final String renamed = PATTERN_UPDATE.get(patternName); -+ if (renamed != null) { -+ pattern.setString("Pattern", renamed); -+ } -+ } -+ RenameHelper.renameSingle(pattern, "Pattern", "pattern"); -+ -+ final String newColour = getBannerColour(pattern.getInt("Color")); -+ pattern.setString("Color", newColour); -+ RenameHelper.renameSingle(pattern, "Color", "color"); -+ } -+ } -+ RenameHelper.renameSingle(data, "Patterns", "patterns"); -+ -+ return null; -+ } -+ }); -+ -+ // Step 2 -+ // Note: there is nothing after the previous breakpoint (1.19.4) that reads nested entity item -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:arrow", new DataConverter<>(VERSION, 2) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Object potion = data.getGeneric("Potion"); -+ final Object customPotionEffects = data.getGeneric("custom_potion_effects"); -+ final Object color = data.getGeneric("Color"); -+ -+ if (potion == null && customPotionEffects == null && color == null) { -+ return null; -+ } -+ -+ data.remove("Potion"); -+ data.remove("custom_potion_effects"); -+ data.remove("Color"); -+ -+ final MapType item = data.getMap("item"); -+ if (item == null) { -+ return null; -+ } -+ -+ final MapType tag = item.getOrCreateMap("tag"); -+ -+ if (potion != null) { -+ tag.setGeneric("Potion", potion); -+ } -+ if (customPotionEffects != null) { -+ tag.setGeneric("custom_potion_effects", customPotionEffects); -+ } -+ if (color != null) { -+ tag.setGeneric("CustomPotionColor", color); -+ } -+ -+ return null; -+ } -+ }); -+ -+ // Step 3 -+ // next version: 4059 -+ MCTypeRegistry.DATA_COMPONENTS.addStructureWalker(VERSION, 3, new DataWalker<>() { -+ private static void walkBlockPredicates(final MapType root, final long fromVersion, final long toVersion) { -+ if (root.hasKey("blocks", ObjectType.STRING)) { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, root, "blocks", fromVersion, toVersion); -+ } else if (root.hasKey("blocks", ObjectType.LIST)) { -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, root, "blocks", fromVersion, toVersion); -+ } -+ } -+ -+ @Override -+ public MapType walk(final MapType root, final long fromVersion, final long toVersion) { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, root, "minecraft:bees", "entity_data", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.TILE_ENTITY, root, "minecraft:block_entity_data", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root, "minecraft:bundle_contents", fromVersion, toVersion); -+ -+ final MapType canBreak = root.getMap("minecraft:can_break"); -+ if (canBreak != null) { -+ final ListType predicates = canBreak.getList("predicates", ObjectType.MAP); -+ if (predicates != null) { -+ for (int i = 0, len = predicates.size(); i < len; ++i) { -+ walkBlockPredicates(predicates.getMap(i), fromVersion, toVersion); -+ } -+ } -+ // Not handled by DFU: simple encoding does not require "predicates" -+ walkBlockPredicates(canBreak, fromVersion, toVersion); -+ } -+ -+ final MapType canPlaceOn = root.getMap("minecraft:can_place_on"); -+ if (canPlaceOn != null) { -+ final ListType predicates = canPlaceOn.getList("predicates", ObjectType.MAP); -+ if (predicates != null) { -+ for (int i = 0, len = predicates.size(); i < len; ++i) { -+ walkBlockPredicates(predicates.getMap(i), fromVersion, toVersion); -+ } -+ } -+ // Not handled by DFU: simple encoding does not require "predicates" -+ walkBlockPredicates(canPlaceOn, fromVersion, toVersion); -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root, "minecraft:charged_projectiles", fromVersion, toVersion); -+ WalkerUtils.convertListPath(MCTypeRegistry.ITEM_STACK, root, "minecraft:container", "item", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, root, "minecraft:entity_data", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_NAME, root, "minecraft:pot_decorations", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root.getMap("minecraft:food"), "using_converts_to", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:custom_name", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:item_name", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:lore", fromVersion, toVersion); -+ -+ final MapType writtenBookContent = root.getMap("minecraft:written_book_content"); -+ if (writtenBookContent != null) { -+ // This logic is OK up until we need to convert TEXT_COMPONENT to NBT. -+ // But that's for the next walker to handle. -+ final ListType pages = writtenBookContent.getListUnchecked("pages"); -+ if (pages != null) { -+ for (int i = 0, len = pages.size(); i < len; ++i) { -+ final Object pageGeneric = pages.getGeneric(i); -+ if (pageGeneric instanceof String string) { -+ final Object convertedGeneric = MCTypeRegistry.TEXT_COMPONENT.convert(string, fromVersion, toVersion); -+ if (convertedGeneric != null) { -+ pages.setGeneric(i, convertedGeneric); -+ } -+ } else if (pageGeneric instanceof MapType mapType) { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, mapType, "raw", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, mapType, "filtered", fromVersion, toVersion); -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ // Step 4 -+ MCTypeRegistry.PARTICLE.addStructureConverter(new DataConverter<>(VERSION, 4) { -+ @Override -+ public MapType convert(final Object input, final long sourceVersion, final long toVersion) { -+ if (!(input instanceof String flat)) { -+ return null; -+ } -+ -+ return ConverterParticleToNBT.convert(flat, Types.NBT); -+ } -+ }); -+ -+ MCTypeRegistry.PARTICLE.addStructureWalker(VERSION, 4, (final Object input, final long fromVersion, final long toVersion) -> { -+ if (!(input instanceof MapType)) { -+ return null; -+ } -+ -+ final MapType root = (MapType)input; -+ -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "item", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_STATE, root, "block_state", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Step 5 -+ // Note: needs breakpoint, reads nested tile entity data -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION, 5) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ return ConverterItemStackToDataComponents.convertItem(data); -+ } -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureWalker(VERSION, 5, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_NAME, root, "id", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.DATA_COMPONENTS, root, "components", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Step 6 -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:area_effect_cloud", new DataConverter<>(VERSION, 6) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Object color = data.getGeneric("Color"); -+ final Object effects = data.getGeneric("effects"); -+ final Object potion = data.getGeneric("Potion"); -+ -+ if (color == null && effects == null && potion == null) { -+ return null; -+ } -+ data.remove("Color"); -+ data.remove("effects"); -+ data.remove("Potion"); -+ -+ final MapType potionContents = data.getTypeUtil().createEmptyMap(); -+ data.setMap("potion_contents", potionContents); -+ -+ if (color != null) { -+ potionContents.setGeneric("custom_color", color); -+ } -+ -+ if (effects != null) { -+ potionContents.setGeneric("custom_effects", effects); -+ } -+ -+ if (potion != null) { -+ potionContents.setGeneric("potion", potion); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3818() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3820.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3820.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8672d40af44a92516256a97d9912a08a6dcb446c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3820.java -@@ -0,0 +1,81 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemstack.ConverterItemStackToDataComponents; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3820 { -+ -+ private static final int VERSION = MCVersions.V24W09A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:skull", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final Object skullOwner = data.getGeneric("SkullOwner"); -+ final Object extraType = data.getGeneric("ExtraType"); -+ -+ if (skullOwner == null && extraType == null) { -+ return null; -+ } -+ -+ data.remove("SkullOwner"); -+ data.remove("ExtraType"); -+ -+ data.setMap( -+ "profile", -+ ConverterItemStackToDataComponents.convertProfile( -+ skullOwner == null ? extraType : skullOwner, data.getTypeUtil() -+ ) -+ ); -+ -+ return null; -+ } -+ }); -+ // I don't see why this converter is necessary, V3818 should have converted correctly... -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType components = data.getMap("components"); -+ -+ if (components == null) { -+ return null; -+ } -+ -+ final MapType oldTarget = components.getMap("minecraft:lodestone_target"); -+ if (oldTarget == null) { -+ return null; -+ } -+ -+ components.remove("minecraft:lodestone_target"); -+ components.setMap("minecraft:lodestone_tracker", oldTarget); -+ -+ final Object pos = oldTarget.getGeneric("pos"); -+ final Object dim = oldTarget.getGeneric("dimension"); -+ -+ if (pos == null || dim == null) { -+ return null; -+ } -+ -+ oldTarget.remove("pos"); -+ oldTarget.remove("dimension"); -+ -+ final MapType target = oldTarget.getTypeUtil().createEmptyMap(); -+ oldTarget.setMap("target", target); -+ -+ target.setGeneric("pos", pos); -+ target.setGeneric("dimension", dim); -+ -+ return null; -+ } -+ }); -+ -+ // Moved from V99 to here, as 21w10a is when custom_name was added -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:skull", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "custom_name")); -+ } -+ -+ private V3820() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3825.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3825.java -new file mode 100644 -index 0000000000000000000000000000000000000000..547c7fe79f4602aefee5910335b147669acde031 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3825.java -@@ -0,0 +1,153 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.Arrays; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V3825 { -+ -+ private static final int VERSION = MCVersions.V24W12A + 1; -+ -+ private static final Set BANNER_NAMES = new HashSet<>( -+ Arrays.asList( -+ "block.minecraft.ominous_banner" -+ ) -+ ); -+ private static final Set MAP_NAMES = new HashSet<>( -+ Arrays.asList( -+ "filled_map.buried_treasure", -+ "filled_map.explorer_jungle", -+ "filled_map.explorer_swamp", -+ "filled_map.mansion", -+ "filled_map.monument", -+ "filled_map.trial_chambers", -+ "filled_map.village_desert", -+ "filled_map.village_plains", -+ "filled_map.village_savanna", -+ "filled_map.village_snowy", -+ "filled_map.village_taiga" -+ ) -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ private static void convertName(final MapType components, final Set standardNames) { -+ final String customName = components.getString("minecraft:custom_name"); -+ if (customName == null) { -+ return; -+ } -+ -+ final String translation = ComponentUtils.retrieveTranslationString(customName); -+ if (translation == null) { -+ return; -+ } -+ -+ if (standardNames.contains(translation)) { -+ components.remove("minecraft:custom_name"); -+ components.setString("minecraft:item_name", customName); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType components = data.getMap("components"); -+ if (components == null) { -+ return null; -+ } -+ -+ final String id = data.getString("id"); -+ if (id == null) { -+ return null; -+ } -+ -+ switch (id) { -+ case "minecraft:white_banner": { -+ convertName(components, BANNER_NAMES); -+ break; -+ } -+ case "minecraft:filled_map": { -+ convertName(components, MAP_NAMES); -+ break; -+ } -+ } -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:banner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String customName = data.getString("CustomName"); -+ if (customName == null || !"block.minecraft.ominous_banner".equals(ComponentUtils.retrieveTranslationString(customName))) { -+ return null; -+ } -+ -+ data.remove("CustomName"); -+ -+ final MapType components = data.getOrCreateMap("components"); -+ -+ components.setString("minecraft:item_name", customName); -+ components.setMap("minecraft:hide_additional_tooltip", components.getTypeUtil().createEmptyMap()); -+ -+ return null; -+ } -+ }); -+ // DFU does not change the schema, even though it moves spawn_potentials -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:trial_spawner", (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType normalConfig = data.getMap("normal_config"); -+ if (normalConfig != null) { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, normalConfig, "spawn_potentials", "data", "entity", fromVersion, toVersion); -+ } -+ final MapType ominousConfig = data.getMap("ominous_config"); -+ if (ominousConfig != null) { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, ominousConfig, "spawn_potentials", "data", "entity", fromVersion, toVersion); -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data.getMap("spawn_data"), "entity", fromVersion, toVersion); -+ return null; -+ }); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:trial_spawner", new DataConverter<>(VERSION) { -+ private static final String[] NORMAL_CONFIG_KEYS = new String[] { -+ "spawn_range", -+ "total_mobs", -+ "simultaneous_mobs", -+ "total_mobs_added_per_player", -+ "simultaneous_mobs_added_per_player", -+ "ticks_between_spawn", -+ "spawn_potentials", -+ "loot_tables_to_eject", -+ "items_to_drop_when_ominous" -+ }; -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType normalConfig = data.getTypeUtil().createEmptyMap(); -+ -+ for (final String normalKey : NORMAL_CONFIG_KEYS) { -+ final Object normalValue = data.getGeneric(normalKey); -+ if (normalValue != null) { -+ data.remove(normalKey); -+ normalConfig.setGeneric(normalKey, normalValue); -+ } -+ } -+ -+ if (!normalConfig.isEmpty()) { -+ data.setMap("normal_config", normalConfig); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:ominous_item_spawner", new DataWalkerItems("item")); -+ } -+ -+ private V3825() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3828.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3828.java -new file mode 100644 -index 0000000000000000000000000000000000000000..084b61402b954f4b29156a08d53b29d6c08fe692 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3828.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public final class V3828 { -+ -+ private static final int VERSION = MCVersions.V24W14A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.VILLAGER_TRADE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType buyB = data.getMap("buyB"); -+ -+ if (buyB == null) { -+ return null; -+ } -+ -+ final String id = NamespaceUtil.correctNamespace(buyB.getString("id", "minecraft:air")); -+ final int count = buyB.getInt("count", 0); -+ -+ // Fix DFU: use count <= 0 instead of count == 0 -+ if ("minecraft:air".equals(id) || count <= 0) { -+ data.remove("buyB"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3828() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3833.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3833.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c4f0152c8c1b1dacd09b880e5415c2ca05f93956 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3833.java -@@ -0,0 +1,36 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public final class V3833 { -+ -+ private static final int VERSION = MCVersions.V1_20_5_PRE4 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:brushable_block", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType item = data.getMap("item"); -+ if (item == null) { -+ return null; -+ } -+ -+ final String id = NamespaceUtil.correctNamespace(item.getString("id", "minecraft:air")); -+ final int count = item.getInt("count", 0); -+ -+ // Fix DFU: use count <= 0 instead of count == 0 -+ if ("minecraft:air".equals(id) || count <= 0) { -+ data.remove("item"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3833() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3938.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3938.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2a6d144c2f074403bde8a62377ca6986c0c12a84 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3938.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+ -+public final class V3938 { -+ -+ private static final int VERSION = MCVersions.V1_20_6 + 99; -+ -+ private static void registerArrow(final String id) { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "inBlockState")); -+ // new: weapon -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerItems("item", "weapon")); -+ } -+ -+ public static void register() { -+ registerArrow("minecraft:spectral_arrow"); -+ registerArrow("minecraft:arrow"); -+ } -+ -+ private V3938() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3939.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3939.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2bcacb82a57bcdca6af699936b22db0ebe925f1b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3939.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.leveldat.ConverterRemoveFeatureFlag; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import java.util.Arrays; -+import java.util.HashSet; -+ -+public final class V3939 { -+ -+ private static final int VERSION = MCVersions.V1_20_6 + 100; -+ -+ public static void register() { -+ MCTypeRegistry.LIGHTWEIGHT_LEVEL.addStructureConverter(new ConverterRemoveFeatureFlag(VERSION, new HashSet<>( -+ Arrays.asList( -+ "minecraft:update_1_21" -+ ) -+ ))); -+ } -+ -+ private V3939() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3943.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3943.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5bbfb32568d0367422f801a1402409f497959eb8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3943.java -@@ -0,0 +1,34 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V3943 { -+ -+ private static final int VERSION = MCVersions.V24W19B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String oldRange = data.getString("menuBackgroundBlurriness", "0.5"); -+ -+ int newRange; -+ try { -+ newRange = (int)Math.round(Double.parseDouble(oldRange) * 10.0); -+ } catch (final NumberFormatException ex) { -+ newRange = 5; -+ } -+ -+ // note: options are always string, so DFU is wrong to use int -+ data.setString("menuBackgroundBlurriness", Integer.toString(newRange)); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3943() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V3945.java b/ca/spottedleaf/dataconverter/minecraft/versions/V3945.java -new file mode 100644 -index 0000000000000000000000000000000000000000..28f2c6f6562bb5f11c6519a7beae5f86e37541a7 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V3945.java -@@ -0,0 +1,244 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+import java.util.LinkedHashMap; -+import java.util.Locale; -+import java.util.Map; -+import java.util.UUID; -+ -+public final class V3945 { -+ -+ private static final int VERSION = MCVersions.V24W20A + 1; -+ -+ private static final Map UUID_TO_ID = new HashMap<>( -+ ImmutableMap.builder() -+ .put(UUID.fromString("736565d2-e1a7-403d-a3f8-1aeb3e302542"), "minecraft:creative_mode_block_range") -+ .put(UUID.fromString("98491ef6-97b1-4584-ae82-71a8cc85cf73"), "minecraft:creative_mode_entity_range") -+ .put(UUID.fromString("91AEAA56-376B-4498-935B-2F7F68070635"), "minecraft:effect.speed") -+ .put(UUID.fromString("7107DE5E-7CE8-4030-940E-514C1F160890"), "minecraft:effect.slowness") -+ .put(UUID.fromString("AF8B6E3F-3328-4C0A-AA36-5BA2BB9DBEF3"), "minecraft:effect.haste") -+ .put(UUID.fromString("55FCED67-E92A-486E-9800-B47F202C4386"), "minecraft:effect.mining_fatigue") -+ .put(UUID.fromString("648D7064-6A60-4F59-8ABE-C2C23A6DD7A9"), "minecraft:effect.strength") -+ .put(UUID.fromString("C0105BF3-AEF8-46B0-9EBC-92943757CCBE"), "minecraft:effect.jump_boost") -+ .put(UUID.fromString("22653B89-116E-49DC-9B6B-9971489B5BE5"), "minecraft:effect.weakness") -+ .put(UUID.fromString("5D6F0BA2-1186-46AC-B896-C61C5CEE99CC"), "minecraft:effect.health_boost") -+ .put(UUID.fromString("EAE29CF0-701E-4ED6-883A-96F798F3DAB5"), "minecraft:effect.absorption") -+ .put(UUID.fromString("03C3C89D-7037-4B42-869F-B146BCB64D2E"), "minecraft:effect.luck") -+ .put(UUID.fromString("CC5AF142-2BD2-4215-B636-2605AED11727"), "minecraft:effect.unluck") -+ .put(UUID.fromString("6555be74-63b3-41f1-a245-77833b3c2562"), "minecraft:evil") -+ .put(UUID.fromString("1eaf83ff-7207-4596-b37a-d7a07b3ec4ce"), "minecraft:powder_snow") -+ .put(UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D"), "minecraft:sprinting") -+ .put(UUID.fromString("020E0DFB-87AE-4653-9556-831010E291A0"), "minecraft:attacking") -+ .put(UUID.fromString("766bfa64-11f3-11ea-8d71-362b9e155667"), "minecraft:baby") -+ .put(UUID.fromString("7E0292F2-9434-48D5-A29F-9583AF7DF27F"), "minecraft:covered") -+ .put(UUID.fromString("9e362924-01de-4ddd-a2b2-d0f7a405a174"), "minecraft:suffocating") -+ .put(UUID.fromString("5CD17E52-A79A-43D3-A529-90FDE04B181E"), "minecraft:drinking") -+ .put(UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"), "minecraft:baby") -+ .put(UUID.fromString("49455A49-7EC5-45BA-B886-3B90B23A1718"), "minecraft:attacking") -+ .put(UUID.fromString("845DB27C-C624-495F-8C9F-6020A9A58B6B"), "minecraft:armor.boots") -+ .put(UUID.fromString("D8499B04-0E66-4726-AB29-64469D734E0D"), "minecraft:armor.leggings") -+ .put(UUID.fromString("9F3D476D-C118-4544-8365-64846904B48E"), "minecraft:armor.chestplate") -+ .put(UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150"), "minecraft:armor.helmet") -+ .put(UUID.fromString("C1C72771-8B8E-BA4A-ACE0-81A93C8928B2"), "minecraft:armor.body") -+ .put(UUID.fromString("b572ecd2-ac0c-4071-abde-9594af072a37"), "minecraft:enchantment.fire_protection") -+ .put(UUID.fromString("40a9968f-5c66-4e2f-b7f4-2ec2f4b3e450"), "minecraft:enchantment.blast_protection") -+ .put(UUID.fromString("07a65791-f64d-4e79-86c7-f83932f007ec"), "minecraft:enchantment.respiration") -+ .put(UUID.fromString("60b1b7db-fffd-4ad0-817c-d6c6a93d8a45"), "minecraft:enchantment.aqua_affinity") -+ .put(UUID.fromString("11dc269a-4476-46c0-aff3-9e17d7eb6801"), "minecraft:enchantment.depth_strider") -+ .put(UUID.fromString("87f46a96-686f-4796-b035-22e16ee9e038"), "minecraft:enchantment.soul_speed") -+ .put(UUID.fromString("b9716dbd-50df-4080-850e-70347d24e687"), "minecraft:enchantment.soul_speed") -+ .put(UUID.fromString("92437d00-c3a7-4f2e-8f6c-1f21585d5dd0"), "minecraft:enchantment.swift_sneak") -+ .put(UUID.fromString("5d3d087b-debe-4037-b53e-d84f3ff51f17"), "minecraft:enchantment.sweeping_edge") -+ .put(UUID.fromString("3ceb37c0-db62-46b5-bd02-785457b01d96"), "minecraft:enchantment.efficiency") -+ .put(UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF"), "minecraft:base_attack_damage") -+ .put(UUID.fromString("FA233E1C-4180-4865-B01B-BCCE9785ACA3"), "minecraft:base_attack_speed") -+ .build() -+ ); -+ private static final Map NAME_TO_ID = new HashMap<>( -+ Map.of( -+ "Random spawn bonus", "minecraft:random_spawn_bonus", -+ "Random zombie-spawn bonus", "minecraft:zombie_random_spawn_bonus", -+ "Leader zombie bonus", "minecraft:leader_zombie_bonus", -+ "Zombie reinforcement callee charge", "minecraft:reinforcement_callee_charge", -+ "Zombie reinforcement caller charge", "minecraft:reinforcement_caller_charge" -+ ) -+ ); -+ -+ private static UUID makeUUID(final int[] arr) { -+ if (arr == null || arr.length != 4) { -+ return null; -+ } -+ -+ final long most = ((long)arr[0] << 32) | ((long)arr[1] & 0xFFFFFFFFL); -+ final long least = ((long)arr[2] << 32) | ((long)arr[3] & 0xFFFFFFFFL); -+ -+ return new UUID(most, least); -+ } -+ -+ private static ListType remapModifiers(final ListType list) { -+ final Map ret = new LinkedHashMap<>(); -+ -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final MapType modifier = list.getMap(i).copy(); -+ -+ final UUID uuid = makeUUID(modifier.getInts("uuid")); -+ final String name = modifier.getString("name", ""); -+ -+ final String remappedUUID = UUID_TO_ID.get(uuid); -+ final String remappedName = NAME_TO_ID.get(name); -+ -+ if (remappedUUID != null) { -+ modifier.remove("uuid"); -+ modifier.remove("name"); -+ -+ modifier.setString("id", remappedUUID); -+ -+ ret.put(remappedUUID, modifier); -+ } else if (remappedName != null) { -+ final MapType existing = ret.get(remappedName); -+ if (existing != null) { -+ existing.setDouble("amount", -+ existing.getDouble("amount", 0.0) + modifier.getDouble("amount", 0.0) -+ ); -+ } else { -+ modifier.remove("uuid"); -+ modifier.remove("name"); -+ -+ modifier.setString("id", remappedName); -+ -+ ret.put(remappedName, modifier); -+ } -+ } else { -+ final String id = "minecraft:" + (uuid == null ? "unknown" : uuid.toString().toLowerCase(Locale.ROOT)); -+ -+ modifier.setString("id", id); -+ -+ ret.put(id, modifier); -+ } -+ } -+ -+ final ListType retList = list.getTypeUtil().createEmptyList(); -+ -+ for (final MapType modifier : ret.values()) { -+ retList.addMap(modifier); -+ } -+ -+ return retList; -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType components = data.getMap("components"); -+ if (components == null) { -+ return null; -+ } -+ -+ final MapType attributeModifiers = components.getMap("minecraft:attribute_modifiers"); -+ if (attributeModifiers == null) { -+ return null; -+ } -+ -+ final ListType modifiers = attributeModifiers.getList("modifiers", ObjectType.MAP); -+ if (modifiers == null) { -+ return null; -+ } -+ -+ attributeModifiers.setList("modifiers", remapModifiers(modifiers)); -+ -+ return null; -+ } -+ }); -+ -+ final DataConverter entityConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "Attributes", "attributes"); -+ -+ final ListType attributes = data.getList("attributes", ObjectType.MAP); -+ if (attributes == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = attributes.size(); i < len; ++i) { -+ final MapType attribute = attributes.getMap(i); -+ -+ RenameHelper.renameSingle(attribute, "Name", "id"); -+ RenameHelper.renameSingle(attribute, "Base", "base"); -+ RenameHelper.renameSingle(attribute, "Modifiers", "modifiers"); -+ -+ final ListType modifiers = attribute.getList("modifiers", ObjectType.MAP); -+ -+ if (modifiers == null) { -+ continue; -+ } -+ -+ for (int j = 0, len2 = modifiers.size(); j < len2; ++j) { -+ final MapType modifier = modifiers.getMap(j); -+ -+ RenameHelper.renameSingle(modifier, "UUID", "uuid"); -+ RenameHelper.renameSingle(modifier, "Name", "name"); -+ RenameHelper.renameSingle(modifier, "Amount", "amount"); -+ final String newOp; -+ switch (modifier.getInt("Operation", 0)) { -+ case 0: { -+ newOp = "add_value"; -+ break; -+ } -+ case 1: { -+ newOp = "add_multiplied_base"; -+ break; -+ } -+ case 2: { -+ newOp = "add_multiplied_total"; -+ break; -+ } -+ default: { -+ newOp = "invalid"; -+ break; -+ } -+ } -+ modifier.remove("Operation"); -+ modifier.setString("operation", newOp); -+ } -+ -+ attribute.setList("modifiers", remapModifiers(modifiers)); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(entityConverter); -+ MCTypeRegistry.PLAYER.addStructureConverter(entityConverter); -+ -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:jukebox", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final long playingFor = data.getLong("TickCount") - data.getLong("RecordStartTick"); -+ -+ data.remove("IsPlaying"); -+ data.remove("TickCount"); -+ data.remove("RecordStartTick"); -+ -+ if (playingFor > 0L) { -+ data.setLong("ticks_since_song_started", playingFor); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V3945() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4054.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4054.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1a76415944b6ad8b98f917acd3c7157e9fccdd5f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4054.java -@@ -0,0 +1,46 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4054 { -+ -+ private static final int VERSION = MCVersions.V1_21_1 + 99; -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:banner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertComponents(data.getMap("components")); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:white_banner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertComponents(data.getMap("components")); -+ return null; -+ } -+ }); -+ } -+ -+ private static void convertComponents(final MapType components) { -+ if (components == null) { -+ return; -+ } -+ -+ final String itemNameKey = ComponentUtils.retrieveTranslationString(components.getString("minecraft:item_name")); -+ -+ if (!"block.minecraft.ominous_banner".equals(itemNameKey)) { -+ return; -+ } -+ -+ components.setString("minecraft:rarity", "uncommon"); -+ components.setString("minecraft:item_name", ComponentUtils.createTranslatableComponent("block.minecraft.ominous_banner")); -+ } -+ -+ private V4054() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4055.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4055.java -new file mode 100644 -index 0000000000000000000000000000000000000000..45b141a651d954554fcca68f36c0b3344328d902 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4055.java -@@ -0,0 +1,41 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.attributes.ConverterAbstractAttributesRename; -+import ca.spottedleaf.dataconverter.util.NamespaceUtil; -+ -+public final class V4055 { -+ -+ private static final int VERSION = MCVersions.V1_21_1 + 100; -+ -+ private static final Prefix[] PREFIXES_TO_REMOVE = new Prefix[] { -+ new Prefix("generic."), -+ new Prefix("horse."), -+ new Prefix("player."), -+ new Prefix("zombie.") -+ }; -+ -+ private static record Prefix(String raw, String namespaced) { -+ public Prefix(final String raw) { -+ this(raw, NamespaceUtil.correctNamespace(raw)); -+ } -+ } -+ -+ public static void register() { -+ ConverterAbstractAttributesRename.register(VERSION, (final String input) -> { -+ final String namespacedInput = NamespaceUtil.correctNamespace(input); -+ -+ for (final Prefix prefix : PREFIXES_TO_REMOVE) { -+ if (!namespacedInput.startsWith(prefix.namespaced())) { -+ continue; -+ } -+ -+ return "minecraft:".concat(namespacedInput.substring(prefix.namespaced().length())); -+ } -+ -+ return null; -+ }); -+ } -+ -+ private V4055() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4057.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4057.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4165efcb182a52d4f1d52f25e684ab8f36cf4c79 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4057.java -@@ -0,0 +1,33 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4057 { -+ -+ private static final int VERSION = MCVersions.V1_21_1 + 102; -+ -+ public static void register() { -+ MCTypeRegistry.CHUNK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType carvingMasks = data.getMap("CarvingMasks"); -+ if (carvingMasks == null) { -+ return null; -+ } -+ data.remove("CarvingMasks"); -+ -+ final long[] airMask = carvingMasks.getLongs("AIR"); -+ if (airMask != null) { -+ data.setLongs("carving_mask", airMask); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4057() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4059.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4059.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e4a1bb8aa512203d28fb683d204762f322862921 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4059.java -@@ -0,0 +1,164 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+ -+public final class V4059 { -+ -+ private static final int VERSION = MCVersions.V24W33A + 1; -+ -+ public static void register() { -+ // previous version: 3818.3 -+ // next version: 4307 -+ MCTypeRegistry.DATA_COMPONENTS.addStructureWalker(VERSION, new DataWalker<>() { -+ private static void walkBlockPredicates(final MapType root, final long fromVersion, final long toVersion) { -+ if (root.hasKey("blocks", ObjectType.STRING)) { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, root, "blocks", fromVersion, toVersion); -+ } else if (root.hasKey("blocks", ObjectType.LIST)) { -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, root, "blocks", fromVersion, toVersion); -+ } -+ } -+ -+ @Override -+ public MapType walk(final MapType root, final long fromVersion, final long toVersion) { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, root, "minecraft:bees", "entity_data", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.TILE_ENTITY, root, "minecraft:block_entity_data", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root, "minecraft:bundle_contents", fromVersion, toVersion); -+ -+ final MapType canBreak = root.getMap("minecraft:can_break"); -+ if (canBreak != null) { -+ final ListType predicates = canBreak.getList("predicates", ObjectType.MAP); -+ if (predicates != null) { -+ for (int i = 0, len = predicates.size(); i < len; ++i) { -+ walkBlockPredicates(predicates.getMap(i), fromVersion, toVersion); -+ } -+ } -+ // Not handled by DFU: simple encoding does not require "predicates" -+ walkBlockPredicates(canBreak, fromVersion, toVersion); -+ } -+ -+ final MapType canPlaceOn = root.getMap("minecraft:can_place_on"); -+ if (canPlaceOn != null) { -+ final ListType predicates = canPlaceOn.getList("predicates", ObjectType.MAP); -+ if (predicates != null) { -+ for (int i = 0, len = predicates.size(); i < len; ++i) { -+ walkBlockPredicates(predicates.getMap(i), fromVersion, toVersion); -+ } -+ } -+ // Not handled by DFU: simple encoding does not require "predicates" -+ walkBlockPredicates(canPlaceOn, fromVersion, toVersion); -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root, "minecraft:charged_projectiles", fromVersion, toVersion); -+ WalkerUtils.convertListPath(MCTypeRegistry.ITEM_STACK, root, "minecraft:container", "item", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, root, "minecraft:entity_data", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_NAME, root, "minecraft:pot_decorations", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "minecraft:use_remainder", fromVersion, toVersion); -+ -+ final MapType equippable = root.getMap("minecraft:equippable"); -+ if (equippable != null) { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY_NAME, equippable, "allowed_entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY_NAME, equippable, "allowed_entities", fromVersion, toVersion); -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:custom_name", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:item_name", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:lore", fromVersion, toVersion); -+ -+ final MapType writtenBookContent = root.getMap("minecraft:written_book_content"); -+ if (writtenBookContent != null) { -+ final ListType pages = writtenBookContent.getListUnchecked("pages"); -+ // This logic needs to correctly handle both the NBT format of TEXT_COMPONENT and the JSON format. -+ if (pages != null) { -+ for (int i = 0, len = pages.size(); i < len; ++i) { -+ final Object pageGeneric = pages.getGeneric(i); -+ final boolean isNBTFormat = fromVersion >= DataConverter.encodeVersions(V4290.VERSION, 0); -+ // Note: We only parse ListType for 4290 and above as only a String was valid JSON. List of anything was not valid. -+ if (pageGeneric instanceof String || (isNBTFormat && pageGeneric instanceof ListType)) { // handles: String case (JSON/NBT), ListType case (NBT) -+ final Object convertedGeneric = MCTypeRegistry.TEXT_COMPONENT.convert(pageGeneric, fromVersion, toVersion); -+ if (convertedGeneric != null) { -+ pages.setGeneric(i, convertedGeneric); -+ } -+ } else if (pageGeneric instanceof MapType mapType) { -+ // Need to handle: Filterable format and regular NBT Component format are both MapType... -+ if (mapType.hasKey("raw") || mapType.hasKey("filtered")) { -+ // Assume filterable format -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, mapType, "raw", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, mapType, "filtered", fromVersion, toVersion); -+ } else if (isNBTFormat) { -+ final Object convertedGeneric = MCTypeRegistry.TEXT_COMPONENT.convert(mapType, fromVersion, toVersion); -+ if (convertedGeneric != null) { -+ pages.setGeneric(i, convertedGeneric); -+ } -+ } // else: invalid data -+ } // else: invalid data -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.DATA_COMPONENTS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType food = data.getMap("minecraft:food"); -+ if (food == null) { -+ return null; -+ } -+ -+ final TypeUtil typeUtil = data.getTypeUtil(); -+ -+ final float eatSeconds = food.getFloat("eat_seconds", 1.6F); -+ -+ final ListType oldEffects = food.getList("effects", ObjectType.MAP); -+ final ListType newEffects = typeUtil.createEmptyList(); -+ if (oldEffects != null) { -+ for (int i = 0, len = oldEffects.size(); i < len; ++i) { -+ final MapType oldEffect = oldEffects.getMap(i); -+ -+ final MapType newEffect = typeUtil.createEmptyMap(); -+ newEffects.addMap(newEffect); -+ -+ newEffect.setString("type", "minecraft:apply_effects"); -+ -+ final Object oldEffectEffect = oldEffect.getGeneric("effect"); -+ final ListType newEffectEffects = typeUtil.createEmptyList(); -+ newEffectEffects.addGeneric(oldEffectEffect); -+ newEffect.setList("effects", newEffectEffects); -+ -+ newEffect.setFloat("probability", oldEffect.getFloat("probability", 1.0F)); -+ } -+ } -+ -+ final Object convertsTo = food.getGeneric("using_converts_to"); -+ if (convertsTo != null) { -+ data.setGeneric("minecraft:use_remainder", convertsTo); -+ } -+ -+ food.remove("eat_seconds"); -+ food.remove("effects"); -+ food.remove("using_converts_to"); -+ -+ final MapType consumable = typeUtil.createEmptyMap(); -+ data.setMap("minecraft:consumable", consumable); -+ -+ consumable.setFloat("consume_seconds", eatSeconds); -+ consumable.setList("on_consume_effects", newEffects); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4059() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4061.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4061.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b092188f5e4f0fa3224fac3cd36f5c1ee6a7f0a4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4061.java -@@ -0,0 +1,112 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; -+import com.mojang.brigadier.exceptions.CommandSyntaxException; -+import com.mojang.datafixers.util.Pair; -+import net.minecraft.nbt.CompoundTag; -+import net.minecraft.nbt.TagParser; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V4061 { -+ -+ private static final int VERSION = MCVersions.V24W34A + 1; -+ -+ private static final Map, String> CONVERT_MAP = new HashMap<>(); -+ static { -+ addConversion("trial_chamber/breeze", "{simultaneous_mobs: 1.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:breeze\"}}, weight: 1}], ticks_between_spawn: 20, total_mobs: 2.0f, total_mobs_added_per_player: 1.0f}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], simultaneous_mobs: 2.0f, total_mobs: 4.0f}"); -+ addConversion("trial_chamber/melee/husk", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:husk\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], spawn_potentials: [{data: {entity: {id: \"minecraft:husk\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_melee\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/melee/spider", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:spider\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}],simultaneous_mobs: 4.0f, total_mobs: 12.0f}"); -+ addConversion("trial_chamber/melee/zombie", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:zombie\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}],spawn_potentials: [{data: {entity: {id: \"minecraft:zombie\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_melee\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/ranged/poison_skeleton", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:bogged\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}],spawn_potentials: [{data: {entity: {id: \"minecraft:bogged\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_ranged\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/ranged/skeleton", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:skeleton\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], spawn_potentials: [{data: {entity: {id: \"minecraft:skeleton\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_ranged\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/ranged/stray", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:stray\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], spawn_potentials: [{data: {entity: {id: \"minecraft:stray\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_ranged\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/slow_ranged/poison_skeleton", "{simultaneous_mobs: 4.0f, simultaneous_mobs_added_per_player: 2.0f, spawn_potentials: [{data: {entity: {id: \"minecraft:bogged\"}}, weight: 1}], ticks_between_spawn: 160}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], spawn_potentials: [{data: {entity: {id: \"minecraft:bogged\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_ranged\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/slow_ranged/skeleton", "{simultaneous_mobs: 4.0f, simultaneous_mobs_added_per_player: 2.0f, spawn_potentials: [{data: {entity: {id: \"minecraft:skeleton\"}}, weight: 1}], ticks_between_spawn: 160}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], spawn_potentials: [{data: {entity: {id: \"minecraft:skeleton\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_ranged\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/slow_ranged/stray", "{simultaneous_mobs: 4.0f, simultaneous_mobs_added_per_player: 2.0f, spawn_potentials: [{data: {entity: {id: \"minecraft:stray\"}}, weight: 1}], ticks_between_spawn: 160}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}],spawn_potentials: [{data: {entity: {id: \"minecraft:stray\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_ranged\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/small_melee/baby_zombie", "{simultaneous_mobs: 2.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {IsBaby: 1b, id: \"minecraft:zombie\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], spawn_potentials: [{data: {entity: {IsBaby: 1b, id: \"minecraft:zombie\"}, equipment: {loot_table: \"minecraft:equipment/trial_chamber_melee\", slot_drop_chances: 0.0f}}, weight: 1}]}"); -+ addConversion("trial_chamber/small_melee/cave_spider", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:cave_spider\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], simultaneous_mobs: 4.0f, total_mobs: 12.0f}"); -+ addConversion("trial_chamber/small_melee/silverfish", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {id: \"minecraft:silverfish\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], simultaneous_mobs: 4.0f, total_mobs: 12.0f}"); -+ addConversion("trial_chamber/small_melee/slime", "{simultaneous_mobs: 3.0f, simultaneous_mobs_added_per_player: 0.5f, spawn_potentials: [{data: {entity: {Size: 1, id: \"minecraft:slime\"}}, weight: 3}, {data: {entity: {Size: 2, id: \"minecraft:slime\"}}, weight: 1}], ticks_between_spawn: 20}", "{loot_tables_to_eject: [{data: \"minecraft:spawners/ominous/trial_chamber/key\", weight: 3}, {data: \"minecraft:spawners/ominous/trial_chamber/consumables\", weight: 7}], simultaneous_mobs: 4.0f, total_mobs: 12.0f}"); -+ } -+ -+ private static void addConversion(final String keyPath, final String normalsNBT, final String ominoussNBT) { -+ final String fullKey = "minecraft:".concat(keyPath); -+ -+ final CompoundTag normalNBT = parseNBT(normalsNBT); -+ final MapType normalMapType = new NBTMapType(normalNBT); -+ final CompoundTag ominousNBT = parseNBT(ominoussNBT); -+ -+ final CompoundTag ominousMerged = normalNBT.copy().merge(ominousNBT); -+ -+ CONVERT_MAP.put(Pair.of(normalMapType, new NBTMapType(ominousNBT)), fullKey); -+ CONVERT_MAP.put(Pair.of(normalMapType, new NBTMapType(ominousMerged)), fullKey); -+ CONVERT_MAP.put(Pair.of(normalMapType, new NBTMapType(removeDefaults(ominousMerged.copy()))), fullKey); -+ } -+ -+ private static CompoundTag parseNBT(final String sNBT) { -+ try { -+ return TagParser.parseCompoundFully(sNBT); -+ } catch (final CommandSyntaxException ex) { -+ throw new IllegalArgumentException("Failed to parse NBT: " + sNBT, ex); -+ } -+ } -+ -+ private static CompoundTag removeDefaults(final CompoundTag config) { -+ if (config.getIntOr("spawn_range", 0) == 4) { -+ config.remove("spawn_range"); -+ } -+ -+ if (config.getFloatOr("total_mobs", 0.0F) == 6.0F) { -+ config.remove("total_mobs"); -+ } -+ -+ if (config.getFloatOr("simultaneous_mobs", 0.0F) == 2.0F) { -+ config.remove("simultaneous_mobs"); -+ } -+ -+ if (config.getFloatOr("total_mobs_added_per_player", 0.0F) == 2.0F) { -+ config.remove("total_mobs_added_per_player"); -+ } -+ -+ if (config.getFloatOr("simultaneous_mobs_added_per_player", 0.0F) == 1.0F) { -+ config.remove("simultaneous_mobs_added_per_player"); -+ } -+ -+ if (config.getIntOr("ticks_between_spawn", 0) == 40) { -+ config.remove("ticks_between_spawn"); -+ } -+ -+ return config; -+ } -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:trial_spawner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType normalConfig = data.getMap("normal_config"); -+ final MapType ominousConfig = data.getMap("ominous_config"); -+ -+ if (normalConfig == null || ominousConfig == null) { -+ return null; -+ } -+ -+ final String newKey = CONVERT_MAP.get(new Pair<>(normalConfig, ominousConfig)); -+ if (newKey == null) { -+ return null; -+ } -+ -+ data.setString("normal_config", newKey.concat("/normal")); -+ data.setString("ominous_config", newKey.concat("/ominous")); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4061() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4064.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4064.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a3bde5f57589d8ec3f1b1d1332ec8a1780bd1f47 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4064.java -@@ -0,0 +1,36 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4064 { -+ -+ private static final int VERSION = MCVersions.V24W36A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType components = data.getMap("components"); -+ if (components == null) { -+ return null; -+ } -+ -+ if (components.hasKey("minecraft:fire_resistant")) { -+ components.remove("minecraft:fire_resistant"); -+ -+ final MapType damageResistant = components.getTypeUtil().createEmptyMap(); -+ components.setMap("minecraft:damage_resistant", damageResistant); -+ -+ damageResistant.setString("types", "#minecraft:is_fire"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4064() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4067.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4067.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1f3d0dc9353444a3826d77272f974a3362e845e1 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4067.java -@@ -0,0 +1,143 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.leveldat.ConverterRemoveFeatureFlag; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.Arrays; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Map; -+ -+public final class V4067 { -+ -+ private static final int VERSION = MCVersions.V24W38A + 1; -+ -+ private static final record BoatType(String name, String suffix) {} -+ private static final BoatType[] BOAT_TYPES = new BoatType[] { -+ new BoatType("oak", "boat"), -+ new BoatType("spruce", "boat"), -+ new BoatType("birch", "boat"), -+ new BoatType("jungle", "boat"), -+ new BoatType("acacia", "boat"), -+ new BoatType("cherry", "boat"), -+ new BoatType("dark_oak", "boat"), -+ new BoatType("mangrove", "boat"), -+ new BoatType("bamboo", "raft") -+ }; -+ -+ private static void registerChestBoat(final String id) { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerItemLists("Items")); -+ } -+ -+ public static void register() { -+ // minecraft:oak_boat is a simple entity -+ // minecraft:spruce_boat is a simple entity -+ // minecraft:birch_boat is a simple entity -+ // minecraft:jungle_boat is a simple entity -+ // minecraft:acacia_boat is a simple entity -+ // minecraft:cherry_boat is a simple entity -+ // minecraft:dark_oak_boat is a simple entity -+ // minecraft:mangrove_boat is a simple entity -+ // minecraft:bamboo_raft is a simple entity -+ -+ registerChestBoat("minecraft:oak_chest_boat"); -+ registerChestBoat("minecraft:spruce_chest_boat"); -+ registerChestBoat("minecraft:birch_chest_boat"); -+ registerChestBoat("minecraft:jungle_chest_boat"); -+ registerChestBoat("minecraft:acacia_chest_boat"); -+ registerChestBoat("minecraft:cherry_chest_boat"); -+ registerChestBoat("minecraft:dark_oak_chest_boat"); -+ registerChestBoat("minecraft:mangrove_chest_boat"); -+ registerChestBoat("minecraft:bamboo_chest_raft"); -+ -+ // we do not update V704 to set the new boat types, as the new ids are only registered here -+ // if we updated V704 to set the new boat types, then the registered walkers for the chest_boat would not run before -+ // V4067 as they are only registered here -+ -+ // to ensure that the id is correctly set eventually, we will force Type to the correct value based on the item id -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final Map BOAT_TYPES_BY_ITEM_ID = new HashMap<>(); -+ static { -+ for (final BoatType boatType : BOAT_TYPES) { -+ BOAT_TYPES_BY_ITEM_ID.put(boatType.name() + "_" + boatType.suffix(), boatType.name()); -+ BOAT_TYPES_BY_ITEM_ID.put(boatType.name() + "_chest_" + boatType.suffix(), boatType.name()); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ final String boatType = BOAT_TYPES_BY_ITEM_ID.get(id); -+ -+ if (boatType == null) { -+ return null; -+ } -+ -+ final MapType components = data.getMap("components"); -+ if (components == null) { -+ return null; -+ } -+ -+ final MapType entityData = components.getMap("minecraft:entity_data"); -+ if (entityData == null) { -+ return null; -+ } -+ -+ entityData.setString("Type", boatType); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final Map NORMAL_REMAPPING = new HashMap<>(BOAT_TYPES.length); -+ static { -+ for (final BoatType type : BOAT_TYPES) { -+ NORMAL_REMAPPING.put(type.name(), type.name() + "_" + type.suffix()); -+ } -+ } -+ private static final Map CHEST_REMAPPING = new HashMap<>(BOAT_TYPES.length); -+ static { -+ for (final BoatType type : BOAT_TYPES) { -+ CHEST_REMAPPING.put(type.name(), type.name() + "_chest_" + type.suffix()); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ if (id == null) { -+ // wat -+ return null; -+ } -+ -+ final boolean normalBoat = id.equals("minecraft:boat"); -+ final boolean chestBoat = id.equals("minecraft:chest_boat"); -+ -+ if (!normalBoat && !chestBoat) { -+ return null; -+ } -+ -+ final String type = data.getString("Type"); -+ data.remove("Type"); -+ -+ if (normalBoat) { -+ data.setString("id", NORMAL_REMAPPING.getOrDefault(type, "minecraft:oak_boat")); -+ } else { -+ data.setString("id", CHEST_REMAPPING.getOrDefault(type, "minecraft:oak_chest_boat")); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.LIGHTWEIGHT_LEVEL.addStructureConverter( -+ new ConverterRemoveFeatureFlag(VERSION, new HashSet<>(Arrays.asList("minecraft:bundle"))) -+ ); -+ } -+ -+ private V4067() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4068.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4068.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d24c33863e66010f4a6394a9afcc8ad7600969de ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4068.java -@@ -0,0 +1,65 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import com.google.common.escape.Escaper; -+import com.google.common.escape.Escapers; -+ -+public final class V4068 { -+ public static final Escaper ESCAPER = Escapers.builder().addEscape('"', "\\\"").addEscape('\\', "\\\\").build(); -+ -+ private static final int VERSION = MCVersions.V24W38A + 2; -+ -+ private static void convertLock(final MapType root, final String srcPath, final String dstPath) { -+ if (root == null) { -+ return; -+ } -+ -+ final Object lockGeneric = root.getGeneric(srcPath); -+ if (lockGeneric == null) { -+ return; -+ } -+ -+ final TypeUtil typeUtil = root.getTypeUtil(); -+ -+ root.remove(srcPath); -+ -+ if (lockGeneric instanceof String lock && !lock.isEmpty()) { -+ final MapType newLock = typeUtil.createEmptyMap(); -+ root.setMap(dstPath, newLock); -+ -+ final MapType lockComponents = typeUtil.createEmptyMap(); -+ newLock.setMap("components", lockComponents); -+ -+ lockComponents.setString("minecraft:custom_name", ESCAPER.escape(lock)); -+ } -+ } -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType components = data.getMap("components"); -+ if (components == null) { -+ return null; -+ } -+ -+ convertLock(components, "minecraft:lock", "minecraft:lock"); -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.TILE_ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ convertLock(data, "Lock", "lock"); -+ return null; -+ } -+ }); -+ } -+ -+ private V4068() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4070.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4070.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b85673d792d4b1c317d312ba607a0d30c2f57ea9 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4070.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+ -+public final class V4070 { -+ -+ private static final int VERSION = MCVersions.V24W39A + 1; -+ -+ private static void registerChestBoat(final String id) { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerItemLists("Items")); -+ } -+ -+ public static void register() { -+ // minecraft:pale_oak_boat is a simple entity -+ -+ registerChestBoat("minecraft:pale_oak_chest_boat"); -+ } -+ -+ private V4070() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4071.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4071.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d00e834ebb7ebdd544f4934375a5a8ba1882d89e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4071.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V4071 { -+ -+ private static final int VERSION = MCVersions.V24W39A + 2; -+ -+ public static void register() { -+ //registerMob("minecraft:creaking"); // changed to simple in 1.21.5 -+ //registerMob("minecraft:creaking_transient"); // changed to simple in 1.21.5 -+ -+ // minecraft:creaking_heart is a simple tile entity -+ } -+ -+ private V4071() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4081.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4081.java -new file mode 100644 -index 0000000000000000000000000000000000000000..214dd539edabc44ada373012b1256747ca373e92 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4081.java -@@ -0,0 +1,27 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4081 { -+ -+ private static final int VERSION = MCVersions.V1_21_2 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:salmon", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if ("large".equals(data.getString("type"))) { -+ return null; -+ } -+ -+ data.setString("type", "medium"); -+ return null; -+ } -+ }); -+ } -+ -+ private V4081() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4173.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4173.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e9cff7ce434ca60196c25c44cd98e28dc5b9d151 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4173.java -@@ -0,0 +1,24 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4173 { -+ -+ private static final int VERSION = MCVersions.V1_21_3 + 91; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "TNTFuse", "fuse"); -+ return null; -+ } -+ }); -+ } -+ -+ private V4173() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4175.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4175.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5812c07643dc21d0db4ebe808ffda0612454c00f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4175.java -@@ -0,0 +1,40 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+ -+public final class V4175 { -+ -+ private static final int VERSION = MCVersions.V24W44A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.DATA_COMPONENTS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data.getMap("minecraft:equippable"), "model", "asset_id"); -+ -+ final Number modelData = data.getNumber("minecraft:custom_model_data"); -+ if (modelData != null) { -+ final TypeUtil typeUtil = data.getTypeUtil(); -+ -+ final MapType newModelData = typeUtil.createEmptyMap(); -+ data.setMap("minecraft:custom_model_data", newModelData); -+ -+ final ListType floats = typeUtil.createEmptyList(); -+ newModelData.setList("floats", floats); -+ -+ floats.addFloat(modelData.floatValue()); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4175() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4176.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4176.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c60f6da5422cc31a92164b5bc62f2afb8e962b00 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4176.java -@@ -0,0 +1,44 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4176 { -+ -+ private static final int VERSION = MCVersions.V24W44A + 2; -+ -+ private static void fixInvalidLock(final MapType root, final String path) { -+ final MapType lock = root.getMap(path); -+ if (lock == null || lock.size() != 1) { -+ return; -+ } -+ -+ final MapType components = lock.getMap("components"); -+ if (components == null || components.size() != 1 || !"\"\"".equals(components.getString("minecraft:custom_name"))) { -+ return; -+ } -+ -+ root.remove(path); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ fixInvalidLock(data, "lock"); -+ return null; -+ } -+ }); -+ MCTypeRegistry.DATA_COMPONENTS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ fixInvalidLock(data, "minecraft:lock"); -+ return null; -+ } -+ }); -+ } -+ -+ private V4176() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4180.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4180.java -new file mode 100644 -index 0000000000000000000000000000000000000000..76eeb8739d9c517a7843545f230853d214ecb8b2 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4180.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.leveldat.ConverterRemoveFeatureFlag; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import java.util.Arrays; -+import java.util.HashSet; -+ -+public final class V4180 { -+ -+ private static final int VERSION = MCVersions.V1_21_4_PRE1 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.LIGHTWEIGHT_LEVEL.addStructureConverter(new ConverterRemoveFeatureFlag(VERSION, new HashSet<>( -+ Arrays.asList( -+ "minecraft:winter_drop" -+ ) -+ ))); -+ } -+ -+ private V4180() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4181.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4181.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8533e5924f5d5542692f511c11487c05bf61f486 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4181.java -@@ -0,0 +1,36 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4181 { -+ -+ private static final int VERSION = MCVersions.V1_21_4_PRE1 + 2; -+ -+ public static void register() { -+ final DataConverter furnaceConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ RenameHelper.renameSingle(data, "CookTime", "cooking_time_spent"); -+ RenameHelper.renameSingle(data, "CookTimeTotal", "cooking_total_time"); -+ RenameHelper.renameSingle(data, "BurnTime", "lit_time_remaining"); -+ -+ final Object litTotalTime = data.getGeneric("lit_time_remaining"); -+ if (litTotalTime != null) { -+ data.setGeneric("lit_total_time", litTotalTime); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:furnace", furnaceConverter); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:smoker", furnaceConverter); -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:blast_furnace", furnaceConverter); -+ } -+ -+ private V4181() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4185.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4185.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8b4041d3d3a4a001bf06eaedbddad1b297122b12 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4185.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.chunk.ConverterAddBlendingData; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V4185 { -+ -+ private static final int VERSION = MCVersions.V1_21_4_RC1 + 1; -+ -+ public static void register() { -+ // See V3088 for why this converter is duplicated in here, V3441, and V3088 -+ MCTypeRegistry.CHUNK.addStructureConverter(new ConverterAddBlendingData(VERSION)); -+ } -+ -+ private V4185() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4187.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4187.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7d09c4218d0db8119d1681bf95900be830557fa3 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4187.java -@@ -0,0 +1,69 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.attributes.ConverterEntityAttributesBaseValueUpdater; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V4187 { -+ -+ private static final int VERSION = MCVersions.V1_21_4_RC2 + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId( -+ "minecraft:villager", -+ new ConverterEntityAttributesBaseValueUpdater( -+ VERSION, "minecraft:follow_range", -+ (final double curr) -> { -+ return curr == 48.0 ? 16.0 : curr; -+ } -+ ) -+ ); -+ MCTypeRegistry.ENTITY.addConverterForId( -+ "minecraft:bee", -+ new ConverterEntityAttributesBaseValueUpdater( -+ VERSION, "minecraft:follow_range", -+ (final double curr) -> { -+ return curr == 48.0 ? 16.0 : curr; -+ } -+ ) -+ ); -+ MCTypeRegistry.ENTITY.addConverterForId( -+ "minecraft:allay", -+ new ConverterEntityAttributesBaseValueUpdater( -+ VERSION, "minecraft:follow_range", -+ (final double curr) -> { -+ return curr == 48.0 ? 16.0 : curr; -+ } -+ ) -+ ); -+ MCTypeRegistry.ENTITY.addConverterForId( -+ "minecraft:llama", -+ new ConverterEntityAttributesBaseValueUpdater( -+ VERSION, "minecraft:follow_range", -+ (final double curr) -> { -+ return curr == 48.0 ? 16.0 : curr; -+ } -+ ) -+ ); -+ MCTypeRegistry.ENTITY.addConverterForId( -+ "minecraft:piglin_brute", -+ new ConverterEntityAttributesBaseValueUpdater( -+ VERSION, "minecraft:follow_range", -+ (final double curr) -> { -+ return curr == 16.0 ? 12.0 : curr; -+ } -+ ) -+ ); -+ MCTypeRegistry.ENTITY.addConverterForId( -+ "minecraft:warden", -+ new ConverterEntityAttributesBaseValueUpdater( -+ VERSION, "minecraft:follow_range", -+ (final double curr) -> { -+ return curr == 16.0 ? 24.0 : curr; -+ } -+ ) -+ ); -+ } -+ -+ private V4187() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d5dfa9a64e2d3f9a37a5bdde60b92ed93bd89aed ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4290.java -@@ -0,0 +1,312 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.types.Types; -+import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; -+import com.google.gson.JsonElement; -+import com.google.gson.JsonParseException; -+import com.google.gson.JsonParser; -+import com.mojang.logging.LogUtils; -+import net.minecraft.nbt.TagParser; -+import org.slf4j.Logger; -+ -+public final class V4290 { -+ -+ public static final int VERSION = MCVersions.V1_21_4 + 101; -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static void convertNestedList(final ListType components) { -+ if (components == null) { -+ return; -+ } -+ for (int i = 0, len = components.size(); i < len; ++i) { -+ convertNested(components.getGeneric(i)); -+ } -+ } -+ -+ private static void convertNested(final Object component) { -+ if (component instanceof ListType listType) { -+ convertNestedList(listType); -+ } else if (component instanceof MapType root) { -+ convertLegacyHover(root); -+ -+ convertNestedList(root.getListUnchecked("extra")); -+ convertNested(root.getGeneric("separator")); -+ -+ final MapType hoverEvent = root.getMap("hoverEvent"); -+ if (hoverEvent != null) { -+ switch (hoverEvent.getString("action", "")) { -+ case "show_text": { -+ convertNested(hoverEvent.getGeneric("contents")); -+ break; -+ } -+ case "show_item": { -+ break; -+ } -+ case "show_entity": { -+ convertNested(hoverEvent.getGeneric("name")); -+ break; -+ } -+ // default: do nothing -+ } -+ } -+ } // else: should only be string -+ } -+ -+ private static void convertLegacyHover(final MapType textComponent) { -+ final TypeUtil typeUtil = textComponent.getTypeUtil(); -+ final MapType hoverEvent = textComponent.getMap("hoverEvent"); -+ if (hoverEvent == null) { -+ return; -+ } -+ -+ final Object legacyValue = hoverEvent.getGeneric("value"); -+ if (legacyValue == null) { -+ // nothing to do here -+ return; -+ } -+ -+ switch (hoverEvent.getString("action", "")) { -+ case "show_text": { -+ // value -> another text component; all we need to do is just move it to contents -+ hoverEvent.remove("value"); -+ hoverEvent.setGeneric("contents", legacyValue); -+ break; -+ } -+ case "show_item": { -+ // value -> snbt of serialized item -+ hoverEvent.remove("value"); -+ if (!(legacyValue instanceof String legacyItemStr)) { -+ LOGGER.error("Legacy HoverEvent with action=show_item has invalid value, expected string: " + legacyValue); -+ break; -+ } -+ -+ final MapType legacyItem; -+ try { -+ legacyItem = new NBTMapType(TagParser.parseCompoundFully(legacyItemStr)); -+ } catch (final Exception ex) { -+ LOGGER.error("Failed to parse SNBT for legacy item HoverEvent: " + legacyItemStr, ex); -+ break; -+ } -+ -+ // note: blindly take precedence over non-legacy data -+ hoverEvent.setMap("contents", legacyItem); -+ break; -+ } -+ case "show_entity": { -+ // value -> snbt of {name:,type:,id:} -+ hoverEvent.remove("value"); -+ if (!(legacyValue instanceof String legacyEntityStr)) { -+ LOGGER.error("Legacy HoverEvent with action=show_entity has invalid value, expected string: " + legacyValue); -+ break; -+ } -+ -+ final MapType legacyEntity; -+ try { -+ legacyEntity = new NBTMapType(TagParser.parseCompoundFully(legacyEntityStr)); -+ } catch (final Exception ex) { -+ LOGGER.error("Failed to parse SNBT for legacy entity HoverEvent: " + legacyEntityStr, ex); -+ break; -+ } -+ -+ final MapType newContents = typeUtil.createEmptyMap(); -+ // note: blindly take precedence over non-legacy data -+ hoverEvent.setMap("contents", newContents); -+ -+ final String name = legacyEntity.getString("name"); -+ if (name != null) { -+ newContents.setString("name", name); -+ } -+ final String type = legacyEntity.getString("type"); -+ if (type != null) { -+ newContents.setString("type", type); -+ } -+ final String id = legacyEntity.getString("id"); -+ if (id != null) { -+ newContents.setString("id", id); -+ } -+ -+ break; -+ } -+ // default: do nothing -+ } -+ } -+ -+ private static void directWalkComponentList(final ListType list, final long fromVersion, final long toVersion) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ directWalkComponent(list.getGeneric(i), fromVersion, toVersion); -+ } -+ } -+ -+ private static void directWalkComponent(final Object input, final long fromVersion, final long toVersion) { -+ if (input instanceof ListType listType) { -+ directWalkComponentList(listType, fromVersion, toVersion); -+ } else if (input instanceof MapType root) { -+ final ListType extra = root.getListUnchecked("extra"); -+ if (extra != null) { -+ directWalkComponentList(extra, fromVersion, toVersion); -+ } -+ -+ final Object separator = root.getGeneric("separator"); -+ if (separator != null) { -+ directWalkComponent(separator, fromVersion, toVersion); -+ } -+ -+ final MapType clickEvent = root.getMap("clickEvent"); -+ if (clickEvent != null) { -+ switch (clickEvent.getString("action", "")) { -+ case "run_command": -+ case "suggest_command": { -+ WalkerUtils.convert(MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND, clickEvent, "value", fromVersion, toVersion); -+ break; -+ } -+ } -+ } -+ -+ final MapType hoverEvent = root.getMap("hoverEvent"); -+ if (hoverEvent != null) { -+ switch (hoverEvent.getString("action", "")) { -+ case "show_text": { -+ final Object contents = hoverEvent.getGeneric("contents"); -+ if (contents != null) { -+ directWalkComponent(contents, fromVersion, toVersion); -+ } -+ break; -+ } -+ case "show_item": { -+ if (hoverEvent.hasKey("contents", ObjectType.STRING)) { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_NAME, hoverEvent, "contents", fromVersion, toVersion); -+ } else { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, hoverEvent, "contents", fromVersion, toVersion); -+ } -+ break; -+ } -+ case "show_entity": { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY_NAME, hoverEvent, "type", fromVersion, toVersion); -+ -+ final Object name = hoverEvent.getGeneric("name"); -+ if (name != null) { -+ directWalkComponent(name, fromVersion, toVersion); -+ } -+ break; -+ } -+ // default: do nothing -+ } -+ } -+ } // else: should only be string -+ } -+ -+ public static void register() { -+ MCTypeRegistry.TEXT_COMPONENT.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ if (data instanceof ListType) { -+ // will be iterated by walker -+ return null; -+ } -+ if (data instanceof MapType) { -+ // (probably) iterated by walker -+ return null; -+ } -+ if (data instanceof Number number) { -+ // text component parsed as list of numbers, which was then iterated by walker -+ // we need to convert to correct type, which is string -+ return number.toString(); -+ } -+ if (data instanceof Boolean bool) { -+ // text component parsed as list of booleans, which was then iterated by walker -+ // we need to convert to correct type, which is string -+ return bool.toString(); -+ } -+ -+ if (!(data instanceof String unparsedJson)) { -+ throw new IllegalArgumentException("Wrong type for text component: " + data); -+ } -+ -+ try { -+ final JsonElement json = JsonParser.parseString(unparsedJson); -+ -+ if (!json.isJsonNull()) { -+ final Object generic = Types.JSON.convertFromBaseToGeneric(json, Types.NBT); -+ final Object ret = switch (generic) { -+ case Number nt -> nt.toString(); // json may parse as integer, need to convert to string -+ case Boolean bt -> bt.toString(); // json may parse as boolean, need to convert to string -+ case String s -> s; // simple string component -+ case ListType lt -> lt; // list of text components -+ case MapType ct -> ct; // complex text component -+ case byte[] bt -> throw new IllegalStateException("Unexpected byte[] output from JsonTypeUtil"); -+ case int[] it -> throw new IllegalStateException("Unexpected int[] output from JsonTypeUtil"); -+ case long[] lt -> throw new IllegalStateException("Unexpected long[] output from JsonTypeUtil"); -+ // null is handled by isJsonNull() -+ default -> throw new IllegalStateException("Unknown nbt type: " + generic); -+ }; -+ -+ convertNested(ret); -+ directWalkComponent(ret, sourceVersion, toVersion); -+ return ret; -+ } -+ } catch (final JsonParseException ex) { -+ LOGGER.error("Failed to convert json to nbt: " + unparsedJson, ex); -+ } -+ -+ return null; -+ } -+ }); -+ -+ // step 1 -+ MCTypeRegistry.TEXT_COMPONENT.addStructureWalker(VERSION, 1, (final Object input, final long fromVersion, final long toVersion) -> { -+ if (input instanceof ListType listType) { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, listType, fromVersion, toVersion); -+ } else if (input instanceof MapType root) { -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, root, "extra", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "separator", fromVersion, toVersion); -+ -+ final MapType clickEvent = root.getMap("clickEvent"); -+ if (clickEvent != null) { -+ switch (clickEvent.getString("action", "")) { -+ case "run_command": -+ case "suggest_command": { -+ WalkerUtils.convert(MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND, clickEvent, "value", fromVersion, toVersion); -+ break; -+ } -+ } -+ } -+ -+ final MapType hoverEvent = root.getMap("hoverEvent"); -+ if (hoverEvent != null) { -+ switch (hoverEvent.getString("action", "")) { -+ case "show_text": { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, hoverEvent, "contents", fromVersion, toVersion); -+ break; -+ } -+ case "show_item": { -+ if (hoverEvent.hasKey("contents", ObjectType.STRING)) { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_NAME, hoverEvent, "contents", fromVersion, toVersion); -+ } else { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, hoverEvent, "contents", fromVersion, toVersion); -+ } -+ break; -+ } -+ case "show_entity": { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY_NAME, hoverEvent, "type", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, hoverEvent, "name", fromVersion, toVersion); -+ break; -+ } -+ // default: do nothing -+ } -+ } -+ } // else: should only be string -+ return null; -+ }); -+ } -+ -+ private V4290() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4291.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4291.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9c01fa1f41735dd54641533ce6eefec381270993 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4291.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4291 { -+ -+ public static final int VERSION = MCVersions.V1_21_4 + 102; -+ -+ public static void register() { -+ // V4290 correctly handles legacy hover events, so we skip that converter. -+ MCTypeRegistry.TEXT_COMPONENT.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final String[] BOOLEAN_PATHS_TO_CONVERT = new String[] { -+ "bold", -+ "italic", -+ "underlined", -+ "strikethrough", -+ "obfuscated", -+ // add extra interpret field -+ "interpret", -+ }; -+ -+ private static void convertToBoolean(final MapType data, final String path) { -+ final String value = data.getString(path); -+ if (value != null) { -+ data.setBoolean(path, Boolean.parseBoolean(value)); -+ } -+ } -+ -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ if (data instanceof MapType root) { -+ for (final String path : BOOLEAN_PATHS_TO_CONVERT) { -+ convertToBoolean(root, path); -+ } -+ } // else: list -> handled by walker, string -> no formatting to convert -+ return null; -+ } -+ }); -+ } -+ -+ private V4291() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4292.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4292.java -new file mode 100644 -index 0000000000000000000000000000000000000000..34f20d3cb6595eaa11e00126804ef7bd3fafa05b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4292.java -@@ -0,0 +1,180 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.CopyHelper; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import java.net.URI; -+ -+public final class V4292 { -+ -+ private static final int VERSION = MCVersions.V1_21_4 + 103; -+ -+ public static void register() { -+ MCTypeRegistry.TEXT_COMPONENT.addStructureConverter(new DataConverter<>(VERSION) { -+ private static boolean isWebUrl(final String value) { -+ try { -+ final String scheme = new URI(value).getScheme(); -+ -+ return "http".equalsIgnoreCase(scheme) || "https".equalsIgnoreCase(scheme); -+ } catch (final Exception ex) { -+ return false; -+ } -+ } -+ -+ private static boolean isValidCommandOrChat(final String value) { -+ for (int i = 0, len = value.length(); i < len; ++i) { -+ final char c = value.charAt(i); -+ -+ if (c < ' ' || c == 127 || c == 167) { -+ return false; -+ } -+ } -+ -+ return true; -+ } -+ -+ private static Integer parseInteger(final MapType root, final String path) { -+ final Object value = root.getGeneric(path); -+ if (value instanceof String string) { -+ try { -+ return Integer.parseInt(string); -+ } catch (final Exception ex) { -+ return null; -+ } -+ } else if (value instanceof Number number) { -+ return Integer.valueOf(number.intValue()); -+ } -+ -+ return null; -+ } -+ -+ @Override -+ public Object convert(final Object data, final long sourceVersion, final long toVersion) { -+ if (!(data instanceof MapType root)) { -+ // list or string, don't care about formatting for those -+ return null; -+ } -+ -+ RenameHelper.renameSingle(root, "hoverEvent", "hover_event"); -+ final MapType hoverEvent = root.getMap("hover_event"); -+ if (hoverEvent != null) { -+ switch (hoverEvent.getString("action", "")) { -+ case "show_text": { -+ RenameHelper.renameSingle(hoverEvent, "contents", "value"); -+ break; -+ } -+ case "show_item": { -+ if (hoverEvent.hasKey("contents", ObjectType.STRING)) { -+ RenameHelper.renameSingle(hoverEvent, "contents", "id"); -+ } else { -+ final MapType contents = hoverEvent.getOrCreateMap("contents"); -+ hoverEvent.remove("contents"); -+ -+ CopyHelper.move(contents, "id", hoverEvent, "id"); -+ CopyHelper.move(contents, "count", hoverEvent, "count"); -+ CopyHelper.move(contents, "components", hoverEvent, "components"); -+ } -+ break; -+ } -+ case "show_entity": { -+ final MapType contents = hoverEvent.getOrCreateMap("contents"); -+ hoverEvent.remove("contents"); -+ -+ CopyHelper.move(contents, "id", hoverEvent, "uuid"); -+ CopyHelper.move(contents, "type", hoverEvent, "id"); -+ CopyHelper.move(contents, "name", hoverEvent, "name"); -+ -+ break; -+ } -+ -+ // default: do nothing -+ } -+ } -+ -+ RenameHelper.renameSingle(root, "clickEvent", "click_event"); -+ final MapType clickEvent = root.getMap("click_event"); -+ if (clickEvent != null) { -+ final String value = clickEvent.getString("value", ""); -+ -+ switch (clickEvent.getString("action", "")) { -+ case "open_url": { -+ if (!isWebUrl(value)) { -+ root.remove("click_event"); -+ break; -+ } -+ RenameHelper.renameSingle(clickEvent, "value", "url"); -+ break; -+ } -+ case "open_file": { -+ RenameHelper.renameSingle(clickEvent, "value", "path"); -+ break; -+ } -+ case "run_command": -+ case "suggest_command": { -+ if (!isValidCommandOrChat(value)) { -+ root.remove("click_event"); -+ break; -+ } -+ RenameHelper.renameSingle(clickEvent, "value", "command"); -+ break; -+ } -+ case "change_page": { -+ final Integer page = parseInteger(clickEvent, "value"); -+ if (page == null) { -+ root.remove("click_event"); -+ break; -+ } -+ clickEvent.remove("value"); -+ clickEvent.setInt("page", Math.max(1, page.intValue())); -+ } -+ -+ // default: do nothing -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TEXT_COMPONENT.addStructureWalker(VERSION, (final Object input, final long fromVersion, final long toVersion) -> { -+ if (input instanceof ListType listType) { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, listType, fromVersion, toVersion); -+ } else if (input instanceof MapType root) { -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, root, "extra", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "separator", fromVersion, toVersion); -+ -+ -+ WalkerUtils.convert(MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND, root.getMap("clickEvent"), "command", fromVersion, toVersion); -+ -+ final MapType hoverEvent = root.getMap("hover_event"); -+ if (hoverEvent != null) { -+ switch (hoverEvent.getString("action", "")) { -+ case "show_text": { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, hoverEvent, "value", fromVersion, toVersion); -+ break; -+ } -+ case "show_item": { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "hover_event", fromVersion, toVersion); -+ break; -+ } -+ case "show_entity": { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY_NAME, hoverEvent, "id", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, hoverEvent, "name", fromVersion, toVersion); -+ break; -+ } -+ // default: do nothing -+ } -+ } -+ } // else: should only be string -+ return null; -+ }); -+ } -+ -+ private V4292() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4293.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4293.java -new file mode 100644 -index 0000000000000000000000000000000000000000..aac34658c39c568baba069ae151bcd7802bdad27 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4293.java -@@ -0,0 +1,71 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4293 { -+ -+ private static final int VERSION = MCVersions.V1_21_4 + 104; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final float DEFAULT = 0.085f; -+ -+ private static final String[] ARMOR_SLOTS = new String[] { -+ "feet", -+ "legs", -+ "chest", -+ "head" -+ }; -+ -+ private static final String[] HAND_SLOTS = new String[] { -+ "mainhand", -+ "offhand" -+ }; -+ -+ private static void convertDropChances(final MapType root, final String srcPath, final String[] names, final MapType dst) { -+ final ListType oldChances = root.getListUnchecked(srcPath); -+ -+ if (oldChances == null) { -+ return; -+ } -+ -+ for (int i = 0, len = Math.min(oldChances.size(), names.length); i < len; ++i) { -+ final float chance = oldChances.getFloat(i, DEFAULT); -+ if (chance != DEFAULT) { -+ dst.setFloat(names[i], chance); -+ } -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType dropChances = data.getTypeUtil().createEmptyMap(); -+ -+ convertDropChances(data, "ArmorDropChances", ARMOR_SLOTS, dropChances); -+ convertDropChances(data, "HandDropChances", HAND_SLOTS, dropChances); -+ -+ data.remove("ArmorDropChances"); -+ data.remove("HandDropChances"); -+ -+ final float body = data.getFloat("body_armor_drop_chance", DEFAULT); -+ data.remove("body_armor_drop_chance"); -+ -+ if (body != DEFAULT) { -+ dropChances.setFloat("body", body); -+ } -+ -+ if (!dropChances.isEmpty()) { -+ data.setMap("drop_chances", dropChances); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4293() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4294.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4294.java -new file mode 100644 -index 0000000000000000000000000000000000000000..86f4c268197d90270768786f3911258e841040ea ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4294.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4294 { -+ -+ private static final int VERSION = MCVersions.V1_21_4 + 105; -+ -+ public static void register() { -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"minecraft:creaking_heart".equals(data.getString("Name"))) { -+ return null; -+ } -+ -+ final MapType properties = data.getMap("Properties"); -+ if (properties == null) { -+ return null; -+ } -+ -+ final String active = properties.getString("active"); -+ if (active == null) { -+ return null; -+ } -+ properties.remove("active"); -+ properties.setString("creaking_heart_state", active.equals("true") ? "awake" : "uprooted"); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4294() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4295.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4295.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e85a156f21f826faf5e04a5f93df7e3b77ebc15c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4295.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.chunk.ConverterAddBlendingData; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+ -+public final class V4295 { -+ -+ private static final int VERSION = MCVersions.V1_21_4 + 106; -+ -+ public static void register() { -+ // See V3088 for why this converter is duplicated in here, V4185, V3441, and V3088 -+ MCTypeRegistry.CHUNK.addStructureConverter(new ConverterAddBlendingData(VERSION)); -+ } -+ -+ private V4295() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4296.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4296.java -new file mode 100644 -index 0000000000000000000000000000000000000000..a22ee6dee2f14a61688734a1afa71dc55d90ff43 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4296.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4296 { -+ -+ private static final int VERSION = MCVersions.V1_21_4 + 107; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:area_effect_cloud", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setFloat("potion_duration_scale", 0.25f); -+ return null; -+ } -+ }); -+ } -+ -+ private V4296() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4297.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4297.java -new file mode 100644 -index 0000000000000000000000000000000000000000..83c2c4e3e3c73e605d0f57b7c85db1bef64f982f ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4297.java -@@ -0,0 +1,51 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+ -+public final class V4297 { -+ -+ private static final int VERSION = MCVersions.V1_21_4 + 108; -+ -+ public static void register() { -+ MCTypeRegistry.SAVED_DATA_TICKETS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ final long[] forced = data.getLongs("Forced"); -+ if (forced == null) { -+ return null; -+ } -+ -+ data.remove("Forced"); -+ -+ final TypeUtil typeUtil = data.getTypeUtil(); -+ -+ final ListType tickets = typeUtil.createEmptyList(); -+ data.setList("tickets", tickets); -+ -+ for (final long coordinate : forced) { -+ final MapType ticket = typeUtil.createEmptyMap(); -+ tickets.addMap(ticket); -+ -+ ticket.setString("type", "minecraft:forced"); -+ ticket.setInt("level", 31); -+ ticket.setLong("ticks_left", 0L); -+ ticket.setLong("chunk_pos", coordinate); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4297() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4299.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4299.java -new file mode 100644 -index 0000000000000000000000000000000000000000..e09c5ed9bd872ddb4d809b28434d35d48b065564 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4299.java -@@ -0,0 +1,140 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+ -+public final class V4299 { -+ -+ private static final int VERSION = MCVersions.V25W02A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final String[] AXOLOTL_VARIANT_LOOKUP = new String[] { -+ "lucy", -+ "wild", -+ "gold", -+ "cyan", -+ "blue", -+ }; -+ -+ private static final Int2ObjectOpenHashMap FISH_PATTERN_LOOKUP = new Int2ObjectOpenHashMap<>(); -+ static { -+ FISH_PATTERN_LOOKUP.defaultReturnValue("kob"); -+ FISH_PATTERN_LOOKUP.put(1,"flopper"); -+ FISH_PATTERN_LOOKUP.put(256,"sunstreak"); -+ FISH_PATTERN_LOOKUP.put(257,"stripey"); -+ FISH_PATTERN_LOOKUP.put(512,"snooper"); -+ FISH_PATTERN_LOOKUP.put(513,"glitter"); -+ FISH_PATTERN_LOOKUP.put(768,"dasher"); -+ FISH_PATTERN_LOOKUP.put(769,"blockfish"); -+ FISH_PATTERN_LOOKUP.put(1024,"brinely"); -+ FISH_PATTERN_LOOKUP.put(1025,"betty"); -+ FISH_PATTERN_LOOKUP.put(1280,"spotty"); -+ FISH_PATTERN_LOOKUP.put(1281,"clayfish"); -+ } -+ -+ private static String lookupAxolotl(final int index) { -+ return index >= 0 && index < AXOLOTL_VARIANT_LOOKUP.length ? AXOLOTL_VARIANT_LOOKUP[index] : AXOLOTL_VARIANT_LOOKUP[0]; -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType components = data.getMap("components"); -+ if (components == null) { -+ return null; -+ } -+ -+ final String id = data.getString("id"); -+ switch (id) { -+ case "minecraft:axolotl_bucket": { -+ final MapType bucketEntityData = components.getMap("minecraft:bucket_entity_data"); -+ if (bucketEntityData == null) { -+ break; -+ } -+ -+ final Number variant = bucketEntityData.getNumber("Variant"); -+ if (variant == null) { -+ break; -+ } -+ -+ bucketEntityData.remove("Variant"); -+ components.setString("minecraft:axolotl/variant", lookupAxolotl(variant.intValue())); -+ -+ break; -+ } -+ case "minecraft:salmon_bucket": { -+ final MapType bucketEntityData = components.getMap("minecraft:bucket_entity_data"); -+ if (bucketEntityData == null) { -+ break; -+ } -+ -+ final Object type = bucketEntityData.getGeneric("type"); -+ if (type == null) { -+ break; -+ } -+ bucketEntityData.remove("type"); -+ components.setGeneric("minecraft:salmon/size", type); -+ -+ break; -+ } -+ case "minecraft:tropical_fish_bucket": { -+ final MapType bucketEntityData = components.getMap("minecraft:bucket_entity_data"); -+ if (bucketEntityData == null) { -+ break; -+ } -+ -+ final Number variantBoxed = bucketEntityData.getNumber("BucketVariantTag"); -+ if (variantBoxed == null) { -+ break; -+ } -+ bucketEntityData.remove("BucketVariantTag"); -+ -+ final int variant = variantBoxed.intValue(); -+ -+ final String fishPattern = FISH_PATTERN_LOOKUP.get(variant & 0xFFFF); -+ final String baseColour = V3818.getBannerColour((variant >>> 16) & 0xFF); -+ final String patternColour = V3818.getBannerColour((variant >>> 24) & 0xFF); -+ -+ components.setString("minecraft:tropical_fish/pattern", fishPattern); -+ components.setString("minecraft:tropical_fish/base_color", baseColour); -+ components.setString("minecraft:tropical_fish/pattern_color", patternColour); -+ -+ break; -+ } -+ case "minecraft:painting": { -+ final MapType entityData = components.getMap("minecraft:entity_data"); -+ -+ if (entityData == null) { -+ break; -+ } -+ -+ if (!"minecraft:painting".equals(entityData.getString("id"))) { -+ break; -+ } -+ -+ final Object variant = entityData.getGeneric("variant"); -+ if (variant != null) { -+ entityData.remove("variant"); -+ components.setGeneric("minecraft:painting/variant", variant); -+ } -+ if (entityData.size() == 1) { -+ components.remove("minecraft:entity_data"); -+ } -+ -+ break; -+ } -+ default: { -+ return null; -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4299() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4300.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4300.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0619fc8509177e8f66e6a33072249d2468789fef ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4300.java -@@ -0,0 +1,89 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.Arrays; -+import java.util.HashSet; -+import java.util.Set; -+ -+public final class V4300 { -+ -+ private static final int VERSION = MCVersions.V25W02A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final Set SADDLE_ITEM_ENTITIES = new HashSet<>( -+ Arrays.asList( -+ "minecraft:horse", -+ "minecraft:skeleton_horse", -+ "minecraft:zombie_horse", -+ "minecraft:donkey", -+ "minecraft:mule", -+ "minecraft:camel", -+ "minecraft:llama", -+ "minecraft:trader_llama" -+ ) -+ ); -+ private static final Set SADDLE_FLAG_ENTITIES = new HashSet<>( -+ Arrays.asList( -+ "minecraft:pig", -+ "minecraft:strider" -+ ) -+ ); -+ -+ private static void setGuaranteedSaddleDropChance(final MapType data) { -+ data.getOrCreateMap("drop_chances").setFloat("saddle", 2.0f); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ -+ if (SADDLE_ITEM_ENTITIES.contains(id)) { -+ if (!RenameHelper.renameSingle(data, "SaddleItem", "saddle")) { -+ return null; -+ } -+ -+ setGuaranteedSaddleDropChance(data); -+ -+ return null; -+ } else if (SADDLE_FLAG_ENTITIES.contains(id)) { -+ final boolean saddle = data.getBoolean("Saddle"); -+ data.remove("Saddle"); -+ -+ if (!saddle) { -+ return null; -+ } -+ -+ final MapType saddleItem = data.getTypeUtil().createEmptyMap(); -+ data.setMap("saddle", saddleItem); -+ saddleItem.setString("id", "minecraft:saddle"); -+ saddleItem.setInt("count", 1); -+ -+ setGuaranteedSaddleDropChance(data); -+ -+ return null; -+ } -+ -+ return null; -+ } -+ }); -+ -+ // saddle item moved to `saddle`, which is now under ENTITY_EQUIPMENT -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:llama", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:trader_llama", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:donkey", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:mule", new DataWalkerItemLists("Items")); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:horse", DataWalker.noOp()); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:skeleton_horse", DataWalker.noOp()); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:zombie_horse", DataWalker.noOp()); -+ } -+ -+ private V4300() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4301.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4301.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3eef93d9666ccf4fd748f137daa25613fefae548 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4301.java -@@ -0,0 +1,93 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4301 { -+ -+ private static final int VERSION = MCVersions.V25W02A + 3; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY_EQUIPMENT.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final String[] ARMOR_SLOTS = new String[] { -+ "feet", -+ "legs", -+ "chest", -+ "head" -+ }; -+ -+ private static final String[] HAND_SLOTS = new String[] { -+ "mainhand", -+ "offhand" -+ }; -+ -+ private static MapType filterItem(final MapType item) { -+ return item == null || item.hasKey("id") ? item : null; -+ } -+ -+ private static void setIfNonNull(final MapType dst, final String dstKey, final MapType value) { -+ if (value != null) { -+ dst.setMap(dstKey, value); -+ } -+ } -+ -+ private static void moveItems(final MapType src, final String srcPath, final String[] names, final MapType dst) { -+ final ListType items = src.getListUnchecked(srcPath); -+ if (items == null) { -+ return; -+ } -+ -+ for (int i = 0, len = Math.min(items.size(), names.length); i < len; ++i) { -+ final MapType item = filterItem(items.getMap(i, null)); -+ if (item != null) { -+ dst.setMap(names[i], item); -+ } -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType equipment = data.getTypeUtil().createEmptyMap(); -+ -+ setIfNonNull(equipment, "body", filterItem(data.getMap("body_armor_item"))); -+ setIfNonNull(equipment, "saddle", filterItem(data.getMap("saddle"))); -+ -+ moveItems(data, "ArmorItems", ARMOR_SLOTS, equipment); -+ moveItems(data, "HandItems", HAND_SLOTS, equipment); -+ -+ data.remove("ArmorItems"); -+ data.remove("HandItems"); -+ data.remove("body_armor_item"); -+ data.remove("saddle"); -+ -+ if (!equipment.isEmpty()) { -+ data.setMap("equipment", equipment); -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY_EQUIPMENT.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType equipment = data.getMap("equipment"); -+ if (equipment != null) { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "mainhand", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "offhand", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "feet", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "legs", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "chest", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "head", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "body", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, equipment, "saddle", fromVersion, toVersion); -+ } -+ -+ return null; -+ }); -+ } -+ -+ private V4301() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4302.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4302.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7eb1d865cf8ba91f15b0bb6460de7c26853bb21b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4302.java -@@ -0,0 +1,17 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V4302 { -+ -+ private static final int VERSION = MCVersions.V25W02A + 4; -+ -+ public static void register() { -+ -+ -+ // test_block is simple TE -+ // test_instance_block is simple TE -+ } -+ -+ private V4302() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4303.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4303.java -new file mode 100644 -index 0000000000000000000000000000000000000000..dd5827a250807c810ac352547a868151dbae95df ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4303.java -@@ -0,0 +1,30 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4303 { -+ -+ private static final int VERSION = MCVersions.V25W02A + 5; -+ -+ public static void register() { -+ final DataConverter fallConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final float fallDistance = data.getFloat("FallDistance", 0.0f); -+ data.remove("FallDistance"); -+ -+ data.setDouble("fall_distance", (double)fallDistance); -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(fallConverter); -+ MCTypeRegistry.PLAYER.addStructureConverter(fallConverter); -+ } -+ -+ private V4303() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4305.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4305.java -new file mode 100644 -index 0000000000000000000000000000000000000000..90bd5dad4efaa654adbda610a287fea26519a352 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4305.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4305 { -+ -+ private static final int VERSION = MCVersions.V25W03A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.BLOCK_STATE.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!"minecraft:test_block".equals(data.getString("Name"))) { -+ return null; -+ } -+ -+ final MapType properties = data.getMap("Properties"); -+ if (properties == null) { -+ return null; -+ } -+ -+ final String mode = properties.getString("test_block_mode"); -+ if (mode == null) { -+ return null; -+ } -+ properties.remove("test_block_mode"); -+ properties.setString("mode", mode); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4305() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4306.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4306.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f5b46c9f10719ce0e2014eb2289648fc7f4aa904 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4306.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4306 { -+ -+ private static final int VERSION = MCVersions.V25W03A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:potion", new DataConverter<>(VERSION) { -+ private static boolean matchItem(final MapType item, final String id) { -+ if (item == null) { -+ return false; -+ } -+ -+ return id.equals(item.getString("id")); -+ } -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setString("id", matchItem(data.getMap("Item"), "minecraft:lingering_potion") ? "minecraft:lingering_potion" : "minecraft:splash_potion"); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:potion", "minecraft:splash_potion"); -+ MCTypeRegistry.ENTITY.copyWalkers(VERSION, "minecraft:potion", "minecraft:lingering_potion"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:potion", DataWalker.noOp()); -+ } -+ -+ private V4306() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4307.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4307.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d2877c20f389d0131e1dd208b464f590671e5d82 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4307.java -@@ -0,0 +1,224 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import java.util.LinkedHashSet; -+import java.util.Set; -+ -+public final class V4307 { -+ -+ private static final int VERSION = MCVersions.V25W03A + 3; -+ -+ public static void register() { -+ MCTypeRegistry.DATA_COMPONENTS.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final String[] ADDITIONAL_TOOLTIP_COMPONENTS = new String[] { -+ "minecraft:banner_patterns", -+ "minecraft:bees", -+ "minecraft:block_entity_data", -+ "minecraft:block_state", -+ "minecraft:bundle_contents", -+ "minecraft:charged_projectiles", -+ "minecraft:container", -+ "minecraft:container_loot", -+ "minecraft:firework_explosion", -+ "minecraft:fireworks", -+ "minecraft:instrument", -+ "minecraft:map_id", -+ "minecraft:painting/variant", -+ "minecraft:pot_decorations", -+ "minecraft:potion_contents", -+ "minecraft:tropical_fish/pattern", -+ "minecraft:written_book_content" -+ }; -+ -+ private static void unwrapBlockPredicates(final MapType root, final String path, final Set hiddenComponents) { -+ final MapType component = root.getMap(path); -+ if (component == null) { -+ return; -+ } -+ -+ final Object predicates = component.getGeneric("predicates"); -+ if (predicates == null) { -+ return; -+ } -+ root.setGeneric(path, predicates); -+ if (!component.getBoolean("show_in_tooltip", true)) { -+ hiddenComponents.add(path); -+ } -+ } -+ -+ private static void updateComponent(final MapType root, final String path, final Set hiddenComponents) { -+ final MapType component = root.getMap(path); -+ if (component == null) { -+ return; -+ } -+ -+ if (!component.getBoolean("show_in_tooltip", true)) { -+ hiddenComponents.add(path); -+ } -+ -+ component.remove("show_in_tooltip"); -+ } -+ -+ private static void updateComponentAndUnwrap(final MapType root, final String componentPath, final String unwrapPath, final Set hiddenComponents) { -+ final MapType component = root.getMap(componentPath); -+ if (component == null) { -+ return; -+ } -+ -+ if (!component.getBoolean("show_in_tooltip", true)) { -+ hiddenComponents.add(componentPath); -+ } -+ -+ component.remove("show_in_tooltip"); -+ -+ final Object wrapped = component.getGeneric(unwrapPath); -+ if (wrapped != null) { -+ root.setGeneric(componentPath, wrapped); -+ } -+ } -+ -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final Set hiddenComponents = new LinkedHashSet<>(); -+ -+ unwrapBlockPredicates(root, "minecraft:can_break", hiddenComponents); -+ unwrapBlockPredicates(root, "minecraft:can_place_on", hiddenComponents); -+ -+ updateComponent(root, "minecraft:trim", hiddenComponents); -+ updateComponent(root, "minecraft:unbreakable", hiddenComponents); -+ -+ updateComponentAndUnwrap(root, "minecraft:dyed_color", "rgb", hiddenComponents); -+ updateComponentAndUnwrap(root, "minecraft:attribute_modifiers", "modifiers", hiddenComponents); -+ updateComponentAndUnwrap(root, "minecraft:enchantments", "levels", hiddenComponents); -+ updateComponentAndUnwrap(root, "minecraft:stored_enchantments", "levels", hiddenComponents); -+ updateComponentAndUnwrap(root, "minecraft:jukebox_playable", "song", hiddenComponents); -+ -+ final boolean hideTooltip = root.hasKey("minecraft:hide_tooltip"); -+ final boolean hideAdditionalTooltip = root.hasKey("minecraft:hide_additional_tooltip"); -+ -+ if (hideAdditionalTooltip) { -+ for (final String component : ADDITIONAL_TOOLTIP_COMPONENTS) { -+ if (root.hasKey(component)) { -+ hiddenComponents.add(component); -+ } -+ } -+ } -+ -+ root.remove("minecraft:hide_tooltip"); -+ root.remove("minecraft:hide_additional_tooltip"); -+ -+ if (hideTooltip || !hiddenComponents.isEmpty()) { -+ final TypeUtil typeUtil = root.getTypeUtil(); -+ -+ final MapType tooltipDisplay = typeUtil.createEmptyMap(); -+ final ListType hiddenComponentsList = typeUtil.createEmptyList(); -+ -+ root.setMap("minecraft:tooltip_display", tooltipDisplay); -+ tooltipDisplay.setBoolean("hide_tooltip", hideTooltip); -+ tooltipDisplay.setList("hidden_components", hiddenComponentsList); -+ -+ for (final String component : hiddenComponents) { -+ hiddenComponentsList.addString(component); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ -+ // previous version: 4059 -+ MCTypeRegistry.DATA_COMPONENTS.addStructureWalker(VERSION, new DataWalker<>() { -+ private static void walkBlockPredicate(final MapType data, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ if (data.hasKey("blocks", ObjectType.LIST)) { -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, data, "blocks", fromVersion, toVersion); -+ } else { -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, data, "blocks", fromVersion, toVersion); -+ } -+ } -+ -+ private static void walkBlockPredicates(final MapType root, final String path, final long fromVersion, final long toVersion) { -+ final Object value = root.getGeneric(path); -+ -+ if (value instanceof MapType data) { -+ walkBlockPredicate(data, fromVersion, toVersion); -+ } else if (value instanceof ListType list) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ walkBlockPredicate(list.getMap(i, null), fromVersion, toVersion); -+ } -+ } -+ } -+ -+ @Override -+ public MapType walk(final MapType root, final long fromVersion, final long toVersion) { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, root, "minecraft:bees", "entity_data", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.TILE_ENTITY, root, "minecraft:block_entity_data", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root, "minecraft:bundle_contents", fromVersion, toVersion); -+ -+ walkBlockPredicates(root, "minecraft:can_break", fromVersion, toVersion); -+ walkBlockPredicates(root, "minecraft:can_place_on", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, root, "minecraft:charged_projectiles", fromVersion, toVersion); -+ WalkerUtils.convertListPath(MCTypeRegistry.ITEM_STACK, root, "minecraft:container", "item", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, root, "minecraft:entity_data", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_NAME, root, "minecraft:pot_decorations", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "minecraft:use_remainder", fromVersion, toVersion); -+ -+ final MapType equippable = root.getMap("minecraft:equippable"); -+ if (equippable != null) { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY_NAME, equippable, "allowed_entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY_NAME, equippable, "allowed_entities", fromVersion, toVersion); -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:custom_name", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:item_name", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, root, "minecraft:lore", fromVersion, toVersion); -+ -+ final MapType writtenBookContent = root.getMap("minecraft:written_book_content"); -+ if (writtenBookContent != null) { -+ final ListType pages = writtenBookContent.getListUnchecked("pages"); -+ if (pages != null) { -+ for (int i = 0, len = pages.size(); i < len; ++i) { -+ final Object pageGeneric = pages.getGeneric(i); -+ if (pageGeneric instanceof String || pageGeneric instanceof ListType) { // handles: String case, ListType case -+ final Object convertedGeneric = MCTypeRegistry.TEXT_COMPONENT.convert(pageGeneric, fromVersion, toVersion); -+ if (convertedGeneric != null) { -+ pages.setGeneric(i, convertedGeneric); -+ } -+ } else if (pageGeneric instanceof MapType mapType) { -+ // Need to handle: Filterable format and regular NBT Component format are both MapType... -+ if (mapType.hasKey("raw") || mapType.hasKey("filtered")) { -+ // Assume filterable format -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, mapType, "raw", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, mapType, "filtered", fromVersion, toVersion); -+ } else { -+ // Assume regular NBT format -+ final Object convertedGeneric = MCTypeRegistry.TEXT_COMPONENT.convert(pageGeneric, fromVersion, toVersion); -+ if (convertedGeneric != null) { -+ pages.setGeneric(i, convertedGeneric); -+ } -+ } -+ } -+ } -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4307() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4309.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4309.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6b73fcafb812f24aede33868ef87408a60ef19c8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4309.java -@@ -0,0 +1,109 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V4309 { -+ -+ private static final int VERSION = MCVersions.V25W04A + 1; -+ -+ public static int[] makeBlockPosition(final Number x, final Number y, final Number z) { -+ return new int[] { x.intValue(), y.intValue(), z.intValue() }; -+ } -+ -+ public static void convertBlockPosition(final MapType data, final String xPath, final String yPath, final String zPath, -+ final String toPath) { -+ final Number x = data.getNumber(xPath); -+ final Number y = data.getNumber(yPath); -+ final Number z = data.getNumber(zPath); -+ -+ if (x == null || y == null || z == null) { -+ return; -+ } -+ -+ data.remove(xPath); -+ data.remove(yPath); -+ data.remove(zPath); -+ -+ data.setInts(toPath, makeBlockPosition(x, y, z)); -+ } -+ -+ public static void register() { -+ MCTypeRegistry.SAVED_DATA_RAIDS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ RenameHelper.renameSingle(data, "Raids", "raids"); -+ RenameHelper.renameSingle(data, "Tick", "tick"); -+ RenameHelper.renameSingle(data, "NextAvailableID", "next_id"); -+ -+ final ListType raids = data.getListUnchecked("raids"); -+ if (raids != null) { -+ for (int i = 0, len = raids.size(); i < len; ++i) { -+ final MapType raid = raids.getMap(i, null); -+ if (raid == null) { -+ continue; -+ } -+ -+ convertBlockPosition(raid, "CX", "CY", "CZ", "center"); -+ -+ RenameHelper.renameSingle(raid, "Id", "id"); -+ RenameHelper.renameSingle(raid, "Started", "started"); -+ RenameHelper.renameSingle(raid, "Active", "active"); -+ RenameHelper.renameSingle(raid, "TicksActive", "ticks_active"); -+ RenameHelper.renameSingle(raid, "BadOmenLevel", "raid_omen_level"); -+ RenameHelper.renameSingle(raid, "GroupsSpawned", "groups_spawned"); -+ RenameHelper.renameSingle(raid, "PreRaidTicks", "cooldown_ticks"); -+ RenameHelper.renameSingle(raid, "PostRaidTicks", "post_raid_ticks"); -+ RenameHelper.renameSingle(raid, "TotalHealth", "total_health"); -+ RenameHelper.renameSingle(raid, "NumGroups", "group_count"); -+ RenameHelper.renameSingle(raid, "Status", "status"); -+ RenameHelper.renameSingle(raid, "HeroesOfTheVillage", "heroes_of_the_village"); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ MCTypeRegistry.SAVED_DATA_TICKETS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ -+ final ListType tickets = data.getListUnchecked("tickets"); -+ if (tickets == null) { -+ return null; -+ } -+ -+ for (int i = 0, len = tickets.size(); i < len; ++i) { -+ final MapType ticket = tickets.getMap(i, null); -+ if (ticket == null) { -+ continue; -+ } -+ -+ if (ticket.hasKey("chunk_pos")) { -+ final long coordinate = ticket.getLong("chunk_pos", 0L); -+ -+ ticket.setInts("chunk_pos", new int[] { (int)coordinate, (int)(coordinate >>> 32) }); -+ } -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V4309() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4311.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4311.java -new file mode 100644 -index 0000000000000000000000000000000000000000..ec8dacda319762effbd01c58cb1d41ff00fc7aa1 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4311.java -@@ -0,0 +1,22 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.advancements.ConverterAbstractAdvancementsRename; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V4311 { -+ -+ private static final int VERSION = MCVersions.V25W05A + 1; -+ -+ private static final Map ADVANCEMENTS_RENAME = new HashMap<>(); -+ static { -+ ADVANCEMENTS_RENAME.put("minecraft:nether/use_lodestone", "minecraft:adventure/use_lodestone"); -+ } -+ -+ public static void register() { -+ ConverterAbstractAdvancementsRename.register(VERSION, ADVANCEMENTS_RENAME::get); -+ } -+ -+ private V4311() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4312.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4312.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7015d97cb5b97d59ca41f63ba23da1edfb6bae0a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4312.java -@@ -0,0 +1,89 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -+import java.util.Map; -+ -+public final class V4312 { -+ -+ private static final int VERSION = MCVersions.V25W05A + 2; -+ -+ public static void register() { -+ MCTypeRegistry.PLAYER.addStructureConverter(new DataConverter<>(VERSION) { -+ private static final Int2ObjectOpenHashMap SLOT_MOVE_MAPPING = new Int2ObjectOpenHashMap<>( -+ Map.of( -+ 100, "feet", -+ 101, "legs", -+ 102, "chest", -+ 103, "head", -+ -106, "offhand" -+ ) -+ ); -+ -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final ListType inventory = data.getListUnchecked("Inventory"); -+ if (inventory == null) { -+ return null; -+ } -+ -+ final MapType equipment = data.getTypeUtil().createEmptyMap(); -+ -+ for (int i = 0; i < inventory.size(); ++i) { -+ final MapType item = inventory.getMap(i, null); -+ if (item == null) { -+ continue; -+ } -+ -+ final int slot = item.getInt("Slot", Integer.MIN_VALUE); -+ final String equipmentKey = SLOT_MOVE_MAPPING.get(slot); -+ -+ if (equipmentKey == null) { -+ continue; -+ } -+ -+ inventory.remove(i--); -+ -+ item.remove("Slot"); -+ equipment.setMap(equipmentKey, item); -+ } -+ -+ data.setMap("equipment", equipment); -+ -+ return null; -+ } -+ }); -+ -+ // Note: See V1458 for why we walk CustomName -+ MCTypeRegistry.PLAYER.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data.getMap("RootVehicle"), "Entity", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "ender_pearls", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Inventory", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "EnderItems", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "ShoulderEntityLeft", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "ShoulderEntityRight", fromVersion, toVersion); -+ -+ final MapType recipeBook = data.getMap("recipeBook"); -+ if (recipeBook != null) { -+ WalkerUtils.convertList(MCTypeRegistry.RECIPE, recipeBook, "recipes", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.RECIPE, recipeBook, "toBeDisplayed", fromVersion, toVersion); -+ } -+ -+ // "From CB" -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "CustomName", fromVersion, toVersion); -+ -+ return MCTypeRegistry.ENTITY_EQUIPMENT.convert(data, fromVersion, toVersion); -+ }); -+ -+ } -+ -+ private V4312() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V4314.java b/ca/spottedleaf/dataconverter/minecraft/versions/V4314.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3b61eb6776c517b553c76a6bd3651d3f7c7155c5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V4314.java -@@ -0,0 +1,110 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.CopyHelper; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+ -+public final class V4314 { -+ -+ private static final int VERSION = MCVersions.V25W06A + 1; -+ -+ public static void register() { -+ final DataConverter livingEntityConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ V4309.convertBlockPosition(data, "SleepingX", "SleepingY", "SleepingZ", "sleeping_pos"); -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.PLAYER.addStructureConverter(livingEntityConverter); -+ MCTypeRegistry.PLAYER.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType root, final long sourceVersion, final long toVersion) { -+ final TypeUtil typeUtil = root.getTypeUtil(); -+ -+ final Number spawnX = root.getNumber("SpawnX"); -+ final Number spawnY = root.getNumber("SpawnY"); -+ final Number spawnZ = root.getNumber("SpawnZ"); -+ if (spawnX != null && spawnY != null && spawnZ != null) { -+ root.remove("SpawnX"); -+ root.remove("SpawnY"); -+ root.remove("SpawnZ"); -+ -+ final MapType respawn = typeUtil.createEmptyMap(); -+ root.setMap("respawn", respawn); -+ -+ respawn.setInts("pos", V4309.makeBlockPosition(spawnX, spawnY, spawnZ)); -+ -+ CopyHelper.move(root, "SpawnAngle", respawn, "angle"); -+ CopyHelper.move(root, "SpawnDimension", respawn, "dimension"); -+ CopyHelper.move(root, "SpawnForced", respawn, "forced"); -+ } -+ -+ final MapType netherPos = root.getMap("enteredNetherPosition"); -+ if (netherPos != null) { -+ root.remove("enteredNetherPosition"); -+ -+ final ListType newPos = typeUtil.createEmptyList(); -+ root.setList("entered_nether_pos", newPos); -+ -+ newPos.addDouble(netherPos.getDouble("x", 0.0)); -+ newPos.addDouble(netherPos.getDouble("y", 0.0)); -+ newPos.addDouble(netherPos.getDouble("z", 0.0)); -+ } -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addStructureConverter(livingEntityConverter); -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:vex", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ V4309.convertBlockPosition(data, "BoundX", "BoundY", "BoundZ", "bound_pos"); -+ RenameHelper.renameSingle(data, "LifeTicks", "life_ticks"); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:phantom", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ V4309.convertBlockPosition(data, "AX", "AY", "AZ", "anchor_pos"); -+ RenameHelper.renameSingle(data, "Size", "size"); -+ return null; -+ } -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:turtle", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.remove("TravelPosX"); -+ data.remove("TravelPosY"); -+ data.remove("TravelPosZ"); -+ V4309.convertBlockPosition(data, "HomePosX", "HomePosY", "HomePosZ", "home_pos"); -+ RenameHelper.renameSingle(data, "HasEgg", "has_egg"); -+ return null; -+ } -+ }); -+ -+ final DataConverter attachedBlockConverter = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ V4309.convertBlockPosition(data, "TileX", "TileY", "TileZ", "block_pos"); -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:item_frame", attachedBlockConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:glow_item_frame", attachedBlockConverter); -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:painting", attachedBlockConverter); -+ // Note: Leash entities never wrote TileX/Y/Z and don't read block_pos... Why is this here then? -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:leash_knot", attachedBlockConverter); -+ } -+ -+ private V4314() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V501.java b/ca/spottedleaf/dataconverter/minecraft/versions/V501.java -new file mode 100644 -index 0000000000000000000000000000000000000000..da5731090c1de479b77d0d9a1b66d217f7f4eeb5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V501.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+ -+public final class V501 { -+ -+ private static final int VERSION = MCVersions.V16W20A; -+ -+ public static void register() { -+ //registerMob("PolarBear"); // is now simple in 1.21.5 -+ } -+ -+ private V501() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V502.java b/ca/spottedleaf/dataconverter/minecraft/versions/V502.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2b6f3eef26a27e800f87a189c63250293b812e50 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V502.java -@@ -0,0 +1,45 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.concurrent.ThreadLocalRandom; -+ -+public final class V502 { -+ -+ private static final int VERSION = MCVersions.V16W20A + 1; -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, (final String name) -> { -+ return "minecraft:cooked_fished".equals(name) ? "minecraft:cooked_fish" : null; -+ }); -+ MCTypeRegistry.ENTITY.addConverterForId("Zombie", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!data.getBoolean("IsVillager")) { -+ return null; -+ } -+ -+ data.remove("IsVillager"); -+ -+ if (data.hasKey("ZombieType")) { -+ return null; -+ } -+ -+ int type = data.getInt("VillagerProfession", -1); -+ // Vanilla doesn't remove the profession tag, so we don't! -+ if (type < 0 || type >= 6) { -+ type = ThreadLocalRandom.current().nextInt(6); -+ } -+ -+ data.setInt("ZombieType", type); -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V502() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V505.java b/ca/spottedleaf/dataconverter/minecraft/versions/V505.java -new file mode 100644 -index 0000000000000000000000000000000000000000..112e287bf2bd21650798f089d6860b9714f19067 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V505.java -@@ -0,0 +1,23 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V505 { -+ -+ private static final int VERSION = MCVersions.V16W21B + 1; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.setString("useVbo", "true"); -+ return null; -+ } -+ }); -+ } -+ -+ private V505() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V700.java b/ca/spottedleaf/dataconverter/minecraft/versions/V700.java -new file mode 100644 -index 0000000000000000000000000000000000000000..63e3c70cc817bd8729ad177df8d388036bb7241d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V700.java -@@ -0,0 +1,28 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V700 { -+ -+ private static final int VERSION = MCVersions.V1_10_2 + 188; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("Guardian", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (data.getBoolean("Elder")) { -+ data.setString("id", "ElderGuardian"); -+ } -+ data.remove("Elder"); -+ return null; -+ } -+ }); -+ -+ //registerMob("ElderGuardian"); // is now simple in 1.21.5 -+ } -+ -+ private V700() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V701.java b/ca/spottedleaf/dataconverter/minecraft/versions/V701.java -new file mode 100644 -index 0000000000000000000000000000000000000000..5fa1afd449c2a45efccc3966c34310bb695ad082 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V701.java -@@ -0,0 +1,37 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V701 { -+ -+ private static final int VERSION = MCVersions.V1_10_2 + 189; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("Skeleton", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int type = data.getInt("SkeletonType"); -+ data.remove("SkeletonType"); -+ -+ switch (type) { -+ case 1: -+ data.setString("id", "WitherSkeleton"); -+ break; -+ case 2: -+ data.setString("id", "Stray"); -+ break; -+ } -+ -+ return null; -+ } -+ }); -+ -+ //registerMob("WitherSkeleton"); // is now simple in 1.21.5 -+ //registerMob("Stray"); // is now simple in 1.21.5 -+ } -+ -+ private V701() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V702.java b/ca/spottedleaf/dataconverter/minecraft/versions/V702.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b2408f8e0c2e62155c51e8383448d5e64bbb58f5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V702.java -@@ -0,0 +1,51 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V702 { -+ -+ private static final int VERSION = MCVersions.V1_10_2 + 190; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("Zombie", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int zombieType = data.getInt("ZombieType"); -+ data.remove("ZombieType"); -+ -+ switch (zombieType) { -+ case 0: -+ default: -+ break; -+ -+ case 1: -+ case 2: -+ case 3: -+ case 4: -+ case 5: -+ data.setString("id", "ZombieVillager"); -+ data.setInt("Profession", zombieType - 1); -+ break; -+ -+ case 6: -+ data.setString("id", "Husk"); -+ break; -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "ZombieVillager", (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.VILLAGER_TRADE, root.getMap("Offers"), "Recipes", fromVersion, toVersion); -+ return null; -+ }); -+ //registerMob("Husk"); // is now simple in 1.21.5 -+ } -+ -+ private V702() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V703.java b/ca/spottedleaf/dataconverter/minecraft/versions/V703.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d56ec81710d23b6bcbc6c5daad6e22a355df3056 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V703.java -@@ -0,0 +1,62 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V703 { -+ -+ private static final int VERSION = MCVersions.V1_10_2 + 191; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("EntityHorse", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final int type = data.getInt("Type"); -+ data.remove("Type"); -+ -+ switch (type) { -+ case 0: -+ default: -+ data.setString("id", "Horse"); -+ break; -+ -+ case 1: -+ data.setString("id", "Donkey"); -+ break; -+ -+ case 2: -+ data.setString("id", "Mule"); -+ break; -+ -+ case 3: -+ data.setString("id", "ZombieHorse"); -+ break; -+ -+ case 4: -+ data.setString("id", "SkeletonHorse"); -+ break; -+ } -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Horse", new DataWalkerItems("ArmorItem", "SaddleItem")); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Donkey", new DataWalkerItems("SaddleItem")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Donkey", new DataWalkerItemLists("Items")); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Mule", new DataWalkerItems("SaddleItem")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Mule", new DataWalkerItemLists("Items")); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "ZombieHorse", new DataWalkerItems("SaddleItem")); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "SkeletonHorse", new DataWalkerItems("SaddleItem")); -+ } -+ -+ private V703() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V704.java b/ca/spottedleaf/dataconverter/minecraft/versions/V704.java -new file mode 100644 -index 0000000000000000000000000000000000000000..16e188ae63c8a545bbc57a58b30311bb9721b826 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V704.java -@@ -0,0 +1,467 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.hooks.DataHookEnforceNamespacedID; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.item_name.DataWalkerItemNames; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.util.Long2ObjectArraySortedMap; -+import com.mojang.logging.LogUtils; -+import net.minecraft.core.BlockPos; -+import net.minecraft.core.registries.BuiltInRegistries; -+import net.minecraft.world.item.BlockItem; -+import net.minecraft.world.item.Item; -+import net.minecraft.world.level.block.Block; -+import net.minecraft.world.level.block.EntityBlock; -+import net.minecraft.world.level.block.entity.BlockEntity; -+import net.minecraft.world.level.block.entity.BlockEntityType; -+import org.slf4j.Logger; -+import java.util.Arrays; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Map; -+import java.util.Set; -+ -+public final class V704 { -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ private static final int VERSION = MCVersions.V1_10_2 + 192; -+ -+ public static final Map ITEM_ID_TO_TILE_ENTITY_ID = new HashMap<>() { -+ @Override -+ public String put(final String key, final String value) { -+ if (this.containsKey(key)) { -+ LOGGER.error("Duplicate item id to tile key: " + key); -+ throw new RuntimeException(); // only devs should see the consequence of this... at least start up the damn thing... -+ } -+ return super.put(key, value); -+ } -+ }; -+ static { -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:furnace", "minecraft:furnace"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:lit_furnace", "minecraft:furnace"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:chest", "minecraft:chest"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:trapped_chest", "minecraft:chest"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:ender_chest", "minecraft:ender_chest"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:jukebox", "minecraft:jukebox"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dispenser", "minecraft:dispenser"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dropper", "minecraft:dropper"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:mob_spawner", "minecraft:mob_spawner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:spawner", "minecraft:mob_spawner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:noteblock", "minecraft:noteblock"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:brewing_stand", "minecraft:brewing_stand"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:enhanting_table", "minecraft:enchanting_table"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:command_block", "minecraft:command_block"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:beacon", "minecraft:beacon"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:skull", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:daylight_detector", "minecraft:daylight_detector"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:hopper", "minecraft:hopper"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:flower_pot", "minecraft:flower_pot"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:repeating_command_block", "minecraft:command_block"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:chain_command_block", "minecraft:command_block"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:white_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:orange_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:magenta_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:light_blue_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:yellow_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:lime_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:pink_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:gray_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:silver_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cyan_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:purple_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:blue_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:brown_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:green_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:red_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:black_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:light_gray_shulker_box", "minecraft:shulker_box"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:white_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:orange_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:magenta_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:light_blue_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:yellow_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:lime_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:pink_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:gray_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:silver_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cyan_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:purple_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:blue_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:brown_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:green_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:red_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:black_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:standing_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:wall_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:piston_head", "minecraft:piston"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:daylight_detector_inverted", "minecraft:daylight_detector"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:unpowered_comparator", "minecraft:comparator"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:powered_comparator", "minecraft:comparator"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:wall_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:standing_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:structure_block", "minecraft:structure_block"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:end_portal", "minecraft:end_portal"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:end_gateway", "minecraft:end_gateway"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:shield", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:white_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:orange_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:magenta_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:light_blue_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:yellow_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:lime_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:pink_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:gray_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:silver_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cyan_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:purple_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:blue_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:brown_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:green_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:red_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:black_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:oak_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:spruce_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:birch_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:jungle_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:acacia_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dark_oak_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:crimson_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:warped_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:skeleton_skull", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:wither_skeleton_skull", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:zombie_head", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:player_head", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:creeper_head", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dragon_head", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:barrel", "minecraft:barrel"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:conduit", "minecraft:conduit"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:smoker", "minecraft:smoker"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:blast_furnace", "minecraft:blast_furnace"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:lectern", "minecraft:lectern"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bell", "minecraft:bell"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:jigsaw", "minecraft:jigsaw"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:campfire", "minecraft:campfire"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bee_nest", "minecraft:beehive"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:beehive", "minecraft:beehive"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sculk_sensor", "minecraft:sculk_sensor"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:decorated_pot", "minecraft:decorated_pot"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:crafter", "minecraft:crafter"); -+ -+ // These are missing from Vanilla up to 1.20.5 -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:enchanting_table", "minecraft:enchanting_table"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:comparator", "minecraft:comparator"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:light_gray_bed", "minecraft:bed"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:light_gray_banner", "minecraft:banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:soul_campfire", "minecraft:campfire"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sculk_catalyst", "minecraft:sculk_catalyst"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:mangrove_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sculk_shrieker", "minecraft:sculk_shrieker"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:chiseled_bookshelf", "minecraft:chiseled_bookshelf"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bamboo_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:oak_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:spruce_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:birch_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:jungle_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:acacia_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dark_oak_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:mangrove_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:bamboo_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:crimson_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:warped_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:piglin_head", "minecraft:skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:suspicious_sand", "minecraft:brushable_block"); // note: this was renamed in the past, see special case in the itemstack walker -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cherry_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cherry_hanging_sign", "minecraft:sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:suspicious_gravel", "minecraft:brushable_block"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:calibrated_sculk_sensor", "minecraft:calibrated_sculk_sensor"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:trial_spawner", "minecraft:trial_spawner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:vault", "minecraft:vault"); -+ } -+ -+ // This class is responsible for also integrity checking the item id to tile id map here, we just use the item registry to figure it out -+ // No longer need to do this, as items now use components in 1.20.5 -+ /*static { -+ for (final Item item : BuiltInRegistries.ITEM) { -+ if (!(item instanceof BlockItem)) { -+ continue; -+ } -+ -+ if (!(((BlockItem)item).getBlock() instanceof EntityBlock entityBlock)) { -+ continue; -+ } -+ -+ String possibleId; -+ try { -+ final BlockEntity entity = entityBlock.newBlockEntity(new BlockPos(0, 0, 0), ((Block)entityBlock).defaultBlockState()); -+ if (entity != null) { -+ possibleId = BlockEntityType.getKey(entity.getType()).toString(); -+ } else { -+ possibleId = null; -+ } -+ } catch (final Throwable th) { -+ possibleId = null; -+ } -+ -+ final String itemName = BuiltInRegistries.ITEM.getKey(item).toString(); -+ final String mappedTo = ITEM_ID_TO_TILE_ENTITY_ID.get(itemName); -+ if (mappedTo == null) { -+ LOGGER.error("Item id " + itemName + " does not contain tile mapping! (V704)"); -+ } else if (possibleId != null && !mappedTo.equals(possibleId)) { -+ final boolean chestCase = mappedTo.equals("minecraft:chest") && possibleId.equals("minecraft:trapped_chest"); -+ final boolean signCase = mappedTo.equals("minecraft:sign") && possibleId.equals("minecraft:hanging_sign"); -+ // save data is identical for the chest and sign case, so we don't care -+ // it's also important to note that there is no versioning for this map, so it is possible -+ // that mapping them correctly could cause issues converting old data -+ if (!chestCase && !signCase) { -+ LOGGER.error("Item id " + itemName + " is mapped to the wrong tile entity! Mapped to: " + mappedTo + ", expected: " + possibleId); -+ } -+ } -+ } -+ }*/ -+ -+ private static Long2ObjectArraySortedMap makeSingle(final int k1, final String v1) { -+ final Long2ObjectArraySortedMap ret = new Long2ObjectArraySortedMap<>(); -+ -+ ret.put(DataConverter.encodeVersions(k1, 0), v1); -+ -+ return ret; -+ } -+ -+ private static Long2ObjectArraySortedMap makeDouble(final int k1, final String v1, -+ final int k2, final String v2) { -+ final Long2ObjectArraySortedMap ret = new Long2ObjectArraySortedMap<>(); -+ -+ ret.put(DataConverter.encodeVersions(k1, 0), v1); -+ ret.put(DataConverter.encodeVersions(k2, 0), v2); -+ -+ return ret; -+ } -+ -+ private static final Map> ITEM_ID_TO_ENTITY_ID = new HashMap<>(); -+ static { -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:armor_stand", makeDouble(V99.VERSION, "ArmorStand", V705.VERSION, "minecraft:armor_stand")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:painting", makeDouble(V99.VERSION, "Painting", V705.VERSION, "minecraft:painting")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:boat", makeDouble(V99.VERSION, "Boat", V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:oak_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:oak_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:spruce_boat",makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:spruce_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:birch_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:birch_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:jungle_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:jungle_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:acacia_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:acacia_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:cherry_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:cherry_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:dark_oak_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:dark_oak_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:mangrove_boat", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:mangrove_chest_boat", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:bamboo_raft", makeSingle(V705.VERSION, "minecraft:boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:bamboo_chest_raft", makeSingle(V705.VERSION, "minecraft:chest_boat")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:minecart", makeDouble(V99.VERSION, "MinecartRideable", V705.VERSION, "minecraft:minecart")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:chest_minecart", makeDouble(V99.VERSION, "MinecartChest", V705.VERSION, "minecraft:chest_minecart")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:furnace_minecart", makeDouble(V99.VERSION, "MinecartFurnace", V705.VERSION, "minecraft:furnace_minecart")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:tnt_minecart", makeDouble(V99.VERSION, "MinecartTNT", V705.VERSION, "minecraft:tnt_minecart")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:hopper_minecart", makeDouble(V99.VERSION, "MinecartHopper", V705.VERSION, "minecraft:hopper_minecart")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:item_frame", makeDouble(V99.VERSION, "ItemFrame", V705.VERSION, "minecraft:item_frame")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:glow_item_frame", makeSingle(V705.VERSION, "minecraft:glow_item_frame")); -+ -+ // Mojang missed these -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:pufferfish_bucket", makeSingle(V705.VERSION, "minecraft:pufferfish")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:salmon_bucket", makeSingle(V705.VERSION, "minecraft:salmon")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:cod_bucket", makeSingle(V705.VERSION, "minecraft:cod")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:tropical_fish_bucket", makeSingle(V705.VERSION, "minecraft:tropical_fish")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:axolotl_bucket", makeSingle(V705.VERSION, "minecraft:axolotl")); -+ ITEM_ID_TO_ENTITY_ID.put("minecraft:tadpole_bucket", makeSingle(V705.VERSION, "minecraft:tadpole")); -+ } -+ -+ private static final Map TILE_ID_UPDATE = new HashMap<>(); -+ static { -+ TILE_ID_UPDATE.put("Airportal", "minecraft:end_portal"); -+ TILE_ID_UPDATE.put("Banner", "minecraft:banner"); -+ TILE_ID_UPDATE.put("Beacon", "minecraft:beacon"); -+ TILE_ID_UPDATE.put("Cauldron", "minecraft:brewing_stand"); -+ TILE_ID_UPDATE.put("Chest", "minecraft:chest"); -+ TILE_ID_UPDATE.put("Comparator", "minecraft:comparator"); -+ TILE_ID_UPDATE.put("Control", "minecraft:command_block"); -+ TILE_ID_UPDATE.put("DLDetector", "minecraft:daylight_detector"); -+ TILE_ID_UPDATE.put("Dropper", "minecraft:dropper"); -+ TILE_ID_UPDATE.put("EnchantTable", "minecraft:enchanting_table"); -+ TILE_ID_UPDATE.put("EndGateway", "minecraft:end_gateway"); -+ TILE_ID_UPDATE.put("EnderChest", "minecraft:ender_chest"); -+ TILE_ID_UPDATE.put("FlowerPot", "minecraft:flower_pot"); -+ TILE_ID_UPDATE.put("Furnace", "minecraft:furnace"); -+ TILE_ID_UPDATE.put("Hopper", "minecraft:hopper"); -+ TILE_ID_UPDATE.put("MobSpawner", "minecraft:mob_spawner"); -+ TILE_ID_UPDATE.put("Music", "minecraft:noteblock"); -+ TILE_ID_UPDATE.put("Piston", "minecraft:piston"); -+ TILE_ID_UPDATE.put("RecordPlayer", "minecraft:jukebox"); -+ TILE_ID_UPDATE.put("Sign", "minecraft:sign"); -+ TILE_ID_UPDATE.put("Skull", "minecraft:skull"); -+ TILE_ID_UPDATE.put("Structure", "minecraft:structure_block"); -+ TILE_ID_UPDATE.put("Trap", "minecraft:dispenser"); -+ } -+ -+ // These do not need a walker, so we can ignore them not being registered. -+ private static final Set IGNORE_ABSENT_WALKERS = new HashSet<>( -+ Arrays.asList( -+ "Airportal", -+ "DLDetector", -+ "Comparator", -+ "EnchantTable", -+ "EndGateway", -+ "Music", -+ "Beacon", -+ // note: contains blockId and blockData, but handled by flattening converters -+ "Piston", -+ "Structure", -+ "EnderChest", -+ // See V99 -+ "Skull", -+ "Banner" -+ ) -+ ); -+ -+ public static void register() { -+ MCTypeRegistry.TILE_ENTITY.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String id = data.getString("id"); -+ if (id == null) { -+ return null; -+ } -+ -+ data.setString("id", TILE_ID_UPDATE.getOrDefault(id, id)); -+ return null; -+ } -+ }); -+ -+ -+ for (final Map.Entry entry : TILE_ID_UPDATE.entrySet()) { -+ final String oldId = entry.getKey(); -+ final String newId = entry.getValue(); -+ -+ if (!MCTypeRegistry.TILE_ENTITY.hasWalkers(oldId) && !IGNORE_ABSENT_WALKERS.contains(oldId)) { -+ LOGGER.error("(V704) Failed to find walkers for " + oldId); -+ } -+ -+ MCTypeRegistry.TILE_ENTITY.copyWalkers(VERSION, oldId, newId); -+ } -+ -+ MCTypeRegistry.ITEM_STACK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_NAME, data, "id", fromVersion, toVersion); -+ -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final String itemId = data.getString("id"); -+ -+ // only things here are in tag, if changed update if above -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, tag, "Items", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, tag, "ChargedProjectiles", fromVersion, toVersion); -+ if ("minecraft:written_book".equals(itemId)) { -+ // These are only text component for WRITTEN books! DFU blindly will mark this as TEXT_COMPONENT. -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, tag, "pages", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, tag, "filtered_pages", fromVersion, toVersion); -+ } -+ // Vanilla blindly marks these as TEXT_COMPONENT even though they are only converted after the versions noted -+ // below. -+ if (toVersion >= DataConverter.encodeVersions(V1458.VERSION, 0)) { -+ final MapType display = tag.getMap("display"); -+ if (display != null) { -+ // only TEXT_COMPONENT in V1458 -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, display, "Name", fromVersion, toVersion); -+ if (toVersion >= DataConverter.encodeVersions(V1803.VERSION, 0)) { -+ // only TEXT_COMPONENT in V1803 -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, display, "Lore", fromVersion, toVersion); -+ } -+ } -+ } -+ -+ MapType entityTag = tag.getMap("EntityTag"); -+ if (entityTag != null) { -+ final String entityId; -+ if (itemId != null && itemId.contains("_spawn_egg")) { -+ // V1451 changes spawn eggs to have the sub entity id be a part of the item id, but of course Mojang never -+ // bothered to write in logic to set the sub entity id, so we have to. -+ // format is ALWAYS :_spawn_egg post flattening -+ entityId = itemId.substring(0, itemId.indexOf("_spawn_egg")); -+ } else { -+ final Long2ObjectArraySortedMap mappingByVersion = ITEM_ID_TO_ENTITY_ID.get(itemId); -+ final String mapped = mappingByVersion == null ? null : mappingByVersion.getFloor(fromVersion); -+ entityId = mapped == null ? entityTag.getString("id") : mapped; -+ } -+ -+ if (entityId == null) { -+ if (!"minecraft:air".equals(itemId)) { -+ LOGGER.warn("Unable to resolve Entity for ItemStack (V704): " + itemId); -+ } -+ } else { -+ if (!entityTag.hasKey("id", ObjectType.STRING)) { -+ entityTag.setString("id", entityId); -+ } -+ } -+ -+ final MapType replace = MCTypeRegistry.ENTITY.convert(entityTag, fromVersion, toVersion); -+ -+ if (replace != null) { -+ entityTag = replace; -+ tag.setMap("EntityTag", entityTag); -+ } -+ } -+ -+ MapType blockEntityTag = tag.getMap("BlockEntityTag"); -+ if (blockEntityTag != null) { -+ final String entityId; -+ if (fromVersion < DataConverter.encodeVersions(V3438.VERSION, 0) && "minecraft:suspicious_sand".equals(itemId)) { -+ // renamed after this version, and since the id is a mapping to just string we need to special case this -+ entityId = "minecraft:suspicious_sand"; -+ } else { -+ entityId = ITEM_ID_TO_TILE_ENTITY_ID.get(itemId); -+ } -+ -+ if (entityId == null) { -+ if (!"minecraft:air".equals(itemId)) { -+ LOGGER.warn("Unable to resolve BlockEntity for ItemStack (V704): " + itemId); -+ } -+ } else { -+ if (!blockEntityTag.hasKey("id", ObjectType.STRING)) { -+ blockEntityTag.setString("id", entityId); -+ } -+ } -+ final MapType replace = MCTypeRegistry.TILE_ENTITY.convert(blockEntityTag, fromVersion, toVersion); -+ if (replace != null) { -+ blockEntityTag = replace; -+ tag.setMap("BlockEntityTag", blockEntityTag); -+ } -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, tag, "CanDestroy", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, tag, "CanPlaceOn", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Enforce namespace for ids -+ MCTypeRegistry.TILE_ENTITY.addStructureHook(VERSION, new DataHookEnforceNamespacedID()); -+ } -+ -+ private V704() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V705.java b/ca/spottedleaf/dataconverter/minecraft/versions/V705.java -new file mode 100644 -index 0000000000000000000000000000000000000000..333a86b4a041df2f9679799f64037ebea33746c0 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V705.java -@@ -0,0 +1,209 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.entity.ConverterAbstractEntityRename; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.hooks.DataHookEnforceNamespacedID; -+import ca.spottedleaf.dataconverter.minecraft.hooks.DataHookValueTypeEnforceNamespaced; -+import ca.spottedleaf.dataconverter.minecraft.walkers.block_name.DataWalkerBlockNames; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.minecraft.walkers.tile_entity.DataWalkerTileEntities; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V705 { -+ -+ public static final int VERSION = MCVersions.V1_10_2 + 193; -+ -+ private static final Map ENTITY_ID_UPDATE = new HashMap<>(); -+ static { -+ ENTITY_ID_UPDATE.put("AreaEffectCloud", "minecraft:area_effect_cloud"); -+ ENTITY_ID_UPDATE.put("ArmorStand", "minecraft:armor_stand"); -+ ENTITY_ID_UPDATE.put("Arrow", "minecraft:arrow"); -+ ENTITY_ID_UPDATE.put("Bat", "minecraft:bat"); -+ ENTITY_ID_UPDATE.put("Blaze", "minecraft:blaze"); -+ ENTITY_ID_UPDATE.put("Boat", "minecraft:boat"); -+ ENTITY_ID_UPDATE.put("CaveSpider", "minecraft:cave_spider"); -+ ENTITY_ID_UPDATE.put("Chicken", "minecraft:chicken"); -+ ENTITY_ID_UPDATE.put("Cow", "minecraft:cow"); -+ ENTITY_ID_UPDATE.put("Creeper", "minecraft:creeper"); -+ ENTITY_ID_UPDATE.put("Donkey", "minecraft:donkey"); -+ ENTITY_ID_UPDATE.put("DragonFireball", "minecraft:dragon_fireball"); -+ ENTITY_ID_UPDATE.put("ElderGuardian", "minecraft:elder_guardian"); -+ ENTITY_ID_UPDATE.put("EnderCrystal", "minecraft:ender_crystal"); -+ ENTITY_ID_UPDATE.put("EnderDragon", "minecraft:ender_dragon"); -+ ENTITY_ID_UPDATE.put("Enderman", "minecraft:enderman"); -+ ENTITY_ID_UPDATE.put("Endermite", "minecraft:endermite"); -+ ENTITY_ID_UPDATE.put("EyeOfEnderSignal", "minecraft:eye_of_ender_signal"); -+ ENTITY_ID_UPDATE.put("FallingSand", "minecraft:falling_block"); -+ ENTITY_ID_UPDATE.put("Fireball", "minecraft:fireball"); -+ ENTITY_ID_UPDATE.put("FireworksRocketEntity", "minecraft:fireworks_rocket"); -+ ENTITY_ID_UPDATE.put("Ghast", "minecraft:ghast"); -+ ENTITY_ID_UPDATE.put("Giant", "minecraft:giant"); -+ ENTITY_ID_UPDATE.put("Guardian", "minecraft:guardian"); -+ ENTITY_ID_UPDATE.put("Horse", "minecraft:horse"); -+ ENTITY_ID_UPDATE.put("Husk", "minecraft:husk"); -+ ENTITY_ID_UPDATE.put("Item", "minecraft:item"); -+ ENTITY_ID_UPDATE.put("ItemFrame", "minecraft:item_frame"); -+ ENTITY_ID_UPDATE.put("LavaSlime", "minecraft:magma_cube"); -+ ENTITY_ID_UPDATE.put("LeashKnot", "minecraft:leash_knot"); -+ ENTITY_ID_UPDATE.put("MinecartChest", "minecraft:chest_minecart"); -+ ENTITY_ID_UPDATE.put("MinecartCommandBlock", "minecraft:commandblock_minecart"); -+ ENTITY_ID_UPDATE.put("MinecartFurnace", "minecraft:furnace_minecart"); -+ ENTITY_ID_UPDATE.put("MinecartHopper", "minecraft:hopper_minecart"); -+ ENTITY_ID_UPDATE.put("MinecartRideable", "minecraft:minecart"); -+ ENTITY_ID_UPDATE.put("MinecartSpawner", "minecraft:spawner_minecart"); -+ ENTITY_ID_UPDATE.put("MinecartTNT", "minecraft:tnt_minecart"); -+ ENTITY_ID_UPDATE.put("Mule", "minecraft:mule"); -+ ENTITY_ID_UPDATE.put("MushroomCow", "minecraft:mooshroom"); -+ ENTITY_ID_UPDATE.put("Ozelot", "minecraft:ocelot"); -+ ENTITY_ID_UPDATE.put("Painting", "minecraft:painting"); -+ ENTITY_ID_UPDATE.put("Pig", "minecraft:pig"); -+ ENTITY_ID_UPDATE.put("PigZombie", "minecraft:zombie_pigman"); -+ ENTITY_ID_UPDATE.put("PolarBear", "minecraft:polar_bear"); -+ ENTITY_ID_UPDATE.put("PrimedTnt", "minecraft:tnt"); -+ ENTITY_ID_UPDATE.put("Rabbit", "minecraft:rabbit"); -+ ENTITY_ID_UPDATE.put("Sheep", "minecraft:sheep"); -+ ENTITY_ID_UPDATE.put("Shulker", "minecraft:shulker"); -+ ENTITY_ID_UPDATE.put("ShulkerBullet", "minecraft:shulker_bullet"); -+ ENTITY_ID_UPDATE.put("Silverfish", "minecraft:silverfish"); -+ ENTITY_ID_UPDATE.put("Skeleton", "minecraft:skeleton"); -+ ENTITY_ID_UPDATE.put("SkeletonHorse", "minecraft:skeleton_horse"); -+ ENTITY_ID_UPDATE.put("Slime", "minecraft:slime"); -+ ENTITY_ID_UPDATE.put("SmallFireball", "minecraft:small_fireball"); -+ ENTITY_ID_UPDATE.put("SnowMan", "minecraft:snowman"); -+ ENTITY_ID_UPDATE.put("Snowball", "minecraft:snowball"); -+ ENTITY_ID_UPDATE.put("SpectralArrow", "minecraft:spectral_arrow"); -+ ENTITY_ID_UPDATE.put("Spider", "minecraft:spider"); -+ ENTITY_ID_UPDATE.put("Squid", "minecraft:squid"); -+ ENTITY_ID_UPDATE.put("Stray", "minecraft:stray"); -+ ENTITY_ID_UPDATE.put("ThrownEgg", "minecraft:egg"); -+ ENTITY_ID_UPDATE.put("ThrownEnderpearl", "minecraft:ender_pearl"); -+ ENTITY_ID_UPDATE.put("ThrownExpBottle", "minecraft:xp_bottle"); -+ ENTITY_ID_UPDATE.put("ThrownPotion", "minecraft:potion"); -+ ENTITY_ID_UPDATE.put("Villager", "minecraft:villager"); -+ ENTITY_ID_UPDATE.put("VillagerGolem", "minecraft:villager_golem"); -+ ENTITY_ID_UPDATE.put("Witch", "minecraft:witch"); -+ ENTITY_ID_UPDATE.put("WitherBoss", "minecraft:wither"); -+ ENTITY_ID_UPDATE.put("WitherSkeleton", "minecraft:wither_skeleton"); -+ ENTITY_ID_UPDATE.put("WitherSkull", "minecraft:wither_skull"); -+ ENTITY_ID_UPDATE.put("Wolf", "minecraft:wolf"); -+ ENTITY_ID_UPDATE.put("XPOrb", "minecraft:xp_orb"); -+ ENTITY_ID_UPDATE.put("Zombie", "minecraft:zombie"); -+ ENTITY_ID_UPDATE.put("ZombieHorse", "minecraft:zombie_horse"); -+ ENTITY_ID_UPDATE.put("ZombieVillager", "minecraft:zombie_villager"); -+ } -+ -+ private static void registerThrowableProjectile(final String id) { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerBlockNames("inTile")); -+ } -+ -+ public static void register() { -+ ConverterAbstractEntityRename.register(VERSION, ENTITY_ID_UPDATE::get); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:area_effect_cloud", new DataWalkerTypePaths<>(MCTypeRegistry.PARTICLE, "Particle")); -+ //registerMob("minecraft:armor_stand"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:arrow", new DataWalkerBlockNames("inTile")); -+ //registerMob("minecraft:bat"); // now simple in 1.21.5 -+ //registerMob("minecraft:blaze"); // now simple in 1.21.5 -+ //registerMob("minecraft:cave_spider"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:chest_minecart", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:chest_minecart", new DataWalkerItemLists("Items")); -+ //registerMob("minecraft:chicken"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:commandblock_minecart", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:commandblock_minecart", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "LastOutput")); -+ //registerMob("minecraft:cow"); // now simple in 1.21.5 -+ //registerMob("minecraft:creeper"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:donkey", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:donkey", new DataWalkerItems("SaddleItem")); -+ registerThrowableProjectile("minecraft:egg"); -+ //registerMob("minecraft:elder_guardian"); // now simple in 1.21.5 -+ //registerMob("minecraft:ender_dragon"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:enderman", new DataWalkerBlockNames("carried")); -+ //registerMob("minecraft:endermite"); // now simple in 1.21.5 -+ registerThrowableProjectile("minecraft:ender_pearl"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:falling_block", new DataWalkerBlockNames("Block")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:falling_block", new DataWalkerTileEntities("TileEntityData")); -+ registerThrowableProjectile("minecraft:fireball"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:fireworks_rocket", new DataWalkerItems("FireworksItem")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:furnace_minecart", new DataWalkerBlockNames("DisplayTile")); -+ //registerMob("minecraft:ghast"); // now simple in 1.21.5 -+ //registerMob("minecraft:giant"); // now simple in 1.21.5 -+ //registerMob("minecraft:guardian"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:hopper_minecart", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:hopper_minecart", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:horse", new DataWalkerItems("ArmorItem", "SaddleItem")); -+ //registerMob("minecraft:husk"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:item", new DataWalkerItems("Item")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:item_frame", new DataWalkerItems("Item")); -+ //registerMob("minecraft:magma_cube"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:minecart", new DataWalkerBlockNames("DisplayTile")); -+ //registerMob("minecraft:mooshroom"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:mule", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:mule", new DataWalkerItems("SaddleItem")); -+ //registerMob("minecraft:ocelot"); // now simple in 1.21.5 -+ //registerMob("minecraft:pig"); // now simple in 1.21.5 -+ //registerMob("minecraft:polar_bear"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:potion", new DataWalkerItems("Potion")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:potion", new DataWalkerBlockNames("inTile")); -+ //registerMob("minecraft:rabbit"); // now simple in 1.21.5 -+ //registerMob("minecraft:sheep"); // now simple in 1.21.5 -+ //registerMob("minecraft:shulker"); // now simple in 1.21.5 -+ //registerMob("minecraft:silverfish"); // now simple in 1.21.5 -+ //registerMob("minecraft:skeleton"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:skeleton_horse", new DataWalkerItems("SaddleItem")); -+ //registerMob("minecraft:slime"); // now simple in 1.21.5 -+ registerThrowableProjectile("minecraft:small_fireball"); -+ registerThrowableProjectile("minecraft:snowball"); -+ //registerMob("minecraft:snowman"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:spawner_minecart", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:spawner_minecart", (final MapType data, final long fromVersion, final long toVersion) -> { -+ return MCTypeRegistry.UNTAGGED_SPAWNER.convert(data, fromVersion, toVersion); -+ }); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:spectral_arrow", new DataWalkerBlockNames("inTile")); -+ //registerMob("minecraft:spider"); // now simple in 1.21.5 -+ //registerMob("minecraft:squid"); // now simple in 1.21.5 -+ //registerMob("minecraft:stray"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:tnt_minecart", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:villager", (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, data, "Inventory", fromVersion, toVersion); -+ -+ WalkerUtils.convertList(MCTypeRegistry.VILLAGER_TRADE, data.getMap("Offers"), "Recipes", fromVersion, toVersion); -+ -+ return null; -+ }); -+ //registerMob("minecraft:villager_golem"); // now simple in 1.21.5 -+ //registerMob("minecraft:witch"); // now simple in 1.21.5 -+ //registerMob("minecraft:wither"); // now simple in 1.21.5 -+ //registerMob("minecraft:wither_skeleton"); // now simple in 1.21.5 -+ registerThrowableProjectile("minecraft:wither_skull"); -+ //registerMob("minecraft:wolf"); // now simple in 1.21.5 -+ registerThrowableProjectile("minecraft:xp_bottle"); -+ //registerMob("minecraft:zombie"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:zombie_horse", new DataWalkerItems("SaddleItem")); -+ //registerMob("minecraft:zombie_pigman"); // now simple in 1.21.5 -+ //registerMob("minecraft:zombie_villager"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:zombie_villager", (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.VILLAGER_TRADE, data.getMap("Offers"), "Recipes", fromVersion, toVersion); -+ -+ return null; -+ }); -+ //registerMob("minecraft:evocation_illager"); // now simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:llama", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:llama", new DataWalkerItems("SaddleItem", "DecorItem")); -+ //registerMob("minecraft:vex"); // now simple in 1.21.5 -+ //registerMob("minecraft:vindication_illager"); // now simple in 1.21.5 -+ // Don't need to re-register itemstack walker, the V704 will correctly choose the right id for armorstand based on -+ // the source version -+ -+ // Enforce namespace for ids -+ MCTypeRegistry.ENTITY.addStructureHook(VERSION, new DataHookEnforceNamespacedID()); -+ MCTypeRegistry.ENTITY_NAME.addStructureHook(VERSION, new DataHookValueTypeEnforceNamespaced()); -+ } -+ -+ private V705() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V804.java b/ca/spottedleaf/dataconverter/minecraft/versions/V804.java -new file mode 100644 -index 0000000000000000000000000000000000000000..7f71c76352bf32d91826dab2e0b8dc8393afcfdc ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V804.java -@@ -0,0 +1,59 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V804 { -+ -+ private static final int VERSION = MCVersions.V16W35A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:banner", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final MapType blockEntity = tag.getMap("BlockEntityTag"); -+ if (blockEntity == null) { -+ return null; -+ } -+ -+ if (!blockEntity.hasKey("Base", ObjectType.NUMBER)) { -+ return null; -+ } -+ -+ data.setShort("Damage", (short)(blockEntity.getShort("Base") & 15)); -+ -+ final MapType display = tag.getMap("display"); -+ if (display != null) { -+ final ListType lore = display.getList("Lore", ObjectType.STRING); -+ if (lore != null) { -+ if (lore.size() == 1 && "(+NBT)".equals(lore.getString(0))) { -+ return null; -+ } -+ } -+ } -+ -+ blockEntity.remove("Base"); -+ if (blockEntity.isEmpty()) { -+ tag.remove("BlockEntityTag"); -+ } -+ -+ if (tag.isEmpty()) { -+ data.remove("tag"); -+ } -+ -+ return null; -+ } -+ }); -+ } -+ -+ private V804() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V806.java b/ca/spottedleaf/dataconverter/minecraft/versions/V806.java -new file mode 100644 -index 0000000000000000000000000000000000000000..510262ad7ff4ab12548e04906a96b7334fe8271d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V806.java -@@ -0,0 +1,39 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.Types; -+ -+public final class V806 { -+ -+ private static final int VERSION = MCVersions.V16W36A + 1; -+ -+ public static void register() { -+ final DataConverter potionWaterUpdater = new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ tag = Types.NBT.createEmptyMap(); -+ data.setMap("tag", tag); -+ } -+ -+ if (!tag.hasKey("Potion", ObjectType.STRING)) { -+ tag.setString("Potion", "minecraft:water"); -+ } -+ -+ return null; -+ } -+ }; -+ -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:potion", potionWaterUpdater); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:splash_potion", potionWaterUpdater); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:lingering_potion", potionWaterUpdater); -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:tipped_arrow", potionWaterUpdater); -+ } -+ -+ private V806() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V808.java b/ca/spottedleaf/dataconverter/minecraft/versions/V808.java -new file mode 100644 -index 0000000000000000000000000000000000000000..c1bd8f279b3dd38296564fc4b1cf7322c7d1c686 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V808.java -@@ -0,0 +1,29 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V808 { -+ -+ private static final int VERSION = MCVersions.V16W38A + 1; -+ -+ public static void register() { -+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:shulker", new DataConverter<>(VERSION, 1) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ if (!data.hasKey("Color", ObjectType.NUMBER)) { -+ data.setByte("Color", (byte)10); -+ } -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:shulker_box", new DataWalkerItemLists("Items")); -+ } -+ -+ private V808() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V813.java b/ca/spottedleaf/dataconverter/minecraft/versions/V813.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0f79651b6d35464823988bd2aba57d08a0ac7613 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V813.java -@@ -0,0 +1,64 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class V813 { -+ -+ private static final int VERSION = MCVersions.V16W40A; -+ -+ private static final String[] SHULKER_ID_BY_COLOUR = new String[] { -+ "minecraft:white_shulker_box", -+ "minecraft:orange_shulker_box", -+ "minecraft:magenta_shulker_box", -+ "minecraft:light_blue_shulker_box", -+ "minecraft:yellow_shulker_box", -+ "minecraft:lime_shulker_box", -+ "minecraft:pink_shulker_box", -+ "minecraft:gray_shulker_box", -+ "minecraft:silver_shulker_box", -+ "minecraft:cyan_shulker_box", -+ "minecraft:purple_shulker_box", -+ "minecraft:blue_shulker_box", -+ "minecraft:brown_shulker_box", -+ "minecraft:green_shulker_box", -+ "minecraft:red_shulker_box", -+ "minecraft:black_shulker_box" -+ }; -+ -+ public static void register() { -+ MCTypeRegistry.ITEM_STACK.addConverterForId("minecraft:shulker_box", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final MapType blockEntity = tag.getMap("BlockEntityTag"); -+ if (blockEntity == null) { -+ return null; -+ } -+ -+ final int color = blockEntity.getInt("Color"); -+ blockEntity.remove("Color"); -+ -+ data.setString("id", SHULKER_ID_BY_COLOUR[color % SHULKER_ID_BY_COLOUR.length]); -+ -+ return null; -+ } -+ }); -+ -+ MCTypeRegistry.TILE_ENTITY.addConverterForId("minecraft:shulker_box", new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ data.remove("Color"); -+ return null; -+ } -+ }); -+ } -+ -+ private V813() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V816.java b/ca/spottedleaf/dataconverter/minecraft/versions/V816.java -new file mode 100644 -index 0000000000000000000000000000000000000000..edbf9c01a44a77f87bdc186bdfaf36b408a31f4e ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V816.java -@@ -0,0 +1,27 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.DataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.Locale; -+ -+public final class V816 { -+ -+ private static final int VERSION = MCVersions.V16W43A; -+ -+ public static void register() { -+ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { -+ @Override -+ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { -+ final String lang = data.getString("lang"); -+ if (lang != null) { -+ data.setString("lang", lang.toLowerCase(Locale.ROOT)); -+ } -+ return null; -+ } -+ }); -+ } -+ -+ private V816() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V820.java b/ca/spottedleaf/dataconverter/minecraft/versions/V820.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0d59cb380e625bb2658216d4a6cb8faebdd147c5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V820.java -@@ -0,0 +1,21 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.itemname.ConverterAbstractItemRename; -+import com.google.common.collect.ImmutableMap; -+import java.util.HashMap; -+ -+public final class V820 { -+ -+ private static final int VERSION = MCVersions.V1_11 + 1; -+ -+ public static void register() { -+ ConverterAbstractItemRename.register(VERSION, new HashMap<>( -+ ImmutableMap.of( -+ "minecraft:totem", "minecraft:totem_of_undying" -+ ) -+ )::get); -+ } -+ -+ private V820() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/versions/V99.java b/ca/spottedleaf/dataconverter/minecraft/versions/V99.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3a2a82bc7c18667bed10086203d995f9effe3399 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/versions/V99.java -@@ -0,0 +1,418 @@ -+package ca.spottedleaf.dataconverter.minecraft.versions; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataHook; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.MCDataConverter; -+import ca.spottedleaf.dataconverter.minecraft.MCVersions; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.HelperItemNameV102; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.hooks.DataHookEnforceNamespacedID; -+import ca.spottedleaf.dataconverter.minecraft.hooks.DataHookValueTypeEnforceNamespaced; -+import ca.spottedleaf.dataconverter.minecraft.walkers.block_name.DataWalkerBlockNames; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; -+import ca.spottedleaf.dataconverter.minecraft.walkers.item_name.DataWalkerItemNames; -+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; -+import ca.spottedleaf.dataconverter.minecraft.walkers.tile_entity.DataWalkerTileEntities; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import com.mojang.logging.LogUtils; -+import org.slf4j.Logger; -+import java.util.HashMap; -+import java.util.Map; -+ -+public final class V99 { -+ -+ // Structure for all data before data upgrading was added to minecraft (pre 15w32a) -+ -+ private static final Logger LOGGER = LogUtils.getLogger(); -+ -+ public static final int VERSION = MCVersions.V15W32A - 1; -+ -+ private static final Map ITEM_ID_TO_TILE_ENTITY_ID = new HashMap<>(); -+ static { -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:furnace", "Furnace"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:lit_furnace", "Furnace"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:chest", "Chest"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:trapped_chest", "Chest"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:ender_chest", "EnderChest"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:jukebox", "RecordPlayer"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dispenser", "Trap"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:dropper", "Dropper"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:sign", "Sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:mob_spawner", "MobSpawner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:noteblock", "Music"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:brewing_stand", "Cauldron"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:enhanting_table", "EnchantTable"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:command_block", "CommandBlock"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:beacon", "Beacon"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:skull", "Skull"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:daylight_detector", "DLDetector"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:hopper", "Hopper"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:banner", "Banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:flower_pot", "FlowerPot"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:repeating_command_block", "CommandBlock"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:chain_command_block", "CommandBlock"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:standing_sign", "Sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:wall_sign", "Sign"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:piston_head", "Piston"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:daylight_detector_inverted", "DLDetector"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:unpowered_comparator", "Comparator"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:powered_comparator", "Comparator"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:wall_banner", "Banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:standing_banner", "Banner"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:structure_block", "Structure"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:end_portal", "Airportal"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:end_gateway", "EndGateway"); -+ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:shield", "Banner"); -+ } -+ -+ private static void registerProjectile(final String id) { -+ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerBlockNames("inTile")); -+ } -+ -+ private static void registerInventory(final String id) { -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, id, new DataWalkerItemLists("Items")); -+ } -+ -+ static void registerSign(final int version, final String id) { -+ // NOTE: In 1.7.10, the text was not TEXT_COMPONENT but in 1.8 it is. -+ MCTypeRegistry.TILE_ENTITY.addWalker(version, id, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "Text1", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "Text2", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "Text3", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "Text4", fromVersion, toVersion); -+ -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "FilteredText1", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "FilteredText2", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "FilteredText3", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, data, "FilteredText4", fromVersion, toVersion); -+ -+ return null; -+ }); -+ } -+ -+ public static void register() { -+ // entities -+ MCTypeRegistry.ENTITY.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data, "Riding", fromVersion, toVersion); -+ -+ return MCTypeRegistry.ENTITY_EQUIPMENT.convert(data, fromVersion, toVersion); -+ }); -+ MCTypeRegistry.ENTITY_EQUIPMENT.addStructureWalker(VERSION, new DataWalkerItemLists("Equipment")); -+ -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Item", new DataWalkerItems("Item")); -+ registerProjectile("ThrownEgg"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Arrow", new DataWalkerBlockNames("inTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "TippedArrow", new DataWalkerBlockNames("inTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "SpectralArrow", new DataWalkerBlockNames("inTile")); -+ registerProjectile("Snowball"); -+ registerProjectile("Fireball"); -+ registerProjectile("SmallFireball"); -+ registerProjectile("ThrownEnderpearl"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "ThrownPotion", new DataWalkerBlockNames("inTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "ThrownPotion", new DataWalkerItems("Potion")); -+ registerProjectile("ThrownExpBottle"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "ItemFrame", new DataWalkerItems("Item")); -+ registerProjectile("WitherSkull"); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "FallingSand", new DataWalkerBlockNames("Block")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "FallingSand", new DataWalkerTileEntities("TileEntityData")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "FireworksRocketEntity", new DataWalkerItems("FireworksItem")); -+ // Note: Minecart is the generic entity. It can be subtyped via an int to become one of the specific minecarts -+ // (i.e rideable, chest, furnace, tnt, etc) -+ // Because of this, we add all walkers to the generic type, even though they might not be needed. -+ // Vanilla does not make the generic minecart convert spawners, but we do. -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Minecart", new DataWalkerBlockNames("DisplayTile")); // for all minecart types -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Minecart", new DataWalkerItemLists("Items")); // for chest types -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Minecart", (final MapType data, final long fromVersion, final long toVersion) -> { -+ return MCTypeRegistry.UNTAGGED_SPAWNER.convert(data, fromVersion, toVersion); -+ }); // for spawner type -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartRideable", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartChest", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartChest", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartFurnace", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartTNT", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartSpawner", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartSpawner", (final MapType data, final long fromVersion, final long toVersion) -> { -+ return MCTypeRegistry.UNTAGGED_SPAWNER.convert(data, fromVersion, toVersion); -+ }); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartHopper", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartHopper", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartCommandBlock", new DataWalkerBlockNames("DisplayTile")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "MinecartCommandBlock", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "LastOutput")); -+ // mob -> simple as equipment is moved to base ENTITY -+ //registerMob("ArmorStand"); // changed to simple in 1.21.5 -+ //registerMob("Creeper"); // changed to simple in 1.21.5 -+ //registerMob("Skeleton"); // changed to simple in 1.21.5 -+ //registerMob("Spider"); // changed to simple in 1.21.5 -+ //registerMob("Giant"); // changed to simple in 1.21.5 -+ //registerMob("Zombie"); // changed to simple in 1.21.5 -+ //registerMob("Slime"); // changed to simple in 1.21.5 -+ //registerMob("Ghast"); // changed to simple in 1.21.5 -+ //registerMob("PigZombie"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Enderman", new DataWalkerBlockNames("carried")); -+ //registerMob("CaveSpider"); // changed to simple in 1.21.5 -+ //registerMob("Silverfish"); // changed to simple in 1.21.5 -+ //registerMob("Blaze"); // changed to simple in 1.21.5 -+ //registerMob("LavaSlime"); // changed to simple in 1.21.5 -+ //registerMob("EnderDragon"); // changed to simple in 1.21.5 -+ //registerMob("WitherBoss"); // changed to simple in 1.21.5 -+ //registerMob("Bat"); // changed to simple in 1.21.5 -+ //registerMob("Witch"); // changed to simple in 1.21.5 -+ //registerMob("Endermite"); // changed to simple in 1.21.5 -+ //registerMob("Guardian"); // changed to simple in 1.21.5 -+ //registerMob("Pig"); // changed to simple in 1.21.5 -+ //registerMob("Sheep"); // changed to simple in 1.21.5 -+ //registerMob("Cow"); // changed to simple in 1.21.5 -+ //registerMob("Chicken"); // changed to simple in 1.21.5 -+ //registerMob("Squid"); // changed to simple in 1.21.5 -+ //registerMob("Wolf"); // changed to simple in 1.21.5 -+ //registerMob("MushroomCow"); // changed to simple in 1.21.5 -+ //registerMob("SnowMan"); // changed to simple in 1.21.5 -+ //registerMob("Ozelot"); // changed to simple in 1.21.5 -+ //registerMob("VillagerGolem"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "EntityHorse", new DataWalkerItemLists("Items")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "EntityHorse", new DataWalkerItems("ArmorItem", "SaddleItem")); -+ //registerMob("Rabbit"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Villager", new DataWalkerItemLists("Inventory")); -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "Villager", (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.VILLAGER_TRADE, data.getMap("Offers"), "Recipes", fromVersion, toVersion); -+ -+ return null; -+ }); -+ //registerMob("Shulker"); // changed to simple in 1.21.5 -+ MCTypeRegistry.ENTITY.addWalker(VERSION, "AreaEffectCloud", new DataWalkerTypePaths<>(MCTypeRegistry.PARTICLE, "Particle")); -+ -+ // tile entities -+ MCTypeRegistry.TILE_ENTITY.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.DATA_COMPONENTS, data, "components", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Inventory -> new DataWalkerItemLists("Items") -+ registerInventory("Furnace"); -+ registerInventory("Chest"); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "RecordPlayer", new DataWalkerItems("RecordItem")); -+ registerInventory("Trap"); -+ registerInventory("Dropper"); -+ registerSign(VERSION, "Sign"); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "MobSpawner", (final MapType data, final long fromVersion, final long toVersion) -> { -+ return MCTypeRegistry.UNTAGGED_SPAWNER.convert(data, fromVersion, toVersion); -+ }); -+ registerInventory("Cauldron"); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "Control", -+ new DataWalkerTypePaths<>(MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND, "Command") -+ ); -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "Control", new DataWalkerTypePaths<>(MCTypeRegistry.TEXT_COMPONENT, "LastOutput")); -+ // skull doesn't even have custom_name in legacy versions! Why is it being walked here in DFU????? -+ registerInventory("Hopper"); -+ // Banner CustomName is a string, not TEXT_COMPONENT. Fix Vanilla incorrectly converting this -+ // Note: Vanilla does not properly handle this case for FlowerPot, it will not convert int ids! -+ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "FlowerPot", new DataWalkerItemNames("Item")); -+ -+ // rest -+ -+ MCTypeRegistry.LEVEL.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.TEXT_COMPONENT, data, "CustomBossEvents", "Name", fromVersion, toVersion); -+ -+ return MCTypeRegistry.LIGHTWEIGHT_LEVEL.convert(data, fromVersion, toVersion); -+ }); -+ -+ MCTypeRegistry.ITEM_STACK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_NAME, data, "id", fromVersion, toVersion); -+ -+ final MapType tag = data.getMap("tag"); -+ if (tag == null) { -+ return null; -+ } -+ -+ final String itemId = getStringId(data.getGeneric("id")); -+ -+ // only things here are in tag, if changed update if above -+ -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, tag, "Items", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.ITEM_STACK, tag, "ChargedProjectiles", fromVersion, toVersion); -+ if ("minecraft:written_book".equals(itemId)) { -+ // These are only text component for WRITTEN books! DFU blindly will mark this as TEXT_COMPONENT. -+ // Like signs, they are only a real TEXT_COMPONENT (possibly!) in 1.8. We really can't distinguish between -+ // them though. -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, tag, "pages", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEXT_COMPONENT, tag, "filtered_pages", fromVersion, toVersion); -+ } -+ // Note: In this version, display IS NEVER a TEXT_COMPONENT! This fixes incorrectly converting the display tag -+ -+ MapType entityTag = tag.getMap("EntityTag"); -+ if (entityTag != null) { -+ final String entityId; -+ if ("minecraft:armor_stand".equals(itemId)) { -+ // The check for version id is removed here. For whatever reason, the legacy -+ // data converters used entity id "minecraft:armor_stand" when version was greater-than 514, -+ // but entity ids were not namespaced until V705! So somebody fucked up the legacy converters. -+ // DFU agrees with my analysis here, it will only set the entityId here to the namespaced variant -+ // with the V705 schema. -+ entityId = "ArmorStand"; -+ } else if ("minecraft:item_frame".equals(itemId)) { -+ // add missing item_frame entity id -+ entityId = "ItemFrame"; -+ } else if ("minecraft:painting".equals(itemId)) { -+ entityId = "Painting"; -+ } else { -+ entityId = entityTag.getString("id"); -+ } -+ -+ final boolean removeId; -+ if (entityId == null) { -+ if (!"minecraft:air".equals(itemId)) { -+ LOGGER.warn("Unable to resolve Entity for ItemStack (V99): " + data.getGeneric("id")); -+ } -+ removeId = false; -+ } else { -+ removeId = !entityTag.hasKey("id", ObjectType.STRING); -+ if (removeId) { -+ entityTag.setString("id", entityId); -+ } -+ } -+ -+ final MapType replace = MCTypeRegistry.ENTITY.convert(entityTag, fromVersion, toVersion); -+ -+ if (replace != null) { -+ entityTag = replace; -+ tag.setMap("EntityTag", entityTag); -+ } -+ if (removeId) { -+ entityTag.remove("id"); -+ } -+ } -+ -+ MapType blockEntityTag = tag.getMap("BlockEntityTag"); -+ if (blockEntityTag != null) { -+ final String entityId = ITEM_ID_TO_TILE_ENTITY_ID.get(itemId); -+ final boolean removeId; -+ if (entityId == null) { -+ if (!"minecraft:air".equals(itemId)) { -+ LOGGER.warn("Unable to resolve BlockEntity for ItemStack (V99): " + data.getGeneric("id")); -+ } -+ removeId = false; -+ } else { -+ removeId = !blockEntityTag.hasKey("id", ObjectType.STRING); -+ blockEntityTag.setString("id", entityId); -+ } -+ final MapType replace = MCTypeRegistry.TILE_ENTITY.convert(blockEntityTag, fromVersion, toVersion); -+ if (replace != null) { -+ blockEntityTag = replace; -+ tag.setMap("BlockEntityTag", blockEntityTag); -+ } -+ if (removeId) { -+ blockEntityTag.remove("id"); -+ } -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, tag, "CanDestroy", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_NAME, tag, "CanPlaceOn", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.PLAYER.addStructureWalker(VERSION, new DataWalkerItemLists("Inventory", "EnderItems")); -+ -+ MCTypeRegistry.CHUNK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ final MapType level = data.getMap("Level"); -+ if (level == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, level, "Entities", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TILE_ENTITY, level, "TileEntities", fromVersion, toVersion); -+ -+ final ListType tileTicks = level.getList("TileTicks", ObjectType.MAP); -+ if (tileTicks != null) { -+ for (int i = 0, len = tileTicks.size(); i < len; ++i) { -+ final MapType tileTick = tileTicks.getMap(i); -+ WalkerUtils.convert(MCTypeRegistry.BLOCK_NAME, tileTick, "i", fromVersion, toVersion); -+ } -+ } -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.ENTITY_CHUNK.addStructureWalker(VERSION, (final MapType data, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertList(MCTypeRegistry.ENTITY, data, "Entities", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.SAVED_DATA_MAP_DATA.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.TEXT_COMPONENT, root, "banners", "Name", fromVersion, toVersion); -+ WalkerUtils.convertListPath(MCTypeRegistry.TEXT_COMPONENT, root.getMap("data"), "banners", "Name", fromVersion, toVersion); -+ return null; -+ }); -+ MCTypeRegistry.SAVED_DATA_SCOREBOARD.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertList(MCTypeRegistry.OBJECTIVE, data, "Objectives", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.TEAM, data, "Teams", fromVersion, toVersion); -+ WalkerUtils.convertListPath(MCTypeRegistry.TEXT_COMPONENT, data, "PlayerScores", "display", fromVersion, toVersion); -+ -+ return null; -+ }); -+ MCTypeRegistry.SAVED_DATA_STRUCTURE_FEATURE_INDICES.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ final MapType data = root.getMap("data"); -+ if (data == null) { -+ return null; -+ } -+ -+ WalkerUtils.convertValues(MCTypeRegistry.STRUCTURE_FEATURE, data, "Features", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.TEAM.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "MemberNamePrefix", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "MemberNameSuffix", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.TEXT_COMPONENT, root, "DisplayName", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.VILLAGER_TRADE.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "buy", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "buyB", fromVersion, toVersion); -+ WalkerUtils.convert(MCTypeRegistry.ITEM_STACK, root, "sell", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ MCTypeRegistry.STRUCTURE.addStructureWalker(VERSION, (final MapType root, final long fromVersion, final long toVersion) -> { -+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, root, "entities", "nbt", fromVersion, toVersion); -+ WalkerUtils.convertListPath(MCTypeRegistry.TILE_ENTITY, root, "blocks", "nbt", fromVersion, toVersion); -+ WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, root, "palette", fromVersion, toVersion); -+ -+ return null; -+ }); -+ -+ // Enforce namespacing for ids -+ MCTypeRegistry.BLOCK_NAME.addStructureHook(VERSION, new DataHookValueTypeEnforceNamespaced()); -+ MCTypeRegistry.ITEM_NAME.addStructureHook(VERSION, new DataHookValueTypeEnforceNamespaced()); -+ MCTypeRegistry.ITEM_STACK.addStructureHook(VERSION, new DataHookEnforceNamespacedID()); -+ -+ // Entity is absent; the String form is not yet namespaced, unlike the above. -+ } -+ -+ private static String getStringId(final Object id) { -+ if (id instanceof String string) { -+ return string; -+ } else if (id instanceof Number number) { -+ return HelperItemNameV102.getNameFromId(number.intValue()); -+ } else { -+ return null; -+ } -+ } -+ -+ private V99() {} -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/block_name/DataWalkerBlockNames.java b/ca/spottedleaf/dataconverter/minecraft/walkers/block_name/DataWalkerBlockNames.java -new file mode 100644 -index 0000000000000000000000000000000000000000..930e014858ef635ebe25f7f92dc81ba0eaac50a8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/block_name/DataWalkerBlockNames.java -@@ -0,0 +1,11 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.block_name; -+ -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+ -+public final class DataWalkerBlockNames extends DataWalkerTypePaths { -+ -+ public DataWalkerBlockNames(final String... paths) { -+ super(MCTypeRegistry.BLOCK_NAME, paths); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/game_event/GameEventListenerWalker.java b/ca/spottedleaf/dataconverter/minecraft/walkers/game_event/GameEventListenerWalker.java -new file mode 100644 -index 0000000000000000000000000000000000000000..618c6d141c30506123dc7acae793355a3f6ff02c ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/game_event/GameEventListenerWalker.java -@@ -0,0 +1,21 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.game_event; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class GameEventListenerWalker implements DataWalker { -+ -+ @Override -+ public MapType walk(final MapType data, final long fromVersion, final long toVersion) { -+ final MapType listener = data.getMap("listener"); -+ if (listener == null) { -+ return null; -+ } -+ -+ WalkerUtils.convert(MCTypeRegistry.GAME_EVENT_NAME, listener.getMap("event"), "game_event", fromVersion, toVersion); -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/generic/DataWalkerListPaths.java b/ca/spottedleaf/dataconverter/minecraft/walkers/generic/DataWalkerListPaths.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6fd706b2fc0b979a3b2b8175127b935ec3f8486d ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/generic/DataWalkerListPaths.java -@@ -0,0 +1,38 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.generic; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public class DataWalkerListPaths implements DataWalker { -+ -+ protected final DataType type; -+ protected final String[] paths; -+ -+ public DataWalkerListPaths(final DataType type, final String... paths) { -+ this.type = type; -+ this.paths = paths; -+ } -+ -+ @Override -+ public final MapType walk(final MapType data, final long fromVersion, final long toVersion) { -+ final DataType type = this.type; -+ for (final String path : this.paths) { -+ final ListType list = data.getListUnchecked(path); -+ if (list == null) { -+ continue; -+ } -+ -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final Object current = list.getGeneric(i); -+ final Object converted = type.convert((T)current, fromVersion, toVersion); -+ if (converted != null) { -+ list.setGeneric(i, converted); -+ } -+ } -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/generic/DataWalkerTypePaths.java b/ca/spottedleaf/dataconverter/minecraft/walkers/generic/DataWalkerTypePaths.java -new file mode 100644 -index 0000000000000000000000000000000000000000..961da39f6d64a6b569071e4351648432961a6a33 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/generic/DataWalkerTypePaths.java -@@ -0,0 +1,34 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.generic; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.converters.datatypes.DataWalker; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public class DataWalkerTypePaths implements DataWalker { -+ -+ protected final DataType type; -+ protected final String[] paths; -+ -+ public DataWalkerTypePaths(final DataType type, final String... paths) { -+ this.type = type; -+ this.paths = paths; -+ } -+ -+ @Override -+ public final MapType walk(final MapType data, final long fromVersion, final long toVersion) { -+ for (final String path : this.paths) { -+ final Object current = data.getGeneric(path); -+ if (current == null) { -+ continue; -+ } -+ -+ final Object converted = this.type.convert((T)current, fromVersion, toVersion); -+ -+ if (converted != null) { -+ data.setGeneric(path, converted); -+ } -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/generic/WalkerUtils.java b/ca/spottedleaf/dataconverter/minecraft/walkers/generic/WalkerUtils.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3c865e0c4e05cb3161e5003b5ce6f0b83ad40463 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/generic/WalkerUtils.java -@@ -0,0 +1,199 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.generic; -+ -+import ca.spottedleaf.dataconverter.converters.datatypes.DataType; -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.RenameHelper; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCDataType; -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCValueType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import java.util.ArrayList; -+ -+public final class WalkerUtils { -+ -+ public static void convert(final MCDataType type, final MapType data, final String path, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final MapType map = data.getMap(path); -+ if (map != null) { -+ final MapType replace = type.convert(map, fromVersion, toVersion); -+ if (replace != null) { -+ data.setMap(path, replace); -+ } -+ } -+ } -+ -+ public static void convertList(final MCDataType type, final MapType data, final String path, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(path); -+ if (list != null) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final MapType listVal = list.getMap(i, null); -+ if (listVal == null) { -+ continue; -+ } -+ -+ final MapType replace = type.convert(listVal, fromVersion, toVersion); -+ if (replace != null) { -+ list.setMap(i, replace); -+ } -+ } -+ } -+ } -+ -+ public static void convertListPath(final MCDataType type, final MapType data, final String listPath, final String elementPath, -+ final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(listPath); -+ if (list != null) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ WalkerUtils.convert(type, list.getMap(i, null), elementPath, fromVersion, toVersion); -+ } -+ } -+ } -+ -+ public static void convertListPath(final MCDataType type, final MapType data, final String listPath, final String elementPath1, -+ final String elementPath2, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(listPath); -+ if (list != null) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final MapType listVal = list.getMap(i, null); -+ if (listVal == null) { -+ continue; -+ } -+ -+ WalkerUtils.convert(type, listVal.getMap(elementPath1), elementPath2, fromVersion, toVersion); -+ } -+ } -+ } -+ -+ public static void convert(final DataType type, final MapType data, final String path, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final Object value = data.getGeneric(path); -+ if (value != null) { -+ final Object converted = type.convert(value, fromVersion, toVersion); -+ if (converted != null) { -+ data.setGeneric(path, converted); -+ } -+ } -+ } -+ -+ public static void convert(final DataType type, final ListType data, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ for (int i = 0, len = data.size(); i < len; ++i) { -+ final Object value = data.getGeneric(i); -+ final Object converted = type.convert(value, fromVersion, toVersion); -+ if (converted != null) { -+ data.setGeneric(i, converted); -+ } -+ } -+ } -+ -+ public static void convertList(final DataType type, final MapType data, final String path, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(path); -+ if (list != null) { -+ convert(type, list, fromVersion, toVersion); -+ } -+ } -+ -+ public static void convertListPath(final DataType type, final MapType data, final String listPath, final String elementPath, -+ final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(listPath); -+ if (list != null) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ WalkerUtils.convert(type, list.getMap(i, null), elementPath, fromVersion, toVersion); -+ } -+ } -+ } -+ -+ public static void convertListPath(final DataType type, final MapType data, final String listPath, final String elementPath1, -+ final String elementPath2, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final ListType list = data.getListUnchecked(listPath); -+ if (list != null) { -+ for (int i = 0, len = list.size(); i < len; ++i) { -+ final MapType listVal = list.getMap(i, null); -+ if (listVal == null) { -+ continue; -+ } -+ -+ WalkerUtils.convert(type, listVal.getMap(elementPath1), elementPath2, fromVersion, toVersion); -+ } -+ } -+ } -+ -+ public static void convertKeys(final DataType type, final MapType data, final String path, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ final MapType map = data.getMap(path); -+ if (map != null) { -+ convertKeys(type, map, fromVersion, toVersion); -+ } -+ } -+ -+ public static void convertKeys(final DataType type, final MapType data, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ RenameHelper.renameKeys(data, (final String input) -> { -+ return (String)type.convert(input, fromVersion, toVersion); -+ }); -+ } -+ -+ public static void convertValues(final MCDataType type, final MapType data, final String path, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ convertValues(type, data.getMap(path), fromVersion, toVersion); -+ } -+ -+ public static void convertValues(final MCDataType type, final MapType data, final long fromVersion, final long toVersion) { -+ if (data == null) { -+ return; -+ } -+ -+ for (final String key : data.keys()) { -+ final MapType value = data.getMap(key); -+ if (value != null) { -+ final MapType replace = type.convert(value, fromVersion, toVersion); -+ if (replace != null) { -+ // no CME, key is in map already -+ data.setMap(key, replace); -+ } -+ } -+ } -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/item_name/DataWalkerItemNames.java b/ca/spottedleaf/dataconverter/minecraft/walkers/item_name/DataWalkerItemNames.java -new file mode 100644 -index 0000000000000000000000000000000000000000..14e291efd864d97dcf83db01c09b9daaae1949bd ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/item_name/DataWalkerItemNames.java -@@ -0,0 +1,11 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.item_name; -+ -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+ -+public final class DataWalkerItemNames extends DataWalkerTypePaths { -+ -+ public DataWalkerItemNames(final String... paths) { -+ super(MCTypeRegistry.ITEM_NAME, paths); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/itemstack/DataWalkerItemLists.java b/ca/spottedleaf/dataconverter/minecraft/walkers/itemstack/DataWalkerItemLists.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4541d2e80f806e62ade419b8f54475fd0aa6d9e8 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/itemstack/DataWalkerItemLists.java -@@ -0,0 +1,12 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.itemstack; -+ -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerListPaths; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public class DataWalkerItemLists extends DataWalkerListPaths { -+ -+ public DataWalkerItemLists(final String... paths) { -+ super(MCTypeRegistry.ITEM_STACK, paths); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/itemstack/DataWalkerItems.java b/ca/spottedleaf/dataconverter/minecraft/walkers/itemstack/DataWalkerItems.java -new file mode 100644 -index 0000000000000000000000000000000000000000..fac29551a3093459a8fd8eceb6323e615c729a97 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/itemstack/DataWalkerItems.java -@@ -0,0 +1,12 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.itemstack; -+ -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public class DataWalkerItems extends DataWalkerTypePaths { -+ -+ public DataWalkerItems(final String... paths) { -+ super(MCTypeRegistry.ITEM_STACK, paths); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/minecraft/walkers/tile_entity/DataWalkerTileEntities.java b/ca/spottedleaf/dataconverter/minecraft/walkers/tile_entity/DataWalkerTileEntities.java -new file mode 100644 -index 0000000000000000000000000000000000000000..14d72f19a429ac12f38cc79f526d465b386c9a15 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/minecraft/walkers/tile_entity/DataWalkerTileEntities.java -@@ -0,0 +1,12 @@ -+package ca.spottedleaf.dataconverter.minecraft.walkers.tile_entity; -+ -+import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; -+import ca.spottedleaf.dataconverter.types.MapType; -+ -+public final class DataWalkerTileEntities extends DataWalkerTypePaths { -+ -+ public DataWalkerTileEntities(final String... paths) { -+ super(MCTypeRegistry.TILE_ENTITY, paths); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/ListType.java b/ca/spottedleaf/dataconverter/types/ListType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..54a6b9db0bc3579735bb473f1e1f4a8c7d4bc6f6 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/ListType.java -@@ -0,0 +1,272 @@ -+package ca.spottedleaf.dataconverter.types; -+ -+public interface ListType { -+ -+ public TypeUtil getTypeUtil(); -+ -+ @Override -+ public int hashCode(); -+ -+ @Override -+ public boolean equals(final Object other); -+ -+ // Provides a deep copy of this list -+ public ListType copy(); -+ -+ // Returns the type of all elements in this list. Returns NONE if empty, returns UNDEFINED if not supported, MIXED if mixed types -+ public ObjectType getUniformType(); -+ -+ public int size(); -+ -+ public void remove(final int index); -+ -+ public Object getGeneric(final int index); -+ -+ public default void setGeneric(final int index, final Object to) { -+ if (to instanceof Number) { -+ if (to instanceof Byte b) { -+ this.setByte(index, b.byteValue()); -+ return; -+ } else if (to instanceof Short s) { -+ this.setShort(index, s.shortValue()); -+ return; -+ } else if (to instanceof Integer i) { -+ this.setInt(index, i.intValue()); -+ return; -+ } else if (to instanceof Long l) { -+ this.setLong(index, l.longValue()); -+ return; -+ } else if (to instanceof Float f) { -+ this.setFloat(index, f.floatValue()); -+ return; -+ } else if (to instanceof Double d) { -+ this.setDouble(index, d.doubleValue()); -+ return; -+ } // else fall through to throw -+ } else if (to instanceof MapType m) { -+ this.setMap(index, m); -+ return; -+ } else if (to instanceof ListType l) { -+ this.setList(index, l); -+ return; -+ } else if (to instanceof String s) { -+ this.setString(index, s); -+ return; -+ } else if (to.getClass().isArray()) { -+ if (to instanceof byte[] bytes) { -+ this.setBytes(index, bytes); -+ return; -+ } else if (to instanceof short[] shorts) { -+ this.setShorts(index, shorts); -+ return; -+ } else if (to instanceof int[] ints) { -+ this.setInts(index, ints); -+ return; -+ } else if (to instanceof long[] longs) { -+ this.setLongs(index, longs); -+ return; -+ } // else fall through to throw -+ } -+ -+ throw new IllegalArgumentException("Object " + to + " is not a valid type!"); -+ } -+ -+ // types here are strict. if the type on get does not match the underlying type, will throw - except for the -+ // default parameter methods, in such cases the default value will be returned. -+ -+ public Number getNumber(final int index); -+ -+ public Number getNumber(final int index, final Number dfl); -+ -+ // if the value at index is a Number but not a byte, then returns the number casted to byte. -+ public byte getByte(final int index); -+ -+ // if the value at index is a Number but not a byte, then returns the number casted to byte. -+ public byte getByte(final int index, final byte dfl); -+ -+ public void setByte(final int index, final byte to); -+ -+ // if the value at index is a Number but not a short, then returns the number casted to short. -+ public short getShort(final int index); -+ -+ // if the value at index is a Number but not a short, then returns the number casted to short. -+ public short getShort(final int index, final short dfl); -+ -+ public void setShort(final int index, final short to); -+ -+ // if the value at index is a Number but not a int, then returns the number casted to int. -+ public int getInt(final int index); -+ -+ // if the value at index is a Number but not a int, then returns the number casted to int. -+ public int getInt(final int index, final int dfl); -+ -+ public void setInt(final int index, final int to); -+ -+ // if the value at index is a Number but not a long, then returns the number casted to long. -+ public long getLong(final int index); -+ -+ // if the value at index is a Number but not a long, then returns the number casted to long. -+ public long getLong(final int index, final long dfl); -+ -+ public void setLong(final int index, final long to); -+ -+ // if the value at index is a Number but not a float, then returns the number casted to float. -+ public float getFloat(final int index); -+ -+ // if the value at index is a Number but not a float, then returns the number casted to float. -+ public float getFloat(final int index, final float dfl); -+ -+ public void setFloat(final int index, final float to); -+ -+ // if the value at index is a Number but not a double, then returns the number casted to double. -+ public double getDouble(final int index); -+ -+ // if the value at index is a Number but not a double, then returns the number casted to double. -+ public double getDouble(final int index, final double dfl); -+ -+ public void setDouble(final int index, final double to); -+ -+ public byte[] getBytes(final int index); -+ -+ public byte[] getBytes(final int index, final byte[] bytes); -+ -+ public void setBytes(final int index, final byte[] to); -+ -+ public short[] getShorts(final int index); -+ -+ public short[] getShorts(final int index, final short[] dfl); -+ -+ public void setShorts(final int index, final short[] to); -+ -+ public int[] getInts(final int index); -+ -+ public int[] getInts(final int index, final int[] dfl); -+ -+ public void setInts(final int index, final int[] to); -+ -+ public long[] getLongs(final int index); -+ -+ public long[] getLongs(final int index, final long[] dfl); -+ -+ public void setLongs(final int index, final long[] to); -+ -+ public ListType getList(final int index); -+ -+ public ListType getList(final int index, final ListType dfl); -+ -+ public void setList(final int index, final ListType list); -+ -+ public MapType getMap(final int index); -+ -+ public MapType getMap(final int index, final MapType dfl); -+ -+ public void setMap(final int index, final MapType to); -+ -+ public String getString(final int index); -+ -+ public String getString(final int index, final String dfl); -+ -+ public void setString(final int index, final String to); -+ -+ public default void addGeneric(final Object to) { -+ if (to instanceof Number) { -+ if (to instanceof Byte b) { -+ this.addByte(b.byteValue()); -+ return; -+ } else if (to instanceof Short s) { -+ this.addShort(s.shortValue()); -+ return; -+ } else if (to instanceof Integer i) { -+ this.addInt(i.intValue()); -+ return; -+ } else if (to instanceof Long l) { -+ this.addLong(l.longValue()); -+ return; -+ } else if (to instanceof Float f) { -+ this.addFloat(f.floatValue()); -+ return; -+ } else if (to instanceof Double d) { -+ this.addDouble(d.doubleValue()); -+ return; -+ } // else fall through to throw -+ } else if (to instanceof MapType m) { -+ this.addMap(m); -+ return; -+ } else if (to instanceof ListType l) { -+ this.addList(l); -+ return; -+ } else if (to instanceof String s) { -+ this.addString(s); -+ return; -+ } else if (to.getClass().isArray()) { -+ if (to instanceof byte[] bytes) { -+ this.addByteArray(bytes); -+ return; -+ } else if (to instanceof short[] shorts) { -+ this.addShortArray(shorts); -+ return; -+ } else if (to instanceof int[] ints) { -+ this.addIntArray(ints); -+ return; -+ } else if (to instanceof long[] longs) { -+ this.addLongArray(longs); -+ return; -+ } // else fall through to throw -+ } -+ -+ throw new IllegalArgumentException("Object " + to + " is not a valid type!"); -+ } -+ -+ public void addByte(final byte b); -+ -+ public void addByte(final int index, final byte b); -+ -+ public void addShort(final short s); -+ -+ public void addShort(final int index, final short s); -+ -+ public void addInt(final int i); -+ -+ public void addInt(final int index, final int i); -+ -+ public void addLong(final long l); -+ -+ public void addLong(final int index, final long l); -+ -+ public void addFloat(final float f); -+ -+ public void addFloat(final int index, final float f); -+ -+ public void addDouble(final double d); -+ -+ public void addDouble(final int index, final double d); -+ -+ public void addByteArray(final byte[] arr); -+ -+ public void addByteArray(final int index, final byte[] arr); -+ -+ public void addShortArray(final short[] arr); -+ -+ public void addShortArray(final int index, final short[] arr); -+ -+ public void addIntArray(final int[] arr); -+ -+ public void addIntArray(final int index, final int[] arr); -+ -+ public void addLongArray(final long[] arr); -+ -+ public void addLongArray(final int index, final long[] arr); -+ -+ public void addList(final ListType list); -+ -+ public void addList(final int index, final ListType list); -+ -+ public void addMap(final MapType map); -+ -+ public void addMap(final int index, final MapType map); -+ -+ public void addString(final String string); -+ -+ public void addString(final int index, final String string); -+ -+} -diff --git a/ca/spottedleaf/dataconverter/types/MapType.java b/ca/spottedleaf/dataconverter/types/MapType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..709edd3e92fb8f73b8f9ae192162a72ce7f99fac ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/MapType.java -@@ -0,0 +1,220 @@ -+package ca.spottedleaf.dataconverter.types; -+ -+import java.util.Set; -+ -+public interface MapType { -+ -+ public TypeUtil getTypeUtil(); -+ -+ @Override -+ public int hashCode(); -+ -+ @Override -+ public boolean equals(final Object other); -+ -+ public int size(); -+ -+ public boolean isEmpty(); -+ -+ public void clear(); -+ -+ public Set keys(); -+ -+ // Provides a deep copy of this map -+ public MapType copy(); -+ -+ public boolean hasKey(final String key); -+ -+ public boolean hasKey(final String key, final ObjectType type); -+ -+ public void remove(final String key); -+ -+ public Object getGeneric(final String key); -+ -+ // types here are not strict. if the key maps to a different type, default is always returned -+ // if default is not a parameter, then default is always null -+ -+ public Number getNumber(final String key); -+ -+ public Number getNumber(final String key, final Number dfl); -+ -+ public boolean getBoolean(final String key); -+ -+ public boolean getBoolean(final String key, final boolean dfl); -+ -+ public void setBoolean(final String key, final boolean val); -+ -+ // if the mapped value is a Number but not a byte, then the number is casted to byte. If the mapped value does not exist or is not a number, returns 0 -+ public byte getByte(final String key); -+ -+ // if the mapped value is a Number but not a byte, then the number is casted to byte. If the mapped value does not exist or is not a number, returns dfl -+ public byte getByte(final String key, final byte dfl); -+ -+ public void setByte(final String key, final byte val); -+ -+ // if the mapped value is a Number but not a short, then the number is casted to short. If the mapped value does not exist or is not a number, returns 0 -+ public short getShort(final String key); -+ -+ // if the mapped value is a Number but not a short, then the number is casted to short. If the mapped value does not exist or is not a number, returns dfl -+ public short getShort(final String key, final short dfl); -+ -+ public void setShort(final String key, final short val); -+ -+ // if the mapped value is a Number but not a int, then the number is casted to int. If the mapped value does not exist or is not a number, returns 0 -+ public int getInt(final String key); -+ -+ // if the mapped value is a Number but not a int, then the number is casted to int. If the mapped value does not exist or is not a number, returns dfl -+ public int getInt(final String key, final int dfl); -+ -+ public void setInt(final String key, final int val); -+ -+ // if the mapped value is a Number but not a long, then the number is casted to long. If the mapped value does not exist or is not a number, returns 0 -+ public long getLong(final String key); -+ -+ // if the mapped value is a Number but not a long, then the number is casted to long. If the mapped value does not exist or is not a number, returns dfl -+ public long getLong(final String key, final long dfl); -+ -+ public void setLong(final String key, final long val); -+ -+ // if the mapped value is a Number but not a float, then the number is casted to float. If the mapped value does not exist or is not a number, returns 0 -+ public float getFloat(final String key); -+ -+ // if the mapped value is a Number but not a float, then the number is casted to float. If the mapped value does not exist or is not a number, returns dfl -+ public float getFloat(final String key, final float dfl); -+ -+ public void setFloat(final String key, final float val); -+ -+ // if the mapped value is a Number but not a double, then the number is casted to double. If the mapped value does not exist or is not a number, returns 0 -+ public double getDouble(final String key); -+ -+ // if the mapped value is a Number but not a double, then the number is casted to double. If the mapped value does not exist or is not a number, returns dfl -+ public double getDouble(final String key, final double dfl); -+ -+ public void setDouble(final String key, final double val); -+ -+ public byte[] getBytes(final String key); -+ -+ public byte[] getBytes(final String key, final byte[] dfl); -+ -+ public void setBytes(final String key, final byte[] val); -+ -+ public short[] getShorts(final String key); -+ -+ public short[] getShorts(final String key, final short[] dfl); -+ -+ public void setShorts(final String key, final short[] val); -+ -+ public int[] getInts(final String key); -+ -+ public int[] getInts(final String key, final int[] dfl); -+ -+ public void setInts(final String key, final int[] val); -+ -+ public long[] getLongs(final String key); -+ -+ public long[] getLongs(final String key, final long[] dfl); -+ -+ public void setLongs(final String key, final long[] val); -+ -+ public ListType getListUnchecked(final String key); -+ -+ public ListType getListUnchecked(final String key, final ListType dfl); -+ -+ public default ListType getList(final String key, final ObjectType type) { -+ return this.getList(key, type, null); -+ } -+ -+ public default ListType getOrCreateList(final String key, final ObjectType type) { -+ ListType ret = this.getList(key, type); -+ if (ret == null) { -+ this.setList(key, ret = this.getTypeUtil().createEmptyList()); -+ } -+ -+ return ret; -+ } -+ -+ public default ListType getList(final String key, final ObjectType type, final ListType dfl) { -+ final ListType ret = this.getListUnchecked(key, null); -+ final ObjectType retType; -+ if (ret != null && ((retType = ret.getUniformType()) == type || retType == ObjectType.UNDEFINED || retType == ObjectType.NONE)) { -+ return ret; -+ } else { -+ return dfl; -+ } -+ } -+ -+ public void setList(final String key, final ListType val); -+ -+ public MapType getMap(final String key); -+ -+ public default MapType getOrCreateMap(final String key) { -+ MapType ret = this.getMap(key); -+ if (ret == null) { -+ this.setMap(key, ret = this.getTypeUtil().createEmptyMap()); -+ } -+ -+ return ret; -+ } -+ -+ public MapType getMap(final String key, final MapType dfl); -+ -+ public void setMap(final String key, final MapType val); -+ -+ public String getString(final String key); -+ -+ public String getString(final String key, final String dfl); -+ -+ public void setString(final String key, final String val); -+ -+ public default void setGeneric(final String key, final Object value) { -+ if (value instanceof Boolean bool) { -+ this.setBoolean(key, bool.booleanValue()); -+ return; -+ } else if (value instanceof Number) { -+ if (value instanceof Byte b) { -+ this.setByte(key, b.byteValue()); -+ return; -+ } else if (value instanceof Short s) { -+ this.setShort(key, s.shortValue()); -+ return; -+ } else if (value instanceof Integer i) { -+ this.setInt(key, i.intValue()); -+ return; -+ } else if (value instanceof Long l) { -+ this.setLong(key, l.longValue()); -+ return; -+ } else if (value instanceof Float f) { -+ this.setFloat(key, f.floatValue()); -+ return; -+ } else if (value instanceof Double d) { -+ this.setDouble(key, d.doubleValue()); -+ return; -+ } // else fall through to throw -+ } else if (value instanceof MapType map) { -+ this.setMap(key, map); -+ return; -+ } else if (value instanceof ListType list) { -+ this.setList(key, list); -+ return; -+ } else if (value instanceof String string) { -+ this.setString(key, string); -+ return; -+ } else if (value.getClass().isArray()) { -+ if (value instanceof byte[] bytes) { -+ this.setBytes(key, bytes); -+ return; -+ } else if (value instanceof short[] shorts) { -+ this.setShorts(key, shorts); -+ return; -+ } else if (value instanceof int[] ints) { -+ this.setInts(key, ints); -+ return; -+ } else if (value instanceof long[] longs) { -+ this.setLongs(key, longs); -+ return; -+ } // else fall through to throw -+ } -+ -+ throw new IllegalArgumentException("Object " + value + " is not a valid type!"); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/ObjectType.java b/ca/spottedleaf/dataconverter/types/ObjectType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..9775d810ba28e59d4eec6c79643c4bcaeb97fc31 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/ObjectType.java -@@ -0,0 +1,73 @@ -+package ca.spottedleaf.dataconverter.types; -+ -+public enum ObjectType { -+ NONE(null), -+ BYTE(Byte.class), -+ SHORT(Short.class), -+ INT(Integer.class), -+ LONG(Long.class), -+ FLOAT(Float.class), -+ DOUBLE(Double.class), -+ NUMBER(Number.class), -+ BYTE_ARRAY(byte[].class), -+ SHORT_ARRAY(short[].class), -+ INT_ARRAY(int[].class), -+ LONG_ARRAY(long[].class), -+ LIST(ListType.class), -+ MAP(MapType.class), -+ STRING(String.class), -+ UNDEFINED(null), -+ MIXED(null); -+ -+ private final Class clazz; -+ private final boolean isNumber; -+ -+ private ObjectType(final Class clazz) { -+ this.clazz = clazz; -+ this.isNumber = clazz != null && Number.class.isAssignableFrom(clazz); -+ } -+ -+ public boolean isNumber() { -+ return this.isNumber; -+ } -+ -+ public Class getObjectClass() { -+ return this.clazz; -+ } -+ -+ public static ObjectType getType(final Object object) { -+ if (object instanceof Number) { -+ if (object instanceof Byte) { -+ return BYTE; -+ } else if (object instanceof Short) { -+ return SHORT; -+ } else if (object instanceof Integer) { -+ return INT; -+ } else if (object instanceof Long) { -+ return LONG; -+ } else if (object instanceof Float) { -+ return FLOAT; -+ } else if (object instanceof Double) { -+ return DOUBLE; -+ } // else return null -+ } else if (object instanceof MapType) { -+ return MAP; -+ } else if (object instanceof ListType) { -+ return LIST; -+ } else if (object instanceof String) { -+ return STRING; -+ } else if (object.getClass().isArray()) { -+ if (object instanceof byte[]) { -+ return BYTE_ARRAY; -+ } else if (object instanceof short[]) { -+ return SHORT_ARRAY; -+ } else if (object instanceof int[]) { -+ return INT_ARRAY; -+ } else if (object instanceof long[]) { -+ return LONG_ARRAY; -+ } // else return null -+ } -+ -+ return null; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/TypeUtil.java b/ca/spottedleaf/dataconverter/types/TypeUtil.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4170c188d9e7150ef7b728d4992d10ec8dab4fa4 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/TypeUtil.java -@@ -0,0 +1,26 @@ -+package ca.spottedleaf.dataconverter.types; -+ -+public interface TypeUtil { -+ -+ public ListType createEmptyList(); -+ -+ public MapType createEmptyMap(); -+ -+ public default Object convertFromBaseToGeneric(final T input, final TypeUtil to) { -+ return this.convertTo(this.baseToGeneric(input), to); -+ } -+ -+ public default D convertBaseToBase(final T input, final TypeUtil to) { -+ return to.genericToBase(this.convertFromBaseToGeneric(input, to)); -+ } -+ -+ public default D convertGenericToBase(final Object valueGeneric, final TypeUtil to) { -+ return to.genericToBase(this.convertTo(valueGeneric, to)); -+ } -+ -+ public Object convertTo(final Object valueGeneric, final TypeUtil to); -+ -+ public Object baseToGeneric(final T input); -+ -+ public T genericToBase(final Object input); -+} -diff --git a/ca/spottedleaf/dataconverter/types/Types.java b/ca/spottedleaf/dataconverter/types/Types.java -new file mode 100644 -index 0000000000000000000000000000000000000000..750aa7b31732d81eb01c80b45b13a830ae7feb91 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/Types.java -@@ -0,0 +1,14 @@ -+package ca.spottedleaf.dataconverter.types; -+ -+import ca.spottedleaf.dataconverter.types.json.JsonTypeUtil; -+import ca.spottedleaf.dataconverter.types.nbt.NBTTypeUtil; -+ -+public interface Types { -+ -+ public static final NBTTypeUtil NBT = new NBTTypeUtil(); -+ -+ public static final JsonTypeUtil JSON = new JsonTypeUtil(false); -+ -+ // why does this exist -+ public static final JsonTypeUtil JSON_COMPRESSED = new JsonTypeUtil(true); -+} -diff --git a/ca/spottedleaf/dataconverter/types/json/JsonListType.java b/ca/spottedleaf/dataconverter/types/json/JsonListType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..58d0bf4931e7516b39d9d31b4807cfa28efeee0a ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/json/JsonListType.java -@@ -0,0 +1,510 @@ -+package ca.spottedleaf.dataconverter.types.json; -+ -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.gson.JsonArray; -+import com.google.gson.JsonElement; -+import com.google.gson.JsonObject; -+import com.google.gson.JsonPrimitive; -+ -+public final class JsonListType implements ListType { -+ -+ final JsonArray array; -+ final boolean compressed; -+ -+ public JsonListType(final boolean compressed) { -+ this.array = new JsonArray(); -+ this.compressed = compressed; -+ } -+ -+ public JsonListType(final JsonArray array, final boolean compressed) { -+ this.array = array; -+ this.compressed = compressed; -+ } -+ -+ @Override -+ public TypeUtil getTypeUtil() { -+ return this.compressed ? Types.JSON_COMPRESSED : Types.JSON; -+ } -+ -+ @Override -+ public boolean equals(final Object obj) { -+ if (this == obj) { -+ return true; -+ } -+ -+ if (obj == null || obj.getClass() != JsonListType.class) { -+ return false; -+ } -+ -+ return this.array.equals(((JsonListType)obj).array); -+ } -+ -+ @Override -+ public int hashCode() { -+ return this.array.hashCode(); -+ } -+ -+ @Override -+ public String toString() { -+ return "JsonListType{" + -+ "array=" + this.array + -+ ", compressed=" + this.compressed + -+ '}'; -+ } -+ -+ public JsonArray getJson() { -+ return this.array; -+ } -+ -+ @Override -+ public ListType copy() { -+ return new JsonListType(this.array.deepCopy(), this.compressed); -+ } -+ -+ @Override -+ public ObjectType getUniformType() { -+ return ObjectType.UNDEFINED; -+ } -+ -+ @Override -+ public int size() { -+ return this.array.size(); -+ } -+ -+ @Override -+ public void remove(final int index) { -+ this.array.remove(index); -+ } -+ -+ @Override -+ public Object getGeneric(final int index) { -+ return Types.JSON.baseToGeneric(this.array.get(index)); -+ } -+ -+ @Override -+ public Number getNumber(final int index) { -+ final JsonElement element = this.array.get(index); -+ if (element instanceof JsonPrimitive) { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isNumber()) { -+ return primitive.getAsNumber(); -+ } else if (primitive.isBoolean()) { -+ return primitive.getAsBoolean() ? Byte.valueOf((byte)1) : Byte.valueOf((byte)0); -+ } else if (this.compressed && primitive.isString()) { -+ try { -+ return Integer.valueOf(Integer.parseInt(primitive.getAsString())); -+ } catch (final NumberFormatException ex) { -+ return null; -+ } -+ } -+ } -+ -+ return null; -+ } -+ -+ @Override -+ public Number getNumber(final int index, final Number dfl) { -+ final Number ret = this.getNumber(index); -+ return ret == null ? dfl : ret; -+ } -+ -+ @Override -+ public byte getByte(final int index) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? (byte)0 : number.byteValue(); -+ } -+ -+ @Override -+ public byte getByte(final int index, final byte dfl) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? dfl : number.byteValue(); -+ } -+ -+ @Override -+ public void setByte(final int index, final byte to) { -+ this.array.set(index, new JsonPrimitive(Byte.valueOf(to))); -+ } -+ -+ @Override -+ public short getShort(final int index) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? (short)0 : number.shortValue(); -+ } -+ -+ @Override -+ public short getShort(final int index, final short dfl) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? dfl : number.shortValue(); -+ } -+ -+ @Override -+ public void setShort(final int index, final short to) { -+ this.array.set(index, new JsonPrimitive(Short.valueOf(to))); -+ } -+ -+ @Override -+ public int getInt(final int index) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? 0 : number.intValue(); -+ } -+ -+ @Override -+ public int getInt(final int index, final int dfl) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? dfl : number.intValue(); -+ } -+ -+ @Override -+ public void setInt(final int index, final int to) { -+ this.array.set(index, new JsonPrimitive(Integer.valueOf(to))); -+ } -+ -+ @Override -+ public long getLong(final int index) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? 0L : number.longValue(); -+ } -+ -+ @Override -+ public long getLong(final int index, final long dfl) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? dfl : number.longValue(); -+ } -+ -+ @Override -+ public void setLong(final int index, final long to) { -+ this.array.set(index, new JsonPrimitive(Long.valueOf(to))); -+ } -+ -+ @Override -+ public float getFloat(final int index) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? 0.0f : number.floatValue(); -+ } -+ -+ @Override -+ public float getFloat(final int index, final float dfl) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? dfl : number.floatValue(); -+ } -+ -+ @Override -+ public void setFloat(final int index, final float to) { -+ this.array.set(index, new JsonPrimitive(Float.valueOf(to))); -+ } -+ -+ @Override -+ public double getDouble(final int index) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? 0.0 : number.doubleValue(); -+ } -+ -+ @Override -+ public double getDouble(final int index, final double dfl) { -+ final Number number = this.getNumber(index); -+ -+ return number == null ? dfl : number.doubleValue(); -+ } -+ -+ @Override -+ public void setDouble(final int index, final double to) { -+ this.array.set(index, new JsonPrimitive(Double.valueOf(to))); -+ } -+ -+ @Override -+ public byte[] getBytes(final int index) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public byte[] getBytes(final int index, final byte[] dfl) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void setBytes(final int index, final byte[] to) { -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public short[] getShorts(final int index) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public short[] getShorts(final int index, final short[] dfl) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void setShorts(final int index, final short[] to) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public int[] getInts(final int index) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public int[] getInts(final int index, final int[] dfl) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void setInts(final int index, final int[] to) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public long[] getLongs(final int index) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public long[] getLongs(final int index, final long[] dfl) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void setLongs(final int index, final long[] to) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public ListType getList(final int index) { -+ final JsonElement element = this.array.get(index); -+ if (element instanceof JsonArray) { -+ return new JsonListType((JsonArray)element, this.compressed); -+ } -+ return null; -+ } -+ -+ @Override -+ public ListType getList(final int index, final ListType dfl) { -+ final ListType ret = this.getList(index); -+ return ret == null ? dfl : ret; -+ } -+ -+ @Override -+ public void setList(final int index, final ListType list) { -+ this.array.set(index, ((JsonListType)list).array); -+ } -+ -+ @Override -+ public MapType getMap(final int index) { -+ final JsonElement element = this.array.get(index); -+ if (element instanceof JsonObject) { -+ return new JsonMapType((JsonObject)element, this.compressed); -+ } -+ return null; -+ } -+ -+ @Override -+ public MapType getMap(final int index, final MapType dfl) { -+ final MapType ret = this.getMap(index); -+ return ret == null ? dfl : ret; -+ } -+ -+ @Override -+ public void setMap(final int index, final MapType to) { -+ this.array.set(index, ((JsonMapType)to).map); -+ } -+ -+ @Override -+ public String getString(final int index) { -+ final JsonElement element = this.array.get(index); -+ if (element instanceof JsonPrimitive) { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isString() || (this.compressed && primitive.isNumber())) { -+ return primitive.getAsString(); -+ } -+ } -+ -+ return null; -+ } -+ -+ @Override -+ public String getString(final int index, final String dfl) { -+ final String ret = this.getString(index); -+ return ret == null ? dfl : ret; -+ } -+ -+ @Override -+ public void setString(final int index, final String to) { -+ this.array.set(index, new JsonPrimitive(to)); -+ } -+ -+ @Override -+ public void addByte(final byte b) { -+ this.array.add(Byte.valueOf(b)); -+ } -+ -+ @Override -+ public void addByte(final int index, final byte b) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addShort(final short s) { -+ this.array.add(Short.valueOf(s)); -+ } -+ -+ @Override -+ public void addShort(final int index, final short s) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addInt(final int i) { -+ this.array.add(Integer.valueOf(i)); -+ } -+ -+ @Override -+ public void addInt(final int index, final int i) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addLong(final long l) { -+ this.array.add(Long.valueOf(l)); -+ } -+ -+ @Override -+ public void addLong(final int index, final long l) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addFloat(final float f) { -+ this.array.add(Float.valueOf(f)); -+ } -+ -+ @Override -+ public void addFloat(final int index, final float f) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addDouble(final double d) { -+ this.array.add(Double.valueOf(d)); -+ } -+ -+ @Override -+ public void addDouble(final int index, final double d) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addByteArray(final byte[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addByteArray(final int index, final byte[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addShortArray(final short[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addShortArray(final int index, final short[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addIntArray(final int[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addIntArray(final int index, final int[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addLongArray(final long[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addLongArray(final int index, final long[] arr) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addList(final ListType list) { -+ this.array.add(((JsonListType)list).array); -+ } -+ -+ @Override -+ public void addList(final int index, final ListType list) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addMap(final MapType map) { -+ this.array.add(((JsonMapType)map).map); -+ } -+ -+ @Override -+ public void addMap(final int index, final MapType map) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addString(final String string) { -+ this.array.add(string); -+ } -+ -+ @Override -+ public void addString(final int index, final String string) { -+ // doesn't implement any methods for adding at index... yee haw... -+ throw new UnsupportedOperationException(); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/json/JsonMapType.java b/ca/spottedleaf/dataconverter/types/json/JsonMapType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6704da4a40522a4f40cd770a4cbaaa8e6f67cc31 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/json/JsonMapType.java -@@ -0,0 +1,472 @@ -+package ca.spottedleaf.dataconverter.types.json; -+ -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.types.Types; -+import com.google.gson.JsonArray; -+import com.google.gson.JsonElement; -+import com.google.gson.JsonObject; -+import com.google.gson.JsonPrimitive; -+import java.util.LinkedHashSet; -+import java.util.Map; -+import java.util.Set; -+ -+public final class JsonMapType implements MapType { -+ -+ final JsonObject map; -+ final boolean compressed; -+ -+ public JsonMapType(final boolean compressed) { -+ this.map = new JsonObject(); -+ this.compressed = compressed; -+ } -+ -+ public JsonMapType(final JsonObject map, final boolean compressed) { -+ this.map = map; -+ this.compressed = compressed; -+ } -+ -+ @Override -+ public TypeUtil getTypeUtil() { -+ return this.compressed ? Types.JSON_COMPRESSED : Types.JSON; -+ } -+ -+ @Override -+ public boolean equals(final Object obj) { -+ if (this == obj) { -+ return true; -+ } -+ -+ if (obj == null || obj.getClass() != JsonMapType.class) { -+ return false; -+ } -+ -+ return this.map.equals(((JsonMapType)obj).map); -+ } -+ -+ @Override -+ public int hashCode() { -+ return this.map.hashCode(); -+ } -+ -+ @Override -+ public String toString() { -+ return "JsonMapType{" + -+ "map=" + this.map + -+ ", compressed=" + this.compressed + -+ '}'; -+ } -+ -+ public JsonObject getJson() { -+ return this.map; -+ } -+ -+ @Override -+ public int size() { -+ return this.map.entrySet().size(); -+ } -+ -+ @Override -+ public boolean isEmpty() { -+ return this.map.entrySet().isEmpty(); -+ } -+ -+ @Override -+ public void clear() { -+ this.map.entrySet().clear(); -+ } -+ -+ @Override -+ public Set keys() { -+ // ah shit. no keyset method -+ final Set keys = new LinkedHashSet<>(); -+ -+ for (final Map.Entry entry : this.map.entrySet()) { -+ keys.add(entry.getKey()); -+ } -+ -+ return keys; -+ } -+ -+ @Override -+ public MapType copy() { -+ return new JsonMapType(this.map.deepCopy(), this.compressed); -+ } -+ -+ @Override -+ public boolean hasKey(final String key) { -+ return this.map.has(key); -+ } -+ -+ @Override -+ public boolean hasKey(final String key, final ObjectType type) { -+ final JsonElement element = this.map.get(key); -+ if (element == null) { -+ return false; -+ } -+ -+ if (type == ObjectType.UNDEFINED) { -+ return true; -+ } -+ -+ if (element.isJsonArray()) { -+ return type == ObjectType.LIST; -+ } else if (element.isJsonObject()) { -+ return type == ObjectType.MAP; -+ } else if (element.isJsonNull()) { -+ return false; -+ } -+ -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isString()) { -+ return type == ObjectType.STRING || (this.compressed && type == ObjectType.NUMBER); -+ } else if (primitive.isBoolean()) { -+ return type.isNumber(); -+ } else { -+ // is number -+ final Number number = primitive.getAsNumber(); -+ if (number instanceof Byte) { -+ return type == ObjectType.BYTE || (this.compressed && type == ObjectType.STRING); -+ } else if (number instanceof Short) { -+ return type == ObjectType.SHORT || (this.compressed && type == ObjectType.STRING); -+ } else if (number instanceof Integer) { -+ return type == ObjectType.INT || (this.compressed && type == ObjectType.STRING); -+ } else if (number instanceof Long) { -+ return type == ObjectType.LONG || (this.compressed && type == ObjectType.STRING); -+ } else if (number instanceof Float) { -+ return type == ObjectType.FLOAT || (this.compressed && type == ObjectType.STRING); -+ } else { -+ return type == ObjectType.DOUBLE || (this.compressed && type == ObjectType.STRING); -+ } -+ } -+ } -+ -+ @Override -+ public void remove(final String key) { -+ this.map.remove(key); -+ } -+ -+ @Override -+ public Object getGeneric(final String key) { -+ final JsonElement element = this.map.get(key); -+ if (element == null || element.isJsonNull()) { -+ return null; -+ } else if (element.isJsonObject()) { -+ return new JsonMapType((JsonObject)element, this.compressed); -+ } else if (element.isJsonArray()) { -+ return new JsonListType((JsonArray)element, this.compressed); -+ } else { -+ // primitive -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isNumber()) { -+ return primitive.getAsNumber(); -+ } else if (primitive.isString()) { -+ return primitive.getAsString(); -+ } else if (primitive.isBoolean()) { -+ return Boolean.valueOf(primitive.getAsBoolean()); -+ } else { -+ throw new IllegalStateException("Unknown json object " + element); -+ } -+ } -+ } -+ -+ @Override -+ public Number getNumber(final String key) { -+ return this.getNumber(key, null); -+ } -+ -+ @Override -+ public Number getNumber(final String key, final Number dfl) { -+ final JsonElement element = this.map.get(key); -+ if (element instanceof JsonPrimitive) { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isNumber()) { -+ return primitive.getAsNumber(); -+ } else if (primitive.isBoolean()) { -+ return primitive.getAsBoolean() ? Byte.valueOf((byte)1) : Byte.valueOf((byte)0); -+ } else if (this.compressed && primitive.isString()) { -+ try { -+ return Integer.valueOf(Integer.parseInt(primitive.getAsString())); -+ } catch (final NumberFormatException ex) { -+ return null; -+ } -+ } -+ } -+ -+ return dfl; -+ } -+ -+ @Override -+ public boolean getBoolean(final String key) { -+ return this.getBoolean(key, false); -+ } -+ -+ @Override -+ public boolean getBoolean(final String key, final boolean dfl) { -+ final JsonElement element = this.map.get(key); -+ if (element instanceof JsonPrimitive) { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isNumber()) { -+ return primitive.getAsNumber().byteValue() != 0; -+ } else if (primitive.isBoolean()) { -+ return primitive.getAsBoolean(); -+ } -+ } -+ -+ return dfl; -+ } -+ -+ @Override -+ public void setBoolean(final String key, final boolean val) { -+ this.map.addProperty(key, Boolean.valueOf(val)); -+ } -+ -+ @Override -+ public byte getByte(final String key) { -+ return this.getByte(key, (byte)0); -+ } -+ -+ @Override -+ public byte getByte(final String key, final byte dfl) { -+ final Number ret = this.getNumber(key, null); -+ return ret == null ? dfl : ret.byteValue(); -+ } -+ -+ @Override -+ public void setByte(final String key, final byte val) { -+ this.map.addProperty(key, Byte.valueOf(val)); -+ } -+ -+ @Override -+ public short getShort(final String key) { -+ return this.getShort(key, (short)0); -+ } -+ -+ @Override -+ public short getShort(final String key, final short dfl) { -+ final Number ret = this.getNumber(key, null); -+ return ret == null ? dfl : ret.shortValue(); -+ } -+ -+ @Override -+ public void setShort(final String key, final short val) { -+ this.map.addProperty(key, Short.valueOf(val)); -+ } -+ -+ @Override -+ public int getInt(final String key) { -+ return this.getInt(key, 0); -+ } -+ -+ @Override -+ public int getInt(final String key, final int dfl) { -+ final Number ret = this.getNumber(key, null); -+ return ret == null ? dfl : ret.intValue(); -+ } -+ -+ @Override -+ public void setInt(final String key, final int val) { -+ this.map.addProperty(key, Integer.valueOf(val)); -+ } -+ -+ @Override -+ public long getLong(final String key) { -+ return this.getLong(key, 0L); -+ } -+ -+ @Override -+ public long getLong(final String key, final long dfl) { -+ final Number ret = this.getNumber(key, null); -+ return ret == null ? dfl : ret.longValue(); -+ } -+ -+ @Override -+ public void setLong(final String key, final long val) { -+ this.map.addProperty(key, Long.valueOf(val)); -+ } -+ -+ @Override -+ public float getFloat(final String key) { -+ return this.getFloat(key, 0.0F); -+ } -+ -+ @Override -+ public float getFloat(final String key, final float dfl) { -+ final Number ret = this.getNumber(key, null); -+ return ret == null ? dfl : ret.floatValue(); -+ } -+ -+ @Override -+ public void setFloat(final String key, final float val) { -+ this.map.addProperty(key, Float.valueOf(val)); -+ } -+ -+ @Override -+ public double getDouble(final String key) { -+ return this.getDouble(key, 0.0D); -+ } -+ -+ @Override -+ public double getDouble(final String key, final double dfl) { -+ final Number ret = this.getNumber(key, null); -+ return ret == null ? dfl : ret.doubleValue(); -+ } -+ -+ @Override -+ public void setDouble(final String key, final double val) { -+ this.map.addProperty(key, Double.valueOf(val)); -+ } -+ -+ @Override -+ public byte[] getBytes(final String key) { -+ return this.getBytes(key, null); -+ } -+ -+ @Override -+ public byte[] getBytes(final String key, final byte[] dfl) { -+ return dfl; -+ } -+ -+ @Override -+ public void setBytes(final String key, final byte[] val) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public short[] getShorts(final String key) { -+ return this.getShorts(key, null); -+ } -+ -+ @Override -+ public short[] getShorts(final String key, final short[] dfl) { -+ return dfl; -+ } -+ -+ @Override -+ public void setShorts(final String key, final short[] val) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public int[] getInts(final String key) { -+ return this.getInts(key, null); -+ } -+ -+ @Override -+ public int[] getInts(final String key, final int[] dfl) { -+ return dfl; -+ } -+ -+ @Override -+ public void setInts(final String key, final int[] val) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public long[] getLongs(final String key) { -+ return this.getLongs(key, null); -+ } -+ -+ @Override -+ public long[] getLongs(final String key, final long[] dfl) { -+ return dfl; -+ } -+ -+ @Override -+ public void setLongs(final String key, final long[] val) { -+ // JSON does not support raw primitive arrays -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public ListType getListUnchecked(final String key) { -+ return this.getListUnchecked(key, null); -+ } -+ -+ @Override -+ public ListType getListUnchecked(final String key, final ListType dfl) { -+ final JsonElement element = this.map.get(key); -+ if (element instanceof JsonArray) { -+ return new JsonListType((JsonArray)element, this.compressed); -+ } -+ -+ return dfl; -+ } -+ -+ @Override -+ public void setList(final String key, final ListType val) { -+ this.map.add(key, ((JsonListType)val).getJson()); -+ } -+ -+ @Override -+ public MapType getMap(final String key) { -+ return this.getMap(key, null); -+ } -+ -+ @Override -+ public MapType getMap(final String key, final MapType dfl) { -+ final JsonElement element = this.map.get(key); -+ if (element instanceof JsonObject) { -+ return new JsonMapType((JsonObject)element, this.compressed); -+ } -+ -+ return dfl; -+ } -+ -+ @Override -+ public void setMap(final String key, final MapType val) { -+ this.map.add(key, ((JsonMapType)val).map); -+ } -+ -+ @Override -+ public String getString(final String key) { -+ return this.getString(key, null); -+ } -+ -+ @Override -+ public String getString(final String key, final String dfl) { -+ final JsonElement element = this.map.get(key); -+ if (element instanceof JsonPrimitive) { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isString()) { -+ return primitive.getAsString(); -+ } else if (this.compressed && primitive.isNumber()) { -+ return primitive.getAsString(); -+ } -+ } -+ -+ return dfl; -+ } -+ -+ public String getForcedString(final String key) { -+ return this.getForcedString(key, null); -+ } -+ -+ public String getForcedString(final String key, final String dfl) { -+ final JsonElement element = this.map.get(key); -+ if (element instanceof JsonPrimitive) { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isString()) { -+ return primitive.getAsString(); -+ } else if (primitive.isNumber()) { -+ return primitive.getAsString(); -+ } -+ -+ return primitive.toString(); -+ } else if (element != null) { -+ return element.toString(); -+ } -+ -+ return dfl; -+ } -+ -+ @Override -+ public void setString(final String key, final String val) { -+ this.map.addProperty(key, val); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/json/JsonTypeUtil.java b/ca/spottedleaf/dataconverter/types/json/JsonTypeUtil.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3ace24bdd5e5da4333e25c9c681007e6a85d52ab ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/json/JsonTypeUtil.java -@@ -0,0 +1,181 @@ -+package ca.spottedleaf.dataconverter.types.json; -+ -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.CopyHelper; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import com.google.gson.JsonArray; -+import com.google.gson.JsonElement; -+import com.google.gson.JsonNull; -+import com.google.gson.JsonObject; -+import com.google.gson.JsonPrimitive; -+import java.math.BigDecimal; -+import java.util.Map; -+ -+public final class JsonTypeUtil implements TypeUtil { -+ -+ private final boolean compressed; -+ -+ public JsonTypeUtil(final boolean compressed) { -+ this.compressed = compressed; -+ } -+ -+ public boolean isCompressed() { -+ return this.compressed; -+ } -+ -+ @Override -+ public ListType createEmptyList() { -+ return new JsonListType(this.compressed); -+ } -+ -+ @Override -+ public MapType createEmptyMap() { -+ return new JsonMapType(this.compressed); -+ } -+ -+ @Override -+ public Object convertTo(final Object valueGeneric, final TypeUtil to) { -+ if (valueGeneric == null || valueGeneric instanceof String || valueGeneric instanceof Boolean) { -+ return valueGeneric; -+ } -+ if (valueGeneric instanceof Number number) { -+ if (CopyHelper.sanitizeNumber(number) == null) { -+ throw new IllegalStateException("Unknown type: " + number); -+ } -+ return number; -+ } -+ if (valueGeneric instanceof JsonListType listType) { -+ return convertJson(to, listType.array, this.compressed); // override input compression -+ } -+ if (valueGeneric instanceof JsonMapType mapType) { -+ return convertJson(to, mapType.map, this.compressed); // override input compression -+ } -+ throw new IllegalStateException("Unknown type: " + valueGeneric); -+ } -+ -+ @Override -+ public Object convertFromBaseToGeneric(final JsonElement input, final TypeUtil to) { -+ return convertJsonToGeneric(to, input, this.compressed); -+ } -+ -+ @Override -+ public Object baseToGeneric(final JsonElement input) { -+ if (input == null) { -+ return null; -+ } -+ if (input instanceof JsonObject jsonObject) { -+ return new JsonMapType(jsonObject, this.compressed); -+ } else if (input instanceof JsonArray array) { -+ return new JsonListType(array, this.compressed); -+ } else if (input instanceof JsonNull) { -+ return null; -+ } else { -+ final JsonPrimitive primitive = (JsonPrimitive)input; -+ if (primitive.isBoolean()) { -+ return Boolean.valueOf(primitive.getAsBoolean()); -+ } else if (primitive.isNumber()) { -+ final Number number = CopyHelper.sanitizeNumber(primitive.getAsNumber()); -+ return number != null ? number : convertBDToGeneric(primitive.getAsBigDecimal()); -+ } else if (primitive.isString()) { -+ return primitive.getAsString(); -+ } -+ } -+ -+ throw new IllegalStateException("Unrecognized type " + input); -+ } -+ -+ @Override -+ public JsonElement genericToBase(final Object input) { -+ if (input == null) { -+ return JsonNull.INSTANCE; -+ } else if (input instanceof JsonMapType mapType) { -+ return mapType.map; -+ } else if (input instanceof JsonListType listType) { -+ return listType.array; -+ } else if (input instanceof Boolean bool) { -+ return new JsonPrimitive(bool); -+ } else if (input instanceof Number number) { -+ return new JsonPrimitive(number); -+ } else if (input instanceof String string) { -+ return new JsonPrimitive(string); -+ } -+ -+ throw new IllegalStateException("Unrecognized type " + input); -+ } -+ -+ private static Number convertBDToGeneric(final BigDecimal input) { -+ try { -+ final long l = input.longValueExact(); -+ final byte b = (byte)l; -+ final short s = (short)l; -+ final int i = (int)l; -+ -+ if ((long)b == l) { -+ return Byte.valueOf(b); -+ } -+ if ((long)s == l) { -+ return Short.valueOf(s); -+ } -+ if ((long)i == l) { -+ return Integer.valueOf(i); -+ } -+ -+ return Long.valueOf(l); -+ } catch (final ArithmeticException ex) { -+ final double d = input.doubleValue(); // possibly lose precision! -+ final float f = (float)d; -+ -+ return (double)f == d ? Float.valueOf(f) : Double.valueOf(d); -+ } -+ } -+ -+ private static Object convertJsonToGeneric(final TypeUtil to, final JsonElement element, final boolean compressed) { -+ if (element == null) { -+ return null; -+ } -+ if (element instanceof JsonObject jsonObject) { -+ return convertJson(to, jsonObject, compressed); -+ } else if (element instanceof JsonArray array) { -+ return convertJson(to, array, compressed); -+ } else if (element instanceof JsonNull) { -+ return null; -+ } else { -+ final JsonPrimitive primitive = (JsonPrimitive)element; -+ if (primitive.isBoolean()) { -+ return Boolean.valueOf(primitive.getAsBoolean()); -+ } else if (primitive.isNumber()) { -+ final Number number = CopyHelper.sanitizeNumber(primitive.getAsNumber()); -+ return number != null ? number : convertBDToGeneric(primitive.getAsBigDecimal()); -+ } else if (primitive.isString()) { -+ return primitive.getAsString(); -+ } -+ } -+ -+ throw new IllegalStateException("Unrecognized type " + element); -+ } -+ -+ private static MapType convertJson(final TypeUtil to, final JsonObject json, final boolean compressed) { -+ final MapType ret = to.createEmptyMap(); -+ for (final Map.Entry entry : json.entrySet()) { -+ final Object obj = convertJsonToGeneric(to, entry.getValue(), compressed); -+ if (obj == null) { -+ continue; -+ } -+ -+ ret.setGeneric(entry.getKey(), obj); -+ } -+ -+ return ret; -+ } -+ -+ private static ListType convertJson(final TypeUtil to, final JsonArray json, final boolean compressed) { -+ final ListType ret = to.createEmptyList(); -+ -+ for (int i = 0, len = json.size(); i < len; ++i) { -+ ret.addGeneric(convertJsonToGeneric(to, json.get(i), compressed)); -+ } -+ -+ return ret; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/nbt/NBTListType.java b/ca/spottedleaf/dataconverter/types/nbt/NBTListType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b4882e90c8845694032e4a43e75bbf35c5eed873 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/nbt/NBTListType.java -@@ -0,0 +1,582 @@ -+package ca.spottedleaf.dataconverter.types.nbt; -+ -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.types.Types; -+import net.minecraft.nbt.ByteArrayTag; -+import net.minecraft.nbt.ByteTag; -+import net.minecraft.nbt.CompoundTag; -+import net.minecraft.nbt.DoubleTag; -+import net.minecraft.nbt.FloatTag; -+import net.minecraft.nbt.IntArrayTag; -+import net.minecraft.nbt.IntTag; -+import net.minecraft.nbt.ListTag; -+import net.minecraft.nbt.LongArrayTag; -+import net.minecraft.nbt.LongTag; -+import net.minecraft.nbt.NumericTag; -+import net.minecraft.nbt.ShortTag; -+import net.minecraft.nbt.StringTag; -+import net.minecraft.nbt.Tag; -+ -+public final class NBTListType implements ListType { -+ -+ final ListTag list; -+ -+ public NBTListType() { -+ this.list = new ListTag(); -+ } -+ -+ public NBTListType(final ListTag tag) { -+ this.list = tag; -+ } -+ -+ @Override -+ public TypeUtil getTypeUtil() { -+ return Types.NBT; -+ } -+ -+ @Override -+ public boolean equals(final Object obj) { -+ if (this == obj) { -+ return true; -+ } -+ if (obj == null || obj.getClass() != NBTListType.class) { -+ return false; -+ } -+ -+ return this.list.equals(((NBTListType)obj).list); -+ } -+ -+ @Override -+ public int hashCode() { -+ return this.list.hashCode(); -+ } -+ -+ @Override -+ public String toString() { -+ return "NBTListType{" + -+ "list=" + this.list + -+ '}'; -+ } -+ -+ public ListTag getTag() { -+ return this.list; -+ } -+ -+ @Override -+ public ListType copy() { -+ return new NBTListType(this.list.copy()); -+ } -+ -+ static ObjectType getType(final byte id) { -+ switch (id) { -+ case Tag.TAG_END: -+ return ObjectType.NONE; -+ case Tag.TAG_BYTE: -+ return ObjectType.BYTE; -+ case Tag.TAG_SHORT: -+ return ObjectType.SHORT; -+ case Tag.TAG_INT: -+ return ObjectType.INT; -+ case Tag.TAG_LONG: -+ return ObjectType.LONG; -+ case Tag.TAG_FLOAT: -+ return ObjectType.FLOAT; -+ case Tag.TAG_DOUBLE: -+ return ObjectType.DOUBLE; -+ case Tag.TAG_BYTE_ARRAY: -+ return ObjectType.BYTE_ARRAY; -+ case Tag.TAG_STRING: -+ return ObjectType.STRING; -+ case Tag.TAG_LIST: -+ return ObjectType.LIST; -+ case Tag.TAG_COMPOUND: -+ return ObjectType.MAP; -+ case Tag.TAG_INT_ARRAY: -+ return ObjectType.INT_ARRAY; -+ case Tag.TAG_LONG_ARRAY: -+ return ObjectType.LONG_ARRAY; -+ default: -+ throw new IllegalStateException("Unknown type: " + id); -+ } -+ } -+ -+ @Override -+ public ObjectType getUniformType() { -+ ObjectType curr = null; -+ -+ for (int i = 0, len = this.list.size(); i < len; ++i) { -+ final Tag tag = this.list.get(i); -+ final ObjectType tagType = getType(tag.getId()); -+ if (curr == null) { -+ curr = tagType; -+ } else if (tagType != curr) { -+ return ObjectType.MIXED; -+ } -+ } -+ -+ return curr == null ? ObjectType.NONE : curr; -+ } -+ -+ @Override -+ public int size() { -+ return this.list.size(); -+ } -+ -+ @Override -+ public void remove(final int index) { -+ this.list.remove(index); -+ } -+ -+ @Override -+ public Object getGeneric(final int index) { -+ return Types.NBT.baseToGeneric(this.list.get(index)); -+ } -+ -+ @Override -+ public Number getNumber(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.box(); -+ } -+ -+ @Override -+ public Number getNumber(final int index, final Number dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.box(); -+ } -+ -+ @Override -+ public byte getByte(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.byteValue(); -+ } -+ -+ @Override -+ public byte getByte(final int index, final byte dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.byteValue(); -+ } -+ -+ @Override -+ public void setByte(final int index, final byte to) { -+ this.list.set(index, ByteTag.valueOf(to)); -+ } -+ -+ @Override -+ public short getShort(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.shortValue(); -+ } -+ -+ @Override -+ public short getShort(final int index, final short dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.shortValue(); -+ } -+ -+ @Override -+ public void setShort(final int index, final short to) { -+ this.list.set(index, ShortTag.valueOf(to)); -+ } -+ -+ @Override -+ public int getInt(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.intValue(); -+ } -+ -+ @Override -+ public int getInt(final int index, final int dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.intValue(); -+ } -+ -+ @Override -+ public void setInt(final int index, final int to) { -+ this.list.set(index, IntTag.valueOf(to)); -+ } -+ -+ @Override -+ public long getLong(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.longValue(); -+ } -+ -+ @Override -+ public long getLong(final int index, final long dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.longValue(); -+ } -+ -+ @Override -+ public void setLong(final int index, final long to) { -+ this.list.set(index, LongTag.valueOf(to)); -+ } -+ -+ @Override -+ public float getFloat(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.floatValue(); -+ } -+ -+ @Override -+ public float getFloat(final int index, final float dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.floatValue(); -+ } -+ -+ @Override -+ public void setFloat(final int index, final float to) { -+ this.list.set(index, FloatTag.valueOf(to)); -+ } -+ -+ @Override -+ public double getDouble(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ throw new IllegalStateException(); -+ } -+ return numericTag.doubleValue(); -+ } -+ -+ @Override -+ public double getDouble(final int index, final double dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof NumericTag numericTag)) { -+ return dfl; -+ } -+ return numericTag.doubleValue(); -+ } -+ -+ @Override -+ public void setDouble(final int index, final double to) { -+ this.list.set(index, DoubleTag.valueOf(to)); -+ } -+ -+ @Override -+ public byte[] getBytes(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof ByteArrayTag bytes)) { -+ throw new IllegalStateException(); -+ } -+ return bytes.getAsByteArray(); -+ } -+ -+ -+ @Override -+ public byte[] getBytes(final int index, final byte[] dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof ByteArrayTag bytes)) { -+ return dfl; -+ } -+ return bytes.getAsByteArray(); -+ } -+ -+ @Override -+ public void setBytes(final int index, final byte[] to) { -+ this.list.set(index, new ByteArrayTag(to)); -+ } -+ -+ @Override -+ public short[] getShorts(final int index) { -+ // NBT does not support shorts -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public short[] getShorts(final int index, final short[] dfl) { -+ // NBT does not support shorts -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void setShorts(final int index, final short[] to) { -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public int[] getInts(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof IntArrayTag ints)) { -+ throw new IllegalStateException(); -+ } -+ return ints.getAsIntArray(); -+ } -+ -+ @Override -+ public int[] getInts(final int index, final int[] dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof IntArrayTag ints)) { -+ return dfl; -+ } -+ return ints.getAsIntArray(); -+ } -+ -+ @Override -+ public void setInts(final int index, final int[] to) { -+ this.list.set(index, new IntArrayTag(to)); -+ } -+ -+ @Override -+ public long[] getLongs(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof LongArrayTag longs)) { -+ throw new IllegalStateException(); -+ } -+ return longs.getAsLongArray(); -+ } -+ -+ @Override -+ public long[] getLongs(final int index, final long[] dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof LongArrayTag longs)) { -+ return dfl; -+ } -+ return longs.getAsLongArray(); -+ } -+ -+ @Override -+ public void setLongs(final int index, final long[] to) { -+ this.list.set(index, new LongArrayTag(to)); -+ } -+ -+ @Override -+ public ListType getList(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof ListTag list)) { -+ throw new IllegalStateException(); -+ } -+ return new NBTListType(list); -+ } -+ -+ @Override -+ public ListType getList(final int index, final ListType dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof ListTag list)) { -+ return dfl; -+ } -+ return new NBTListType(list); -+ } -+ -+ @Override -+ public void setList(final int index, final ListType list) { -+ this.list.set(index, ((NBTListType)list).getTag()); -+ } -+ -+ @Override -+ public MapType getMap(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof CompoundTag compoundTag)) { -+ throw new IllegalStateException(); -+ } -+ return new NBTMapType(compoundTag); -+ } -+ -+ @Override -+ public MapType getMap(final int index, final MapType dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof CompoundTag compoundTag)) { -+ return dfl; -+ } -+ return new NBTMapType(compoundTag); -+ } -+ -+ @Override -+ public void setMap(final int index, final MapType to) { -+ this.list.set(index, ((NBTMapType)to).getTag()); -+ } -+ -+ @Override -+ public String getString(final int index) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof StringTag stringTag)) { -+ throw new IllegalStateException(); -+ } -+ return stringTag.value(); -+ } -+ -+ -+ @Override -+ public String getString(final int index, final String dfl) { -+ final Tag tag = this.list.get(index); // does bound checking for us -+ if (!(tag instanceof StringTag stringTag)) { -+ return dfl; -+ } -+ return stringTag.value(); -+ } -+ -+ @Override -+ public void setString(final int index, final String to) { -+ this.list.set(index, StringTag.valueOf(to)); -+ } -+ -+ @Override -+ public void addByte(final byte b) { -+ this.list.add(ByteTag.valueOf(b)); -+ } -+ -+ @Override -+ public void addByte(final int index, final byte b) { -+ this.list.add(index, ByteTag.valueOf(b)); -+ } -+ -+ @Override -+ public void addShort(final short s) { -+ this.list.add(ShortTag.valueOf(s)); -+ } -+ -+ @Override -+ public void addShort(final int index, final short s) { -+ this.list.add(index, ShortTag.valueOf(s)); -+ } -+ -+ @Override -+ public void addInt(final int i) { -+ this.list.add(IntTag.valueOf(i)); -+ } -+ -+ @Override -+ public void addInt(final int index, final int i) { -+ this.list.add(index, IntTag.valueOf(i)); -+ } -+ -+ @Override -+ public void addLong(final long l) { -+ this.list.add(LongTag.valueOf(l)); -+ } -+ -+ @Override -+ public void addLong(final int index, final long l) { -+ this.list.add(index, LongTag.valueOf(l)); -+ } -+ -+ @Override -+ public void addFloat(final float f) { -+ this.list.add(FloatTag.valueOf(f)); -+ } -+ -+ @Override -+ public void addFloat(final int index, final float f) { -+ this.list.add(index, FloatTag.valueOf(f)); -+ } -+ -+ @Override -+ public void addDouble(final double d) { -+ this.list.add(DoubleTag.valueOf(d)); -+ } -+ -+ @Override -+ public void addDouble(final int index, final double d) { -+ this.list.add(index, DoubleTag.valueOf(d)); -+ } -+ -+ @Override -+ public void addByteArray(final byte[] arr) { -+ this.list.add(new ByteArrayTag(arr)); -+ } -+ -+ @Override -+ public void addByteArray(final int index, final byte[] arr) { -+ this.list.add(index, new ByteArrayTag(arr)); -+ } -+ -+ @Override -+ public void addShortArray(final short[] arr) { -+ // NBT does not support short[] -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addShortArray(final int index, final short[] arr) { -+ // NBT does not support short[] -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public void addIntArray(final int[] arr) { -+ this.list.add(new IntArrayTag(arr)); -+ } -+ -+ @Override -+ public void addIntArray(final int index, final int[] arr) { -+ this.list.add(index, new IntArrayTag(arr)); -+ } -+ -+ @Override -+ public void addLongArray(final long[] arr) { -+ this.list.add(new LongArrayTag(arr)); -+ } -+ -+ @Override -+ public void addLongArray(final int index, final long[] arr) { -+ this.list.add(index, new LongArrayTag(arr)); -+ } -+ -+ @Override -+ public void addList(final ListType list) { -+ this.list.add(((NBTListType)list).getTag()); -+ } -+ -+ @Override -+ public void addList(final int index, final ListType list) { -+ this.list.add(index, ((NBTListType)list).getTag()); -+ } -+ -+ @Override -+ public void addMap(final MapType map) { -+ this.list.add(((NBTMapType)map).getTag()); -+ } -+ -+ @Override -+ public void addMap(final int index, final MapType map) { -+ this.list.add(index, ((NBTMapType)map).getTag()); -+ } -+ -+ @Override -+ public void addString(final String string) { -+ this.list.add(StringTag.valueOf(string)); -+ } -+ -+ @Override -+ public void addString(final int index, final String string) { -+ this.list.add(index, StringTag.valueOf(string)); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/nbt/NBTMapType.java b/ca/spottedleaf/dataconverter/types/nbt/NBTMapType.java -new file mode 100644 -index 0000000000000000000000000000000000000000..2558d9014e1daff6dd4a44ad85bbc0254c7de056 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/nbt/NBTMapType.java -@@ -0,0 +1,442 @@ -+package ca.spottedleaf.dataconverter.types.nbt; -+ -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.ObjectType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import ca.spottedleaf.dataconverter.types.Types; -+import net.minecraft.nbt.ByteArrayTag; -+import net.minecraft.nbt.ByteTag; -+import net.minecraft.nbt.CompoundTag; -+import net.minecraft.nbt.IntArrayTag; -+import net.minecraft.nbt.ListTag; -+import net.minecraft.nbt.LongArrayTag; -+import net.minecraft.nbt.NumericTag; -+import net.minecraft.nbt.StringTag; -+import net.minecraft.nbt.StringTagVisitor; -+import net.minecraft.nbt.Tag; -+ -+import java.util.Set; -+ -+public final class NBTMapType implements MapType { -+ -+ final CompoundTag map; -+ -+ public NBTMapType() { -+ this.map = new CompoundTag(); -+ } -+ -+ public NBTMapType(final CompoundTag tag) { -+ this.map = tag; -+ } -+ -+ @Override -+ public boolean equals(final Object obj) { -+ if (this == obj) { -+ return true; -+ } -+ if (obj == null || obj.getClass() != NBTMapType.class) { -+ return false; -+ } -+ -+ return this.map.equals(((NBTMapType)obj).map); -+ } -+ -+ @Override -+ public TypeUtil getTypeUtil() { -+ return Types.NBT; -+ } -+ -+ @Override -+ public int hashCode() { -+ return this.map.hashCode(); -+ } -+ -+ @Override -+ public String toString() { -+ return "NBTMapType{" + -+ "map=" + this.map + -+ '}'; -+ } -+ -+ @Override -+ public int size() { -+ return this.map.size(); -+ } -+ -+ @Override -+ public boolean isEmpty() { -+ return this.map.isEmpty(); -+ } -+ -+ @Override -+ public void clear() { -+ this.map.keySet().clear(); -+ } -+ -+ @Override -+ public Set keys() { -+ return this.map.keySet(); -+ } -+ -+ public CompoundTag getTag() { -+ return this.map; -+ } -+ -+ @Override -+ public MapType copy() { -+ return new NBTMapType(this.map.copy()); -+ } -+ -+ @Override -+ public boolean hasKey(final String key) { -+ return this.map.get(key) != null; -+ } -+ -+ @Override -+ public boolean hasKey(final String key, final ObjectType type) { -+ final Tag tag = this.map.get(key); -+ if (tag == null) { -+ return false; -+ } -+ -+ final ObjectType valueType = NBTListType.getType(tag.getId()); -+ -+ return valueType == type || (type == ObjectType.NUMBER && valueType.isNumber()); -+ } -+ -+ @Override -+ public void remove(final String key) { -+ this.map.remove(key); -+ } -+ -+ @Override -+ public Object getGeneric(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag == null) { -+ return null; -+ } -+ -+ switch (NBTListType.getType(tag.getId())) { -+ case BYTE: -+ case SHORT: -+ case INT: -+ case LONG: -+ case FLOAT: -+ case DOUBLE: -+ return ((NumericTag)tag).box(); -+ case MAP: -+ return new NBTMapType((CompoundTag)tag); -+ case LIST: -+ return new NBTListType((ListTag)tag); -+ case STRING: -+ return ((StringTag)tag).value(); -+ case BYTE_ARRAY: -+ return ((ByteArrayTag)tag).getAsByteArray(); -+ // Note: No short array tag! -+ case INT_ARRAY: -+ return ((IntArrayTag)tag).getAsIntArray(); -+ case LONG_ARRAY: -+ return ((LongArrayTag)tag).getAsLongArray(); -+ } -+ -+ throw new IllegalStateException("Unrecognized type " + tag); -+ } -+ -+ @Override -+ public Number getNumber(final String key) { -+ return this.getNumber(key, null); -+ } -+ -+ @Override -+ public Number getNumber(final String key, final Number dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numTag) { -+ return numTag.box(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public boolean getBoolean(final String key) { -+ return this.getByte(key) != 0; -+ } -+ -+ @Override -+ public boolean getBoolean(final String key, final boolean dfl) { -+ return this.getByte(key, dfl ? (byte)1 : (byte)0) != 0; -+ } -+ -+ @Override -+ public void setBoolean(final String key, final boolean val) { -+ this.setByte(key, val ? (byte)1 : (byte)0); -+ } -+ -+ @Override -+ public byte getByte(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.byteValue(); -+ } -+ return 0; -+ } -+ -+ @Override -+ public byte getByte(final String key, final byte dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.byteValue(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setByte(final String key, final byte val) { -+ this.map.putByte(key, val); -+ } -+ -+ @Override -+ public short getShort(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.shortValue(); -+ } -+ return 0; -+ } -+ -+ @Override -+ public short getShort(final String key, final short dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.shortValue(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setShort(final String key, final short val) { -+ this.map.putShort(key, val); -+ } -+ -+ @Override -+ public int getInt(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.intValue(); -+ } -+ return 0; -+ } -+ -+ @Override -+ public int getInt(final String key, final int dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.intValue(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setInt(final String key, final int val) { -+ this.map.putInt(key, val); -+ } -+ -+ @Override -+ public long getLong(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.longValue(); -+ } -+ return 0; -+ } -+ -+ @Override -+ public long getLong(final String key, final long dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.longValue(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setLong(final String key, final long val) { -+ this.map.putLong(key, val); -+ } -+ -+ @Override -+ public float getFloat(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.floatValue(); -+ } -+ return 0; -+ } -+ -+ @Override -+ public float getFloat(final String key, final float dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.floatValue(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setFloat(final String key, final float val) { -+ this.map.putFloat(key, val); -+ } -+ -+ @Override -+ public double getDouble(final String key) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.doubleValue(); -+ } -+ return 0; -+ } -+ -+ @Override -+ public double getDouble(final String key, final double dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof NumericTag numericTag) { -+ return numericTag.doubleValue(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setDouble(final String key, final double val) { -+ this.map.putDouble(key, val); -+ } -+ -+ @Override -+ public byte[] getBytes(final String key) { -+ return this.getBytes(key, null); -+ } -+ -+ @Override -+ public byte[] getBytes(final String key, final byte[] dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof ByteArrayTag byteArrayTag) { -+ return byteArrayTag.getAsByteArray(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setBytes(final String key, final byte[] val) { -+ this.map.putByteArray(key, val); -+ } -+ -+ @Override -+ public short[] getShorts(final String key) { -+ return this.getShorts(key, null); -+ } -+ -+ @Override -+ public short[] getShorts(final String key, final short[] dfl) { -+ // NBT does not support short array -+ return dfl; -+ } -+ -+ @Override -+ public void setShorts(final String key, final short[] val) { -+ throw new UnsupportedOperationException(); -+ } -+ -+ @Override -+ public int[] getInts(final String key) { -+ return this.getInts(key, null); -+ } -+ -+ @Override -+ public int[] getInts(final String key, final int[] dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof IntArrayTag intArrayTag) { -+ return intArrayTag.getAsIntArray(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setInts(final String key, final int[] val) { -+ this.map.putIntArray(key, val); -+ } -+ -+ @Override -+ public long[] getLongs(final String key) { -+ return this.getLongs(key, null); -+ } -+ -+ @Override -+ public long[] getLongs(final String key, final long[] dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof LongArrayTag longArrayTag) { -+ return longArrayTag.getAsLongArray(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setLongs(final String key, final long[] val) { -+ this.map.putLongArray(key, val); -+ } -+ -+ @Override -+ public ListType getListUnchecked(final String key) { -+ return this.getListUnchecked(key, null); -+ } -+ -+ @Override -+ public ListType getListUnchecked(final String key, final ListType dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof ListTag listTag) { -+ return new NBTListType(listTag); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setList(final String key, final ListType val) { -+ this.map.put(key, ((NBTListType)val).getTag()); -+ } -+ -+ @Override -+ public MapType getMap(final String key) { -+ return this.getMap(key, null); -+ } -+ -+ @Override -+ public MapType getMap(final String key, final MapType dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof CompoundTag compoundTag) { -+ return new NBTMapType(compoundTag); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setMap(final String key, final MapType val) { -+ this.map.put(key, ((NBTMapType)val).getTag()); -+ } -+ -+ @Override -+ public String getString(final String key) { -+ return this.getString(key, null); -+ } -+ -+ @Override -+ public String getString(final String key, final String dfl) { -+ final Tag tag = this.map.get(key); -+ if (tag instanceof StringTag strTag) { -+ return strTag.value(); -+ } -+ return dfl; -+ } -+ -+ @Override -+ public void setString(final String key, final String val) { -+ this.map.putString(key, val); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/types/nbt/NBTTypeUtil.java b/ca/spottedleaf/dataconverter/types/nbt/NBTTypeUtil.java -new file mode 100644 -index 0000000000000000000000000000000000000000..61e98240a221a75780e311c0777a8c43c4297d65 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/types/nbt/NBTTypeUtil.java -@@ -0,0 +1,128 @@ -+package ca.spottedleaf.dataconverter.types.nbt; -+ -+import ca.spottedleaf.dataconverter.minecraft.converters.helpers.CopyHelper; -+import ca.spottedleaf.dataconverter.types.ListType; -+import ca.spottedleaf.dataconverter.types.MapType; -+import ca.spottedleaf.dataconverter.types.TypeUtil; -+import net.minecraft.nbt.ByteArrayTag; -+import net.minecraft.nbt.ByteTag; -+import net.minecraft.nbt.CompoundTag; -+import net.minecraft.nbt.EndTag; -+import net.minecraft.nbt.IntArrayTag; -+import net.minecraft.nbt.IntTag; -+import net.minecraft.nbt.ListTag; -+import net.minecraft.nbt.LongArrayTag; -+import net.minecraft.nbt.LongTag; -+import net.minecraft.nbt.NumericTag; -+import net.minecraft.nbt.ShortTag; -+import net.minecraft.nbt.StringTag; -+import net.minecraft.nbt.Tag; -+ -+public final class NBTTypeUtil implements TypeUtil { -+ -+ @Override -+ public ListType createEmptyList() { -+ return new NBTListType(); -+ } -+ -+ @Override -+ public MapType createEmptyMap() { -+ return new NBTMapType(); -+ } -+ -+ @Override -+ public Object convertTo(final Object valueGeneric, final TypeUtil to) { -+ if (valueGeneric == null || valueGeneric instanceof String || valueGeneric instanceof Boolean) { -+ return valueGeneric; -+ } -+ if (valueGeneric instanceof Number number) { -+ if (CopyHelper.sanitizeNumber(number) == null) { -+ throw new IllegalStateException("Unknown type: " + number); -+ } -+ return number; -+ } -+ if (valueGeneric instanceof NBTListType listType) { -+ return convertNBT(to, listType.list); -+ } -+ if (valueGeneric instanceof NBTMapType mapType) { -+ return convertNBT(to, mapType.map); -+ } -+ throw new IllegalStateException("Unknown type: " + valueGeneric); -+ } -+ -+ @Override -+ public Object convertFromBaseToGeneric(final Tag input, final TypeUtil to) { -+ return convertNBTToGeneric(to, input); -+ } -+ -+ @Override -+ public Object baseToGeneric(final Tag input) { -+ return switch (input) { -+ case CompoundTag ct -> new NBTMapType(ct); -+ case ListTag lt -> new NBTListType(lt); -+ case EndTag endTag -> null; -+ case StringTag st -> st.value(); -+ case ByteArrayTag bt -> bt.getAsByteArray(); -+ case IntArrayTag it -> it.getAsIntArray(); -+ case LongArrayTag lt -> lt.getAsLongArray(); -+ case NumericTag nt -> nt.box(); -+ case null -> null; -+ default -> throw new IllegalStateException("Unknown tag: " + input); -+ }; -+ } -+ -+ @Override -+ public Tag genericToBase(final Object input) { -+ return switch (input) { -+ case null -> EndTag.INSTANCE; -+ case NBTMapType mapType -> mapType.map; -+ case NBTListType listType -> listType.list; -+ case String string -> StringTag.valueOf(string); -+ case Boolean bool -> ByteTag.valueOf(bool.booleanValue()); -+ case Byte b -> ByteTag.valueOf(b.byteValue()); -+ case Short s -> ShortTag.valueOf(s.shortValue()); -+ case Integer i -> IntTag.valueOf(i.intValue()); -+ case Long l -> LongTag.valueOf(l.longValue()); -+ case byte[] bytes -> new ByteArrayTag(bytes); -+ case int[] ints -> new IntArrayTag(ints); -+ case long[] longs -> new LongArrayTag(longs); -+ -+ default -> throw new IllegalStateException("Unrecognized type " + input); -+ }; -+ } -+ -+ private static Object convertNBTToGeneric(final TypeUtil to, final Tag nbt) { -+ return switch (nbt) { -+ case CompoundTag ct -> convertNBT(to, ct); -+ case ListTag lt -> convertNBT(to, lt); -+ case EndTag endTag -> null; -+ case StringTag st -> st.value(); -+ case ByteArrayTag bt -> bt.getAsByteArray(); -+ case IntArrayTag it -> it.getAsIntArray(); -+ case LongArrayTag lt -> lt.getAsLongArray(); -+ case NumericTag nt -> nt.box(); -+ case null -> null; -+ default -> throw new IllegalStateException("Unknown tag: " + nbt); -+ }; -+ } -+ -+ public static MapType convertNBT(final TypeUtil to, final CompoundTag nbt) { -+ final MapType ret = to.createEmptyMap(); -+ -+ for (final String key : nbt.keySet()) { -+ ret.setGeneric(key, convertNBTToGeneric(to, nbt.get(key))); -+ } -+ -+ return ret; -+ } -+ -+ public static ListType convertNBT(final TypeUtil to, final ListTag nbt) { -+ final ListType ret = to.createEmptyList(); -+ -+ for (int i = 0, len = nbt.size(); i < len; ++i) { -+ ret.addGeneric(convertNBTToGeneric(to, nbt.get(i))); -+ } -+ -+ return ret; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/util/Int2IntArraySortedMap.java b/ca/spottedleaf/dataconverter/util/Int2IntArraySortedMap.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6596de3d9ebae583c252aa061f0cfdf8778ea1a5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/util/Int2IntArraySortedMap.java -@@ -0,0 +1,77 @@ -+package ca.spottedleaf.dataconverter.util; -+ -+import it.unimi.dsi.fastutil.ints.Int2IntFunction; -+ -+import java.util.Arrays; -+ -+public class Int2IntArraySortedMap { -+ -+ protected int[] key; -+ protected int[] val; -+ protected int size; -+ -+ public Int2IntArraySortedMap() { -+ this.key = new int[8]; -+ this.val = new int[8]; -+ } -+ -+ public int put(final int key, final int value) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ final int current = this.val[index]; -+ this.val[index] = value; -+ return current; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ ++this.size; -+ -+ this.key[insert] = key; -+ this.val[insert] = value; -+ -+ return 0; -+ } -+ -+ public int computeIfAbsent(final int key, final Int2IntFunction producer) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ return this.val[index]; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ ++this.size; -+ -+ this.key[insert] = key; -+ -+ return this.val[insert] = producer.apply(key); -+ } -+ -+ public int get(final int key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ return 0; -+ } -+ return this.val[index]; -+ } -+ -+ public int getFloor(final int key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ final int insert = -(index + 1) - 1; -+ return insert < 0 ? 0 : this.val[insert]; -+ } -+ return this.val[index]; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/util/Int2ObjectArraySortedMap.java b/ca/spottedleaf/dataconverter/util/Int2ObjectArraySortedMap.java -new file mode 100644 -index 0000000000000000000000000000000000000000..de9d632489609136c712a9adaee941fd38fad440 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/util/Int2ObjectArraySortedMap.java -@@ -0,0 +1,74 @@ -+package ca.spottedleaf.dataconverter.util; -+ -+import java.util.Arrays; -+import java.util.function.IntFunction; -+ -+public class Int2ObjectArraySortedMap { -+ -+ protected int[] key; -+ protected V[] val; -+ protected int size; -+ -+ public Int2ObjectArraySortedMap() { -+ this.key = new int[8]; -+ this.val = (V[])new Object[8]; -+ } -+ -+ public V put(final int key, final V value) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ final V current = this.val[index]; -+ this.val[index] = value; -+ return current; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ -+ this.key[insert] = key; -+ this.val[insert] = value; -+ -+ return null; -+ } -+ -+ public V computeIfAbsent(final int key, final IntFunction producer) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ return this.val[index]; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ -+ this.key[insert] = key; -+ -+ return this.val[insert] = producer.apply(key); -+ } -+ -+ public V get(final int key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ return null; -+ } -+ return this.val[index]; -+ } -+ -+ public V getFloor(final int key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ final int insert = -(index + 1); -+ return this.val[insert]; -+ } -+ return this.val[index]; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/util/IntegerUtil.java b/ca/spottedleaf/dataconverter/util/IntegerUtil.java -new file mode 100644 -index 0000000000000000000000000000000000000000..4bbf38c812feeb30d2aa5f3fcf482bfcbed79d05 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/util/IntegerUtil.java -@@ -0,0 +1,239 @@ -+package ca.spottedleaf.dataconverter.util; -+ -+public final class IntegerUtil { -+ public static final int HIGH_BIT_U32 = Integer.MIN_VALUE; -+ public static final long HIGH_BIT_U64 = Long.MIN_VALUE; -+ -+ public static int ceilLog2(final int value) { -+ return Integer.SIZE - Integer.numberOfLeadingZeros(value - 1); // see doc of numberOfLeadingZeros -+ } -+ -+ public static long ceilLog2(final long value) { -+ return Long.SIZE - Long.numberOfLeadingZeros(value - 1); // see doc of numberOfLeadingZeros -+ } -+ -+ public static int floorLog2(final int value) { -+ // xor is optimized subtract for 2^n -1 -+ // note that (2^n -1) - k = (2^n -1) ^ k for k <= (2^n - 1) -+ return (Integer.SIZE - 1) ^ Integer.numberOfLeadingZeros(value); // see doc of numberOfLeadingZeros -+ } -+ -+ public static int floorLog2(final long value) { -+ // xor is optimized subtract for 2^n -1 -+ // note that (2^n -1) - k = (2^n -1) ^ k for k <= (2^n - 1) -+ return (Long.SIZE - 1) ^ Long.numberOfLeadingZeros(value); // see doc of numberOfLeadingZeros -+ } -+ -+ public static int roundCeilLog2(final int value) { -+ // optimized variant of 1 << (32 - leading(val - 1)) -+ // given -+ // 1 << n = HIGH_BIT_32 >>> (31 - n) for n [0, 32) -+ // 1 << (32 - leading(val - 1)) = HIGH_BIT_32 >>> (31 - (32 - leading(val - 1))) -+ // HIGH_BIT_32 >>> (31 - (32 - leading(val - 1))) -+ // HIGH_BIT_32 >>> (31 - 32 + leading(val - 1)) -+ // HIGH_BIT_32 >>> (-1 + leading(val - 1)) -+ return HIGH_BIT_U32 >>> (Integer.numberOfLeadingZeros(value - 1) - 1); -+ } -+ -+ public static long roundCeilLog2(final long value) { -+ // see logic documented above -+ return HIGH_BIT_U64 >>> (Long.numberOfLeadingZeros(value - 1) - 1); -+ } -+ -+ public static int roundFloorLog2(final int value) { -+ // optimized variant of 1 << (31 - leading(val)) -+ // given -+ // 1 << n = HIGH_BIT_32 >>> (31 - n) for n [0, 32) -+ // 1 << (31 - leading(val)) = HIGH_BIT_32 >> (31 - (31 - leading(val))) -+ // HIGH_BIT_32 >> (31 - (31 - leading(val))) -+ // HIGH_BIT_32 >> (31 - 31 + leading(val)) -+ return HIGH_BIT_U32 >>> Integer.numberOfLeadingZeros(value); -+ } -+ -+ public static long roundFloorLog2(final long value) { -+ // see logic documented above -+ return HIGH_BIT_U64 >>> Long.numberOfLeadingZeros(value); -+ } -+ -+ public static boolean isPowerOfTwo(final int n) { -+ // 2^n has one bit -+ // note: this rets true for 0 still -+ return IntegerUtil.getTrailingBit(n) == n; -+ } -+ -+ public static boolean isPowerOfTwo(final long n) { -+ // 2^n has one bit -+ // note: this rets true for 0 still -+ return IntegerUtil.getTrailingBit(n) == n; -+ } -+ -+ public static int getTrailingBit(final int n) { -+ return -n & n; -+ } -+ -+ public static long getTrailingBit(final long n) { -+ return -n & n; -+ } -+ -+ public static int trailingZeros(final int n) { -+ return Integer.numberOfTrailingZeros(n); -+ } -+ -+ public static int trailingZeros(final long n) { -+ return Long.numberOfTrailingZeros(n); -+ } -+ -+ // from hacker's delight (signed division magic value) -+ public static int getDivisorMultiple(final long numbers) { -+ return (int)(numbers >>> 32); -+ } -+ -+ // from hacker's delight (signed division magic value) -+ public static int getDivisorShift(final long numbers) { -+ return (int)numbers; -+ } -+ -+ public static long getDivisorNumbers(final int d) { -+ final int ad = branchlessAbs(d); -+ -+ if (ad < 2) { -+ throw new IllegalArgumentException("|number| must be in [2, 2^31 -1], not: " + d); -+ } -+ -+ final int two31 = 0x80000000; -+ final long mask = 0xFFFFFFFFL; // mask for enforcing unsigned behaviour -+ -+ /* -+ Signed usage: -+ int number; -+ long magic = getDivisorNumbers(div); -+ long mul = magic >>> 32; -+ int sign = number >> 31; -+ int result = (int)(((long)number * mul) >>> magic) - sign; -+ */ -+ /* -+ Unsigned usage: -+ int number; -+ long magic = getDivisorNumbers(div); -+ long mul = magic >>> 32; -+ int result = (int)(((long)number * mul) >>> magic); -+ */ -+ -+ int p = 31; -+ -+ // all these variables are UNSIGNED! -+ int t = two31 + (d >>> 31); -+ int anc = t - 1 - (int)((t & mask)%ad); -+ int q1 = (int)((two31 & mask)/(anc & mask)); -+ int r1 = two31 - q1*anc; -+ int q2 = (int)((two31 & mask)/(ad & mask)); -+ int r2 = two31 - q2*ad; -+ int delta; -+ -+ do { -+ p = p + 1; -+ q1 = 2*q1; // Update q1 = 2**p/|nc|. -+ r1 = 2*r1; // Update r1 = rem(2**p, |nc|). -+ if ((r1 & mask) >= (anc & mask)) {// (Must be an unsigned comparison here) -+ q1 = q1 + 1; -+ r1 = r1 - anc; -+ } -+ q2 = 2*q2; // Update q2 = 2**p/|d|. -+ r2 = 2*r2; // Update r2 = rem(2**p, |d|). -+ if ((r2 & mask) >= (ad & mask)) {// (Must be an unsigned comparison here) -+ q2 = q2 + 1; -+ r2 = r2 - ad; -+ } -+ delta = ad - r2; -+ } while ((q1 & mask) < (delta & mask) || (q1 == delta && r1 == 0)); -+ -+ int magicNum = q2 + 1; -+ if (d < 0) { -+ magicNum = -magicNum; -+ } -+ int shift = p; -+ return ((long)magicNum << 32) | shift; -+ } -+ -+ public static int branchlessAbs(final int val) { -+ // -n = -1 ^ n + 1 -+ final int mask = val >> (Integer.SIZE - 1); // -1 if < 0, 0 if >= 0 -+ return (mask ^ val) - mask; // if val < 0, then (0 ^ val) - 0 else (-1 ^ val) + 1 -+ } -+ -+ public static long branchlessAbs(final long val) { -+ // -n = -1 ^ n + 1 -+ final long mask = val >> (Long.SIZE - 1); // -1 if < 0, 0 if >= 0 -+ return (mask ^ val) - mask; // if val < 0, then (0 ^ val) - 0 else (-1 ^ val) + 1 -+ } -+ -+ //https://github.com/skeeto/hash-prospector for hash functions -+ -+ //score = ~590.47984224483832 -+ public static int hash0(int x) { -+ x *= 0x36935555; -+ x ^= x >>> 16; -+ return x; -+ } -+ -+ //score = ~310.01596637036749 -+ public static int hash1(int x) { -+ x ^= x >>> 15; -+ x *= 0x356aaaad; -+ x ^= x >>> 17; -+ return x; -+ } -+ -+ public static int hash2(int x) { -+ x ^= x >>> 16; -+ x *= 0x7feb352d; -+ x ^= x >>> 15; -+ x *= 0x846ca68b; -+ x ^= x >>> 16; -+ return x; -+ } -+ -+ public static int hash3(int x) { -+ x ^= x >>> 17; -+ x *= 0xed5ad4bb; -+ x ^= x >>> 11; -+ x *= 0xac4c1b51; -+ x ^= x >>> 15; -+ x *= 0x31848bab; -+ x ^= x >>> 14; -+ return x; -+ } -+ -+ //score = ~365.79959673201887 -+ public static long hash1(long x) { -+ x ^= x >>> 27; -+ x *= 0xb24924b71d2d354bL; -+ x ^= x >>> 28; -+ return x; -+ } -+ -+ //h2 hash -+ public static long hash2(long x) { -+ x ^= x >>> 32; -+ x *= 0xd6e8feb86659fd93L; -+ x ^= x >>> 32; -+ x *= 0xd6e8feb86659fd93L; -+ x ^= x >>> 32; -+ return x; -+ } -+ -+ public static long hash3(long x) { -+ x ^= x >>> 45; -+ x *= 0xc161abe5704b6c79L; -+ x ^= x >>> 41; -+ x *= 0xe3e5389aedbc90f7L; -+ x ^= x >>> 56; -+ x *= 0x1f9aba75a52db073L; -+ x ^= x >>> 53; -+ return x; -+ } -+ -+ private IntegerUtil() { -+ throw new RuntimeException(); -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/util/Long2IntArraySortedMap.java b/ca/spottedleaf/dataconverter/util/Long2IntArraySortedMap.java -new file mode 100644 -index 0000000000000000000000000000000000000000..94705bb141b550589faa9a0408402d8636c61907 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/util/Long2IntArraySortedMap.java -@@ -0,0 +1,76 @@ -+package ca.spottedleaf.dataconverter.util; -+ -+import it.unimi.dsi.fastutil.longs.Long2IntFunction; -+import java.util.Arrays; -+ -+public class Long2IntArraySortedMap { -+ -+ protected long[] key; -+ protected int[] val; -+ protected int size; -+ -+ public Long2IntArraySortedMap() { -+ this.key = new long[8]; -+ this.val = new int[8]; -+ } -+ -+ public int put(final long key, final int value) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ final int current = this.val[index]; -+ this.val[index] = value; -+ return current; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ ++this.size; -+ -+ this.key[insert] = key; -+ this.val[insert] = value; -+ -+ return 0; -+ } -+ -+ public int computeIfAbsent(final long key, final Long2IntFunction producer) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ return this.val[index]; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ ++this.size; -+ -+ this.key[insert] = key; -+ -+ return this.val[insert] = producer.apply(key); -+ } -+ -+ public int get(final long key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ return 0; -+ } -+ return this.val[index]; -+ } -+ -+ public int getFloor(final long key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ final int insert = -(index + 1) - 1; -+ return insert < 0 ? 0 : this.val[insert]; -+ } -+ return this.val[index]; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/util/Long2ObjectArraySortedMap.java b/ca/spottedleaf/dataconverter/util/Long2ObjectArraySortedMap.java -new file mode 100644 -index 0000000000000000000000000000000000000000..6f634c8825589a23f46ad7b54354475c9a95bd1b ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/util/Long2ObjectArraySortedMap.java -@@ -0,0 +1,76 @@ -+package ca.spottedleaf.dataconverter.util; -+ -+import java.util.Arrays; -+import java.util.function.LongFunction; -+ -+public class Long2ObjectArraySortedMap { -+ -+ protected long[] key; -+ protected V[] val; -+ protected int size; -+ -+ public Long2ObjectArraySortedMap() { -+ this.key = new long[8]; -+ this.val = (V[])new Object[8]; -+ } -+ -+ public V put(final long key, final V value) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ final V current = this.val[index]; -+ this.val[index] = value; -+ return current; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ ++this.size; -+ -+ this.key[insert] = key; -+ this.val[insert] = value; -+ -+ return null; -+ } -+ -+ public V computeIfAbsent(final long key, final LongFunction producer) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index >= 0) { -+ return this.val[index]; -+ } -+ final int insert = -(index + 1); -+ // shift entries down -+ if (this.size >= this.val.length) { -+ this.key = Arrays.copyOf(this.key, this.key.length * 2); -+ this.val = Arrays.copyOf(this.val, this.val.length * 2); -+ } -+ System.arraycopy(this.key, insert, this.key, insert + 1, this.size - insert); -+ System.arraycopy(this.val, insert, this.val, insert + 1, this.size - insert); -+ ++this.size; -+ -+ this.key[insert] = key; -+ -+ return this.val[insert] = producer.apply(key); -+ } -+ -+ public V get(final long key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ return null; -+ } -+ return this.val[index]; -+ } -+ -+ public V getFloor(final long key) { -+ final int index = Arrays.binarySearch(this.key, 0, this.size, key); -+ if (index < 0) { -+ final int insert = -(index + 1) - 1; -+ return insert < 0 ? null : this.val[insert]; -+ } -+ return this.val[index]; -+ } -+} -diff --git a/ca/spottedleaf/dataconverter/util/NamespaceUtil.java b/ca/spottedleaf/dataconverter/util/NamespaceUtil.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b028017b9c44821a8a313a04e0b10f5d0610edd5 ---- /dev/null -+++ b/ca/spottedleaf/dataconverter/util/NamespaceUtil.java -@@ -0,0 +1,39 @@ -+package ca.spottedleaf.dataconverter.util; -+ -+import ca.spottedleaf.dataconverter.types.MapType; -+import net.minecraft.resources.ResourceLocation; -+ -+public final class NamespaceUtil { -+ -+ private NamespaceUtil() {} -+ -+ public static void enforceForPath(final MapType data, final String path) { -+ if (data == null) { -+ return; -+ } -+ -+ final String id = data.getString(path); -+ if (id != null) { -+ final String replace = NamespaceUtil.correctNamespaceOrNull(id); -+ if (replace != null) { -+ data.setString(path, replace); -+ } -+ } -+ } -+ -+ public static String correctNamespace(final String value) { -+ if (value == null) { -+ return null; -+ } -+ final ResourceLocation resourceLocation = ResourceLocation.tryParse(value); -+ return resourceLocation != null ? resourceLocation.toString() : value; -+ } -+ -+ public static String correctNamespaceOrNull(final String value) { -+ if (value == null) { -+ return null; -+ } -+ final String correct = correctNamespace(value); -+ return correct.equals(value) ? null : correct; -+ } -+} -diff --git a/ca/spottedleaf/moonrise/paper/PaperHooks.java b/ca/spottedleaf/moonrise/paper/PaperHooks.java -index b9b774a3ca600cee3d0e967063ea2f72c7ab184f..0837dde07d8a34cd941f019772c1b1760a896a43 100644 ---- a/ca/spottedleaf/moonrise/paper/PaperHooks.java -+++ b/ca/spottedleaf/moonrise/paper/PaperHooks.java -@@ -205,6 +205,43 @@ public final class PaperHooks extends BaseChunkSystemHooks implements PlatformHo - @Override - public CompoundTag convertNBT(final DSL.TypeReference type, final DataFixer dataFixer, final CompoundTag nbt, - final int fromVersion, final int toVersion) { -+ // Paper start - optimise data conversion -+ if (type == net.minecraft.util.datafix.fixes.References.PLAYER) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.PLAYER, nbt, fromVersion, toVersion -+ ); -+ } -+ if (type == net.minecraft.util.datafix.fixes.References.CHUNK) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, nbt, fromVersion, toVersion -+ ); -+ } -+ if (type == net.minecraft.util.datafix.fixes.References.STRUCTURE) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.STRUCTURE, nbt, fromVersion, toVersion -+ ); -+ } -+ if (type == net.minecraft.util.datafix.fixes.References.POI_CHUNK) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.POI_CHUNK, nbt, fromVersion, toVersion -+ ); -+ } -+ if (type == net.minecraft.util.datafix.fixes.References.ENTITY_CHUNK) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, nbt, fromVersion, toVersion -+ ); -+ } -+ if (type == net.minecraft.util.datafix.fixes.References.ITEM_STACK) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ITEM_STACK, nbt, fromVersion, toVersion -+ ); -+ } -+ if (type == net.minecraft.util.datafix.fixes.References.ENTITY || type == net.minecraft.util.datafix.fixes.References.ENTITY_TREE) { -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag( -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY, nbt, fromVersion, toVersion -+ ); -+ } -+ // Paper end - optimise data conversion - return (CompoundTag)dataFixer.update( - type, new Dynamic<>(NbtOps.INSTANCE, nbt), fromVersion, toVersion - ).getValue(); -diff --git a/net/minecraft/data/structures/StructureUpdater.java b/net/minecraft/data/structures/StructureUpdater.java -index 175647d57e59e838ea7b4680fbf22c161100c513..a7b772cfc89161414469cd7da374d6c77ac0b05d 100644 ---- a/net/minecraft/data/structures/StructureUpdater.java -+++ b/net/minecraft/data/structures/StructureUpdater.java -@@ -27,7 +27,7 @@ public class StructureUpdater implements SnbtToNbt.Filter { - LOGGER.warn("SNBT Too old, do not forget to update: {} < {}: {}", dataVersion, 4292, structureLocationPath); - } - -- CompoundTag compoundTag = DataFixTypes.STRUCTURE.updateToCurrentVersion(DataFixers.getDataFixer(), tag, dataVersion); -+ CompoundTag compoundTag = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.STRUCTURE, tag, dataVersion, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper - structureTemplate.load(BuiltInRegistries.BLOCK, compoundTag); - return structureTemplate.save(new CompoundTag()); - } -diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 54f5336b5bb56cb9dfda2b75fff07bae0b27cfd3..60ec95c72506afe5cc58c15fef8749f96222c318 100644 ---- a/net/minecraft/server/MinecraftServer.java -+++ b/net/minecraft/server/MinecraftServer.java -@@ -294,6 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function threadFunction) { -+ ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system - AtomicReference atomicReference = new AtomicReference<>(); - Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> atomicReference.get().runServer(), "Server thread"); - thread.setUncaughtExceptionHandler((thread1, exception) -> LOGGER.error("Uncaught exception in server thread", exception)); -diff --git a/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index 258a6b82b10bce1aecc42ddb61cb6732645c1ea0..3835824053e7498d717f92a05848396d49d287bf 100644 ---- a/net/minecraft/world/level/chunk/storage/ChunkStorage.java -+++ b/net/minecraft/world/level/chunk/storage/ChunkStorage.java -@@ -64,7 +64,7 @@ public class ChunkStorage implements AutoCloseable, ca.spottedleaf.moonrise.patc - } else { - try { - // CraftBukkit start -- if (version < 1466) { -+ if (false && version < 1466) { // Paper - no longer needed, data converter system / DFU handles it now - CompoundTag level = chunkData.getCompoundOrEmpty("Level"); - if (level.getBooleanOr("TerrainPopulated", false) && !level.getBooleanOr("LightPopulated", false)) { - // Light is purged updating to 1.14+. We need to set light populated to true so the converter recognizes the chunk as being "full" -@@ -73,7 +73,7 @@ public class ChunkStorage implements AutoCloseable, ca.spottedleaf.moonrise.patc - } - // CraftBukkit end - if (version < 1493) { -- chunkData = DataFixTypes.CHUNK.update(this.fixerUpper, chunkData, version, 1493); -+ chunkData = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, chunkData, version, 1493); // Paper - replace chunk converter - if (chunkData.getCompound("Level").flatMap(compoundTag -> compoundTag.getBoolean("hasLegacyStructureData")).orElse(false)) { - LegacyStructureDataHandler legacyStructureHandler = this.getLegacyStructureHandler(levelKey, storage); - synchronized (legacyStructureHandler) { // Paper - rewrite chunk system -@@ -92,7 +92,7 @@ public class ChunkStorage implements AutoCloseable, ca.spottedleaf.moonrise.patc - // Spigot end - - injectDatafixingContext(chunkData, levelKey, chunkGeneratorKey); -- chunkData = DataFixTypes.CHUNK.updateToCurrentVersion(this.fixerUpper, chunkData, Math.max(1493, version)); -+ chunkData = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, chunkData, Math.max(1493, version), SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper - replace chunk converter - // Spigot start - if (stopBelowZero) { - chunkData.putString("Status", net.minecraft.core.registries.BuiltInRegistries.CHUNK_STATUS.getKey(net.minecraft.world.level.chunk.status.ChunkStatus.SPAWN).toString()); -diff --git a/net/minecraft/world/level/chunk/storage/SimpleRegionStorage.java b/net/minecraft/world/level/chunk/storage/SimpleRegionStorage.java -index 1d8c151c00ef1192792584b50fe15e102ef46d60..f883c6400281788982403d0af3ee28613e9a29b1 100644 ---- a/net/minecraft/world/level/chunk/storage/SimpleRegionStorage.java -+++ b/net/minecraft/world/level/chunk/storage/SimpleRegionStorage.java -@@ -32,13 +32,30 @@ public class SimpleRegionStorage implements AutoCloseable { - return this.worker.store(chunkPos, data); - } - -+ // Paper start - rewrite data conversion system -+ private ca.spottedleaf.dataconverter.minecraft.datatypes.MCDataType getDataConverterType() { -+ if (this.dataFixType == DataFixTypes.ENTITY_CHUNK) { -+ return ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK; -+ } else if (this.dataFixType == DataFixTypes.POI_CHUNK) { -+ return ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.POI_CHUNK; -+ } else { -+ throw new UnsupportedOperationException("For " + this.dataFixType.name()); -+ } -+ } -+ // Paper end - rewrite data conversion system -+ - public CompoundTag upgradeChunkTag(CompoundTag tag, int version) { -- int dataVersion = NbtUtils.getDataVersion(tag, version); -- return this.dataFixType.updateToCurrentVersion(this.fixerUpper, tag, dataVersion); -+ // Paper start - rewrite data conversion system -+ final int dataVer = NbtUtils.getDataVersion(tag, version); -+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(this.getDataConverterType(), tag, dataVer, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); -+ // Paper end - rewrite data conversion system - } - - public Dynamic upgradeChunkTag(Dynamic tag, int version) { -- return this.dataFixType.updateToCurrentVersion(this.fixerUpper, tag, version); -+ // Paper start - rewrite data conversion system -+ final CompoundTag converted = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(this.getDataConverterType(), (CompoundTag)tag.getValue(), version, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); -+ return new Dynamic<>(tag.getOps(), converted); -+ // Paper end - rewrite data conversion system - } - - public CompletableFuture synchronize(boolean flushStorage) { -diff --git a/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/net/minecraft/world/level/levelgen/structure/StructureCheck.java -index 48fce0845fb023d6286dac144c285b048d778564..0b4c04ce134fceaedd28d0cb420083353eb9061c 100644 ---- a/net/minecraft/world/level/levelgen/structure/StructureCheck.java -+++ b/net/minecraft/world/level/levelgen/structure/StructureCheck.java -@@ -159,7 +159,7 @@ public class StructureCheck { - - CompoundTag compoundTag1; - try { -- compoundTag1 = DataFixTypes.CHUNK.updateToCurrentVersion(this.fixerUpper, compoundTag, version); -+ compoundTag1 = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, compoundTag, version, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper - replace chunk converter - } catch (Exception var12) { - LOGGER.warn("Failed to partially datafix chunk {}", chunkPos, var12); - return StructureCheckResult.CHUNK_LOAD_NEEDED; -diff --git a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java -index 7bb5a1102524cfe850859482346b1dd2af2d8868..2d6e17c4755edcfbcab58a858d1b6efc4b4dc94f 100644 ---- a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java -+++ b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplateManager.java -@@ -243,7 +243,7 @@ public class StructureTemplateManager { - public StructureTemplate readStructure(CompoundTag nbt) { - StructureTemplate structureTemplate = new StructureTemplate(); - int dataVersion = NbtUtils.getDataVersion(nbt, 500); -- structureTemplate.load(this.blockLookup, DataFixTypes.STRUCTURE.updateToCurrentVersion(this.fixerUpper, nbt, dataVersion)); -+ structureTemplate.load(this.blockLookup, ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.STRUCTURE, nbt, dataVersion, SharedConstants.getCurrentVersion().getDataVersion().getVersion())); // Paper - rewrite data conversion system - return structureTemplate; - } - -diff --git a/net/minecraft/world/level/storage/LevelStorageSource.java b/net/minecraft/world/level/storage/LevelStorageSource.java -index 169b4544ab3d0e8515a2d7020a23ae0e2e0c952d..dd53d59f5c4eeb26282ccba0fd1031c60ae5712b 100644 ---- a/net/minecraft/world/level/storage/LevelStorageSource.java -+++ b/net/minecraft/world/level/storage/LevelStorageSource.java -@@ -227,7 +227,7 @@ public class LevelStorageSource { - CompoundTag compoundOrEmpty = levelDataTagRaw.getCompoundOrEmpty("Data"); - int dataVersion = NbtUtils.getDataVersion(compoundOrEmpty, -1); - Dynamic dynamic = DataFixTypes.LEVEL.updateToCurrentVersion(dataFixer, new Dynamic<>(NbtOps.INSTANCE, compoundOrEmpty), dataVersion); -- dynamic = dynamic.update("Player", dynamic1 -> DataFixTypes.PLAYER.updateToCurrentVersion(dataFixer, dynamic1, dataVersion)); -+ dynamic = dynamic.update("Player", dynamic1 -> new Dynamic(dynamic1.getOps(), ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.PLAYER, (net.minecraft.nbt.CompoundTag)dynamic1.getValue(), dataVersion, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()))); // Paper - replace data conversion system - return dynamic.update("WorldGenSettings", dynamic1 -> DataFixTypes.WORLD_GEN_SETTINGS.updateToCurrentVersion(dataFixer, dynamic1, dataVersion)); - } - -diff --git a/net/minecraft/world/level/storage/PlayerDataStorage.java b/net/minecraft/world/level/storage/PlayerDataStorage.java -index 7a39ea109dee258e7fb83982572ee18731b5446f..b1eb46326bf76e109b362a3d6fbaeb2389f6d86e 100644 ---- a/net/minecraft/world/level/storage/PlayerDataStorage.java -+++ b/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -187,7 +187,7 @@ public class PlayerDataStorage { - - return optional.or(() -> this.load(name, uuid, ".dat_old", playerUuid)).map(compoundTag -> { // CraftBukkit - int dataVersion = NbtUtils.getDataVersion(compoundTag, -1); -- compoundTag = DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, compoundTag, dataVersion); -+ compoundTag = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.PLAYER, compoundTag, dataVersion, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper - rewrite data conversion system - // player.load(compoundTag); // CraftBukkit - handled above - return compoundTag; - }); diff --git a/leaf-server/paper-patches/features/0001-Rebrand.patch b/leaf-server/paper-patches/features/0001-Rebrand.patch index e9666902..4acc35b5 100644 --- a/leaf-server/paper-patches/features/0001-Rebrand.patch +++ b/leaf-server/paper-patches/features/0001-Rebrand.patch @@ -375,7 +375,7 @@ index 6ee39b534b8d992655bc0cef3c299d12cbae0034..f59879ae7d3c73cd4c4233d30667988b .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java -index 790bad0494454ca12ee152e3de6da3da634d9b20..5b844d2fea387f2cb655169f458ec0ca627f1c65 100644 +index 74ffdc823e66fc5ec027c4b7c462382bcbfe2be2..f5302d038e4bb731075dccde4015627dc9e7b420 100644 --- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java +++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java @@ -31,6 +31,10 @@ public record ServerBuildInfoImpl( @@ -398,8 +398,8 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..5b844d2fea387f2cb655169f458ec0ca getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME) - .orElse(BRAND_PAPER_NAME), + .orElse(BRAND_LEAF_NAME), // Gale - branding changes // Leaf - Rebrand - SharedConstants.getCurrentVersion().getId(), - SharedConstants.getCurrentVersion().getName(), + SharedConstants.getCurrentVersion().id(), + SharedConstants.getCurrentVersion().name(), getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER) @@ -61,7 +65,11 @@ public record ServerBuildInfoImpl( @@ -441,10 +441,10 @@ index 1354ccfbf525e5e64483ac5f443cc2325ba63850..f6f787db016f4d1ac14648ebf2b8e162 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a287ad5cce532229f2a514956d34a9358175bc45..05823a2865565446a100e161ca3a44c972868ea7 100644 +index c1aad9203af20102e560571435dfa75150b37c1b..756f08f25924c2128a0c8d4ea21f1bc905c33301 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -485,7 +485,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -481,7 +481,7 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { diff --git a/leaf-server/paper-patches/features/0004-Gale-configuration.patch b/leaf-server/paper-patches/features/0004-Gale-configuration.patch index 082ac3d2..b36f0270 100644 --- a/leaf-server/paper-patches/features/0004-Gale-configuration.patch +++ b/leaf-server/paper-patches/features/0004-Gale-configuration.patch @@ -144,10 +144,10 @@ index 05339a176083af667c16f77d76dc1878dafce3f0..9ca55cba185b9de566f911b08d671bee } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1da86b25e3b89c79d4f3920c8d2ef10ee2757f65..c92adb939892e1054f7b2d24070f43e6104dda2b 100644 +index 03dfcb4665d0279c825a74f3f999c92fe2bd22cb..bcdd1581ed564e8002f8120ab2efa38871c40ba7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1073,6 +1073,7 @@ public final class CraftServer implements Server { +@@ -1045,6 +1045,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); @@ -155,7 +155,7 @@ index 1da86b25e3b89c79d4f3920c8d2ef10ee2757f65..c92adb939892e1054f7b2d24070f43e6 for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) -@@ -2967,6 +2968,14 @@ public final class CraftServer implements Server { +@@ -2944,6 +2945,14 @@ public final class CraftServer implements Server { return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console); } diff --git a/leaf-server/paper-patches/features/0006-Leaf-Bootstrap.patch b/leaf-server/paper-patches/features/0006-Leaf-Bootstrap.patch index c3daa7ca..840e1c02 100644 --- a/leaf-server/paper-patches/features/0006-Leaf-Bootstrap.patch +++ b/leaf-server/paper-patches/features/0006-Leaf-Bootstrap.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Leaf Bootstrap org.bukkit.craftbukkit.Main#main -> LeafBootstrap -> PaperBootstrap -> ... diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index a11fc64b4933a5abce0182ba46f1da22043eb0d8..e89c906dc07e52ea8d661e005d8531128ce4d080 100644 +index 7675acdca2162e403f4ff523bcdd6efe0cb42d49..d10df0f81d922c3a5eca62afc376457fb8d4c197 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -240,7 +240,7 @@ public class Main { +@@ -239,7 +239,7 @@ public class Main { System.setProperty("library.jansi.version", "Paper"); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows System.setProperty("jdk.console", "java.base"); // Paper - revert default console provider back to java.base so we can have our own jline diff --git a/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch b/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch index 2749dc77..58e04b7f 100644 --- a/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch +++ b/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch @@ -1,12 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Github Actions -Date: Sun, 6 Apr 2025 06:33:24 +0000 +Date: Fri, 13 Jun 2025 14:00:13 +0000 Subject: [PATCH] Purpur Server Paper Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: 61d7f5590e79909caba55e9f00cefdd51006d015 +Commit: dfd8a7ad14f436ea9c4704a758305e7145923c2d Patches listed below are removed in this patch, They exists in Gale or Leaf: * "Rebrand.patch" @@ -127,20 +127,20 @@ index 0000000000000000000000000000000000000000..15a226e3854d731f7724025ea3459c8a + } +} diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java -index a786d7579455c017c8ad79c97b1507b66f8c0800..c26cf541de853d380048119057752e1ccebc89aa 100644 +index 94bf04bb1c646ec5ba1d42f4b7b3e6c200707beb..3e41a308cf92b841b5375250d1380d16af3d0309 100644 --- a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java +++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java -@@ -27,6 +27,10 @@ public class MobGoalHelper { - static { - // TODO these kinda should be checked on each release, in case obfuscation changes - deobfuscationMap.put("abstract_skeleton_1", "abstract_skeleton_melee"); +@@ -142,6 +142,10 @@ public class MobGoalHelper { + // TODO these kinda should be checked on each release, in case nested classes changes + private static final Map NESTED_CLASS_NAMES = Util.make(new HashMap<>(), map -> { + map.put("AbstractSkeleton$1", "AbstractSkeletonMelee"); + // Purpur start - Add option to disable zombie aggressiveness towards villagers -+ deobfuscationMap.put("zombie_1", "zombie_attack_villager"); -+ deobfuscationMap.put("drowned_1", "drowned_attack_villager"); ++ map.put("Zombie$1", "ZombieAttackVillager"); ++ map.put("Drowned$1", "DrownedAttackVillager"); + // Purpur end - Add option to disable zombie aggressiveness towards villagers - ignored.add("goal_selector_1"); - ignored.add("goal_selector_2"); + // remove duplicate + map.put("TraderLlama$TraderLlamaDefendWanderingTraderGoal", "TraderLlamaDefendWanderingTraderGoal"); diff --git a/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java b/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java index 41c95f00b4b2bea6d31f85e268c33d7f6184823e..2eaf27ddf0bddb23b8850310c332b202b1d7e69c 100644 --- a/src/main/java/io/papermc/paper/command/PaperPluginsCommand.java @@ -285,10 +285,10 @@ index a8e813ca89b033f061e695288b3383bdcf128531..96a377a07d8396f893954a3ba97fbf88 } if (SysoutCatcher.NAG_INTERVAL > 0 || SysoutCatcher.NAG_TIMEOUT > 0) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index 43ae147ae15668d3357ff1f7ae66bcad241d3ff3..ecd9e392e9e026cbeac4c65bfdb7467f971ca92d 100644 +index 54ab8a0b502a2665027f293e6ddebf6c0a2af215..f967560da343867fdc1c380a42874b0796633777 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -@@ -336,6 +336,12 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa +@@ -340,6 +340,12 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa @Override public Location getLocation() { @@ -301,7 +301,7 @@ index 43ae147ae15668d3357ff1f7ae66bcad241d3ff3..ecd9e392e9e026cbeac4c65bfdb7467f CompoundTag data = this.getData(); if (data == null) { return null; -@@ -573,4 +579,183 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa +@@ -577,4 +583,183 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa manager.save(); } } @@ -486,10 +486,10 @@ index 43ae147ae15668d3357ff1f7ae66bcad241d3ff3..ecd9e392e9e026cbeac4c65bfdb7467f + // Purpur end - OfflinePlayer API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0ac01f8b7a 100644 +index bcdd1581ed564e8002f8120ab2efa38871c40ba7..b66a7e4da7fd3fe22fef65a201705dcfe876f88e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -429,6 +429,20 @@ public final class CraftServer implements Server { +@@ -428,6 +428,20 @@ public final class CraftServer implements Server { this.paperPluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(this, this.commandMap, pluginManager); this.pluginManager.paperPluginManager = this.paperPluginManager; // Paper end @@ -510,7 +510,7 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a CraftRegistry.setMinecraftRegistry(console.registryAccess()); -@@ -1074,6 +1088,7 @@ public final class CraftServer implements Server { +@@ -1046,6 +1060,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration @@ -518,7 +518,7 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) -@@ -1089,6 +1104,7 @@ public final class CraftServer implements Server { +@@ -1061,6 +1076,7 @@ public final class CraftServer implements Server { } } world.spigotConfig.init(); // Spigot @@ -526,7 +526,7 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -1106,6 +1122,7 @@ public final class CraftServer implements Server { +@@ -1078,6 +1094,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.registerCommands(); // Spigot io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper this.spark.registerCommandBeforePlugins(this); // Paper - spark @@ -534,7 +534,7 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -1605,6 +1622,60 @@ public final class CraftServer implements Server { +@@ -1577,6 +1594,60 @@ public final class CraftServer implements Server { return true; } @@ -595,7 +595,7 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a @Override public List getRecipesFor(ItemStack result) { Preconditions.checkArgument(result != null, "ItemStack cannot be null"); -@@ -2976,6 +3047,18 @@ public final class CraftServer implements Server { +@@ -2953,6 +3024,18 @@ public final class CraftServer implements Server { } // Gale end - Gale configuration - API @@ -614,7 +614,7 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a @Override public void restart() { CraftServer.this.restart(); -@@ -3215,4 +3298,18 @@ public final class CraftServer implements Server { +@@ -3192,4 +3275,18 @@ public final class CraftServer implements Server { public void allowPausing(final Plugin plugin, final boolean value) { this.console.addPluginAllowingSleep(plugin.getName(), value); } @@ -634,10 +634,10 @@ index c92adb939892e1054f7b2d24070f43e6104dda2b..23bd30ad769507e3eeb4e397e57a2c0a + // Purpur end - Lagging threshold } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index aae378697b2f2e388d2a5dfaca24c9197b8abf3e..0ea7df63498492e320f98ddec5bdf33b203cc770 100644 +index 68351e47609ae06f0a1641b4ad2013ce6261ae4e..cd43af3f442f7d8af1a4552a0eff33958873a366 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2352,6 +2352,50 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2374,6 +2374,50 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } @@ -689,25 +689,25 @@ index aae378697b2f2e388d2a5dfaca24c9197b8abf3e..0ea7df63498492e320f98ddec5bdf33b public Collection getStructures(int x, int z) { return this.getStructures(x, z, struct -> true); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index e89c906dc07e52ea8d661e005d8531128ce4d080..4f64d377b56481fe5e1ff82b424fe06cdf8304e8 100644 +index d10df0f81d922c3a5eca62afc376457fb8d4c197..c03726447fa79270d00f3c4384f0b43f9e421073 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -165,6 +165,14 @@ public class Main { +@@ -164,6 +164,14 @@ public class Main { .defaultsTo(new File[] {}) .describedAs("Jar file"); + // Purpur start - Purpur config files -+ acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings") ++ this.acceptsAll(asList("purpur", "purpur-settings"), "File for purpur settings") + .withRequiredArg() + .ofType(File.class) + .defaultsTo(new File("purpur.yml")) + .describedAs("Yml file"); + // Purpur end - Purpur config files + - acceptsAll(asList("server-name"), "Name of the server") + this.accepts("server-name", "Name of the server") .withRequiredArg() .ofType(String.class) -@@ -224,7 +232,7 @@ public class Main { +@@ -223,7 +231,7 @@ public class Main { System.setProperty(net.minecrell.terminalconsole.TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper } @@ -717,7 +717,7 @@ index e89c906dc07e52ea8d661e005d8531128ce4d080..4f64d377b56481fe5e1ff82b424fe06c Calendar deadline = Calendar.getInstance(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java -index ed4692090a115d3d0a0826b10f77e903058eeec6..c5971aadd443dc0ffa26f1740552cc009d244a3e 100644 +index ed4692090a115d3d0a0826b10f77e903058eeec6..205c367fd5e2921d36f78ac7df5999d4adb819d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java @@ -16,8 +16,15 @@ import org.bukkit.entity.Bee; @@ -730,7 +730,7 @@ index ed4692090a115d3d0a0826b10f77e903058eeec6..c5971aadd443dc0ffa26f1740552cc00 super(world, blockEntity); + // Purpur start - load bees to be able to modify them individually - Stored Bee API + for(BeehiveBlockEntity.BeeData data : blockEntity.getStored()) { -+ storage.add(new org.purpurmc.purpur.entity.PurpurStoredBee(data, this)); ++ storage.add(new org.purpurmc.purpur.entity.PurpurStoredBee(data, this, blockEntity)); + } + // Purpur end - Stored Bee API } @@ -785,7 +785,7 @@ index ed4692090a115d3d0a0826b10f77e903058eeec6..c5971aadd443dc0ffa26f1740552cc00 + // Purpur start - check if new bee was added, and if yes, add to stored bees - Stored Bee API + List storedBeeData = this.getSnapshot().getStored(); + if(length < storedBeeData.size()) { -+ storage.add(new org.purpurmc.purpur.entity.PurpurStoredBee(storedBeeData.getLast(), this)); ++ storage.add(new org.purpurmc.purpur.entity.PurpurStoredBee(storedBeeData.getLast(), this, this.getBlockEntity())); + } + // Purpur end - Stored Bee API } @@ -800,10 +800,10 @@ index ed4692090a115d3d0a0826b10f77e903058eeec6..c5971aadd443dc0ffa26f1740552cc00 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java -index b7352ab040c979b42ec7efd301bd9d7bfe08129f..79c59d77068709e42b3a908080d147b94fcee209 100644 +index 21443c9cbbbc69b81bb34ee63d8d31bd31894d2a..8b7008ca957a52c55f1a2c7bf0bbedc89477884d 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java -@@ -73,7 +73,7 @@ public class CraftConduit extends CraftBlockEntityState impl +@@ -75,7 +75,7 @@ public class CraftConduit extends CraftBlockEntityState impl public int getRange() { this.ensureNoWorldGeneration(); ConduitBlockEntity conduit = (ConduitBlockEntity) this.getBlockEntityFromWorld(); @@ -859,10 +859,10 @@ index 000c5ea5d39d5ab6e5592012ab1cc7ee547505dc..140da7078217f833f490d88faaf803ab @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 3b41a37f852c3b494b158e447eade9b030f26556..395951c968e95adffa97e1851d104faf192744fd 100644 +index b38073628d3b1381ccc4e5c6c44b2b7ec8ba1273..476eefebace887064b728f08af40c746b6f70787 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -100,6 +100,25 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -113,6 +113,25 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { this.entityType = CraftEntityType.minecraftToBukkit(entity.getType()); } @@ -888,7 +888,7 @@ index 3b41a37f852c3b494b158e447eade9b030f26556..395951c968e95adffa97e1851d104faf public static CraftEntity getEntity(CraftServer server, T entity) { Preconditions.checkArgument(entity != null, "Unknown entity"); -@@ -289,6 +308,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -302,6 +321,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS); // Don't allow teleporting between worlds while keeping passengers if (flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS) && this.entity.isVehicle() && location.getWorld() != this.getWorld()) { @@ -896,7 +896,7 @@ index 3b41a37f852c3b494b158e447eade9b030f26556..395951c968e95adffa97e1851d104faf return false; } -@@ -1313,4 +1333,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1333,4 +1353,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return this.entity.get(io.papermc.paper.datacomponent.PaperDataComponentType.bukkitToMinecraft(type)) != null; } @@ -924,10 +924,10 @@ index 3b41a37f852c3b494b158e447eade9b030f26556..395951c968e95adffa97e1851d104faf + // Purpur end - Ridables } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 934eb5c668b09d871c62a17c8d0916723fa25695..d4e36d6d2e11d43db4c80bf95d0a935f99de576e 100644 +index 8fba3cbac5d2d39e7db3d3261c68317dbc936736..b02826fc7390eb1fd7c2a1b597a5f1abf156b1c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -295,6 +295,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -301,6 +301,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void recalculatePermissions() { this.perm.recalculatePermissions(); @@ -958,12 +958,12 @@ index 2d7be6f2afe32fd7555640989313052d37973e61..5bafbb876e4780ff6ea0408c95007bdf + // Purpur end - Summoner API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index ca656d97a00eef86773be9833fd908283002c885..01759ae999cd158e540f1e282473740758d6cf54 100644 +index 33a0e5de4b96e3752ed60a77e9f20f38e434104e..24c169aeb21a9abf30e98362408dcd3576f12860 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -@@ -143,4 +143,53 @@ public class CraftItem extends CraftEntity implements Item { +@@ -145,4 +145,53 @@ public class CraftItem extends CraftEntity implements Item { public UUID getThrower() { - return this.getHandle().thrower; + return Optionull.map(this.getHandle().thrower, EntityReference::getUUID); } + + // Purpur start - Item entity immunities @@ -1068,10 +1068,10 @@ index 02deb9c37250144be9afa0fe55df2a49017a7070..dfb597fcb8d01ed6cf20eae57e260949 + // Purpur end - Llama API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1db6276ae7a547860cf2c6f85b37ec4d6b33655a..fcc7bc9098e2544588d8b36dd0cff59e6a2563bd 100644 +index 3e18819ae23ab5ecd866d61cd0fd62ce1324109e..7f17c5025f25e44a917f5d6a65b8d958a982b301 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -614,10 +614,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -625,10 +625,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setPlayerListName(String name) { @@ -1088,7 +1088,7 @@ index 1db6276ae7a547860cf2c6f85b37ec4d6b33655a..fcc7bc9098e2544588d8b36dd0cff59e if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined for (ServerPlayer player : (List) this.server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { -@@ -1431,6 +1436,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1442,6 +1447,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start - Teleport passenger API // Don't allow teleporting between worlds while keeping passengers if (ignorePassengers && entity.isVehicle() && location.getWorld() != this.getWorld()) { @@ -1096,7 +1096,7 @@ index 1db6276ae7a547860cf2c6f85b37ec4d6b33655a..fcc7bc9098e2544588d8b36dd0cff59e return false; } -@@ -1452,6 +1458,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1463,6 +1469,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API @@ -1104,7 +1104,7 @@ index 1db6276ae7a547860cf2c6f85b37ec4d6b33655a..fcc7bc9098e2544588d8b36dd0cff59e return false; } -@@ -2723,6 +2730,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2726,6 +2733,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().getAbilities().walkingSpeed * 2f; } @@ -1133,7 +1133,7 @@ index 1db6276ae7a547860cf2c6f85b37ec4d6b33655a..fcc7bc9098e2544588d8b36dd0cff59e private void validateSpeed(float value) { Preconditions.checkArgument(value <= 1f && value >= -1f, "Speed value (%s) need to be between -1f and 1f", value); } -@@ -3576,4 +3605,76 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3569,4 +3598,76 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setDeathScreenScore(final int score) { getHandle().setScore(score); } @@ -1292,10 +1292,10 @@ index 33866c5a5591150de4c1d8f4c175122db3bd5bd4..5fd656f43985e3972c9f572d5b05bf5c + // Purpur end - Configurable chance for wolves to spawn rabid } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 9774c9c72a910ccd919b903d92f4068c06d199d7..5300a513a295d472752d31a6e8af48bb64b06704 100644 +index c5daefa56597bd13fe227fa014ca5225c00a2a2d..98b766d115856dbf3ea11a983c1304591032f1b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -514,6 +514,15 @@ public class CraftEventFactory { +@@ -515,6 +515,15 @@ public class CraftEventFactory { } craftServer.getPluginManager().callEvent(event); @@ -1311,7 +1311,7 @@ index 9774c9c72a910ccd919b903d92f4068c06d199d7..5300a513a295d472752d31a6e8af48bb return event; } -@@ -1046,6 +1055,7 @@ public class CraftEventFactory { +@@ -1047,6 +1056,7 @@ public class CraftEventFactory { EntityDamageEvent event; if (damager != null) { event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions, critical); @@ -1800,7 +1800,7 @@ index a573499fb96cb08d96e0b20602fc423bfd0e2f52..eb9cbc29181ffc83acd556f26f2c0b4f + // Purpur end - Explorer Map API } diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java -index a38d464b470bacd9280fb4ae69f3600cbd5dbe22..a36b0b535252c06fc426535ad2138e23fa2e47fd 100644 +index de33ea03508552d0cc7dd548754c626af093dd7c..22f820dcef5a760eff77d5eb75c08125dc7ae367 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java @@ -23,7 +23,15 @@ public final class CommandPermissions { diff --git a/leaf-server/paper-patches/features/0012-Print-stack-trace-for-plugins-not-shutting-down-task.patch b/leaf-server/paper-patches/features/0012-Print-stack-trace-for-plugins-not-shutting-down-task.patch index 85468675..bd80c121 100644 --- a/leaf-server/paper-patches/features/0012-Print-stack-trace-for-plugins-not-shutting-down-task.patch +++ b/leaf-server/paper-patches/features/0012-Print-stack-trace-for-plugins-not-shutting-down-task.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 23bd30ad769507e3eeb4e397e57a2c0ac01f8b7a..889687ee9bcea490e8a7ee29d0a1f81011cd4a34 100644 +index b66a7e4da7fd3fe22fef65a201705dcfe876f88e..db4bbabf5f6c24a32fb96f0ce5e642adb468c805 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1184,6 +1184,13 @@ public final class CraftServer implements Server { +@@ -1156,6 +1156,13 @@ public final class CraftServer implements Server { plugin.getPluginMeta().getDisplayName(), "This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies." )); diff --git a/leaf-server/paper-patches/features/0016-Do-not-log-legacy-Material-initialization.patch b/leaf-server/paper-patches/features/0015-Do-not-log-legacy-Material-initialization.patch similarity index 100% rename from leaf-server/paper-patches/features/0016-Do-not-log-legacy-Material-initialization.patch rename to leaf-server/paper-patches/features/0015-Do-not-log-legacy-Material-initialization.patch diff --git a/leaf-server/paper-patches/features/0017-Do-not-log-Not-Secure-marker.patch b/leaf-server/paper-patches/features/0016-Do-not-log-Not-Secure-marker.patch similarity index 100% rename from leaf-server/paper-patches/features/0017-Do-not-log-Not-Secure-marker.patch rename to leaf-server/paper-patches/features/0016-Do-not-log-Not-Secure-marker.patch diff --git a/leaf-server/paper-patches/features/0018-Reduce-array-allocations.patch b/leaf-server/paper-patches/features/0017-Reduce-array-allocations.patch similarity index 98% rename from leaf-server/paper-patches/features/0018-Reduce-array-allocations.patch rename to leaf-server/paper-patches/features/0017-Reduce-array-allocations.patch index a75e6bde..be94a771 100644 --- a/leaf-server/paper-patches/features/0018-Reduce-array-allocations.patch +++ b/leaf-server/paper-patches/features/0017-Reduce-array-allocations.patch @@ -98,7 +98,7 @@ index db92261a6cb3758391108361096417c61bc82cdc..1a14fddb36ca3c14d243304db629d0c5 public SortedList(final E[] elements, final Comparator comparator) { diff --git a/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java b/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java -index 84fab94f38e8ee51f2c82fc8c3ddffe2a24d7148..6d1d05caa7c3b6a43770aa185070317a89c1bd74 100644 +index af480008adc07c63344d625101d1bf42fab96b5d..8c9609b95cf27b6316c48a554b2c508aa527b964 100644 --- a/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java +++ b/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java @@ -178,7 +178,7 @@ public class PaperCommands implements Commands, PaperRegistrar diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3baf8e5508ba6acf4331b23832dac0316cb93ca1..03c93d7f17a0c5440cb1d8078e3e241cbd1f1c41 100644 +index 94efaf127c22b6bb722982bf1ccc63bfd6458153..c5da43af18b507d348dae8fa46852c1d1af65742 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1381,6 +1381,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1392,6 +1392,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end - Teleportation API } diff --git a/leaf-server/paper-patches/features/0030-Leaves-Protocol-Core.patch b/leaf-server/paper-patches/features/0029-Leaves-Protocol-Core.patch similarity index 87% rename from leaf-server/paper-patches/features/0030-Leaves-Protocol-Core.patch rename to leaf-server/paper-patches/features/0029-Leaves-Protocol-Core.patch index 11b4ec06..257cc1a6 100644 --- a/leaf-server/paper-patches/features/0030-Leaves-Protocol-Core.patch +++ b/leaf-server/paper-patches/features/0029-Leaves-Protocol-Core.patch @@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves Commit: 3187d77f57058a81bc04ce7eaac1224f58b03c25 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fd956a7c81e4b7407f70dee6a65f973d43f747b2..d877dbabb4e0ee1b167c9f56669ecd5b629b6146 100644 +index e7d9035c54ef8224f9cca52eb23c5d02ec952c73..4ea1ceac80bd4676bb2c59bc4219903850cc7213 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -512,6 +512,7 @@ public final class CraftServer implements Server { +@@ -511,6 +511,7 @@ public final class CraftServer implements Server { this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper this.spark = new io.papermc.paper.SparksFly(this); // Paper - spark @@ -20,7 +20,7 @@ index fd956a7c81e4b7407f70dee6a65f973d43f747b2..d877dbabb4e0ee1b167c9f56669ecd5b } public boolean getCommandBlockOverride(String command) { -@@ -1126,6 +1127,7 @@ public final class CraftServer implements Server { +@@ -1098,6 +1099,7 @@ public final class CraftServer implements Server { org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur - Purpur config files this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); diff --git a/leaf-server/paper-patches/features/0031-Leaves-Replay-Mod-API.patch b/leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch similarity index 88% rename from leaf-server/paper-patches/features/0031-Leaves-Replay-Mod-API.patch rename to leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch index 7b1a686a..69ed4958 100644 --- a/leaf-server/paper-patches/features/0031-Leaves-Replay-Mod-API.patch +++ b/leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch @@ -27,10 +27,10 @@ index 4c003acccdd2dd17918b15316001e52e7670123e..780f3a48152fef6a06dc67bf7fbd1965 HandlerList handlers = event.getHandlers(); RegisteredListener[] listeners = handlers.getRegisteredListeners(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d877dbabb4e0ee1b167c9f56669ecd5b629b6146..2ea89dd5693e111367bc4c085bf30e9ddb0256a2 100644 +index 4ea1ceac80bd4676bb2c59bc4219903850cc7213..745f3915afdf22fbbc816bd2be30c274e306ee1d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -317,6 +317,7 @@ public final class CraftServer implements Server { +@@ -316,6 +316,7 @@ public final class CraftServer implements Server { private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; public final io.papermc.paper.SparksFly spark; private final ServerConfiguration serverConfig = new PaperServerConfiguration(); @@ -38,7 +38,7 @@ index d877dbabb4e0ee1b167c9f56669ecd5b629b6146..2ea89dd5693e111367bc4c085bf30e9d // Paper start - Folia region threading API private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler(); -@@ -411,7 +412,7 @@ public final class CraftServer implements Server { +@@ -410,7 +411,7 @@ public final class CraftServer implements Server { public CraftServer(DedicatedServer console, PlayerList playerList) { this.console = console; this.playerList = (DedicatedPlayerList) playerList; @@ -47,7 +47,7 @@ index d877dbabb4e0ee1b167c9f56669ecd5b629b6146..2ea89dd5693e111367bc4c085bf30e9d @Override public CraftPlayer apply(ServerPlayer player) { return player.getBukkitEntity(); -@@ -3372,4 +3373,11 @@ public final class CraftServer implements Server { +@@ -3349,4 +3350,11 @@ public final class CraftServer implements Server { return MinecraftServer.lastTickOversleepTime; } // Gale end - YAPFA - last tick time - API @@ -60,10 +60,10 @@ index d877dbabb4e0ee1b167c9f56669ecd5b629b6146..2ea89dd5693e111367bc4c085bf30e9d + // Leaves end - replay mod api } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 395951c968e95adffa97e1851d104faf192744fd..30d2ff810d8f9f1bdf785e9165c032eaa177ee43 100644 +index 476eefebace887064b728f08af40c746b6f70787..beae8a57a0ce9b8e7d81619efe4c39d908869319 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -127,6 +127,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -140,6 +140,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return new CraftHumanEntity(server, (net.minecraft.world.entity.player.Player) entity); } @@ -73,10 +73,10 @@ index 395951c968e95adffa97e1851d104faf192744fd..30d2ff810d8f9f1bdf785e9165c032ea if (entity instanceof EnderDragonPart complexPart) { if (complexPart.parentMob instanceof EnderDragon) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 03c93d7f17a0c5440cb1d8078e3e241cbd1f1c41..578b026cf6dbf2b00b796a7b69272c20152dc882 100644 +index c5da43af18b507d348dae8fa46852c1d1af65742..4fcc231b0acbb536f3f6466454555845fe54a815 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2283,7 +2283,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2294,7 +2294,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public boolean canSee(Player player) { diff --git a/leaf-server/paper-patches/features/0032-Skip-event-if-no-listeners.patch b/leaf-server/paper-patches/features/0031-Skip-event-if-no-listeners.patch similarity index 100% rename from leaf-server/paper-patches/features/0032-Skip-event-if-no-listeners.patch rename to leaf-server/paper-patches/features/0031-Skip-event-if-no-listeners.patch diff --git a/leaf-server/paper-patches/features/0034-SparklyPaper-Optimize-canSee-checks.patch b/leaf-server/paper-patches/features/0032-SparklyPaper-Optimize-canSee-checks.patch similarity index 94% rename from leaf-server/paper-patches/features/0034-SparklyPaper-Optimize-canSee-checks.patch rename to leaf-server/paper-patches/features/0032-SparklyPaper-Optimize-canSee-checks.patch index d6ab612d..90880432 100644 --- a/leaf-server/paper-patches/features/0034-SparklyPaper-Optimize-canSee-checks.patch +++ b/leaf-server/paper-patches/features/0032-SparklyPaper-Optimize-canSee-checks.patch @@ -16,10 +16,10 @@ This seems stupid, but it does seem that it improves the performance a bit, and We also create a "canSee" method tailored for "ChunkMap#updatePlayer()", a method without the equals check (the "updatePlayer()" already checks if the entity is the same entity) because the CraftPlayer's `equals()` check is a *bit* expensive compared to only checking the object's identity, and because the identity has already been check, we don't need to check it twice. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 578b026cf6dbf2b00b796a7b69272c20152dc882..16d836614cea2599a6252bcec8301bd76582328e 100644 +index 4fcc231b0acbb536f3f6466454555845fe54a815..a6d89e3e6dcdfac785111706dfceabffa0a52cbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -216,7 +216,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -227,7 +227,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private boolean hasPlayedBefore = false; private final ConversationTracker conversationTracker = new ConversationTracker(); private final Set channels = new HashSet(); @@ -28,7 +28,7 @@ index 578b026cf6dbf2b00b796a7b69272c20152dc882..16d836614cea2599a6252bcec8301bd7 private final Set unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player private static final WeakHashMap> pluginWeakReferences = new WeakHashMap<>(); private int hash = 0; -@@ -2288,9 +2288,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2299,9 +2299,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public boolean canSee(org.bukkit.entity.Entity entity) { diff --git a/leaf-server/paper-patches/features/0035-Including-5s-in-getTPS.patch b/leaf-server/paper-patches/features/0033-Including-5s-in-getTPS.patch similarity index 84% rename from leaf-server/paper-patches/features/0035-Including-5s-in-getTPS.patch rename to leaf-server/paper-patches/features/0033-Including-5s-in-getTPS.patch index 95e874a8..d8dd8123 100644 --- a/leaf-server/paper-patches/features/0035-Including-5s-in-getTPS.patch +++ b/leaf-server/paper-patches/features/0033-Including-5s-in-getTPS.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Including 5s in getTPS() diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2ea89dd5693e111367bc4c085bf30e9ddb0256a2..126eb60f9713b5f525942e5e9743b65b0a3f1507 100644 +index 745f3915afdf22fbbc816bd2be30c274e306ee1d..079fcde7b0eb47838f4ccf256ed5adb6ffbca95a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -3098,6 +3098,8 @@ public final class CraftServer implements Server { +@@ -3075,6 +3075,8 @@ public final class CraftServer implements Server { @Override public double[] getTPS() { diff --git a/leaf-server/paper-patches/features/0036-Don-t-throw-exception-on-missing-ResourceKey-value.patch b/leaf-server/paper-patches/features/0034-Don-t-throw-exception-on-missing-ResourceKey-value.patch similarity index 100% rename from leaf-server/paper-patches/features/0036-Don-t-throw-exception-on-missing-ResourceKey-value.patch rename to leaf-server/paper-patches/features/0034-Don-t-throw-exception-on-missing-ResourceKey-value.patch diff --git a/leaf-server/paper-patches/features/0037-Virtual-Thread-for-async-scheduler.patch b/leaf-server/paper-patches/features/0035-Virtual-Thread-for-async-scheduler.patch similarity index 100% rename from leaf-server/paper-patches/features/0037-Virtual-Thread-for-async-scheduler.patch rename to leaf-server/paper-patches/features/0035-Virtual-Thread-for-async-scheduler.patch diff --git a/leaf-server/paper-patches/features/0038-Mirai-Configurable-chat-message-signatures.patch b/leaf-server/paper-patches/features/0036-Mirai-Configurable-chat-message-signatures.patch similarity index 100% rename from leaf-server/paper-patches/features/0038-Mirai-Configurable-chat-message-signatures.patch rename to leaf-server/paper-patches/features/0036-Mirai-Configurable-chat-message-signatures.patch diff --git a/leaf-server/paper-patches/features/0039-Matter-Secure-Seed.patch b/leaf-server/paper-patches/features/0037-Matter-Secure-Seed.patch similarity index 95% rename from leaf-server/paper-patches/features/0039-Matter-Secure-Seed.patch rename to leaf-server/paper-patches/features/0037-Matter-Secure-Seed.patch index d920d41d..5cad2151 100644 --- a/leaf-server/paper-patches/features/0039-Matter-Secure-Seed.patch +++ b/leaf-server/paper-patches/features/0037-Matter-Secure-Seed.patch @@ -34,10 +34,10 @@ index 400e632208d133a3f49fc7f14bceb48a1026769b..8c4e5b0c81d90a0eeee4ab9e5882b137 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 126eb60f9713b5f525942e5e9743b65b0a3f1507..717084d0ca60ff8bd3fa04083cad69f754b38340 100644 +index 079fcde7b0eb47838f4ccf256ed5adb6ffbca95a..01b44f84f53ccf6aebd31bb940f0d7c7aa296b32 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1383,7 +1383,11 @@ public final class CraftServer implements Server { +@@ -1355,7 +1355,11 @@ public final class CraftServer implements Server { registryAccess = levelDataAndDimensions.dimensions().dimensionsRegistryAccess(); } else { LevelSettings levelSettings; diff --git a/leaf-server/paper-patches/features/0040-Faster-random-generator.patch b/leaf-server/paper-patches/features/0038-Faster-random-generator.patch similarity index 100% rename from leaf-server/paper-patches/features/0040-Faster-random-generator.patch rename to leaf-server/paper-patches/features/0038-Faster-random-generator.patch diff --git a/leaf-server/paper-patches/features/0041-Configurable-unknown-command-message.patch b/leaf-server/paper-patches/features/0039-Configurable-unknown-command-message.patch similarity index 100% rename from leaf-server/paper-patches/features/0041-Configurable-unknown-command-message.patch rename to leaf-server/paper-patches/features/0039-Configurable-unknown-command-message.patch diff --git a/leaf-server/paper-patches/features/0042-Replace-world-map-with-optimized-collection.patch b/leaf-server/paper-patches/features/0040-Replace-world-map-with-optimized-collection.patch similarity index 92% rename from leaf-server/paper-patches/features/0042-Replace-world-map-with-optimized-collection.patch rename to leaf-server/paper-patches/features/0040-Replace-world-map-with-optimized-collection.patch index 02005e53..e277a786 100644 --- a/leaf-server/paper-patches/features/0042-Replace-world-map-with-optimized-collection.patch +++ b/leaf-server/paper-patches/features/0040-Replace-world-map-with-optimized-collection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Replace world map with optimized collection diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 717084d0ca60ff8bd3fa04083cad69f754b38340..b71edea2c1126bc558f2a803cdf4dd46677a16fc 100644 +index 01b44f84f53ccf6aebd31bb940f0d7c7aa296b32..d25b0c36e8bafabc7a1a16d01eef9d69567f2c91 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -286,7 +286,7 @@ public final class CraftServer implements Server { diff --git a/leaf-server/paper-patches/features/0043-Cache-CraftEntityType-minecraftToBukkit-convert.patch b/leaf-server/paper-patches/features/0041-Cache-CraftEntityType-minecraftToBukkit-convert.patch similarity index 100% rename from leaf-server/paper-patches/features/0043-Cache-CraftEntityType-minecraftToBukkit-convert.patch rename to leaf-server/paper-patches/features/0041-Cache-CraftEntityType-minecraftToBukkit-convert.patch diff --git a/leaf-server/paper-patches/features/0044-Multithreaded-Tracker.patch b/leaf-server/paper-patches/features/0042-Multithreaded-Tracker.patch similarity index 91% rename from leaf-server/paper-patches/features/0044-Multithreaded-Tracker.patch rename to leaf-server/paper-patches/features/0042-Multithreaded-Tracker.patch index a28ad7e4..41b4bc4f 100644 --- a/leaf-server/paper-patches/features/0044-Multithreaded-Tracker.patch +++ b/leaf-server/paper-patches/features/0042-Multithreaded-Tracker.patch @@ -41,10 +41,10 @@ index 379c2dc1853e45a96dda9b13bf28b7e08f65658a..361f4de9cdf0f7505628a2fed2a3f536 } // Leaves start - skip photographer diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 875a5f644fae6a7d91c789c1bd49896bc8ca7732..93d8503814a42f21813c9e568b072ebaca0ea038 100644 +index beae8a57a0ce9b8e7d81619efe4c39d908869319..6b1926080eddf61ff9c0156a6846f7f0bcff1c2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -760,7 +760,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -764,7 +764,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { ChunkMap.TrackedEntity entityTracker = world.getChunkSource().chunkMap.entityMap.get(this.getEntityId()); if (entityTracker != null) { @@ -53,7 +53,7 @@ index 875a5f644fae6a7d91c789c1bd49896bc8ca7732..93d8503814a42f21813c9e568b072eba players.add(connection.getPlayer().getBukkitEntity()); } } -@@ -1076,7 +1076,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1095,7 +1095,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return; } @@ -62,7 +62,7 @@ index 875a5f644fae6a7d91c789c1bd49896bc8ca7732..93d8503814a42f21813c9e568b072eba this.getHandle().resendPossiblyDesyncedEntityData(connection.getPlayer()); } } -@@ -1223,7 +1223,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1242,7 +1242,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } Set set = new java.util.HashSet<>(tracker.seenBy.size()); @@ -72,10 +72,10 @@ index 875a5f644fae6a7d91c789c1bd49896bc8ca7732..93d8503814a42f21813c9e568b072eba } return set; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 16d836614cea2599a6252bcec8301bd76582328e..ee113efb74d24a0c70c0e189694b1d5d3bd2aaa9 100644 +index a6d89e3e6dcdfac785111706dfceabffa0a52cbf..66d555e97177e340ee1c07ae389a6c52855dd3d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2892,7 +2892,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2895,7 +2895,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Iterator iterator = collection.iterator(); while (iterator.hasNext()) { AttributeInstance genericInstance = iterator.next(); @@ -85,10 +85,10 @@ index 16d836614cea2599a6252bcec8301bd76582328e..ee113efb74d24a0c70c0e189694b1d5d break; } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5300a513a295d472752d31a6e8af48bb64b06704..fec0f3b72c1808c5019e95760e3fef19c45e1be0 100644 +index 98b766d115856dbf3ea11a983c1304591032f1b0..62cefed7674a6938698a57f5f89750d120461e9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1751,6 +1751,26 @@ public class CraftEventFactory { +@@ -1798,6 +1798,26 @@ public class CraftEventFactory { } public static boolean handleBlockFormEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags, @Nullable Entity entity, boolean checkSetResult) { diff --git a/leaf-server/paper-patches/features/0045-Asynchronous-locator.patch b/leaf-server/paper-patches/features/0043-Asynchronous-locator.patch similarity index 100% rename from leaf-server/paper-patches/features/0045-Asynchronous-locator.patch rename to leaf-server/paper-patches/features/0043-Asynchronous-locator.patch diff --git a/leaf-server/paper-patches/features/0046-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch b/leaf-server/paper-patches/features/0044-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch similarity index 94% rename from leaf-server/paper-patches/features/0046-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch rename to leaf-server/paper-patches/features/0044-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch index 2289148c..cd7c351d 100644 --- a/leaf-server/paper-patches/features/0046-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch +++ b/leaf-server/paper-patches/features/0044-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch @@ -20,7 +20,7 @@ index a4d5c65edc1db59f3486ce5d3757cc306211a54b..b00a82816784ea2f6422ca98c1f11597 // Paper start diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -index 2338e7c115037430cefae26a571ded71f77983c4..321280d7c9c3c828cbf2eb19d2fd196a1f84d4c3 100644 +index 63f6b5d00b401fe670fd237e53dd2073d042535b..eb51cfce4069035664d2d1e3d30ab681e917dee6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java @@ -185,7 +185,7 @@ public final class CraftBlockStates { diff --git a/leaf-server/paper-patches/features/0047-Faster-CraftServer-getworlds-list-creation.patch b/leaf-server/paper-patches/features/0045-Faster-CraftServer-getworlds-list-creation.patch similarity index 85% rename from leaf-server/paper-patches/features/0047-Faster-CraftServer-getworlds-list-creation.patch rename to leaf-server/paper-patches/features/0045-Faster-CraftServer-getworlds-list-creation.patch index 2c1d0203..f8ab0168 100644 --- a/leaf-server/paper-patches/features/0047-Faster-CraftServer-getworlds-list-creation.patch +++ b/leaf-server/paper-patches/features/0045-Faster-CraftServer-getworlds-list-creation.patch @@ -8,10 +8,10 @@ replacing ArrayList with Fastutil ObjectArrayList brings about 40% performance improvement in benchmark. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b71edea2c1126bc558f2a803cdf4dd46677a16fc..20542041202bf7589f0246ae172c6801b335b75c 100644 +index d25b0c36e8bafabc7a1a16d01eef9d69567f2c91..55fd02cf61c38b8d0caaed40a3cd49412b03901c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -979,7 +979,7 @@ public final class CraftServer implements Server { +@@ -977,7 +977,7 @@ public final class CraftServer implements Server { @Override public List getWorlds() { diff --git a/leaf-server/paper-patches/features/0048-Cache-chunk-key.patch b/leaf-server/paper-patches/features/0046-Cache-chunk-key.patch similarity index 87% rename from leaf-server/paper-patches/features/0048-Cache-chunk-key.patch rename to leaf-server/paper-patches/features/0046-Cache-chunk-key.patch index b0f13051..0bffa125 100644 --- a/leaf-server/paper-patches/features/0048-Cache-chunk-key.patch +++ b/leaf-server/paper-patches/features/0046-Cache-chunk-key.patch @@ -9,10 +9,10 @@ This patch didn't cahce SectionPos or BlockPos to chunkKey, since it needs to co TODO: Cache block pos and section pos, whether need? diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/CoordinateUtils.java b/src/main/java/ca/spottedleaf/moonrise/common/util/CoordinateUtils.java -index 036c1a287db04c0191e5f84b027ea68d31447cbc..3cda726b5ef7419da512889d3edd1fb6935e6a54 100644 +index bb5b9c9cb0c73edce1dbe3758ee2db0fcc8f4e40..7e3ec4b74406e040ae79d63845fc57bfa3d78a80 100644 --- a/src/main/java/ca/spottedleaf/moonrise/common/util/CoordinateUtils.java +++ b/src/main/java/ca/spottedleaf/moonrise/common/util/CoordinateUtils.java -@@ -20,7 +20,7 @@ public final class CoordinateUtils { +@@ -21,7 +21,7 @@ public final class CoordinateUtils { } public static long getChunkKey(final ChunkPos pos) { diff --git a/leaf-server/paper-patches/features/0049-Async-structure-locate-api.patch b/leaf-server/paper-patches/features/0047-Async-structure-locate-api.patch similarity index 95% rename from leaf-server/paper-patches/features/0049-Async-structure-locate-api.patch rename to leaf-server/paper-patches/features/0047-Async-structure-locate-api.patch index 1306b955..1a823ab4 100644 --- a/leaf-server/paper-patches/features/0049-Async-structure-locate-api.patch +++ b/leaf-server/paper-patches/features/0047-Async-structure-locate-api.patch @@ -9,10 +9,10 @@ Added some asynchronous structure locate methods in World, requires async-locator to be enabled in Leaf config, or else it will fall back to sync methods. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0ea7df63498492e320f98ddec5bdf33b203cc770..0d2cfaef1413a343bc03829730453b03f903d5ce 100644 +index cd43af3f442f7d8af1a4552a0eff33958873a366..3183dab5ae079402f5c0f2d5c0048a4d105d8eeb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2277,6 +2277,45 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2299,6 +2299,45 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this)); } diff --git a/leaf-server/paper-patches/features/0050-PlayerInventoryOverflowEvent.patch b/leaf-server/paper-patches/features/0048-PlayerInventoryOverflowEvent.patch similarity index 100% rename from leaf-server/paper-patches/features/0050-PlayerInventoryOverflowEvent.patch rename to leaf-server/paper-patches/features/0048-PlayerInventoryOverflowEvent.patch diff --git a/leaf-server/paper-patches/features/0051-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/paper-patches/features/0049-SparklyPaper-Parallel-world-ticking.patch similarity index 98% rename from leaf-server/paper-patches/features/0051-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/paper-patches/features/0049-SparklyPaper-Parallel-world-ticking.patch index bb413dbd..710d0d3a 100644 --- a/leaf-server/paper-patches/features/0051-SparklyPaper-Parallel-world-ticking.patch +++ b/leaf-server/paper-patches/features/0049-SparklyPaper-Parallel-world-ticking.patch @@ -251,10 +251,10 @@ index a4aa2615823d77920ff55b8aa0bcc27a54b8c3e1..e1bf7dfdb3be8f92ef2cb86d7f15a613 + // SparklyPaper end - parallel world ticking } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a97e48477f 100644 +index 3183dab5ae079402f5c0f2d5c0048a4d105d8eeb..ad53cef93c55e73579f2419e10196bebbd57aae5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -456,7 +456,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -478,7 +478,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { } private boolean unloadChunk0(int x, int z, boolean save) { @@ -268,7 +268,7 @@ index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a9 if (!this.isChunkLoaded(x, z)) { return true; } -@@ -473,6 +478,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -495,6 +500,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -277,7 +277,7 @@ index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a9 ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; -@@ -523,7 +530,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -545,7 +552,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { @@ -291,7 +291,7 @@ index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a9 warnUnsafeChunk("loading a faraway chunk", x, z); // Paper ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper -@@ -751,6 +763,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -773,6 +785,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) { @@ -300,7 +300,7 @@ index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a9 this.world.captureTreeGeneration = true; this.world.captureBlockStates = true; boolean grownTree = this.generateTree(loc, type); -@@ -866,6 +880,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -888,6 +902,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { } public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source, Consumer configurator) { // Paper end - expand explosion API @@ -309,7 +309,7 @@ index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a9 net.minecraft.world.level.Level.ExplosionInteraction explosionType; if (!breakBlocks) { explosionType = net.minecraft.world.level.Level.ExplosionInteraction.NONE; // Don't break blocks -@@ -987,6 +1003,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1009,6 +1025,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setBiome(int x, int y, int z, Holder bb) { BlockPos pos = new BlockPos(x, 0, z); @@ -318,7 +318,7 @@ index 0d2cfaef1413a343bc03829730453b03f903d5ce..bf87e5dcda7deb8f9c36a3f6b64285a9 if (this.world.hasChunkAt(pos)) { net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkAt(pos); -@@ -2334,6 +2352,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2356,6 +2374,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) { @@ -1439,10 +1439,10 @@ index b00a82816784ea2f6422ca98c1f11597105cc177..5c43785b891b8b6faf3f513510509ec3 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 3422970353dcd886934b9ee906467769d39abbde..13c91223bbb4841cab0e491037a36113a33faf15 100644 +index 5d4faad9df4824cfd61abfd4df011c006f114424..40fb6081bc2a6045c76f6e86584327758627f444 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -@@ -26,6 +26,27 @@ public abstract class CraftBlockEntityState extends Craft +@@ -33,6 +33,27 @@ public abstract class CraftBlockEntityState extends Craft private final T snapshot; public boolean snapshotDisabled; // Paper public static boolean DISABLE_SNAPSHOT = false; // Paper @@ -1470,7 +1470,7 @@ index 3422970353dcd886934b9ee906467769d39abbde..13c91223bbb4841cab0e491037a36113 public CraftBlockEntityState(World world, T blockEntity) { super(world, blockEntity.getBlockPos(), blockEntity.getBlockState()); -@@ -34,8 +55,8 @@ public abstract class CraftBlockEntityState extends Craft +@@ -41,8 +62,8 @@ public abstract class CraftBlockEntityState extends Craft try { // Paper - Show blockstate location if we failed to read it // Paper start @@ -1508,7 +1508,7 @@ index 196835bdf95ba0e149b2977e9ef41698971f501f..eb7e63d4549e672ff1206055d2d75439 net.minecraft.world.item.ItemStack nms = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(item); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -index 321280d7c9c3c828cbf2eb19d2fd196a1f84d4c3..cd8f771e08cee5d00c53a8e70f0fe37cf393cd52 100644 +index eb51cfce4069035664d2d1e3d30ab681e917dee6..aea45592a3e870b9474e64317c329c55ffbebfdb 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java @@ -195,14 +195,14 @@ public final class CraftBlockStates { @@ -1530,10 +1530,10 @@ index 321280d7c9c3c828cbf2eb19d2fd196a1f84d4c3..cd8f771e08cee5d00c53a8e70f0fe37c } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fec0f3b72c1808c5019e95760e3fef19c45e1be0..d0991574d3c8c826e31b4448bbe6a6c79c16c91d 100644 +index 62cefed7674a6938698a57f5f89750d120461e9c..3c21b9701e0266bc56e6d3fc855bf49ed381441c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -818,6 +818,28 @@ public class CraftEventFactory { +@@ -819,6 +819,28 @@ public class CraftEventFactory { } public static BlockPos sourceBlockOverride = null; // SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPos up to five methods deep. @@ -1562,7 +1562,7 @@ index fec0f3b72c1808c5019e95760e3fef19c45e1be0..d0991574d3c8c826e31b4448bbe6a6c7 public static boolean handleBlockSpreadEvent(LevelAccessor world, BlockPos source, BlockPos target, net.minecraft.world.level.block.state.BlockState state, int flags) { return handleBlockSpreadEvent(world, source, target, state, flags, false); -@@ -833,7 +855,10 @@ public class CraftEventFactory { +@@ -834,7 +856,10 @@ public class CraftEventFactory { CraftBlockState snapshot = CraftBlockStates.getBlockState(world, target); snapshot.setData(state); diff --git a/leaf-server/paper-patches/features/0052-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 94% rename from leaf-server/paper-patches/features/0052-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch index 45286aed..36593b54 100644 --- a/leaf-server/paper-patches/features/0052-Paper-PR-Throttle-failed-spawn-attempts.patch +++ b/leaf-server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch @@ -31,10 +31,10 @@ vain. Throttling spawn attempts in suspected spawnproof chunks improves performance without noticeably advantaging or disadvantaging the mob farm. diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -index 9511f978f6c7da506f67928f5a5a92ecf28e5930..6c298304f842612d0e063b578f274eed04b32960 100644 +index 8e65586182bd586c95b8c4873fab6d6ff5975243..ed687b0ab589fd2ddb8bf77f42ba42cf8b1c2ea7 100644 --- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -@@ -182,6 +182,17 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -183,6 +183,17 @@ public class WorldConfiguration extends ConfigurationPart { @MergeMap public Reference2IntMap ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); diff --git a/leaf-server/paper-patches/features/0053-Async-playerdata-saving.patch b/leaf-server/paper-patches/features/0051-Async-playerdata-saving.patch similarity index 78% rename from leaf-server/paper-patches/features/0053-Async-playerdata-saving.patch rename to leaf-server/paper-patches/features/0051-Async-playerdata-saving.patch index aa224fb2..55473125 100644 --- a/leaf-server/paper-patches/features/0053-Async-playerdata-saving.patch +++ b/leaf-server/paper-patches/features/0051-Async-playerdata-saving.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Async playerdata saving diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -index ecd9e392e9e026cbeac4c65bfdb7467f971ca92d..ce27ab19b3b2bc4f5de7b5f6b13f3f5786a61f84 100644 +index f967560da343867fdc1c380a42874b0796633777..3b516f57854f6482b3748d0c3a037fdeacfe78ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java -@@ -196,7 +196,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa - } +@@ -200,7 +200,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa private CompoundTag getData() { -- return this.storage.load(this.profile.getName(), this.profile.getId().toString()).orElse(null); -+ return this.storage.load(this.profile.getName(), this.profile.getId().toString(), this.profile.getId()).orElse(null); // Leaf - Async playerdata saving + // This method does not use the problem reporter +- return this.storage.load(this.profile.getName(), this.profile.getId().toString(), ProblemReporter.DISCARDING).orElse(null); ++ return this.storage.load(this.profile.getName(), this.profile.getId().toString(), this.profile.getId(), ProblemReporter.DISCARDING).orElse(null); // Leaf - Async playerdata saving } private CompoundTag getBukkitData() { -@@ -746,16 +746,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa +@@ -750,16 +750,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa * @param compoundTag */ private void save(CompoundTag compoundTag) { diff --git a/leaf-server/paper-patches/features/0054-Async-chunk-sending.patch b/leaf-server/paper-patches/features/0052-Async-chunk-sending.patch similarity index 100% rename from leaf-server/paper-patches/features/0054-Async-chunk-sending.patch rename to leaf-server/paper-patches/features/0052-Async-chunk-sending.patch diff --git a/leaf-server/paper-patches/features/0055-Optimise-player-movement-checks.patch b/leaf-server/paper-patches/features/0053-Optimise-player-movement-checks.patch similarity index 100% rename from leaf-server/paper-patches/features/0055-Optimise-player-movement-checks.patch rename to leaf-server/paper-patches/features/0053-Optimise-player-movement-checks.patch diff --git a/leaf-server/paper-patches/features/0056-optimise-ReferenceList.patch b/leaf-server/paper-patches/features/0054-optimise-ReferenceList.patch similarity index 100% rename from leaf-server/paper-patches/features/0056-optimise-ReferenceList.patch rename to leaf-server/paper-patches/features/0054-optimise-ReferenceList.patch diff --git a/leaf-server/paper-patches/features/0057-cache-getBiome.patch b/leaf-server/paper-patches/features/0055-cache-getBiome.patch similarity index 100% rename from leaf-server/paper-patches/features/0057-cache-getBiome.patch rename to leaf-server/paper-patches/features/0055-cache-getBiome.patch diff --git a/leaf-server/paper-patches/features/0061-dump-pwt-thread.patch b/leaf-server/paper-patches/features/0056-dump-pwt-thread.patch similarity index 100% rename from leaf-server/paper-patches/features/0061-dump-pwt-thread.patch rename to leaf-server/paper-patches/features/0056-dump-pwt-thread.patch diff --git a/leaf-server/paper-patches/features/0063-Paw-optimization.patch b/leaf-server/paper-patches/features/0057-Paw-optimization.patch similarity index 95% rename from leaf-server/paper-patches/features/0063-Paw-optimization.patch rename to leaf-server/paper-patches/features/0057-Paw-optimization.patch index 62060f49..56c5e950 100644 --- a/leaf-server/paper-patches/features/0063-Paw-optimization.patch +++ b/leaf-server/paper-patches/features/0057-Paw-optimization.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Paw optimization Some random optimizations diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 34a2e07dabc546799df6881de30252397d856f05..d8aca1d7ffad3eccaae676263a41a9a1f04988b9 100644 +index ae9c9a96ac070f629564fba867749df173fd4f85..461b7ae34a4448cac0f9ca315b25ed9e7564f0b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -244,13 +244,37 @@ public class CraftBlockData implements BlockData { diff --git a/leaf-server/paper-patches/features/0062-optimize-despawn.patch b/leaf-server/paper-patches/features/0058-optimize-despawn.patch similarity index 91% rename from leaf-server/paper-patches/features/0062-optimize-despawn.patch rename to leaf-server/paper-patches/features/0058-optimize-despawn.patch index 7ffee8c9..1be60e74 100644 --- a/leaf-server/paper-patches/features/0062-optimize-despawn.patch +++ b/leaf-server/paper-patches/features/0058-optimize-despawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] optimize despawn diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -index 6c298304f842612d0e063b578f274eed04b32960..dc401da92deb55ed59197c6b1a1f6996f39dc9d0 100644 +index ed687b0ab589fd2ddb8bf77f42ba42cf8b1c2ea7..5d075f51baeaf775a458f459b762bf629e695f2e 100644 --- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -@@ -177,7 +177,7 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -178,7 +178,7 @@ public class WorldConfiguration extends ConfigurationPart { @MergeMap public Reference2IntMap spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); @MergeMap diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityArrayMap.java b/leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityArrayMap.java new file mode 100644 index 00000000..055298a9 --- /dev/null +++ b/leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityArrayMap.java @@ -0,0 +1,315 @@ +package org.dreeam.leaf.util.map; + +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.entity.schedule.Activity; + +import java.util.*; +import java.util.AbstractMap.SimpleEntry; + +public final class ActivityArrayMap implements Map { + public static final int BITS = 25; + + public int bitset = 0; + public final Object[] a = new Object[BITS + 1]; + private int size = 0; + + private transient KeySet keySet; + private transient Values valuesCollection; + private transient EntrySet entrySet; + + public ActivityArrayMap() { + if (BuiltInRegistries.ACTIVITY.size() != BITS + 1) { + throw new IllegalStateException("Unexpected registry minecraft:activity size"); + } + } + + @Override + public V put(Activity key, V value) { + int index = key.id; + int mask = 1 << index; + @SuppressWarnings("unchecked") + V oldValue = (V) a[index]; + boolean hadValue = oldValue != null; + a[index] = value; + if (!hadValue && value != null) { + size++; + bitset |= mask; + } + if (hadValue && value == null) { + size--; + bitset &= ~mask; + } + return oldValue; + } + + @Override + public V get(Object key) { + if (key instanceof Activity activity) { + @SuppressWarnings("unchecked") + V value = (V) a[activity.id]; + return value; + } + return null; + } + + @Override + public boolean containsKey(Object key) { + return key instanceof Activity activity && a[activity.id] != null; + } + + @Override + public V remove(Object key) { + if (key instanceof Activity activity) { + int index = activity.id; + @SuppressWarnings("unchecked") + V oldValue = (V) a[index]; + if (oldValue != null) { + a[index] = null; + bitset &= ~(1 << index); + size--; + } + return oldValue; + } + return null; + } + + @Override + public void clear() { + Arrays.fill(a, null); + size = 0; + bitset = 0; + } + + @Override + public int size() { + return size; + } + + @Override + public boolean isEmpty() { + return size == 0; + } + + @Override + public boolean containsValue(Object value) { + for (Object v : a) { + if (Objects.equals(v, value)) return true; + } + return false; + } + + @Override + public void putAll(Map m) { + for (Entry e : m.entrySet()) { + put(e.getKey(), e.getValue()); + } + } + + @Override + public Set keySet() { + if (keySet == null) { + keySet = new KeySet(); + } + return keySet; + } + + @Override + public Collection values() { + if (valuesCollection == null) { + valuesCollection = new Values(); + } + return valuesCollection; + } + + @Override + public Set> entrySet() { + if (entrySet == null) { + entrySet = new EntrySet(); + } + return entrySet; + } + + private final class KeySet extends AbstractSet { + @Override + public Iterator iterator() { + return new Iterator<>() { + private int index = -1; + + private void advance() { + do index++; + while (index <= BITS && (bitset & (1 << index)) == 0); + } + + { + advance(); + } + + @Override + public boolean hasNext() { + return index <= BITS; + } + + @Override + public Activity next() { + if (!hasNext()) throw new NoSuchElementException(); + Activity activity = BuiltInRegistries.ACTIVITY.byIdOrThrow(index); + advance(); + return activity; + } + }; + } + + @Override + public int size() { + return ActivityArrayMap.this.size(); + } + + @Override + public boolean contains(Object o) { + return ActivityArrayMap.this.containsKey(o); + } + + @Override + public void clear() { + ActivityArrayMap.this.clear(); + } + } + + private final class Values extends AbstractCollection { + @Override + public Iterator iterator() { + return new Iterator<>() { + private int index = -1; + + private void advance() { + do index++; + while (index <= BITS && (bitset & (1 << index)) == 0); + } + + { + advance(); + } + + @Override + public boolean hasNext() { + return index <= BITS; + } + + @Override + public V next() { + if (!hasNext()) throw new NoSuchElementException(); + @SuppressWarnings("unchecked") + V value = (V) a[index]; + advance(); + return value; + } + }; + } + + @Override + public int size() { + return ActivityArrayMap.this.size(); + } + + @Override + public boolean contains(Object o) { + return ActivityArrayMap.this.containsValue(o); + } + + @Override + public void clear() { + ActivityArrayMap.this.clear(); + } + } + + private final class EntrySet extends AbstractSet> { + @Override + public Iterator> iterator() { + return new Iterator<>() { + private int index = -1; + private int last = -1; + + private void advance() { + do index++; + while (index <= BITS && (bitset & (1 << index)) == 0); + } + + { + advance(); + } + + @Override + public boolean hasNext() { + return index <= BITS; + } + + @Override + public Entry next() { + if (!hasNext()) throw new NoSuchElementException(); + last = index; + Activity activity = BuiltInRegistries.ACTIVITY.byIdOrThrow(index); + @SuppressWarnings("unchecked") + V value = (V) a[index]; + advance(); + return new SimpleEntry<>(activity, value); + } + + @Override + public void remove() { + if (last == -1) throw new IllegalStateException(); + if (a[last] != null) { + a[last] = null; + bitset &= ~(1 << last); + size--; + } + last = -1; + } + }; + } + + @Override + public int size() { + return ActivityArrayMap.this.size(); + } + + @Override + public boolean contains(Object o) { + if (o instanceof Entry entry && entry.getKey() instanceof Activity activity) { + @SuppressWarnings("unchecked") + V value = (V) a[activity.id]; + return Objects.equals(value, entry.getValue()); + } + return false; + } + + @Override + public void clear() { + ActivityArrayMap.this.clear(); + } + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Map other)) return false; + if (this.size() != other.size()) return false; + + for (Entry entry : this.entrySet()) { + Activity key = entry.getKey(); + V value = entry.getValue(); + if (!Objects.equals(value, other.get(key))) { + return false; + } + } + return true; + } + + @Override + public int hashCode() { + int hash = 0; + for (Entry entry : entrySet()) { + hash += entry.hashCode(); + } + return hash; + } +} diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityBitSet.java b/leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityBitSet.java new file mode 100644 index 00000000..975f2250 --- /dev/null +++ b/leaf-server/src/main/java/org/dreeam/leaf/util/map/ActivityBitSet.java @@ -0,0 +1,104 @@ +package org.dreeam.leaf.util.map; + +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.entity.schedule.Activity; +import org.jetbrains.annotations.NotNull; + +import java.util.*; + +public final class ActivityBitSet extends AbstractCollection implements Set { + public static final int BITS = 25; + + public int bitset = 0; + + public ActivityBitSet() { + if (BuiltInRegistries.ACTIVITY.size() != BITS + 1) { + throw new IllegalStateException("Unexpected registry minecraft:activity size"); + } + } + + private static Activity map(int i) { + return BuiltInRegistries.ACTIVITY.byIdOrThrow(i); + } + + @Override + public boolean add(Activity activity) { + int mask = 1 << activity.id; + if ((bitset & mask) != 0) return false; + bitset |= mask; + return true; + } + + @Override + public boolean remove(Object o) { + if (o instanceof Activity activity) { + int mask = 1 << activity.id; + if ((bitset & mask) != 0) { + bitset &= ~mask; + return true; + } + } + return false; + } + + @Override + public boolean contains(Object o) { + return (o instanceof Activity activity) && ((bitset & (1 << activity.id)) != 0); + } + + @Override + public @NotNull Iterator iterator() { + return new Iterator<>() { + private int index = 0; + + private void advance() { + while (index < BITS && (bitset & (1 << index)) == 0) index++; + } + { + advance(); + } + + @Override + public boolean hasNext() { + return index < BITS; + } + + @Override + public Activity next() { + if (!hasNext()) throw new NoSuchElementException(); + Activity act = map(index++); + advance(); + return act; + } + }; + } + + @Override + public int size() { + return Integer.bitCount(bitset); + } + + @Override + public void clear() { + bitset = 0; + } + + @Override + public boolean equals(Object o) { + if (o == this) return true; + if (!(o instanceof Set s)) return false; + if (s.size() != size()) return false; + return containsAll(s); + } + + @Override + public int hashCode() { + int hash = 0; + for (int i = 0; i < BITS; i++) { + if ((bitset & (1 << i)) != 0) { + hash += map(i).hashCode(); + } + } + return hash; + } +} diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/map/AttributeInstanceArrayMap.java b/leaf-server/src/main/java/org/dreeam/leaf/util/map/AttributeInstanceArrayMap.java index 3464700c..81e7e2bd 100644 --- a/leaf-server/src/main/java/org/dreeam/leaf/util/map/AttributeInstanceArrayMap.java +++ b/leaf-server/src/main/java/org/dreeam/leaf/util/map/AttributeInstanceArrayMap.java @@ -13,15 +13,17 @@ import java.util.AbstractMap.SimpleEntry; // fast array backend map with O(1) get & put & remove public final class AttributeInstanceArrayMap implements Map, AttributeInstance>, Cloneable { + private static final int VANILLA_ATTRIBUTE_SIZE = 35; // 1.21.6 (Check this on every Minecraft version) + private int size = 0; - private transient AttributeInstance[] a = new AttributeInstance[32]; + private transient AttributeInstance[] a = new AttributeInstance[VANILLA_ATTRIBUTE_SIZE]; private transient KeySet keys; private transient Values values; private transient EntrySet entries; public AttributeInstanceArrayMap() { - if (BuiltInRegistries.ATTRIBUTE.size() != 32) { - throw new IllegalStateException("Registered custom attribute"); + if (BuiltInRegistries.ATTRIBUTE.size() != VANILLA_ATTRIBUTE_SIZE) { + throw new IllegalStateException("Unexpected registry minecraft:attribute size"); } } diff --git a/leaf-server/src/main/java/org/dreeam/leaf/util/map/BehaviorControlArraySet.java b/leaf-server/src/main/java/org/dreeam/leaf/util/map/BehaviorControlArraySet.java new file mode 100644 index 00000000..b3d85ee9 --- /dev/null +++ b/leaf-server/src/main/java/org/dreeam/leaf/util/map/BehaviorControlArraySet.java @@ -0,0 +1,26 @@ +package org.dreeam.leaf.util.map; + +import it.unimi.dsi.fastutil.objects.ObjectArraySet; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.behavior.Behavior; +import net.minecraft.world.entity.ai.behavior.BehaviorControl; + +public class BehaviorControlArraySet extends ObjectArraySet> { + private int running; + + public Object[] raw() { + return a; + } + + public void inc() { + running++; + } + + public void dec() { + running--; + } + + public boolean running() { + return running != 0; + } +} diff --git a/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java index 8106ce67..6588ab85 100644 --- a/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -67,7 +67,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { public Keepalive keepalive; public class Keepalive extends ConfigurationPart { - public boolean sendMultiple = true; // Gale - Purpur - send multiple keep-alive packets + public boolean sendMultiple = false; // Gale - Purpur - send multiple keep-alive packets } // Gale start - YAPFA - last tick time - in TPS command diff --git a/leaf-server/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java b/leaf-server/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java index 939b4f19..41fa5c07 100644 --- a/leaf-server/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java +++ b/leaf-server/src/main/java/org/leavesmc/leaves/protocol/AppleSkinProtocol.java @@ -82,7 +82,7 @@ public class AppleSkinProtocol implements LeavesProtocol { } case "natural_regeneration" -> { - boolean regeneration = player.serverLevel().getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION); + boolean regeneration = player.level().getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION); Boolean previousRegeneration = previousNaturalRegeneration.get(player); if (previousRegeneration == null || regeneration != previousRegeneration) { ProtocolUtils.sendBytebufPacket(player, NATURAL_REGENERATION_KEY, buf -> buf.writeBoolean(regeneration)); diff --git a/leaf-server/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/MobSpawnerCooldownProvider.java b/leaf-server/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/MobSpawnerCooldownProvider.java index a70f4a81..feb636dd 100644 --- a/leaf-server/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/MobSpawnerCooldownProvider.java +++ b/leaf-server/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/MobSpawnerCooldownProvider.java @@ -6,7 +6,7 @@ import net.minecraft.network.codec.StreamCodec; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity; -import net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData; +import net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerStateData; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.leavesmc.leaves.protocol.jade.JadeProtocol; @@ -21,7 +21,7 @@ public enum MobSpawnerCooldownProvider implements StreamServerDataProvider packet, @Nullable PacketSendListener callbacks, boolean flush) { + public void send(@NotNull Packet packet, @Nullable ChannelFutureListener callbacks, boolean flush) { if (!stopped) { if (packet instanceof BundlePacket packet1) { packet1.subPackets().forEach(subPacket -> send(subPacket, null)); diff --git a/leaf-server/src/main/java/org/leavesmc/leaves/replay/ReplayFile.java b/leaf-server/src/main/java/org/leavesmc/leaves/replay/ReplayFile.java index 4b1579b1..4c93b3f5 100644 --- a/leaf-server/src/main/java/org/leavesmc/leaves/replay/ReplayFile.java +++ b/leaf-server/src/main/java/org/leavesmc/leaves/replay/ReplayFile.java @@ -111,7 +111,7 @@ public class ReplayFile { public void saveMetaData(@NotNull RecordMetaData data) throws IOException { data.fileFormat = "MCPR"; data.fileFormatVersion = RecordMetaData.CURRENT_FILE_FORMAT_VERSION; - data.protocol = SharedConstants.getCurrentVersion().getProtocolVersion(); + data.protocol = SharedConstants.getCurrentVersion().protocolVersion(); data.generator = ProtocolUtils.buildProtocolVersion("replay"); try (Writer writer = new OutputStreamWriter(new FileOutputStream(metaFile), StandardCharsets.UTF_8)) { diff --git a/leaf-server/src/main/java/org/leavesmc/leaves/replay/ServerPhotographer.java b/leaf-server/src/main/java/org/leavesmc/leaves/replay/ServerPhotographer.java index d1eb8b9e..592b5d5f 100644 --- a/leaf-server/src/main/java/org/leavesmc/leaves/replay/ServerPhotographer.java +++ b/leaf-server/src/main/java/org/leavesmc/leaves/replay/ServerPhotographer.java @@ -61,7 +61,7 @@ public class ServerPhotographer extends ServerPlayer { photographer.recorder.start(); MinecraftServer.getServer().getPlayerList().placeNewPhotographer(photographer.recorder, photographer, world); - photographer.serverLevel().chunkSource.move(photographer); + photographer.level().chunkSource.move(photographer); photographer.setInvisible(true); photographers.add(photographer); @@ -79,7 +79,7 @@ public class ServerPhotographer extends ServerPlayer { if (this.server.getTickCount() % 10 == 0) { connection.resetPosition(); - this.serverLevel().chunkSource.move(this); + this.level().chunkSource.move(this); } if (this.followPlayer != null) { diff --git a/public/readme/README_CN.md b/public/readme/README_CN.md index 58d092cf..0fd85368 100644 --- a/public/readme/README_CN.md +++ b/public/readme/README_CN.md @@ -2,7 +2,7 @@
[![下载](https://img.shields.io/badge/releases-blue?label=%e4%b8%8b%e8%bd%bd&style=for-the-badge&colorA=19201a&colorB=298046)](https://www.leafmc.one/zh/download)⠀ -[![Github Actions 构建](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1215.yml?label=%e6%9e%84%e5%bb%ba&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ +[![Github Actions 构建](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1216.yml?label=%e6%9e%84%e5%bb%ba&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ ![QQ](https://img.shields.io/badge/619278377-blue?label=QQ%e7%be%a4&style=for-the-badge&colorA=19201a&colorB=298046) [![文档](https://img.shields.io/badge/leafmc.one/zh/docs-blue?label=%e6%96%87%e6%a1%a3&style=for-the-badge&colorA=19201a&colorB=298046)](https://www.leafmc.one/zh/docs) @@ -65,7 +65,7 @@ cn.dreeam.leaf leaf-api - 1.21.5-R0.1-SNAPSHOT + 1.21.6-R0.1-SNAPSHOT provided ``` @@ -78,7 +78,7 @@ repositories { } dependencies { - compileOnly("cn.dreeam.leaf:leaf-api:1.21.5-R0.1-SNAPSHOT") + compileOnly("cn.dreeam.leaf:leaf-api:1.21.6-R0.1-SNAPSHOT") } java { diff --git a/scripts/prepareRelease.sh b/scripts/prepareRelease.sh index 28233ee0..80ee4334 100755 --- a/scripts/prepareRelease.sh +++ b/scripts/prepareRelease.sh @@ -5,12 +5,12 @@ IS_EOL=false IS_UNSUPPORTED=false IS_DEV=false -JAR_NAME="leaf-1.21.5" -CURRENT_TAG="ver-1.21.5" +JAR_NAME="leaf-1.21.6" +CURRENT_TAG="ver-1.21.6" RELEASE_NOTES="release_notes.md" # Rename Leaf jar -mv ./leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./$JAR_NAME-${BUILD_NUMBER}.jar +mv ./leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./$JAR_NAME-${BUILD_NUMBER}.jar # Branch name CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) diff --git a/scripts/upstreamCommit.sh b/scripts/upstreamCommit.sh index 43e196b3..0f6ea255 100755 --- a/scripts/upstreamCommit.sh +++ b/scripts/upstreamCommit.sh @@ -53,7 +53,7 @@ logsuffix="" # Paper updates if [ -n "$paperHash" ]; then newHash=$(git diff gradle.properties | awk '/^+paperCommit =/{print $NF}') - paper=$(getCommits "PaperMC/Paper" "$paperHash" $(echo $newHash | grep . -q && echo $newHash || echo "ver/1.21.5")) # Update this on every version update + paper=$(getCommits "PaperMC/Paper" "$paperHash" $(echo $newHash | grep . -q && echo $newHash || echo "main")) # Update this on every version update # Updates found if [ -n "$paper" ]; then @@ -64,7 +64,7 @@ fi # Purpur updates if [ -n "$purpurHash" ]; then - purpur=$(getCommits "PurpurMC/Purpur" "$purpurHash" "ver/1.21.5") # Update this on every version update + purpur=$(getCommits "PurpurMC/Purpur" "$purpurHash" "ver/1.21.6") # Update this on every version update # Updates found if [ -n "$purpur" ]; then