Compare commits

...

361 Commits

Author SHA1 Message Date
AlphaKR93
a020337531 rebuild patches 2025-02-24 16:56:51 +09:00
AlphaKR93
bcf356ff4a [ci skip] Update Gradle Wrapper version to 8.12.1 2025-02-24 16:39:14 +09:00
AlphaKR93
eead936c54 /gc, /heal 2025-02-24 02:50:43 +09:00
AlphaKR93
55fbffae38 Command related patches 2025-02-24 01:53:56 +09:00
AlphaKR93
637b0ef8cb PlayerVehicleMovedIncorrectlyEvent 2025-02-24 01:08:21 +09:00
AlphaKR93
4904f64392 Fix build 2025-02-23 23:42:01 +09:00
AlphaKR93
7456362b05 More optimizations 2025-02-23 23:37:08 +09:00
AlphaKR93
d9625f4213 Apply more optimizations 2025-02-23 23:22:13 +09:00
AlphaKR93
7fac157785 Reapply more patches 2025-02-23 22:54:00 +09:00
AlphaKR93
14403ebab9 Akarin ports 2025-02-23 22:35:05 +09:00
AlphaKR93
fb72bc56c3 [ci skip] Cleanup unapplied patches 2025-02-23 20:24:18 +09:00
AlphaKR93
4e0b4a2732 Remove Timings 2025-02-23 19:54:35 +09:00
AlphaKR93
96cb741c0e Remove Mojang Profiler 2025-02-23 18:58:11 +09:00
AlphaKR93
8b0a4c75c5 Remove unnecessary client features 2025-02-23 17:48:53 +09:00
AlphaKR93
e286d62894 comment some lines 2025-02-19 21:24:33 +09:00
AlphaKR93
883f334864 Fix NPE on startup 2025-02-19 21:07:18 +09:00
AlphaKR93
063137dce4 Plazma Configurations 2025-02-19 20:40:59 +09:00
AlphaKR93
6958022ef9 Rebrand 2025-02-19 12:56:37 +09:00
AlphaKR93
7e1f20905c Hardfork - Initial Commit 2025-02-19 10:57:48 +09:00
IPECTER 이팩터
b9b81666d7 Fix SparklyPaper - Optimize farm check 2025-02-06 18:07:43 +09:00
IPECTER 이팩터
fc74a019dc Fix SparklyPaper - Optimize farm check 2025-02-06 18:03:46 +09:00
AlphaKR93
5788942629 Some fixes 2025-01-22 13:54:35 +09:00
AlphaKR93
0c58a0b04a Fix build 2024-12-26 01:22:49 +09:00
AlphaKR93
379451fec5 fix build 2024-12-25 23:51:18 +09:00
AlphaKR93
fae89fb86d Add options for help.yml and version_history.json 2024-12-25 23:47:55 +09:00
AlphaKR93
b1368732a3 Fix #105, add /heal command, etc. 2024-12-25 19:12:48 +09:00
AlphaKR93
ebe98dd7f4 Add some features 2024-12-25 15:08:30 +09:00
Alpha
6d6a60fcde "sanpshots"
Signed-off-by: Alpha <dev@alpha93.kr>
2024-12-15 16:40:54 +09:00
Alpha
02ffa930f1 publish api (again)
Signed-off-by: Alpha <dev@alpha93.kr>
2024-12-15 16:07:30 +09:00
Alpha
eb4036a64d publish api
Signed-off-by: Alpha <dev@alpha93.kr>
2024-12-15 15:54:51 +09:00
AlphaKR93
1764f1095e 1.21.4 2024-12-15 15:04:13 +09:00
AlphaKR93
22bcf63585 publish 2024-12-14 20:10:05 +09:00
AlphaKR93
86b9aa41cc minor fix 2024-12-14 18:29:01 +09:00
AlphaKR93
e55f818ab2 Fix build 2024-12-14 12:25:54 +09:00
AlphaKR93
e54f3fcf11 Add tick toggle command 2024-12-14 12:22:39 +09:00
AlphaKR93
3f15d7a684 Updated Upstream (Paper, Pufferfish, Purpur)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@e86a1b6: Updated Upstream (Paper)
PurpurMC/Purpur@962ee30: Updated Upstream (Paper)
PurpurMC/Purpur@74d1b4c: Updated Upstream (Paper)
PurpurMC/Purpur@e2e8c61: Updated Upstream (Paper)
PurpurMC/Purpur@7a01fd8: Updated Upstream (Paper)
PurpurMC/Purpur@34c18f0: Updated Upstream (Paper)
PurpurMC/Purpur@ca668ab: Updated Upstream (Paper)
PurpurMC/Purpur@200178d: Updated Upstream (Paper)
PurpurMC/Purpur@9968cbb: Updated Upstream (Paper)
PurpurMC/Purpur@db09358: Fix clamp-levels option not being true by default (#1609)
PurpurMC/Purpur@f289b6a: Updated Upstream (Paper)
PurpurMC/Purpur@959c29d: Fix Tridents giving errors without having an Elytra equipped (#1612)
PurpurMC/Purpur@68c1612: Fix villagers not spawning when the `follow-emerald-blocks` option is enabled (#1611)
PurpurMC/Purpur@5b75c68: fix `bypass-mob-griefing` not being the inverse of mobgriefing gamerule, closes #1603
PurpurMC/Purpur@55d4309: Updated Upstream (Paper)
PurpurMC/Purpur@0601f87: Updated Upstream (Paper)
PurpurMC/Purpur@06dde9d: Add Ridable and Attribute options for Creaking mob (#1613)
PurpurMC/Purpur@420a1ce: Set the bee's `takes-damage-from-water` option to true by default (#1614)
PurpurMC/Purpur@2b6f273: Updated Upstream (Paper)
PurpurMC/Purpur@504f311: Updated Upstream (Paper)
PurpurMC/Purpur@2b694c9: Updated Upstream (Paper)
PurpurMC/Purpur@96d7ef7: Updated Upstream (Paper)
PurpurMC/Purpur@e141f68: Updated Upstream (Paper)
PurpurMC/Purpur@7f6f667: Updated Upstream (Pufferfish)
PurpurMC/Purpur@de20ba9: ignore `minecart.max-speed` config value if using minecart experiment, closes #1618
PurpurMC/Purpur@03062a8: fix ridable mobs not being controllable, closes #1620
PurpurMC/Purpur@0493ac3: Updated Upstream (Paper)
PurpurMC/Purpur@16ce24a: fix(ridables/creaking): override tick method in look/move control
2024-12-14 01:59:42 +09:00
AlphaKR93
851cab54e0 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@00ef8bd: Fix Entity#isTicking and update Paper entity command (#11590)
PaperMC/Paper@6483ecb: Updated Upstream (Bukkit/CraftBukkit)
PaperMC/Paper@17dbf74: Improve CraftEntity and CraftPlayer equals
PaperMC/Paper@0af4e84: [ci skip] Add identifying line to some larger/optimization patches
PaperMC/Paper@bcbd108: Call CraftPlayer#onEntityRemove for all online players (#11598)
PaperMC/Paper@e47f79a: Configure mockito agent (#11560)
PaperMC/Paper@94ea770: Re-add exact choice shapeless support (#11546)
PaperMC/Paper@2e6eafb: Improve Minecart#getMinecartMaterial (#11544)
PaperMC/Paper@9d1c91d: [ci skip] Fix UseCooldownComponent jd (#11565)
PaperMC/Paper@59b79c8: Fix NPE with enchantable (#11557)
PaperMC/Paper@6da7b9e: Update Eigencraft patch to 1.21.3 (#11553)
PaperMC/Paper@1ef4c0e: Improve performance of RecipeMap#removeRecipe (#11547)
PaperMC/Paper@52fb265: Optimize custom map rendering (#11000)
PaperMC/Paper@661839e: Fix and optimize getChunkCount (#11610)
PaperMC/Paper@c60af44: Fix experimental minecart collisions on sloped rails
PaperMC/Paper@13f48d8: [ci skip] Rebuild patches
PaperMC/Paper@be886cf: Fix Naming issue inside Add PlayerArmorChangeEvent (#11614)
2024-11-15 23:41:52 +09:00
AlphaKR93
f63645c2fb fix build 2024-11-09 16:24:26 +09:00
AlphaKR93
8062ccb4ed Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@e86a1b6: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@a6df4c8: Handle corrupt light data gracefully
PaperMC/Paper@ce0a041: [ci skip] Rebuild patches

[Paper Changes]
PaperMC/Paper@c6aa61e: Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561)
PaperMC/Paper@93b435d: [ci skip] better instructions for patch apply conflict (#11568)
PaperMC/Paper@42a1901: Correctly adopt upstream item EAR fix (#11582)
PaperMC/Paper@fcb6c72: Correctly pass velocity native compressor (#11509)
PaperMC/Paper@99f4bb2: Fix infinite fireworks (#11592) (#11594)
2024-11-08 23:01:41 +09:00
AlphaKR93
c0d36db38d Hashed RCON password 2024-11-05 18:33:34 +09:00
Alpha
62f90e3fba Update build.gradle.kts
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-05 09:42:00 +09:00
Alpha
2986abeee1 Update release.yaml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-04 16:22:38 +09:00
Alpha
fc38239b61 Update release.yaml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-04 16:22:03 +09:00
AlphaKR93
cfe2db6181 Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@e86a1b6: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@a6df4c8: Handle corrupt light data gracefully
PaperMC/Paper@ce0a041: [ci skip] Rebuild patches
2024-11-04 16:21:00 +09:00
AlphaKR93
8975d5676b add back more patches 2024-11-04 16:18:16 +09:00
Alpha
3e1399c421 more readme fixes
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 23:50:49 +09:00
Alpha
d110f25a23 PlazmaBukkit, not Plazmaclip
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 23:47:35 +09:00
Alpha
7543f3adbd Update README.md
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 23:41:44 +09:00
Alpha
6a16940e2b Fix build
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 23:33:52 +09:00
Alpha
5596d998c1 Rename release.yml to release.yaml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 23:19:04 +09:00
Alpha
75fad4cd35 first try
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 23:18:20 +09:00
Alpha
f476809251 Update release.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 00:43:47 +09:00
Alpha
269cbb507b Update release.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-03 00:04:58 +09:00
Alpha
54dfd7163a Update release.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-02 22:22:58 +09:00
Alpha
d975acec6b more buildscript fix
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-02 22:08:25 +09:00
Alpha
72565bec8e protip: be sure to check the docs when you make something
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-02 18:58:05 +09:00
Alpha
05215498c3 Update release.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-02 18:44:27 +09:00
Alpha
ae94d43098 Update release.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-02 18:34:13 +09:00
Alpha
8889a877d6 💀
Signed-off-by: Alpha <dev@alpha93.kr>
2024-11-02 18:18:54 +09:00
AlphaKR93
e915eadfad fix 2024-11-02 18:06:37 +09:00
AlphaKR93
28ce30ec48 fix 2024-11-02 17:43:18 +09:00
AlphaKR93
dd8042f88a Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@3fc255d: Updated Upstream (Paper)
PurpurMC/Purpur@93f3948: bump Gradle wrapper version to 8.10.2
PurpurMC/Purpur@1a67c42: drop the patch that removes the mojang profiler for now
PurpurMC/Purpur@803bf62: Final 1.21.1 Upstream (Paper)
PurpurMC/Purpur@af96590: Merge branch 'ver/1.21.1' into ver/1.21.3
PurpurMC/Purpur@c6802b0: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@99b1bf9: Use new ClientboundPlayerRotationPacket for setting player rotation
PaperMC/Paper@40211a0: Update Gradle wrapper to 8.10.2
PaperMC/Paper@49eae0d: remove some leftovers
PaperMC/Paper@d576cfc: cleanup bugfix patch
PaperMC/Paper@1196ab5: Avoid issues with certain tasks not processing during sleep (#11526)
PaperMC/Paper@fe2f3d4: Fix portal exit resulting in bad teleport transition
PaperMC/Paper@9f1fa0b: Fix item gravity on inactive items, remove dumb active skipping
PaperMC/Paper@1a1d0cf: Use target pitch in teleport (generally the same thing)
PaperMC/Paper@8ba3073: fix "is_freezing" damage type tag
PaperMC/Paper@1523212: don't resend effects when PlayerItemConsumeEvent is cancelled
PaperMC/Paper@1330880: Add Friction API to minecarts
PaperMC/Paper@580a610: Allow using old ender pearl behavior & apply ender pearl exploit patch (#11524)
PaperMC/Paper@40a960d: Rebuild patches
PaperMC/Paper@dfedf79: Correctly cancel consumption of consumable
PaperMC/Paper@147b796: get previous redstone level from the right state for experimental wires
PaperMC/Paper@ad9c58e: Only expose velocity relative tp flags to API (#11532)
PaperMC/Paper@f273e6e: Set updatingMinecraft to false
PaperMC/Paper@c5c1250: [ci skip] Remove leftover todo file (#11540)
PaperMC/Paper@7ee4835: Correctly clear  explosion density cache(#11541)
PaperMC/Paper@52a0590: Updated Upstream (Bukkit/CraftBukkit) (#11543)
PaperMC/Paper@5c0930d: Fix fix recipe iterator patch
PaperMC/Paper@1de0130: re-add a dispense fix patch
PaperMC/Paper@16d7d73: bunch more general fixes
PaperMC/Paper@a5d7426: Correctly support RecipeChoice.empty (#11550)
PaperMC/Paper@85c870e: Correct update cursor (#11554)
PaperMC/Paper@d19be64: Fix NPE with spark when CraftServer is not init yet (#11558)
PaperMC/Paper@92131ad: Decrease dead entity teleport warning (#11559)
2024-11-02 16:54:55 +09:00
AlphaKR93
54bc879a9e fix build 2024-11-02 16:40:43 +09:00
AlphaKR93
33701c1eca more work 2024-11-02 16:39:08 +09:00
AlphaKR93
2028e19bf8 work 2024-11-01 18:12:14 +09:00
AlphaKR93
7a7a88a7bb fix build 2024-10-31 22:54:03 +09:00
AlphaKR93
8860cedaf7 work 2024-10-31 15:33:54 +09:00
AlphaKR93
527b6c7eaf more work 2024-10-31 14:31:42 +09:00
AlphaKR93
e37f05bd87 work 2024-10-31 13:18:20 +09:00
AlphaKR93
dfb64f50db [ci-skip] Bump Gradle Wrapper 2024-10-31 12:50:27 +09:00
AlphaKR93
69d4f4bf86 compile 2024-10-31 09:40:04 +09:00
AlphaKR93
64802e7e50 1.21.3 2024-10-30 15:03:07 +09:00
AlphaKR93
a313424212 [ci-skip] license 2024-10-27 16:03:28 +09:00
AlphaKR93
fa3c15b4f3 more optimizations 2024-10-27 16:01:43 +09:00
AlphaKR93
393e079743 minor optimization 2024-10-27 00:18:44 +09:00
AlphaKR93
90d412bbf3 random things 2024-10-26 22:07:15 +09:00
AlphaKR93
98cf5b2d13 Updated SparklyPaper port to latest 2024-10-25 19:30:16 +09:00
AlphaKR93
32243963f5 some works 2024-10-25 19:00:52 +09:00
AlphaKR93
72183c64b9 runnable 2024-10-25 18:42:48 +09:00
AlphaKR93
f7998d1955 fix build 2024-10-25 14:22:07 +09:00
AlphaKR93
58ddbf4dd6 generated api 2024-10-25 14:11:46 +09:00
AlphaKR93
3484117415 patches done 2024-10-25 07:50:20 +09:00
AlphaKR93
bff96101bb workworkworkwork 2024-10-25 07:28:41 +09:00
AlphaKR93
6b54d11f9c more work 2024-10-25 07:22:54 +09:00
AlphaKR93
08a067e974 prepare for 1.21.3 2024-10-24 10:51:28 +09:00
AlphaKR93
46433f7303 6 2024-10-22 13:29:21 +09:00
AlphaKR93
72415ee5f2 API patches 2024-10-22 07:47:40 +09:00
AlphaKR93
6d7683503c Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PurpurMC/Purpur@a52426c: Updated Upstream (Paper)
PurpurMC/Purpur@86ad0b3: Updated Upstream (Paper)
PurpurMC/Purpur@79d199c: Updated Upstream (Paper)
PurpurMC/Purpur@7708a4c: don't send keepalive packet early, closes #1520
PurpurMC/Purpur@4873495: add config to reverse bubble column flow for soulsand and magma blocks
PurpurMC/Purpur@eac4198: Updated Upstream (Paper)
PurpurMC/Purpur@7219263: [ci skip] inline fqn imports
PurpurMC/Purpur@cc56332: Final 1.20.6 Paper Upstream \o/
PurpurMC/Purpur@f1c87e4: add missing armadillo & bogged options, closes #1527
PurpurMC/Purpur@d259ed5: prepare for update
PurpurMC/Purpur@1544081: Updated Upstream (Paper)
PurpurMC/Purpur@e2b5e14: apply API patches
PurpurMC/Purpur@7c38d97: first 5 patches!
PurpurMC/Purpur@0ab7756: ridables patch \o/
PurpurMC/Purpur@085de5a: first 50 patches \o/
PurpurMC/Purpur@b191556: 100 patches \o/
PurpurMC/Purpur@2a4d2e5: 150 patches \o/
PurpurMC/Purpur@c716c80: 200 patches \o/
PurpurMC/Purpur@699969f: 250 patches \o/
PurpurMC/Purpur@cfc96e0: all patches apply \o/
PurpurMC/Purpur@59c536c: Updated Upstream (Paper)
PurpurMC/Purpur@20e182a: Updated Upstream (Paper)
PurpurMC/Purpur@973bcd4: drop damage-with-frost-walker option - can be done with a datapack
PurpurMC/Purpur@331c216: re-add timings/mojang profiler removal patches
PurpurMC/Purpur@b27c8b2: add back leashable villagers option
PurpurMC/Purpur@6b2acdc: infinity on crossbows can be done with datapacks now
PurpurMC/Purpur@c3829f2: add back portal permission bypass patch
PurpurMC/Purpur@0510294: add back fix-stuck-in-portal patch
PurpurMC/Purpur@dedcdd0: re-add generated api patches
PurpurMC/Purpur@00126e8: re-add removing curse of binding with weakness patch
PurpurMC/Purpur@09ec31b: infinity bow settings can be done through a datapack
PurpurMC/Purpur@cdb192f: mending muliplier is better done through a datapack
PurpurMC/Purpur@bf6dbdd: fix timings/profiler compilation issues
PurpurMC/Purpur@6e1147f: Updated Upstream (Paper)
PurpurMC/Purpur@c991735: Fix compilation issues (#1530)
PurpurMC/Purpur@25ecbc4: rename enchantment convenience patch
PurpurMC/Purpur@ea406a0: use matchingSlot helper method
PurpurMC/Purpur@4dca11b: elytra.ignore-unbreaking option can probably be done through datapacks now
PurpurMC/Purpur@fa88174: clear out TODOs
PurpurMC/Purpur@04a9fec: reuse extrainfo in crash report
PurpurMC/Purpur@45774b4: apply the rest of the unapplied patches
PurpurMC/Purpur@dd826a3: Updated Upstream (Paper)
PurpurMC/Purpur@778995d: Updated Upstream (Paper)
PurpurMC/Purpur@9ff84cb: Updated Upstream (Paper)
PurpurMC/Purpur@bd49055: [ci skip] replace paper with purpur in log message
PurpurMC/Purpur@a122fd7: Updated Upstream (Paper)
PurpurMC/Purpur@783acfe: Updated Upstream (Paper)
PurpurMC/Purpur@b5f1c48: Updated Upstream (Paper)
PurpurMC/Purpur@c0f5e78: add default silverfish movement speed & attack damage attributes
PurpurMC/Purpur@b82f693: configurable mob size attribute (#1538)
PurpurMC/Purpur@e05f91b: [ci skip] move import to config patch
PurpurMC/Purpur@2ba7bee: Updated Upstream (Paper)
PurpurMC/Purpur@19da21c: Updated Upstream (Paper)
PurpurMC/Purpur@21ec259: fix kickForOutOfOrderChat being applied in the incorrect spot
PurpurMC/Purpur@9efd5fc: Updated Upstream (Paper)
PurpurMC/Purpur@ad910f8: Updated Upstream (Paper)
PurpurMC/Purpur@39617d5: entities with passengers can go through portals now, closes #1540
PurpurMC/Purpur@7d59f25: fix blast resistence config not accepting namespaced values
PurpurMC/Purpur@1615793: set burp delay in the correct spot
PurpurMC/Purpur@797ce6b: Updated Upstream (Paper)
PurpurMC/Purpur@ac6c312: Updated Upstream (Paper)
PurpurMC/Purpur@d5c06b4: fix summon_entity effect attempting to add incorrect entity, closes #1545
PurpurMC/Purpur@faa1f93: add PlayerSetTrialSpawnerTypeWithEggEvent, fixes #1546 (#1547)
PurpurMC/Purpur@1ab7990: Updated Upstream (Paper)
PurpurMC/Purpur@8b987b1: fix infinityWorksWithoutArrows not working
PurpurMC/Purpur@de2e7a7: Updated Upstream (Paper)
PurpurMC/Purpur@cb0f04b: Updated Upstream (Paper)
PurpurMC/Purpur@ff19bcc: Updated Upstream (Paper)
PurpurMC/Purpur@b3709b1: Updated Upstream (Paper)
PurpurMC/Purpur@5e70800: Updated Upstream (Paper)
PurpurMC/Purpur@14136b8: Updated Upstream (Paper)
PurpurMC/Purpur@458dc18: Updated Upstream (Paper), closes #1556
PurpurMC/Purpur@87cf9f1: Updated Upstream (Paper)
PurpurMC/Purpur@bf63cfa: Updated Upstream (Paper)
PurpurMC/Purpur@8f0f20d: Updated Upstream (Paper)
PurpurMC/Purpur@86a6543: Updated Upstream (Paper)
PurpurMC/Purpur@2e39567: Re-add missing chunk api calls, fixes #1560
PurpurMC/Purpur@eadfff7: Updated Upstream (Paper)
PurpurMC/Purpur@65d3665: Updated Upstream (Paper)
PurpurMC/Purpur@936c29a: Updated Upstream (Paper)
PurpurMC/Purpur@032697e: Updated Upstream (Paper)
PurpurMC/Purpur@b2d1fea: always output bukkit/paper plugin header in plugin command
PurpurMC/Purpur@61b63b1: Updated Upstream (Paper)
PurpurMC/Purpur@c3849be: Fire EntityTeleportHinderedEvent when attempting to teleport a player with passengers (#1563)
PurpurMC/Purpur@7e0ca92: [ci skip] missed rebranding
PurpurMC/Purpur@82ccc76: Updated Upstream (Paper)
PurpurMC/Purpur@72ccfbd: Updated Upstream (Paper)
PurpurMC/Purpur@0bd5579: Updated Upstream (Paper)
PurpurMC/Purpur@b3623fa: Updated Upstream (Paper)
PurpurMC/Purpur@9e444c5: Add Entities can use portals patch back (#1571)
PurpurMC/Purpur@930003b: Updated Upstream (Paper)
PurpurMC/Purpur@7950960: Updated Upstream (Paper)
PurpurMC/Purpur@02e4e76: Updated Upstream (Paper)
PurpurMC/Purpur@afabbc9: missed these
PurpurMC/Purpur@73a90e8: Updated Upstream (Paper)
PurpurMC/Purpur@75e81d8: deprecate old anvil api methods
PurpurMC/Purpur@699448c: Merge branch 'ver/1.21' into ver/1.21.1
PurpurMC/Purpur@4e55e26: final 1.21 Paper upstream
PurpurMC/Purpur@edd9be7: Merge branch 'ver/1.21' into ver/1.21.1
PurpurMC/Purpur@abf2f21: Updated Upstream (Paper)
PurpurMC/Purpur@366af80: Updated Upstream (Paper)
PurpurMC/Purpur@07979c3: Updated Upstream (Paper)
PurpurMC/Purpur@3f790ac: Updated Upstream (Paper)
PurpurMC/Purpur@201e928: Updated Upstream (Pufferfish) (#1575)
PurpurMC/Purpur@f2307b8: Updated Upstream (Paper)
PurpurMC/Purpur@bba87bf: Updated Upstream (Paper)
PurpurMC/Purpur@f530395: Fix no exp drops from spawners using silk touch pickaxe without option enabled  (#1582)
PurpurMC/Purpur@3510a9e: Updated Upstream (Paper)
PurpurMC/Purpur@1d3cef7: Updated Upstream (Paper)
PurpurMC/Purpur@c4a6f63: Updated Upstream (Paper)
PurpurMC/Purpur@568a028: Updated Upstream (Paper)
PurpurMC/Purpur@ef12ede: Updated Upstream (Paper)
PurpurMC/Purpur@a61db94: Updated Upstream (Paper)
PurpurMC/Purpur@5c0d2f7: Updated Upstream (Paper)
PurpurMC/Purpur@49db849: Updated Upstream (Paper)
PurpurMC/Purpur@a43711d: Updated Upstream (Paper)
PurpurMC/Purpur@0a9941e: Updated Upstream (Paper)
PurpurMC/Purpur@88352c3: Updated Upstream (Paper)
PurpurMC/Purpur@dee41bc: Updated Upstream (Paper)
PurpurMC/Purpur@fdfc12e: Updated Upstream (Paper)
PurpurMC/Purpur@bc7bcbb: Fix elytra durability setting not working properly (#1589)
PurpurMC/Purpur@8af4ea6: Updated Upstream (Paper)
PurpurMC/Purpur@8332fa4: Updated Upstream (Paper)
PurpurMC/Purpur@be61a07: Updated Upstream (Paper)
PurpurMC/Purpur@f154903: Updated Upstream (Paper)
PurpurMC/Purpur@0fa9a50: Updated Upstream (Paper)
PurpurMC/Purpur@d7a7c91: Updated Upstream (Paper)
PurpurMC/Purpur@20fa61e: Updated Upstream (Paper)
PurpurMC/Purpur@501e7c5: Updated Upstream (Paper)
PurpurMC/Purpur@2a50638: Updated Upstream (Paper)
PurpurMC/Purpur@639bcbd: Updated Upstream (Paper)
PurpurMC/Purpur@bcf8103: remove obsolete allowUnsafeEnchants config option
PurpurMC/Purpur@51f15ee: fully remove obsolete allowUnsafeEnchants config option
PurpurMC/Purpur@3d0716d: Fix colored shulker box contents not dropping when destroyed, supercedes #1594
PurpurMC/Purpur@12e2926: [ci skip] drop old migration patch
PurpurMC/Purpur@212c942: delegate itemstack convenience methods
PurpurMC/Purpur@2eaea6a: switch to JSpecify annotations
PurpurMC/Purpur@4565f41: these options should be off by default
PurpurMC/Purpur@4671e1e: show a message stating the removal of mojang profiler when running perf comamnd, closes #1591
PurpurMC/Purpur@e12a4de: Updated Upstream (Paper)
PurpurMC/Purpur@7f490a6: Updated Upstream (Paper)
PurpurMC/Purpur@4f2fe31: Updated Upstream (Paper)
PurpurMC/Purpur@4b57bed: Updated Upstream (Paper)
2024-10-22 07:36:03 +09:00
AlphaKR93
6a7a817c0d stable 2024-10-18 21:21:16 +09:00
github-actions[bot]
c531844986 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@bd5867a: Handle alpha channel from potion_contents component (#10808)
2024-06-04 21:12:54 +00:00
github-actions[bot]
e721df9890 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@88d76d9: Make Bogged implement Shearable (#10844)
2024-06-04 20:45:48 +00:00
github-actions[bot]
44f2749fe5 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@79c1ce1: Add since to deprecated for removals (#10848)
2024-06-04 19:45:36 +00:00
github-actions[bot]
451d2cc363 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@4f13be9: Do not perform chunk existance check for I/O scheduling
2024-06-03 20:45:14 +00:00
github-actions[bot]
da6e51f141 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@b8f2101: Only assign blockstate data if super ctor did not (#10841)
2024-06-03 17:45:43 +00:00
github-actions[bot]
acb774fbb8 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Paper Changes]
PaperMC/Paper@54fbd0c: clarify what getEntityId actually returns (#10839)
2024-06-03 17:29:48 +00:00
github-actions[bot]
ad01d8a450 Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly

Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PlazmaMC/Purpur@be3a6d5: Updated Upstream (Paper)
PlazmaMC/Purpur@0cbff64: Add back Pufferfish patches
2024-06-02 23:13:46 +00:00
AlphaKR93
45fe520135 Fix javadoc update 2024-06-02 22:43:09 +09:00
AlphaKR93
2c85fd3304 . 2024-06-02 22:03:34 +09:00
AlphaKR93
443f09d9e7 real build fix 2024-06-02 22:01:33 +09:00
AlphaKR93
1d63c3808d [ci skip] Updated Gradle Wrapper to 8.8 2024-06-02 21:51:17 +09:00
AlphaKR93
cbeb17c8e8 Fix build, again 2024-06-02 21:48:55 +09:00
AlphaKR93
5557065f36 Build 2024-06-02 21:30:39 +09:00
AlphaKR93
4f2deab03f Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly.

[Purpur Changes]
PlazmaMC/Purpur@69d3bb4: Updated Upstream (Paper)
PlazmaMC/Purpur@ad32b22: fix version command throwing an exception
PlazmaMC/Purpur@9dcfdf1: [ci skip] missed this from the upstream
PlazmaMC/Purpur@88aa731: Updated Upstream (Paper)
PlazmaMC/Purpur@3d25693: Updated Upstream (Paper)
PlazmaMC/Purpur@248ba17: Updated Upstream (Paper)
PlazmaMC/Purpur@ed1e0ec: Updated Upstream (Paper)
PlazmaMC/Purpur@1bbb033: Updated Upstream (Paper)
PlazmaMC/Purpur@222387f: Updated Upstream (Paper)
PlazmaMC/Purpur@692ff89: [ci skip] specify purpur in version command
PlazmaMC/Purpur@7b850ef: [ci skip] Fix version inconsistency in README (#1517)
PlazmaMC/Purpur@22fc5f9: Updated Upstream (Paper)
PlazmaMC/Purpur@2842b97: Updated Upstream (Paper)
PlazmaMC/Purpur@ec1b4fa: Updated Upstream (Paper)
PlazmaMC/Purpur@b1464f3: Updated Upstream (Paper)
PlazmaMC/Purpur@ee56117: Updated Upstream (Paper)
PlazmaMC/Purpur@847719c: one punch!! improvements
PlazmaMC/Purpur@1af7456: [ci skip] document mods that patches took inspiration from
PlazmaMC/Purpur@224e7c7: Updated Upstream (Paper)
PlazmaMC/Purpur@7095128: Add back Pufferfish patches

[Paper Changes]
PaperMC/Paper@23fe116: Fix missing debug trace
PaperMC/Paper@b0c9b9c: Only remove worldgen block entity on changed block (#10794)
PaperMC/Paper@9c917fe: [ci skip] Clean up paperclip build-pr workflow (#10802)
PaperMC/Paper@9d6f2cc: [ci skip] Rebuild patches (#10803)
PaperMC/Paper@84f6e6e: Fix max temper API for llama (#10823)
PaperMC/Paper@672c077: handle BODY slot for non-mobs (#10822)
PaperMC/Paper@716b868: Use RegistryOps for loadAdvancement (#10799)
PaperMC/Paper@d9e659a: Allow firework effects with no colors (#10814)
PaperMC/Paper@7e2b682: Fix skipping custom block entity tag (#10812)
PaperMC/Paper@ed85aac: Flatten namespaced vanilla command alias redirects (#10821)
PaperMC/Paper@a31dc90: Several fixes and new api for experience merging/stacking (#9242)
PaperMC/Paper@efd91e5: Add registry-related argument types (#10770)
PaperMC/Paper@27d2ed8: Extend fishing API (#10634)
PaperMC/Paper@0fcf3e3: Deprecate InvAction#HOTBAR_MOVE_AND_READD (#10784)
PaperMC/Paper@8e6554a: Fix sending disconnect packet in phases where it doesn't exist
PaperMC/Paper@06e69c8: Use CommandSourceStack in AsyncPlayerSendCommandsEvent (#10826)
PaperMC/Paper@a47e11d: fix knockback events (#10831)
PaperMC/Paper@3181470: Add entity heal API (#10267)
PaperMC/Paper@0513374: Fire TabCompleteEvent for legacy commands (#10834)
PaperMC/Paper@5d8e53d: Fix CommandSourceStack#bypassSelectorPermissions (#10837)
2024-06-02 20:24:50 +09:00
Alpha
b099cccffb Update README.md
Signed-off-by: Alpha <dev@alpha93.kr>
2024-05-29 23:15:42 +00:00
Alpha
c2f67d1f59 Update Task.kt
Signed-off-by: Alpha <dev@alpha93.kr>
2024-05-29 06:32:00 +09:00
AlphaKR93
fd98985104 . 2024-05-29 00:10:12 +09:00
AlphaKR93
75f88071bc Fix AlwaysUpToDate 2024-05-29 00:06:29 +09:00
AlphaKR93
e6586daeaa Fix startup 2024-05-28 02:31:33 +09:00
AlphaKR93
305ff4d587 [ci skip] Cleanup 2024-05-27 15:03:26 +09:00
AlphaKR93
5a966df572 fix build 2024-05-27 14:24:10 +09:00
AlphaKR93
0d05ccbffc Updated Upstream (Paper) 2024-05-27 14:13:49 +09:00
AlphaKR93
6d70d2180f Fix build 2024-05-26 23:29:57 +09:00
AlphaKR93
15a9cac376 Updated Upstream (Paper, Purpur)
[Purpur Changes]
PlazmaMC/Purpur@ceeec1c: work
PlazmaMC/Purpur@e8f8f93: Updated Upstream (Paper, Pufferfish)

[Paper Changes]
PaperMC/Paper@f175193: Expose server build information (#10729)
PaperMC/Paper@d8d59e0: Fix NPE sending resource pack without prompt
PaperMC/Paper@5a9afbe: Fixes issues in the suppress dismount cancellation patch (#10735)
PaperMC/Paper@0ad09de: Make PaperSimplePluginClassLoader show class which is not found
PaperMC/Paper@b3b3406: fix CompassMeta not being correct (#10737)
PaperMC/Paper@591521e: Check for more correct profile validation (#10730)
PaperMC/Paper@7d2e5c3: Add an 'empty' RecipeChoice for certain ingredient slots (#10710)
PaperMC/Paper@9bf4855: Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754)
PaperMC/Paper@66cb880: Remove ThreadedWorldUpgrader patch
PaperMC/Paper@980cff9: Fix compile
PaperMC/Paper@d3ffa62: fix default item attributes
PaperMC/Paper@b149584: Always show command exception stack traces in logs (#10766)
PaperMC/Paper@a9201d4: [ci skip] Move logic in our patches to ItemType/BlockType (#10772)
PaperMC/Paper@3de408e: Fix equipment slot and group API (#10767)
PaperMC/Paper@d408381: Print CommandRegisteredEvent deprecation warnings again (#10756)
PaperMC/Paper@6de7a1f: Improve default item attributes API (#10765)
PaperMC/Paper@2a90732: Remove incorrect logic for Fireball#setVelocity (#10764)
PaperMC/Paper@5e7b65a: Allow using PluginLoader classpath API from Bukkit plugins (#10758)
PaperMC/Paper@3004717: Do not re-wrap vanilla goals (#10751)
PaperMC/Paper@377733d: Use getter/setter on Mob for equipment drop chances (#10780)
PaperMC/Paper@dff591d: Allow to define new map cursor types (#10782)
PaperMC/Paper@4fd3ac0: [ci skip] Update Player#getListeningPluginChannels Jdoc (#10778)
PaperMC/Paper@535dca5: Fix a few issues with ItemMeta (#10740)
PaperMC/Paper@26e90b9: Fix CraftMetaBlockState for data components (#10731)
PaperMC/Paper@f0bd0cc: Expose anvil cost in the API (#10682)
PaperMC/Paper@41bee55: Fix NPE for color-related metas
PaperMC/Paper@4e10fad: reset meta block state on BlockStateMeta#setBlockState
2024-05-26 23:21:05 +09:00
AlphaKR93
c3681a26f5 Fix fluid generation 2024-05-26 19:33:04 +09:00
Alpha
33812e0bc8 💀
Signed-off-by: Alpha <dev@alpha93.kr>
2024-05-26 17:30:32 +09:00
AlphaKR93
7ef7531cd3 Add back cave lava see level configuration 2024-05-26 17:21:30 +09:00
AlphaKR93
d75427a54e Add an option to apply the configuration to the vanilla default 2024-05-15 16:33:01 +09:00
AlphaKR93
9dbff3634b some patch cleanups 2024-05-15 16:09:49 +09:00
AlphaKR93
64df11da56 nahh 2024-05-15 14:58:31 +09:00
AlphaKR93
892269673e Add back Pufferfish related patches 2024-05-15 14:32:29 +09:00
github-actions[bot]
e5158825bf Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PlazmaMC/Purpur@ba950ad: reparse minimessage from serialized playerlist component, closes #1515
PlazmaMC/Purpur@1ffd250: Add back Pufferfish patch
PlazmaMC/Purpur@150395f: 💀
2024-05-15 03:20:56 +00:00
AlphaKR93
09d30a5d9f some cleanups 2024-05-15 11:32:49 +09:00
AlphaKR93
718927ee70 💀💀💀 2024-05-14 23:48:56 +09:00
AlphaKR93
63e37b3633 Add back Pufferfish patch 2024-05-14 23:12:29 +09:00
AlphaKR93
6e591f2d3f bruh 2024-05-14 19:03:56 +09:00
AlphaKR93
34fef470e5 Updated Upstream (Paper & Purpur) 2024-05-14 18:58:32 +09:00
AlphaKR93
069250da59 [ci skip] cleanup 2024-05-09 17:39:59 +09:00
AlphaKR93
4a3d274bda more tweaks 2024-05-09 15:23:46 +09:00
AlphaKR93
930ef33a61 Revert "more cleanups"
This reverts commit ace7a1abe9.
2024-05-09 13:55:25 +09:00
AlphaKR93
ace7a1abe9 more cleanups 2024-05-09 13:50:41 +09:00
AlphaKR93
10ddca5626 [ci skip] Cleanup codes 2024-05-09 13:46:25 +09:00
AlphaKR93
da7a4324cd oops 2024-05-09 13:10:43 +09:00
AlphaKR93
7c8614f897 fix some mistakes 2024-05-09 12:55:32 +09:00
AlphaKR93
151f97c9c7 💀 2024-05-09 12:40:43 +09:00
AlphaKR93
225708db0a more improve 2024-05-09 11:41:26 +09:00
AlphaKR93
6bb6091980 more easy fork 2024-05-09 08:24:34 +09:00
AlphaKR93
f0c635282d Fix API publish 2024-05-09 07:54:18 +09:00
github-actions[bot]
14981765c5 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@f9258cd: fix bows shooting infinite arrows
2024-05-08 08:19:09 +00:00
github-actions[bot]
386d064269 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@3239393: add config for startup commands
2024-05-08 03:51:20 +00:00
github-actions[bot]
6123e40664 Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@117ed5f: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@eee55d0: Correctly compare holders in BeaconMenu (#10673)
2024-05-08 02:06:33 +00:00
Alpha
b5e0e31e3e Update Paperweight
Signed-off-by: Alpha <dev@alpha93.kr>
2024-05-07 23:30:54 +09:00
AlphaKR93
0a8bd76ac3 Fix build 2024-05-07 23:10:01 +09:00
AlphaKR93
e88cac21e4 cleanups 2024-05-07 22:54:00 +09:00
AlphaKR93
040724b445 easy fork 2024-05-07 22:47:32 +09:00
github-actions[bot]
531a3bbe3e Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@e1a0fc3: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@9e51f94: Fix ping event always receiving protocol version 0 (#10671)
PaperMC/Paper@89ad61f: Fix hopper pull event being skipped after the first call (#10667)
2024-05-07 13:18:10 +00:00
github-actions[bot]
dd781d2610 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@a398e71: add option to make ravagers afraid of rabbits
2024-05-07 12:23:17 +00:00
github-actions[bot]
4810a20e50 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]
PurpurMC/Purpur@61e91ba: re-add sign and book color code patches
2024-05-07 11:33:09 +00:00
AlphaKR93
fac51e8b64 Some tweaks 2024-05-06 20:44:16 +09:00
AlphaKR93
1cd33a9a1d Add some info messages 2024-05-06 15:33:44 +09:00
AlphaKR93
b4737f1a07 Apply more rebrand 2024-05-06 15:24:07 +09:00
AlphaKR93
ab38e33809 Updated Upstream (Paper, Purpur)
[Purpur Changes]
PurpurMC/Purpur@7a63a45: [ci-skip] fix adventure dependency in dev bundle
PurpurMC/Purpur@44858f5: Updated Upstream (Paper)
PurpurMC/Purpur@bbb0457: Updated Upstream (Paper)
PurpurMC/Purpur@d3971ad: Updated Upstream (Paper)

[Paper Changes]
PaperMC/Paper@156675c: Fix lodestone compass target conversion
PaperMC/Paper@5632210: add RegistryAccess for managing registries (#10154)
PaperMC/Paper@6fcca46: Add missing step in V3818
PaperMC/Paper@7401313: fix shear drops for wolf and bogged
PaperMC/Paper@7ae2c67: Keep components using single items in creative (#10664)
PaperMC/Paper@b13c7db: Add missing experimental field and annotations (#10653)
PaperMC/Paper@9d8d38d: Updated Upstream (CraftBukkit) (#10646)
PaperMC/Paper@0e43d3c: Added API to get player's proxy address (#10400)
PaperMC/Paper@54c5ecb: Add missing SpigotConfig logCommands check (#10659)
PaperMC/Paper@816ea9e: [ci skip] Update old particle reference in javadoc (#10652)
PaperMC/Paper@716dfd8: Fix EntityLoadCrossbowEvent (#10645)
PaperMC/Paper@21d91ce: Prevent profile lookups when unnecessary (#10651)
PaperMC/Paper@2a6a5fe: Add a way to check whether the chest is blocked (#10635)
PaperMC/Paper@ac3a547: Fix BlockStateMeta (#10647)
2024-05-06 15:11:20 +09:00
AlphaKR93
71243ee5e6 Readd FreedomChat 2024-05-06 15:05:18 +09:00
AlphaKR93
90e0b1b857 Async Path Process 2024-05-06 13:44:12 +09:00
AlphaKR93
71e7a6f43f some fixes 2024-05-05 20:11:34 +09:00
AlphaKR93
c655047139 fix build 2024-05-05 10:33:28 +09:00
AlphaKR93
ce17ed2020 Fix global configuration, Complete SparklyPaper porting (closes #73) 2024-05-05 09:15:29 +09:00
AlphaKR93
e765830ef2 More SparklyPaper patches 2024-05-05 00:13:31 +09:00
AlphaKR93
a21f3bab8a #73 - 2 Patches remain 2024-05-04 22:42:27 +09:00
AlphaKR93
491c491ba6 Updated Upstream (Paper, Purpur) 2024-05-04 18:13:25 +09:00
AlphaKR93
4815251655 1.20.6 2024-05-04 17:41:34 +09:00
AlphaKR93
4fc2eec8b7 fix compile 2024-05-04 17:29:16 +09:00
AlphaKR93
39a32b7ea3 done. 2024-05-04 17:13:01 +09:00
AlphaKR93
5b5d1c1281 30/37 2024-05-04 17:07:01 +09:00
AlphaKR93
aede6b2591 20/37 2024-05-04 16:50:58 +09:00
AlphaKR93
d526550c66 work 2024-05-03 21:51:38 +09:00
AlphaKR93
8e50bc4b0c aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2024-05-03 17:12:08 +09:00
AlphaKR93
e25871e11c 10/37 2024-05-01 21:02:18 +09:00
AlphaKR93
75f1875e4b Reduce allocations 2024-05-01 19:34:01 +09:00
AlphaKR93
f495171031 work 2024-05-01 13:18:20 +09:00
AlphaKR93
9b1303d849 API patches done 2024-04-30 23:49:03 +09:00
AlphaKR93
cee005f2b9 work 2024-04-30 23:18:39 +09:00
AlphaKR93
6b4bc276a0 initial work 2024-04-30 15:24:46 +09:00
Alpha
39728823f0 Final 1.20.4 Update (#97) 2024-04-29 15:43:49 +09:00
Alpha
a479b3e02f [ci-skip] Now stable
Signed-off-by: Alpha <dev@alpha93.kr>
2024-03-19 17:54:49 +09:00
github-actions[bot]
e4ca876d98 Updated Upstream (Paper, Purpur)
Upstream has released updates that appear to apply and compile correctly

[Purpur Changes]PurpurMC/Purpur@d80fbed: port PaperMC/Paper#10285

[Paper Changes]PaperMC/Paper@850b736: Close PRs opened from orgs or bot accounts (#10281)
2024-03-03 01:02:28 +00:00
Alpha
38c2cfa282 [ci skip] Add MojangAPI patch 2024-02-27 18:38:09 +09:00
Alpha
3852ef88c4 Make configurations more extendable 2024-02-25 17:26:00 +09:00
Alpha
03821dffe9 Fix #90 2024-02-25 14:24:32 +09:00
Alpha
02143d8487 Updated Upstream (Paper, Purpur) 2024-02-25 13:00:05 +09:00
AlphaKR93
83e396bde6 Fix Purpur Upstream 2024-01-27 17:26:06 +09:00
AlphaKR93
bdc88bc21f Clear compare file when update Paper 2024-01-27 17:20:59 +09:00
AlphaKR93
2a7f161519 Improve AlwaysUpToDate 2024-01-27 16:51:48 +09:00
AlphaKR93
1338975cb7 Fix API version 2024-01-26 18:08:33 +09:00
Alpha
07d5d1a905 Fix
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-26 15:52:00 +09:00
AlphaKR93
1c4ffc2a14 Fix version fetching 2024-01-26 15:35:32 +09:00
Alpha
e20a613029 Update Javadocs release token
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-26 14:33:01 +09:00
AlphaKR93
fca7f237b6 Updated Upstream (Paper, Purpur) 2024-01-26 14:12:13 +09:00
AlphaKR93
1a296539b9 I forgot to add the configuration file 💀 2024-01-25 17:21:01 +09:00
AlphaKR93
8170f1f246 Port some SparklyPaper patches 2024-01-25 17:15:45 +09:00
AlphaKR93
e12e3db7ef Oops 2024-01-25 16:10:43 +09:00
AlphaKR93
04203941c1 Updated Upstream (Paper) 2024-01-25 16:00:44 +09:00
AlphaKR93
33db373ae2 Fix metrics 2024-01-25 15:43:55 +09:00
Alpha
67b1959f31 Change Javadocs release system
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-23 17:41:14 +09:00
Alpha
f16785b526 Change Javadocs Release
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-23 17:26:13 +09:00
Alpha
d9b45e9b07 :trollface:
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-23 17:21:03 +09:00
AlphaKR93
9d97d0d9bd Fix package publishing 2024-01-23 16:53:25 +09:00
AlphaKR93
71c863456f Update Upstream (Paper, Purpur) 2024-01-23 16:02:54 +09:00
AlphaKR93
c33c06589f Update Upstream (Paper, Purpur) 2024-01-23 15:53:06 +09:00
Alpha
ec6ce69526 I forgor 💀
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-20 00:35:20 +09:00
Alpha
9686a72d0d Update gradle.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-20 00:22:24 +09:00
AlphaKR93
90de54692c I accidentally broke the patch 💀 2024-01-20 00:10:04 +09:00
Alpha
9a288453bc Update README.md
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-19 20:46:12 +09:00
AlphaKR93
db8e9122cb it builds!!! 2024-01-19 20:45:37 +09:00
AlphaKR93
63bd308315 Complete patches 2024-01-19 19:42:52 +09:00
AlphaKR93
707c138318 bump 2024-01-18 23:29:09 +09:00
AlphaKR93
bcb9a051af API, Generated API Patches done 2024-01-18 23:16:05 +09:00
AlphaKR93
2e182c5aaa Fix build, again 2024-01-18 19:42:16 +09:00
AlphaKR93
62fab39558 Fix load player on online mode 2024-01-18 19:13:39 +09:00
Alpha
0309438d9f Add Upstream updaters in buildscript (#78)
* Use libs.versions.toml

* Use libs.versions.toml

* Add update upstream tasks

* Some cleanup
2024-01-18 18:22:48 +09:00
Alpha
e071249ed1 Cleanup (ver/1.20.2) (#77)
* Cleanup README.md

Signed-off-by: Alpha <dev@alpha93.kr>

* what

Signed-off-by: Alpha <dev@alpha93.kr>

* Remove unused files

---------

Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-15 18:48:48 +09:00
AlphaKR93
d4cbc57b49 oops 2024-01-11 18:11:39 +09:00
AlphaKR93
dc0856ca65 [CI-Skip] Cleanup patches 2024-01-11 18:10:40 +09:00
AlphaKR93
b009259293 Async PathProcessing 2024-01-11 18:07:18 +09:00
AlphaKR93
2008ba2d54 Fix build, again 2024-01-11 00:15:26 +09:00
AlphaKR93
fad453c120 Fix build 2024-01-11 00:09:25 +09:00
AlphaKR93
7b62b795ae More rebranding 2024-01-10 23:56:47 +09:00
AlphaKR93
e5292079fb Add option to disable startup warning 2024-01-10 18:23:20 +09:00
AlphaKR93
e9b2902304 Fix workflow 2024-01-10 18:18:56 +09:00
AlphaKR93
1b3cb0dc53 Add some optimizations 2024-01-10 18:14:57 +09:00
Alpha
d1572993db Improve Release script
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-10 14:53:52 +09:00
Alpha
1474b31ba5 [CI-Skip] Improve Gradle test action
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-10 14:51:38 +09:00
Alpha
11c340c828 [CI-Skip] [CheckSkip] Fix download lInk
Signed-off-by: Alpha <dev@alpha93.kr>
2024-01-10 14:46:04 +09:00
AlphaKR93
9502ebf684 Reduce allocations 2024-01-10 13:20:08 +09:00
Alpha
96ef8b9e4d Change JDK version
Signed-off-by: Alpha <dev@alpha93.kr>
2023-12-30 18:54:48 +09:00
Alpha
9889ed9b5b Update build.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2023-12-09 15:49:36 +09:00
Alpha
db9b36463c Update build.yml
Signed-off-by: Alpha <dev@alpha93.kr>
2023-12-09 15:44:26 +09:00
Alpha
1764af50d7 Fix workflow
Signed-off-by: Alpha <dev@alpha93.kr>
2023-12-09 12:59:07 +09:00
Alpha
922c33171c Rewrite Configuration (#60)
* work

* work

* more work

* complete configuration base

* More work

* more work

* Configurable cave lava sea level, Fix MC-237017

* more more more work

* Updated Upstream (Paper, Pufferfish, Purpur)

* Rework, again

* Cleanup workflows, fix build

* typo

* more work

* more work

- Updated Upstream (Paper)
- [CI-Skip] Update Upstream CacheData (Pufferfish, Purpur)
- Update Dependencies (Paperweight)
- Fix build
- Update Wrapper

* more works

* more more works

* Fix build

* Fix test

* Implemented FixMySpawnR, Added more config optimize

* Fix build
2023-12-09 11:22:36 +09:00
github-actions[bot]
3c625b1141 [CI-Skip] Updated Dependencies ()
Dependency has released updates that appear to apply and compile correctly
2023-11-09 19:47:37 +00:00
Alpha
fa6429f5b6 [CI-Skip] Improve README.md
Signed-off-by: Alpha <dev@alpha93.kr>
2023-10-26 11:21:04 +09:00
github-actions[bot]
ddc4aeedc0 [CI-Skip] Updated Dependencies (Wrapper)
Dependency has released updates that appear to apply and compile correctly

Wrapper Changes:
gradle/gradle@6391363 Merge pull request #26166 docs: Update documentation to reflect actual plugin behavior
gradle/gradle@9030bdf Merge pull request #26172 Fix scheduling of finalizers after last finalized task
gradle/gradle@92be687 Merge pull request #26080 Fix always ignored tests
gradle/gradle@dbf63af Merge pull request #26171 Disable another shellcheck related to `ulimit` command
gradle/gradle@5d2baec Fix failing kotlin-dsl-tooling-builder
gradle/gradle@a84a3c4 Apply review comments for auto-discover of UpgradedProperty
gradle/gradle@d904025 Bump CC report to 1.3
gradle/gradle@d92f591 Update verification metadata
gradle/gradle@ac5d11f Merge pull request #26165 Auto-discover classes with UpgradedProperty annotation
gradle/gradle@a187850 Migrate some JVM language projects to JVM platform
gradle/gradle@a7e4e0c Remove unnecessary project entries from CODEOWNERS
gradle/gradle@975ecb5 Merge pull request #26187 Migrate some JVM language projects to JVM platform
gradle/gradle@6f04ab3 Refactor variant selection failure handing to route failures through a processor class
gradle/gradle@d5b6949 Refactor configuration selection failure exception hierarchy
gradle/gradle@548a400 Add documentation and rename type for clarity and consistency
gradle/gradle@84cf08b Route configuration selection failures through the failure processor as well
gradle/gradle@74db2fc Route no matching capabilities exception through the failure handler
gradle/gradle@7f25dc1 Clean test problems utility
gradle/gradle@4ba9786 Update imports to match new location
gradle/gradle@b0a3c26 Remove dead code and revert unnecessary changes from code review
gradle/gradle@e46cc5f Delete unused imports
gradle/gradle@25e2266 Commenting out usage of Problems API for now
gradle/gradle@dcabd52 Replace interface with static util class
gradle/gradle@dfd373b Merge pull request #26168 Refactor variant selection failure handing to route failures through a handler class
gradle/gradle@db7726d Moves tests for the groovy compiler toolchains into the language-groovy project
gradle/gradle@b1bc3f3 Merge pull request #26186 Moves test for the groovy compiler toolchains into the language-groovy project
gradle/gradle@265d7c3 Allow variant reselection to reselect variants referenced by dependencies with artifacts
gradle/gradle@91ceb6d Add integ test for new functionality
gradle/gradle@cc89d78 Attempt to tune for performance
gradle/gradle@5b16c11 Attempt to futher improve performance by reducing allocations
gradle/gradle@cdfa506 Fail when attempting to reselect variant with explicitly declared artifact
gradle/gradle@51d9f2c Add test to verify artifact tasks are not resolved if artifacts are not selected
gradle/gradle@62a0360 Resolve review comments
gradle/gradle@1aa4040 Make test CC compatible
gradle/gradle@b6ccddc Do not throw exception when explicit artifact dependencies are reselected
gradle/gradle@49ef618 Remove lenient from test since it is not necessary
gradle/gradle@f017f2b Add tests to verify existing root component behavior
gradle/gradle@aa879c9 Apply review comment fixes
gradle/gradle@d6ada79 Do not manually implement dyanmic Groovy support for ScriptHandler. Let code generation do it
gradle/gradle@94e1a4d Merge pull request #26003 Add tests to verify existing root component behavior
gradle/gradle@9c252a3 Merge pull request #25515 Allow variant reselection to reselect variants referenced by dependencies with artifacts
gradle/gradle@24f5059 Merge pull request #26193 Fix failing kotlin-dsl-tooling-builder
gradle/gradle@b9c6f6a issues/25044: fix Instrumented.filesReadString(Path, String)
gradle/gradle@06bba76 Rebaseline performance test
gradle/gradle@faba00f Merge pull request #26117 Fix file content reading within zip archive
gradle/gradle@2c8d549 Format deprecation entries in build operation trace
gradle/gradle@0c72142 Merge pull request #26101 Format deprecation entries in build operation trace
gradle/gradle@28d4baf Fix dependency verification metadata
gradle/gradle@fab4b5f Merge branch 'master' into issue-24575
gradle/gradle@4b96963 Make Isolated Projects setting part of the CC key
gradle/gradle@ef732e8 Migrate integration tests for language-groovy to new home in platforms
gradle/gradle@1b052f8 Remove unused import
gradle/gradle@392566d Merge pull request #26194 Bump Configuration Cache report to 1.3
gradle/gradle@19cf1a1 Extend AnnotationProcessorFixture for use with "*" annotation type
gradle/gradle@b880466 Add test demonstrating the issue
gradle/gradle@786f84a Filter ModuleElement top level elements instead of taking a 'null' value
gradle/gradle@afa625b Test that involves Java Modules needs Java 9+
gradle/gradle@9f4ddea Add integ test for closure-based listeners in AbstractTestTask
gradle/gradle@de1752d Merge pull request #26205 Migrate integration tests for language-groovy to new home in platforms
gradle/gradle@1110e93 Clean up performance build directory at the beginning
gradle/gradle@e83fa0c Merge pull request #24592 Make scheduled executor service tasks robust against exceptions (#24575)
gradle/gradle@4161732 Merge pull request #26213 Clean up performance build directory at the beginning
gradle/gradle@24c59a1 Merge pull request #25644 Fix NPE in incremental compilation of projects with '*' annotation processor and 'module-info.java'
gradle/gradle@bfe8ccb Update foojay plugin version to 0.7.0
gradle/gradle@620bcf8 Update verification metadata
gradle/gradle@4d69f7b Revert "Update verification metadata"
gradle/gradle@1e95017 Beanify `DocLink`, so Kotlin/Groovy would use property accessors for them.
gradle/gradle@e512d34 Remove AGP 8.2.0-dev from test versions
gradle/gradle@e040897 Merge pull request #26184 Update foojay plugin version to 0.7.0
gradle/gradle@a390d39 Merge pull request #26216 Remove AGP 8.2.0-dev from test versions
gradle/gradle@937836a Cache default PgpSignatory when in-memory signing is used
gradle/gradle@96b18af Merge pull request #26210 Add integ test for closure-based listeners in AbstractTestTask
gradle/gradle@6275668 Don't fail TestLauncher execution when only tasks are configured
gradle/gradle@052634e Fix tests
gradle/gradle@eb89a9d Add a test for CC key equality depending on the Isolated Projects option
gradle/gradle@9ed6643 Add a javadoc to the CC start parameter
gradle/gradle@e4f9cd8 Merge pull request #26215 Beanify `DocLink`, so Kotlin/Groovy would use property accessors
gradle/gradle@6cbd12c Merge pull request #26204 Make Isolated Projects setting part of the Configuration Cache key
gradle/gradle@6293239 "Method can be static" inspection should be a weak warning in IntelliJ
gradle/gradle@399ccbc Print daemon log if it's not parse-able
gradle/gradle@5798918 Fix a typo in file permissions javadoc
gradle/gradle@c03e83f Merge pull request #26232 Fix a typo in file permissions javadoc
gradle/gradle@f525eb4 Make BuildLauncher and TestLauncher behavior more uniform
gradle/gradle@da3b134 Merge pull request #26230 from gradle/lptr/intellij/make-static-inspection-less-severe
gradle/gradle@5d56618 Merge pull request #24520 Don't fail TestLauncher execution when only tasks are configured
gradle/gradle@5019cf4 Initial spike of JDK 21 support
gradle/gradle@2716d33 Fix JavaVersionSpec
gradle/gradle@571df38 Update Scala cross-compile test
gradle/gradle@9ee92b9 Update test bucket json
gradle/gradle@c20204d Add 21 to JavaClassUtilTest
gradle/gradle@5b3ff6f Update Groovy 4 version for 21
gradle/gradle@91f6904 Revert change to KotlinTestFixturesIntegrationTest
gradle/gradle@a5f1aed Use java toolchain in generated convention plugin
gradle/gradle@a606fa6 Add test to verify toolchains are used in convention
gradle/gradle@ef6a429 Remove `@IgnoreIf`
gradle/gradle@d4fd9ab Merge pull request #26192 Remove `@IgnoreIf`
gradle/gradle@83c092e Merge pull request #26246 Update test bucket json
gradle/gradle@77e8234 Merge pull request #26231 Print daemon log if it's not parse-able
gradle/gradle@2ff00a5 Merge pull request #26200 Make BuildLauncher and TestLauncher behavior more uniform
gradle/gradle@a939d6c Locate java toolchain tests in language-java project
gradle/gradle@10608c2 Bump Kotlin to 1.9.10
gradle/gradle@103e642 Fix update versions tasks
gradle/gradle@c178d77 Update kotlin-dsl version
gradle/gradle@b913550 Update CC docs so EAR shows as compatible
gradle/gradle@3e9d4e6 Merge pull request #26259 Update CC docs so EAR shows as compatible
gradle/gradle@6356a4a Merge pull request #26254 Locate java toolchain tests in language-java project
gradle/gradle@7827a61 Merge pull request #26237 Bump Kotlin to 1.9.10
gradle/gradle@2eb3186 Re-ignore failing native test on macOS
gradle/gradle@b734d19 Merge pull request #26260 Re-ignore failing native test on macOS
gradle/gradle@4f4e22d Update wrapper with recent nightly
gradle/gradle@1fd0b63 Merge pull request #26262 Update wrapper with recent nightly
gradle/gradle@8711488 Use isolated daemons in AbstractCompilerContinuousIntegrationTest
gradle/gradle@14a5248 Merge commit '1fd0b632a437ae771718982ef2aa1c3b52ee2f0f' into release
gradle/gradle@76102ac Disable trace file for TD
gradle/gradle@81283b7 Merge pull request #26264 Use isolated daemons in AbstractCompilerContinuousIntegrationTest
gradle/gradle@cb8fc83 Fix hanging `JavaProcessStackTracesMonitor` issue
gradle/gradle@1556882 Bump IVY version and adapt the code
gradle/gradle@2cc3977 Fix incorrect storage of extra info
gradle/gradle@2e14287 Replace serialization with DataInputStream
gradle/gradle@f329b9a Fix failing tests
gradle/gradle@38aa64a Make lenient copy of Ivy helper
gradle/gradle@e9227a7 Bump Ivy version further, clean up revert some verification changes
gradle/gradle@4ed14a7 Fix closure control flow tracking when closure calls throw exceptions
gradle/gradle@b221b79 Improve readability of instrumentation code for closure exceptions and the test
gradle/gradle@53d49e1 Add documentation to utility class
gradle/gradle@e2c5e7e Introduce `Path.takeFirstSegments`
gradle/gradle@04c9749 Introduce `TestLauncherCompositeBuildCrossVersionTest`
gradle/gradle@0a467e3 Adjust `TestLauncherCompositeBuildCrossVersionTest`
gradle/gradle@c684bed Let `TestLauncher` correctly find and configure included builds
gradle/gradle@4be993e Adjust `TestLauncherCompositeBuildCrossVersionTest`
gradle/gradle@8f6f4e8 Merge pull request #24506 Use java toolchain in generated convention plugin
gradle/gradle@4326d59 Polish `DefaultBuildLifecycleController`
gradle/gradle@01b9fbc Ensure `TestLauncher` can run tests from an included build subproject
gradle/gradle@2e1beea Merge pull request #26214 Add JDK 21 compiling and testing support
gradle/gradle@5f81c11 Add newer Java versions to cross-compile test
gradle/gradle@1947877 Merge pull request #26279 Fix hanging `JavaProcessStackTracesMonitor` issue
gradle/gradle@fa9f4eb Merge pull request #26220 Cache default PgpSignatory when in-memory signing is used
gradle/gradle@e9746a1 Improve TODO message a bit
gradle/gradle@d6b7e15 Replace TODO with an issue link
gradle/gradle@f53a469 Move `TestLauncherCompositeBuildCrossVersionTest` to `r84` package
gradle/gradle@61f91c4 Polish `ConfigurationCacheState`
gradle/gradle@7ed8d86 Merge pull request #26243 Let `TestLauncher` correctly find and configure tasks from included builds
gradle/gradle@a0d10e7 Merge pull request #26295 Cherry-pick #26207 Fix closure control flow tracking when closure calls throw exceptions
gradle/gradle@5b05191 Merge pull request #26291 Add newer Java versions to cross-compile test
gradle/gradle@2675622 Improve deprecated configuration role warning URL
gradle/gradle@329382c Merge pull request #26150 Bump IVY version and adapt the code
gradle/gradle@e8b3e67 Update versions of smoke tested plugins
gradle/gradle@c363b85 Merge pull request #26275 Update versions of smoke tested plugins
gradle/gradle@554ae52 Revise wording based on review
gradle/gradle@253a519 Merge pull request #26304 Improve deprecated configuration role warning URL
gradle/gradle@3a4bb33 Iterate through attribute keys added by attributeProvider in insertion order
gradle/gradle@f0bb13e Add test that reproduces similar behavior as #26298
gradle/gradle@6155cbb Allow attribute values to cause the realization of other attribute values
gradle/gradle@0afdf33 Do not allow Providers of attribute values to add new attributes to the container
gradle/gradle@c4d82b5 Fix missing spread operator on wrapped call to files(Object...) in Kotlin scripts
gradle/gradle@fe37524 Revise tests based on feedback
gradle/gradle@1272f0f Merge pull request #26317 Fix missing spread operator on wrapped call to files(Object...) in Kotlin scripts
gradle/gradle@eb5aa20 Merge pull request #26315 Avoid side effect of evaluating Provider values in an attribute container causing the container to become inconsistent
gradle/gradle@cf29286 Fix CODEOWNERS for renamed Configuration Cache team
gradle/gradle@39223a2 Merge pull request #26326 Fix CODEOWNERS for CC team
gradle/gradle@255e5a4 Fix permissions for a file copied from symlink
gradle/gradle@bed09fb minor CopyPermissionsIntegrationTest reading improvements
gradle/gradle@7bbd5f0 Merge pull request #26273 Fix permissions for file copied from symlink
gradle/gradle@8acbb1b Remove release-specific information from TestKit documentation
gradle/gradle@f2ee3af Merge pull request #26331 Remove release-specific information from TestKit documentation
gradle/gradle@d48e817 Fix Gradle version in CC docs mentioning an inputs tracking change
gradle/gradle@3a00c9c Merge pull request #26335 (minor) Fix Gradle version in CC docs mentioning an inputs tracking change
gradle/gradle@eca0a92 Update to GE plugin 3.15
gradle/gradle@7654519 Fix sanityCheck
gradle/gradle@ca73763 Prepare release notes for 8.4 RC1
gradle/gradle@efa7fe9 Replace absolute link with a relative one
gradle/gradle@3fe2b62 Implement review changes
gradle/gradle@0d1bc90 Merge pull request #26364 Update to GE plugin 3.15
gradle/gradle@bbc9532 Remove incorrect incubating flag
gradle/gradle@ac4bc05 Add comment about property filter
gradle/gradle@f8eda9a Enable secure XML processing for Ivy descriptors
gradle/gradle@50ef055 Enable secure XML processing for Maven POM files
gradle/gradle@5930695 Enable secure XML processing for Maven toolchains.xml files
gradle/gradle@8c8bcfa Enable secure XML processing for Dependency Verification metadata files
gradle/gradle@6d85ddc Enable secure XML processing for XmlTransformer
gradle/gradle@127137b Extract all XML factories creation into XmlFactories
gradle/gradle@525a050 Add ArchUnit XmlFactoriesTest to prevent any new direct usage of XML factories
gradle/gradle@345ff6b Adjust XmlTransformerTest for not supporting external entities anymore
gradle/gradle@a45b6ba Add failure test case for Ivy descriptor with external entities
gradle/gradle@315ca74 Add failure test case for Maven POM with external entities
gradle/gradle@ef5601a Add failure test case for Maven toochains.xml with external entities
gradle/gradle@8570416 Add failure test case for Dependency Verification metadata file with external entities
gradle/gradle@3cd1376 Add failure test case for EAR descriptor DSL customized as DOM node with external entities
gradle/gradle@ffa4003 Mention EAR JEE 1.3 withXml { asElement() } potential breaking change in the upgrade guide
gradle/gradle@b7591e7 Apply improvements from Google Docs
gradle/gradle@cc15864 Merge pull request #26402 Enable secure processing of XML Files
gradle/gradle@ccc390e Update release features for 8.4
gradle/gradle@41be715 Update release notes following review
gradle/gradle@3e6f20d Merge pull request #26373 Prepare release notes for 8.4 RC1
gradle/gradle@3bb3217 Further release notes refinements
gradle/gradle@e338803 Do small renamings
gradle/gradle@af93d8f Do not warn about EAR plugin's incompatibility with CC on its doc page
gradle/gradle@f083e3a Add contributors to release notes
gradle/gradle@42422d2 Merge pull request #26432 Add 8.4 contributors to release notes
gradle/gradle@ebdfd04 Merge pull request #26431 Do not warn about EAR plugin's incompatibility with CC on its doc page
gradle/gradle@63c10ab Update wrapper after 8.4-rc-1 release
gradle/gradle@65e4a0b Merge pull request #26443 Update wrapper after 8.4-rc-1 release
gradle/gradle@63c3c2c Merge pull request #26411 Add build-level retry
gradle/gradle@9ae6124 Merge pull request #26444 Cherry-pick #26411 to release
gradle/gradle@78bb5db Increase docs distribution size limit
gradle/gradle@da3fe13 Merge pull request #26430 Rename a few elements of the Kotlin DSL Reference docs
gradle/gradle@bf04095 Add missing pattern for matching leaking java processes
gradle/gradle@c22e832 Update leaking Java process pattern and kill all Gradle processes when build is cancelled. (#26473)
gradle/gradle@32a53d4 Serialize `KotlinClosure*` instances to the configuration cache
gradle/gradle@430096d Merge pull request #26489 Serialize `KotlinClosure*` instances to the configuration cache
gradle/gradle@be0537c Add CLEAN_UP_PERFORMANCE_BUILD_DIR to performance test
gradle/gradle@f21cda2 Merge pull request #26497 Add CLEAN_UP_PERFORMANCE_BUILD_DIR to performance test
gradle/gradle@301d1cc Use `KillLeakingJavaProcesses` before performance tests
gradle/gradle@5f8dd10 Merge pull request #26450 Use `KillLeakingJavaProcesses` before performance tests
gradle/gradle@60e74c1 Add upgrade guide paragraph about XML failing parser configuration
gradle/gradle@b7d4565 Enhance XMLFactories error messages
gradle/gradle@ee868b7 Refine upgrade guide
gradle/gradle@3833711 Merge pull request #26508 Add upgrade guide paragraph about XML failing parser configuration
gradle/gradle@0890e9a Clarify configuration factory method release notes
gradle/gradle@21dd48a Merge pull request #26524 Clarify configuration factory method release notes
gradle/gradle@a90c31c Add missing coma in upgrade guide
gradle/gradle@f485d9f Update wrapper after 8.4-rc-2 release
gradle/gradle@af6859a Merge pull request #26545 Cobexer/release/wrapper update
gradle/gradle@a5870a2 Clean up version-control build dir on Windows
gradle/gradle@9caa7bf Ignore subproject directories that only have `build` subdirectories
gradle/gradle@db07f03 Update test bucket json
gradle/gradle@a743595 Update test bucket json
gradle/gradle@a555508 Merge pull request #26535 Refine upgrade guide
gradle/gradle@3a641a1 Restore deleted internal registerJvmLanguageSourceDirectory API
gradle/gradle@ce2e07c Restore integration test for registerJvmLanguageSourceDirectory
gradle/gradle@efa18f2 Merge pull request #26561 Restore deleted internal registerJvmLanguageSourceDirectory API
gradle/gradle@1383ade Merge pull request #26557 Refine KillLeakingJavaProcesses
gradle/gradle@b58d899 Merge pull request #26568 Cherry-pick #26557 to release
gradle/gradle@77b7b94 Release notes: Mention simpler property assignment in Kotlin dsl section
gradle/gradle@741c5dd Improve configuration role docs
gradle/gradle@c76bd3a Fix link to userguide to be relative
gradle/gradle@dabac9b Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@1af31be Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@1716aab Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@463c765 Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@dc67e5d Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@27fff57 Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@fc5dd80 Merge pull request #26574 Release notes: Mention simpler property assignment in Kotlin dsl section
gradle/gradle@f1698ef Minor polishing of the configuration roles
gradle/gradle@805b516 Add details to compiler daemon section
gradle/gradle@7788100 Merge pull request #26576 Improve configuration role section in release notes
gradle/gradle@a26c047 Update wrapper to 8.4 rc3
gradle/gradle@36fe0e3 Merge pull request #26592 Update wrapper to 8.4 rc3
gradle/gradle@adbcd27 Final 8.4 release notes
gradle/gradle@e9251e5 Merge pull request #26625 Final 8.4 release notes
2023-10-04 21:16:11 +00:00
github-actions[bot]
63c63f844e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@38376f4 Some jd fixes (#9781)
2023-10-01 01:22:03 +00:00
AlphaKR93
0f0f925cb8 [CI-Skip] fix release 2023-09-30 22:24:02 +09:00
AlphaKR93
c0273a9343 [CI-Skip] fix release 2023-09-30 22:20:20 +09:00
AlphaKR93
326a88dca5 More work (85% complete) 2023-09-30 22:18:58 +09:00
AlphaKR93
cb3099170e Fix build 2023-09-30 21:32:12 +09:00
github-actions[bot]
a2120f0c82 Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@4cdbb0c Updated Upstream (Bukkit/CraftBukkit/Spigot)
PaperMC/Paper@0f69290 [ci skip] Fix typo (important)
PaperMC/Paper@c4ba28a Don't throw when removing unplaced player in NearbyPlayers

Purpur Changes:
PlazmaMC/Purpur@46df92e clean up stored bee api
PlazmaMC/Purpur@9b8e853 Updated Upstream (Paper)
PlazmaMC/Purpur@93806cf work
PlazmaMC/Purpur@0bd9549 250/305 patches done
PlazmaMC/Purpur@b40ea92 All done
PlazmaMC/Purpur@c4502b9 Fix build
PlazmaMC/Purpur@5b3fc62 rebuild patches
PlazmaMC/Purpur@6a6706d Updated Upstream (Paper)
2023-09-30 09:56:06 +00:00
AlphaKR93
1c33d683c8 More patches 2023-09-29 21:15:02 +09:00
github-actions[bot]
ff30483d2c Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1765917 Fix creating the reverse map for loot table keys (#9766)
2023-09-28 23:55:41 +00:00
IPECTER 이팩터
3884819fff [CI-SKIP] Improve BiomeTemperatureCache
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-28 16:17:37 +09:00
AlphaKR93
41df279b8b Some improvements 2023-09-28 12:40:14 +09:00
AlphaKR93
8730a4d0a5 Fix build 2023-09-28 12:30:58 +09:00
AlphaKR93
c357668334 [CI-Skip] c o m m e n t 2023-09-28 12:24:49 +09:00
AlphaKR93
9cde439cce Implement No Chat Reports 2023-09-28 12:23:20 +09:00
github-actions[bot]
0290b04ffd [CI-Skip] Updated Dependencies ()
Dependency has released updates that appear to apply and compile correctly
2023-09-27 18:20:10 +00:00
AlphaKR93
d63b408e89 Fix build 2023-09-28 00:48:30 +09:00
AlphaKR93
5efc27e381 56% Complete 2023-09-27 22:36:12 +09:00
AlphaKR93
4042f69c8d more work 2023-09-27 19:04:39 +09:00
github-actions[bot]
617172ab6c Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PlazmaMC/Purpur@133a1cb let's begin
PlazmaMC/Purpur@81b8d32 update API
PlazmaMC/Purpur@60f73e4 first 50 patches done
PlazmaMC/Purpur@6230542 at 100 patches now
PlazmaMC/Purpur@87e5f45 200 patches
PlazmaMC/Purpur@e74f718 the rest of the patches
PlazmaMC/Purpur@e148391 it compiles! \o/
PlazmaMC/Purpur@cdea790 Updated Upstream (Paper)
PlazmaMC/Purpur@8a46226 please the scanJarForBadCalls task
PlazmaMC/Purpur@01e013b Updated Upstream (Paper)
PlazmaMC/Purpur@cb4586d Updated Upstream (Paper)
PlazmaMC/Purpur@e068628 Updated Upstream (Paper)
PlazmaMC/Purpur@fdadc8d [ci-skip] update foojay resolver convention plugin
PlazmaMC/Purpur@414fe5f work
PlazmaMC/Purpur@2379df3 250/305 patches done
PlazmaMC/Purpur@c90aa13 All done
PlazmaMC/Purpur@ec8f7d0 Fix build
PlazmaMC/Purpur@db6f54b rebuild patches
2023-09-27 09:47:49 +00:00
AlphaKR93
7737cd805a work 2023-09-27 18:17:43 +09:00
github-actions[bot]
4c26d69762 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@b0a7353 Updated Upstream (Paper)
PurpurMC/Purpur@fbedef8 Updated Upstream (Paper)
PurpurMC/Purpur@cc43efd Updated Upstream (Paper)
PurpurMC/Purpur@f6fd5f6 update paperweight to 1.5.7-SNAPSHOT
2023-09-23 10:30:38 +00:00
AlphaKR93
078fbd108c Updated Upstream (Paper)
temporary dropped bump dependencies patches for better patches
2023-09-23 19:12:25 +09:00
Alpha
318376a16f Update Dependencies (Paperweight)
Signed-off-by: Alpha <dev@alpha93.kr>
2023-09-23 14:24:31 +09:00
AlphaKR93
74c593fa04 Revert "[CI-Skip] Updated Dependencies (Paperweight)"
This reverts commit 017f695244.
2023-09-22 17:45:44 +09:00
IPECTER 이팩터
c6c048c34f Fix Incompat (Bump-Dependencies)
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-19 09:27:56 +09:00
github-actions[bot]
017f695244 [CI-Skip] Updated Dependencies (Paperweight)
Dependency has released updates that appear to apply and compile correctly

Paperweight Changes:
PaperMC/Paperweight@d3d7eec chore: Bump ASM & lorenz-tiny
PaperMC/Paperweight@972de2e Add task to scan generated code to make sure versions match
PaperMC/Paperweight@9f602b8 Fix license formats
PaperMC/Paperweight@92f922f support importing files from data/minecraft/ into the resources folder
PaperMC/Paperweight@33b8a1b add task to filter project dir
PaperMC/Paperweight@329b566 fix a couple issues after rebasing on main
PaperMC/Paperweight@a3033c6 fix license and style violations
PaperMC/Paperweight@ce9df1c account for inner classes
PaperMC/Paperweight@57566dd Remove commented code
PaperMC/Paperweight@3f6c7a5 Fix Gradle deprecation issue, buildSrc missing name
PaperMC/Paperweight@c2d4fcb fix FilterProjectDir vanillaJar input
PaperMC/Paperweight@de15167 Merge pull request #198 from Machine-Maker/fix/FilterProjectDir
PaperMC/Paperweight@28786b0 use ceilingEntry instead of higherEntry for line mappings
PaperMC/Paperweight@d23909c adjust ScanJar loggers
PaperMC/Paperweight@8faebd1 release: Version 1.5.6
2023-09-15 17:13:59 +00:00
github-actions[bot]
ecbebeb403 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@07b13f2 Updated Upstream (Paper)
2023-09-15 16:41:56 +00:00
github-actions[bot]
5bf8a8124e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@29d1c7b Call BlockRedstoneEvents for lecterns (#9721)
2023-09-14 21:34:34 +00:00
github-actions[bot]
3e35bff9a0 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@e68fd71 Add missing Piglin Dancing API (#8894)
PaperMC/Paper@6378792 Add Barrel to LootableBlockInventory (#9687)
PaperMC/Paper@7145f41 compression level change with config option (#9711)
2023-09-14 11:21:18 +00:00
github-actions[bot]
cb7a348e89 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@eea0c64 Swap some nullable annotations (#9696)
2023-09-14 10:57:08 +00:00
AlphaKR93
eea08a3ecd [CI-Skip] Update README.md 2023-09-14 19:05:23 +09:00
github-actions[bot]
b49ad3f336 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1c15111 Add missing particle javadocs (#9716)
2023-09-14 02:30:36 +00:00
github-actions[bot]
3ba3fe9814 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@7927f53 fix fire and lava immunity options, closes #1431
2023-09-13 23:19:35 +00:00
IPECTER 이팩터
2adeb25bff [CI-SKIP] Update README.md
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-13 22:03:13 +09:00
github-actions[bot]
c93e0ff16a Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@bd327ae Updated Upstream (Paper)
2023-09-12 02:03:04 +00:00
github-actions[bot]
5c5d10ae4e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@517f8fb Fix line of sight distance check
2023-09-12 01:10:01 +00:00
IPECTER 이팩터
057b293ed5 Update README.md
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-12 10:02:38 +09:00
github-actions[bot]
9c54aed53d Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@d527ade Updated Upstream (Paper)
2023-09-11 23:21:14 +00:00
github-actions[bot]
a637a72412 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@fb06829 Optimise multiple block updates occurring in the same chunk
2023-09-11 18:27:49 +00:00
IPECTER 이팩터
8f116cc067 [CI-SKIP] Update README.md
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-11 14:24:15 +09:00
github-actions[bot]
8b317976a9 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@c9cd94f Fix fixItemsMergingThroughWalls check (#9707)
2023-09-11 04:54:11 +00:00
IPECTER 이팩터
986a3f4598 Merge pull request #54 from RRS-9747/ver/1.20.1
Update README.md
2023-09-11 13:22:18 +09:00
IPECTER 이팩터
5671b24941 Update README.md
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-11 13:22:04 +09:00
RRS
59b163d8fa Update README.md
Signed-off-by: RRS <39312279+RRS-9747@users.noreply.github.com>
2023-09-11 09:21:07 +06:00
github-actions[bot]
67c03ea3ec Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@e2b1971 Add missing slot sanity checks for container clicks
2023-09-11 02:31:37 +00:00
github-actions[bot]
d8856b5127 Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@72e87ab Strip raytracing for EntityLiving#hasLineOfSight

Purpur Changes:
PurpurMC/Purpur@39bdf3d Updated Upstream (Paper)
2023-09-11 01:10:15 +00:00
github-actions[bot]
a76facf92e Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@39953cf Take in account waterlogged blocks for scaffolding (#9676)
PaperMC/Paper@471f4de Copy NBT in upgrade data neighbor ticks
PaperMC/Paper@33bec7f Copy NBT in legacy dragon fight converter

Purpur Changes:
PurpurMC/Purpur@042e192 Updated Upstream (Pufferfish)
PurpurMC/Purpur@617240e Updated Upstream (Paper)
PurpurMC/Purpur@671c31a Updated Upstream (Paper)
2023-09-09 16:34:13 +00:00
AlphaKR93
34162ce62e [CI-Skip] Updated Dependencies (Gradle Wrapper, Tiny Remapper)
Dependencies has released updates that appear to apply and compile correctly

Wrapper Changes:
gradle/gradle@38c68a8 Fix broken looking link to JavaCompile on Build Environment docs page
gradle/gradle@8355f2b Merge pull request #25584 Decouple ivy component from publication model
gradle/gradle@367ebe1 Merge pull request #25641 Merge release into master
gradle/gradle@b1c43d7 Merge pull request #25627 Enable persistent compiler daemons by default
gradle/gradle@d0178c7 Publish 8.2.1-20230707035526+0000
gradle/gradle@aa1331a Merge branch 'release'
gradle/gradle@c771bc8 Merge pull request #25652 Remove all unwanted occurrences of o.g.unsafe.c-c
gradle/gradle@8c74b96 Finalize 8.2.1 release notes
gradle/gradle@cd19513 Refine KotlinDslScriptsModelBuilder
gradle/gradle@00b6a12 Simplify KotlinBuildScriptModelCrossVersionSpec
gradle/gradle@fcd7167 Merge pull request #25656 Publish 8.2.1-20230707035526+0000
gradle/gradle@57a7981 Merge pull request #25657 Finalize 8.2.1 release notes
gradle/gradle@1eba6bf Merge pull request #25545 support environment variables for maven toolchain
gradle/gradle@6f08b76 Fix isolated projects settings event name
gradle/gradle@e4526e3 Remove redundant internal flags
gradle/gradle@591fed2 Fix notes
gradle/gradle@de05c6d Rename PI to IP
gradle/gradle@4eb9e18 Merge pull request #25619 Apply coarse locking on all projects to solve deprecation warning
gradle/gradle@3ea7b68 Adjust smoke tests for full GUtil nagging
gradle/gradle@37bcbc9 Fix naming: "Project Isolation" -> "Isolated Projects"
gradle/gradle@14f9ae8 Simplify parser debugging via delegated properties
gradle/gradle@9444cdb Remove unnecessary trimIndents
gradle/gradle@70ff803 Fix comments
gradle/gradle@ea47c27 Fix backward compatibility for task options where only negated option is set
gradle/gradle@05b7b89 Merge pull request #25664 Fix release notes
gradle/gradle@79713a7 Merge pull request #25653 Fix broken looking link to JavaCompile on Build Environment docs page
gradle/gradle@1b6632b Various gitstream updates
gradle/gradle@ffa3ac6 Polish directoryChildrenNamesHash a bit
gradle/gradle@95006a7 Merge pull request #25665 Fix backward compatibility for task options where only negated option is set
gradle/gradle@ae471bb Merge pull request #25667 Update gitstream automations for various requests
gradle/gradle@1098d82 Introduce a separate FilePropertyVisitor
gradle/gradle@29269be Clarify uniqueness of ExecuteWorkBuildOperationType.Details.getIdentity
gradle/gradle@cedb221 Remove duplication for fileProperties()
gradle/gradle@0d56d9a Merge pull request #25519 Erase annotations on top-level script blocks
gradle/gradle@b0bca5d Introduce a type to represent the state for a component that is used during graph resolution and that is specific to the graph being resolved.
gradle/gradle@1863bb6 Associate each component in the dependency graph with the correct repository, when there are identical repositories being used.
gradle/gradle@adf40ff Adjust `ResolveState` after cherry-pick
gradle/gradle@81de96d Adjust `DependencyGraphBuilderTest` after cherry pick
gradle/gradle@781f1f9 Merge pull request #25621 Move some project configuration at project creation time
gradle/gradle@7357719 Update percentage display in comment
gradle/gradle@edd6187 Recognize certain options as making workers unreliable on Windows
gradle/gradle@01c05ef Remove special exceptions for persistent compiler daemons on ForkCapableRelocation tests
gradle/gradle@86dd859 Use a no-op implementation of `IgnoredConfigurationInputs` when none are declared
gradle/gradle@ec5ed25 Minor code quality improvement in `DefaultIgnoredConfigurationInputs`
gradle/gradle@8460662 Refactor test to follow more idiomatic patterns
gradle/gradle@f2300ba Refactor JavaAgentFixture to be reusable in another test
gradle/gradle@2555426 Add test that checks that persistent compiler daemons are not reused on Windows
gradle/gradle@3ee9dc4 Merge pull request #25675 Cherry pick: Associate each component in the dependency graph with the correct repository in build operation results
gradle/gradle@4373bf4 Merge pull request #25637 Introduce build operations for artifact transform executions
gradle/gradle@544037d Merge pull request #25602 Add `ProjectIsolation` integration test executer
gradle/gradle@f6bc44f Merge pull request #25677 Update percentage display in comment
gradle/gradle@8f86b2f Merge pull request #25567 Disable GE plugin until 3.15 if Isolated Projects is enabled
gradle/gradle@5e8d7b6 Merge pull request #25598 Full nagging for deprecation of GUtil
gradle/gradle@3f1a329 Add upper bound for Groovy compile test
gradle/gradle@a7cb70f Merge pull request #24593 Make progress bar robust against excessive progress reports (#24576)
gradle/gradle@249b79d Add upper bound for Groovy compile test
gradle/gradle@46c72c4 Merge pull request #25510 Do not use VFS to snapshot results of File.list and the likes
gradle/gradle@a69f53d Revert accidental code change
gradle/gradle@a4de732 Merge pull request #24702 Disable embedded testing jetty server stop timeout
gradle/gradle@3484ff5 Revert accidental code change
gradle/gradle@1295bb8 Add upper bound for Scala compile test
gradle/gradle@d26520a Add upper bound for Scala compile test
gradle/gradle@e3bac92 Merge pull request #25662 Fix the name for Isolated Projects settings event
gradle/gradle@23f1813 Mark flaky CrossCompilationIntegrationTest
gradle/gradle@dcfaf64 Historical performance test timeout 2280 -> 600
gradle/gradle@d33fff2 Merge pull request #25683 Historical performance test timeout 2280 -> 600
gradle/gradle@0f2c742 Merge pull request #25682 Mark flaky CrossCompilationIntegrationTest
gradle/gradle@feccb02 Finalize 8.2.1 release notes
gradle/gradle@a38ec64 Merge pull request #25685 Finalize 8.2.1 release notes
gradle/gradle@8577cdb Merge pull request #25544 Add an option to ignore file-system-check inputs
gradle/gradle@4587ea3 Publish 8.2.1
gradle/gradle@48aa74f Merge pull request #25691 Publish 8.2.1
gradle/gradle@5f2a06b Merge branch 'release' into 'master'
gradle/gradle@3bcacda Upgrade wrapper to 8.2.1
gradle/gradle@3f9c93c Merge pull request #25692 Upgrade wrapper to 8.2.1
gradle/gradle@2479646 Merge pull request #25690 Merge release into master to clean up conflicts
gradle/gradle@66e5098 Fix and clean JacocoAggregationReportPlugin
gradle/gradle@0b87378 Fix checkstyle
gradle/gradle@5bd935c Restore direct application of reporting-base plugin
gradle/gradle@13db839 Update to a recent nightly wrapper
gradle/gradle@a27e07b Merge pull request #25695 Update to a recent nightly wrapper
gradle/gradle@5de2ec8 changes from Piotr 1:1 feedback
gradle/gradle@2539041 Improve the info message about dropping the keep alive to SESSION
gradle/gradle@7a46c66 Improve error when running snippet that requires --write-locks
gradle/gradle@5c99929 Merge commit 'a27e07bfad36b9017d91ac36cfd57298971109f2' into release
gradle/gradle@379ea59 Upgrade embedded Kotlin to 1.9.0
gradle/gradle@a6ccc93 Stop disabling compilation avoidance in `kotlin-dsl` projects
gradle/gradle@481bb22 Work around https://github.com/gradle/gradle/issues/25636 in tests
gradle/gradle@1dffc25 Temporarily ignore unit tests for binary compatibility check
gradle/gradle@bb64a2b Upgradlew with Kotlin 1.9.0 embedded
gradle/gradle@2495283 Revert "Temporarily ignore unit tests for binary compatibility check"
gradle/gradle@d37a0fa Fix unit tests for binary compat check
gradle/gradle@eb53986 Bump :kotlin-dsl-plugins version for Kotlin 1.9.0
gradle/gradle@5316af4 Bump :kotlin-dsl-plugins for next dev iteration
gradle/gradle@67ad926 Upgrade `kotlin-dsl` plugins
gradle/gradle@7fd9c67 Fix build script compilation warning
gradle/gradle@0a78399 Let init use Kotlin 1.9.0
gradle/gradle@0458527 Let JVM test suites use Kotlin 1.9.0 by default
gradle/gradle@7e3b292 Update documentation snippets to use Kotlin 1.9.0
gradle/gradle@1187d2c Smoke, integ and perf test Kotlin 1.9.0 instead of 1.9.0-RC
gradle/gradle@cca2d3b Update compatibility matrix and upgrading guide for Kotlin 1.9.0
gradle/gradle@8da00e4 Mention Kotlin 1.9.0 upgrade in release notes
gradle/gradle@fab3f2e Update wrapper for latest `kotlin-dsl` plugin
gradle/gradle@b59de80 Polish dependency verification metadata
gradle/gradle@aeaa6e0 Refine workaround for https://github.com/gradle/gradle/issues/25636
gradle/gradle@454a3ba Update subprojects/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/support/KotlinCompiler.kt
gradle/gradle@34e3c49 Upgradlew
gradle/gradle@bbd37f0 Refine workaround for https://github.com/gradle/gradle/issues/25636
gradle/gradle@58558a9 Merge pull request #25632 Upgrade embedded Kotlin to 1.9.0
gradle/gradle@4d258c6 Bump ASM version to 9.5
gradle/gradle@4babc50 Update plugins versions in smoke tests
gradle/gradle@cac0b61 Don't consider an annotation @ followed by whitespace or comments
gradle/gradle@0916df2 Remove org.artifactory.oss.docker plugin test because artifactory-oss is hosted only on bintray
gradle/gradle@f249688 Test that label definitions get ignored
gradle/gradle@78bb8c2 Skip annotation parsing inside blocks
gradle/gradle@c0693bd Simplify test
gradle/gradle@011c035 Move annotation erasure tests into separate class
gradle/gradle@d9cb9b2 Use companion object for static instance
gradle/gradle@c5bbcc6 Memoize simple token parsers
gradle/gradle@2f57c4e Move specific method out of generic code areas
gradle/gradle@bb6876d Merge pull request #25704 Update versions of smoke tested plugins
gradle/gradle@eba16f9 Upgradlew to latest non-branch release snapshot
gradle/gradle@7707a8d Extract unreliable JVM arguments into constants
gradle/gradle@a98cb25 Merge pull request #25715 Upgradlew to latest non-branch release snapshot
gradle/gradle@30225f9 Merge pull request #25654 Improve error when running snippet that requires --write-locks
gradle/gradle@2005b9d Better capture the behavior with the reused Java compiler daemons in a soak test
gradle/gradle@4ddbc84 Make startup failures from workers attach to the operation
gradle/gradle@fcfaefc Fix test names for failure messages
gradle/gradle@cdecd07 Fix bug with double-writing worker output
gradle/gradle@2dd1611 Rename operation ref field to be clearer
gradle/gradle@38a48b9 Keep operation around for non-worker execs
gradle/gradle@acefc04 Merge pull request #25639 Fix and clean JacocoAggregationReportPlugin
gradle/gradle@087c300 Merge pull request #25678 Recognize certain options as making workers unreliable on Windows
gradle/gradle@9c7946e Use a simpler set up for cleaning the op ref
gradle/gradle@3d72415 Account for non-deterministic output in failing JVM start
gradle/gradle@0f17c1b Merge pull request #25676 Make startup failures from workers attach to the operation
gradle/gradle@6d88447 Merge pull request #25710 Fix issues in lexing
gradle/gradle@a73c515 Merge pull request #25688 Erase annotations on top-level script blocks - final touches
gradle/gradle@56429c7 Add test dry run mode release notes
gradle/gradle@504a223 Merge pull request #25702 Add test dry run mode release notes
gradle/gradle@71019e7 Merge pull request #25708 Bump ASM version to 9.5
gradle/gradle@2dc7564 Add docs for the configuration input detection opt-out flags
gradle/gradle@ca9b586 Apply suggestions from code review
gradle/gradle@d97dbad Add an anchor link to the doc paragraph for referencing from the release notes
gradle/gradle@9ea9fa8 Adjust the CC input tracking opt-out docs for 8.3
gradle/gradle@4082707 Remove usage of project.buildDir from documentation
gradle/gradle@0d3cf30 Add upgrade entry about project.buildDir
gradle/gradle@45f92e3 Fix test and re-organize them
gradle/gradle@5c3201c Add minimum version to finalizer test
gradle/gradle@e796c80 Merge pull request #25672 Documentation updates following Project.buildDir deprecation
gradle/gradle@fd3977a update dist sizes
gradle/gradle@2eb8f9d Merge branch 'release' into lkasso/documentation/intro-tutorial
gradle/gradle@885b0c0 Apply suggestions from code review
gradle/gradle@2859de0 Merge pull request #25757 Add docs for the configuration input detection opt-out flags for Gradle 8.3
gradle/gradle@a847b8f Align name on IdentifyTransformExecutionProgressDetails
gradle/gradle@63b8436 Merge pull request #25763 Add minimum version to finalizer test
gradle/gradle@5c4238c Update the java compatibility table
gradle/gradle@cae0892 Merge pull request #25775 Alternate proposal for updating the Java compat table
gradle/gradle@4c3fd32 Merge pull request #25768 Align name on IdentifyTransformExecutionProgressDetails
gradle/gradle@b4496d2 Add contributors to Gradle 8.3
gradle/gradle@ab2029d Finalize release notes for 8.3 RC1
gradle/gradle@3adcfad Add release features for Gradle 8.3
gradle/gradle@d036e60 Merge pull request #25794 Finalize 8.3 release notes
gradle/gradle@8a8acc5 Update wrapper following 8.3-rc-1 release
gradle/gradle@5bcce93 Merge pull request #25817 Update wrapper following 8.3-rc-1 release
gradle/gradle@abe72c2 Fix grammar in release notes
gradle/gradle@63db320 Use custome checkout dir for BCNG
gradle/gradle@b3dc24c Merge pull request #25827 Use custom checkout dir for BCNG
gradle/gradle@d7fa311 Mark flaky WorkerExecutorParallelBuildOperationsIntegrationTest
gradle/gradle@c24297a Merge pull request #25821 Grammar in release notes is improved
gradle/gradle@6ed592d Don't keep compiler daemons alive on Windows
gradle/gradle@2555446 Update Gradle Enterprise Gradle plugin to v3.14
gradle/gradle@277715b Update comment with better wording
gradle/gradle@451e08f Skip RemotePreconditionProbingTest on non-remote executor
gradle/gradle@efb0c87 Merge pull request #25883 Cherry-pick "Skip RemotePreconditionProbingTest on non-remote executor" to release
gradle/gradle@6303632 Emit all deprecation stacktraces when requested
gradle/gradle@9647be7 Do not pass `--stacktrace` to performance tests
gradle/gradle@926eb5f Use warningMode to decide to capture stacks
gradle/gradle@fd1a708 Revert "Do not pass `--stacktrace` to performance tests"
gradle/gradle@b892fe1 Merge pull request #25879 Update Gradle Enterprise Gradle plugin to v3.14
gradle/gradle@2f8c92e Enable testing of JDK 20
gradle/gradle@977732c Use correct vendor for Java 20
gradle/gradle@d764e97 Use toolchains for compile tests to ensure 8 support
gradle/gradle@a3e09b7 Mark support for JDK 20 in 8.3+ in tests
gradle/gradle@437d72f Update scala for JDK 20 support
gradle/gradle@3d221c6 Fix Groovy compilation after failure test
gradle/gradle@16e2234 Remove sourceCompatibility setting for cross version tests
gradle/gradle@40d447e Ignore internal instrumentation test on JDK 20+
gradle/gradle@6d878a7 Add dynamic pom tests for source/target conversion
gradle/gradle@6ecdbe7 Rewrite dynamic maven conversion tests
gradle/gradle@0db795b Don't use toolchains for compiler tests
gradle/gradle@4aa5851 Only supply JDK 11 for 8-targeting tests
gradle/gradle@2f3589e Include 'maximum' in scala coverage version accessor
gradle/gradle@dc3f9bf Remove toolchains from incremental compile tests
gradle/gradle@9ab3ec5 Revert changes to command line Java compilation tests to use JDK 11 always
gradle/gradle@c11de03 Avoid running some Maven conversion tests on JDK8
gradle/gradle@6bb99dd Force test kit test to use local groovy version
gradle/gradle@0d01710 Fix failing worker test on Windows
gradle/gradle@c50261a Add DSL entry for ProviderFactory
gradle/gradle@eedf2e0 Merge pull request #25777 Verify support for running on Java 20
gradle/gradle@7eb3ef6 Merge pull request #25862 Don't keep compiler daemons alive on Windows
gradle/gradle@9652fec Increase memory for configCacheSantaTrackerSmokeTest
gradle/gradle@2db4e96 Merge pull request #25880 Emit all deprecation stacktraces for warning mode all or fail
gradle/gradle@9ec3ca9 Prefer KotlinGradlePluginVersions over hardcoded list in tests
gradle/gradle@0c33354 Add tests demonstrating using different Kotlin language versions
gradle/gradle@8ab6854 Add a note in the upgrading guide about Kotlin language compatibility
gradle/gradle@9477a9b Update links to ProviderFactory
gradle/gradle@fed6c97 Merge pull request #25902 Add ProviderFactory to Groovy DSL reference
gradle/gradle@043ff42 Polish release notes for 8.2 RC2
gradle/gradle@a232677 Merge pull request #25903 Polish release notes for 8.2 RC2
gradle/gradle@180692c Adjust Kotlin cross version tests for Java 20 coverage
gradle/gradle@563956a Merge pull request #25901 Document and test building for older Kotlin language versions
gradle/gradle@0e127cb Adapt Scala - Java compatibility
gradle/gradle@c48101d Merge pull request #25912 Adapt Scala - Java compatibility
gradle/gradle@9e38604 Update wrapper following 8.3-rc2 release
gradle/gradle@cf4656c Merge pull request #25922 Update wrapper following 8.3-rc2 release
gradle/gradle@a0a40d8 Change flaky deprecation warnings to "maybe"
gradle/gradle@df0208c Merge pull request #25930 Change flaky deprecation warnings to "maybe"
gradle/gradle@65c759c Fix regression in copy spec fileMode/dirMode mutation
gradle/gradle@8690bb4 Refreeze archunit tests for removed overrides
gradle/gradle@e149359 Add @Issue to regression test
gradle/gradle@ac60595 Merge pull request #25936 Fix regression in copy spec fileMode/dirMode mutation
gradle/gradle@841aebd Update Gradle Enterprise Gradle plugin to 3.14.1
gradle/gradle@b6d1932 Require daemon to avoid classpath conflicts when running with TD/PTS
gradle/gradle@6dcaebc Use same version of JUnit as GE Gradle plugin
gradle/gradle@de7027d Merge pull request #25965 Update Gradle Enterprise Gradle plugin to 3.14.1
gradle/gradle@09b79fc Change failing deprecation warnings to 'maybe'
gradle/gradle@77731a7 Merge pull request #25976 Change failing deprecation warnings to 'maybe'
gradle/gradle@3220514 Make cc debug profile name for fingerprints unique
gradle/gradle@5e5779c Merge pull request #25968 Fix configuration cache debug log for space usage analysis
gradle/gradle@34a9ec1 Adjust smoke tests for AGP usage of deprecated GUtil
gradle/gradle@6d3fc01 Merge pull request #25995 Adjust smoke tests for AGP usage of deprecated GUtil once per Gradle daemon
gradle/gradle@9f436d9 Update release notes for 8.3 RC3
gradle/gradle@5137ec0 Merge pull request #26001 Update release notes for 8.3 RC3
gradle/gradle@d58dc83 Update wrapper following 8.3 RC3 release
gradle/gradle@14defee Merge pull request #26005 Update wrapper following 8.3 RC3 release
gradle/gradle@a7e7d67 Adjust wording about CC in the "build performance" doc
gradle/gradle@5062dce Fix deprecation replacement for `Project.buildDir`
gradle/gradle@ad22f62 Merge pull request #26013 Fix deprecation replacement for `Project.buildDir`
gradle/gradle@0e80aad Merge pull request #26012 [Doc-only] Adjust wording about CC in the "build performance" doc
gradle/gradle@3d02c35 Allow nested beans from kotlinx package
gradle/gradle@7f7a751 Add more information why nested annotation is not allowed
gradle/gradle@3334e56 Fix ValidatePluginsIntegrationTest after nested validation changes
gradle/gradle@d770c43 Rename NestedValidationUtil.isSupportedType to getUnsupportedReason
gradle/gradle@45d5bd7 Merge pull request #26034 Allow nested types with kotlinx package
gradle/gradle@17e8e2e Update wrapper after 8.3-rc-4 release
gradle/gradle@0e6574f Merge pull request #26102 Update wrapper after 8.3-rc-4 release
gradle/gradle@2a2e36d Document Configuration attribute behavior in upgrade guide
gradle/gradle@e23ad31 Apply recommended grammar and formatting changes
gradle/gradle@8afbf24 Merge pull request #26109 Document Configuration attribute behavior in upgrade guide
2023-09-09 23:57:28 +09:00
AlphaKR93
eea18dca7c Fix #52, cleanup README.md 2023-09-09 22:42:57 +09:00
Alpha
f427c79af9 [CI-Skip] Update README.md 2023-09-09 22:21:46 +09:00
AlphaKR93
a3142d6319 change startup warning message 2023-09-09 22:04:50 +09:00
IPECTER 이팩터
3949e2feb5 Fix 2023-09-08 01:12:32 +09:00
IPECTER
514495bb90 Async PathProcessing (Default Disabled) 2023-09-08 00:58:06 +09:00
IPECTER 이팩터
60aa2f51c4 Merge pull request #51 from PlazmaMC/IPECTER-patch-1
Update 0006-Bump-Dependencies.patch
2023-09-07 20:11:59 +09:00
IPECTER 이팩터
ff191c4cca Update 0006-Bump-Dependencies.patch 2023-09-07 20:11:10 +09:00
IPECTER
8058507e4d Fix 2023-09-07 15:47:39 +09:00
IPECTER
ef2cf1d921 Fix Incompat with CoreProtect 2023-09-07 02:20:23 +09:00
IPECTER
e1445c2d7d Fix Optimize VarInts
Thank you, Martijn!
2023-09-07 00:54:18 +09:00
IPECTER 이팩터
8c84468144 Its work 2023-09-06 17:19:25 +09:00
IPECTER 이팩터
9e6a4071bb Hotfix? 2023-09-06 17:17:54 +09:00
IPECTER
567c2be31a Implement CarpetFixes Optimizations 2023-09-06 17:00:55 +09:00
IPECTER
37621427cf 1.20.1 2023-09-01 02:13:54 +09:00
IPECTER
8a64698c4e Updated Upstream (Paper & Pufferfish & Purpur) 2023-06-19 16:11:00 +09:00
IPECTER
acf6e2df01 Fix FerriteCore Port Mistake
slow-chunk-load bug may be fixed
2023-06-17 20:22:09 +09:00
github-actions[bot]
1f0f3fe45f Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@956062a Add transient modifiers (#9244)
2023-06-05 17:33:49 +00:00
github-actions[bot]
9237ea8410 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@561164b Updated Upstream (Pufferfish)
2023-06-04 07:55:19 +00:00
github-actions[bot]
e622c64617 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@6d7bb23 Updated Upstream (Paper)
2023-06-04 07:38:42 +00:00
github-actions[bot]
6ddb56dde7 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@d8d3bd7 [ci skip] Add missing deprecations for legacy MaterialData api (#9253)
2023-06-03 18:24:47 +00:00
github-actions[bot]
d598e114a6 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@8a18fc5 [ci skip] add 'needs triage' label to invalid on issue close (#9252)
2023-06-03 17:53:46 +00:00
github-actions[bot]
f6a1d5825f Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@bacbf86 Fixes and additions to projectile API (#9237)
2023-06-01 03:19:41 +00:00
github-actions[bot]
0c997c2e0c Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@2eda177 Expand PlayerItemMendEvent (#7382)
2023-06-01 02:06:55 +00:00
github-actions[bot]
8c336c7e8e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@ea0b639 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9228)
2023-05-31 23:54:14 +00:00
github-actions[bot]
af9f9f76f3 Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@0f91091 Re-implement the compost events (#9192)
PaperMC/Paper@fa8fa1c Fix playing adventure sounds on World/Server (#8077)

Purpur Changes:
PurpurMC/Purpur@d6cfa8f Updated Upstream (Paper)
2023-05-31 12:53:42 +00:00
IPECTER
ed191511cf [CI-SKIP] oh mistake folder :) 2023-05-30 17:14:22 +09:00
IPECTER
f0e1e58914 Reduce allocations
removed all array allocations except two!
2023-05-30 16:35:02 +09:00
github-actions[bot]
6bf0230eb6 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@f9f9079 Pull a few Folia patches
2023-05-27 18:56:30 +00:00
github-actions[bot]
11623bf432 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@90a0835 Fix incremental player saving patch
2023-05-27 18:26:38 +00:00
IPECTER
23e724232e Implemented Let Me Despawn 2023-05-18 16:57:32 +09:00
github-actions[bot]
4193f4b1aa Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@84da848 Updated Upstream (Paper)
PurpurMC/Purpur@3325421 Updated Upstream (Paper)
PurpurMC/Purpur@2ae3be3 use component directly for player list name
PurpurMC/Purpur@74ed018 re-add GUI patch
PurpurMC/Purpur@6319570 sorry, but this really annoys me :3 (#1327)
PurpurMC/Purpur@b842229 reorder spark loader logic to fix a few issues (#1326)
PurpurMC/Purpur@3b02c04 Updated Upstream (Paper)
PurpurMC/Purpur@68117a4 add portal-wait-time options for player
2023-05-17 05:50:04 +00:00
IPECTER
bb4a0d5d54 Updated Upstream (Paper & Pufferfish & Purpur)
Implemented FerriteCore
2023-05-17 14:21:36 +09:00
IPECTER
4e89f2a271 Fix NCR
Add Some Patches
2023-05-08 22:23:35 +09:00
github-actions[bot]
5184e6e4c1 Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@83da4b6 Fix DamageSource for Falling Blocks (#9175)
PaperMC/Paper@9846d0d Fix some NPE for EntityCompostItemEvent (#9169)
PaperMC/Paper@813d039 Make sure the player didn't disconnect when processing commands
PaperMC/Paper@1d4c780 Fix BlockPosition#offset(double,double,double) (#9190)

Purpur Changes:
PurpurMC/Purpur@54656e9 Updated Upstream (Paper)
2023-05-08 06:07:38 +00:00
github-actions[bot]
d644aad71e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@4f9575e Break redstone on top of trap doors early
2023-05-02 02:18:53 +00:00
github-actions[bot]
5e4f190507 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@21411de add cherry_log, cherry_wood, bamboo_block to strippables config
2023-05-01 08:37:06 +00:00
IPECTER 이팩터
b4836df2f1 Fix? 2023-04-28 17:29:58 +09:00
github-actions[bot]
aac53a4a99 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@3ef9911 save https://github.com/PaperMC/Paper/pull/9149 from paper pr queue hell
PurpurMC/Purpur@a54b535 Updated Upstream (Paper)
2023-04-28 07:12:27 +00:00
github-actions[bot]
6745278fd3 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@f4ce997 Add Mob Experience reward API (#9122)
PaperMC/Paper@bcec5b1 Fixed large packet handling (#9147)
2023-04-27 19:20:08 +00:00
github-actions[bot]
d890f1a3d8 Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@2cccbbe [ci skip] Update Gradle plugins and wrapper (#9140)

Purpur Changes:
PurpurMC/Purpur@c407d78 Updated Upstream (Paper)
2023-04-27 16:03:07 +00:00
IPECTER 이팩터
7d176f7404 [CI-Skip] FIx 2023-04-28 00:34:35 +09:00
IPECTER 이팩터
9b5e4e162c [CI-Skip] FIx 2023-04-28 00:34:12 +09:00
IPECTER
d96d3069d7 Updated Upstream (Paper & Purpur) 2023-04-28 00:32:11 +09:00
github-actions[bot]
31ab8fd1f4 [CI-Skip] Updated Dependencies (Paperweight)
Dependency has released updates that appear to apply and compile correctly

Paperweight Changes:
PaperMC/Paperweight@934e245 1.5.5-SNAPSHOT
PaperMC/Paperweight@c095ab0 Add Java version check
PaperMC/Paperweight@d82fddd release: Version 1.5.5
2023-04-27 15:07:26 +00:00
IPECTER
e97aefe2a7 Updated Upstream (Paper & Pufferfish & Purpur) 2023-04-24 11:29:21 +09:00
github-actions[bot]
a4f2120454 [CI-Skip] Updated Dependencies (Wrapper)
Dependency has released updates that appear to apply and compile correctly

Wrapper Changes:
gradle/gradle@daedc68 Update wrapper to 8.1
gradle/gradle@a51ce99 Merge pull request #24729 Update wrapper to 8.1
gradle/gradle@efcf2ae Gradle Enterprise plugin upgrade to v 3.13
gradle/gradle@7abc9bd Merge pull request #24743 Gradle Enterprise plugin version update to 3.13
gradle/gradle@386733d Revert "Merge pull request #24743 Gradle Enterprise plugin version update to 3.13"
gradle/gradle@8834027 Mark failing AbstractUndeclaredBuildInputsIntegrationTest as @LocalOnly
gradle/gradle@5203b3d Mark failing AbstractUndeclaredBuildInputsIntegrationTest as @LocalOnly
gradle/gradle@4aba541 Let `kotlin-dsl` fail with reasonable message when required Kotlin compiler arguments have been removed
gradle/gradle@d69f8e0 Remove now irrelevant test
gradle/gradle@55a0f06 Merge pull request #24800 Let `kotlin-dsl` fail with reasonable message when required Kotlin compiler arguments have been removed
gradle/gradle@1f32e69 Extend cross-version test coverage for kotlin dsl precompiled script plugins
gradle/gradle@afe2e19 Restore compatibility of kotlin-dsl precompiled scripts
gradle/gradle@6d63f2e Merge pull request #24803 Restore kotlin-dsl precompiled scripts compatibility
gradle/gradle@d57320d Extract lambda rewriting code into a separate class
gradle/gradle@2abe6b7 Add estimations of code size to LambdaSerializationTransformer
gradle/gradle@c21534d Split generated $deserializeLambda$ if it becomes too large
gradle/gradle@8ea3fb2 Add a future-proofing check for lambdas that cannot be deserialized
gradle/gradle@12ba6e9 Bump instrumentation version for lambda serialization improvements
gradle/gradle@e9c1ce6 Merge pull request #24825 Split generated $deserializeLambda$ if it becomes too large
gradle/gradle@06758b1 Update version for 8.1.1 and update release metadata
gradle/gradle@776a2d6 Update release notes for 8.1.1
gradle/gradle@fa12d07 Skip test with broken Gradle version
gradle/gradle@ac19ba1 Merge pull request #24834 Prepare for Gradle 8.1.1
gradle/gradle@5545e2d Add upgrading guide note for Kotlin compiler options in kotlin-dsl project
gradle/gradle@c66fc9b Match patched issue title
gradle/gradle@874e075 Merge pull request #24838 Add upgrading guide note for Kotlin compiler options in kotlin-dsl project
gradle/gradle@e5299f1 Upgradlew to latest release nightly
gradle/gradle@c95c981 Mention Java 20 in compatibility table
gradle/gradle@8fb6388 Merge pull request #24844 Mention Java 20 in compatibility table
gradle/gradle@1cf537a Merge pull request #24841 Upgradlew to latest release nightly
2023-04-21 12:58:21 +00:00
IPECTER 이팩터
84f31480cb Merge pull request #41 from GDMgmer3992/ver/1.19.4
Updated Upstream (Purpur)
2023-04-15 14:41:01 +09:00
GDMgamer3992
9937ef0e3b Updated Upstream (Purpur) 2023-04-15 10:54:24 +07:00
IPECTER
41b1677130 Fix NCR 2023-04-14 20:57:13 +09:00
IPECTER
26154a8a1a Fix NCR 2023-04-14 20:41:24 +09:00
IPECTER
1cc6619c3d Fix NCR 2023-04-14 20:27:46 +09:00
github-actions[bot]
472833fe85 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@96dbac3 [ci-skip] stop needing to specify --paper in upstreamCommit
2023-04-14 07:52:14 +00:00
github-actions[bot]
257f3db70f Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@9429820 Add environment variable to bypass idle kick permission
2023-04-14 06:52:05 +00:00
github-actions[bot]
d87eaf8a8b Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@f69b21d Updated Upstream (Paper)
2023-04-14 05:37:20 +00:00
IPECTER
58818c543a Updated Upstream (Paper & Pufferfish & Purpur) 2023-04-14 12:28:50 +09:00
github-actions[bot]
170e37b1a8 [CI-Skip] Updated Dependencies (Wrapper)
Dependency has released updates that appear to apply and compile correctly

Wrapper Changes:
gradle/gradle@bee2fa4 Extract utility method `DefaultTypeValidationContext.throwOnProblemsOf`
gradle/gradle@a7d25f0 Polish `DefaultNodeValidator`
gradle/gradle@a78988e Format `DefaultTransformationRegistrationFactory`
gradle/gradle@0f9410b Ensure flow actions cannot depend on tasks (yet)
gradle/gradle@ca18f72 Fix CC compat for JavaCompileTaskOperationResultIntegTest
gradle/gradle@b2539da Merge pull request #23887 Support JDK 20 (compiling and testing only)
gradle/gradle@c7c7dc5 Merge pull request #24061 Promote configuration cache as stable
gradle/gradle@5a458a2 Merge branch 'release' into sigushkin/resource-groovy-methods-interceptors
gradle/gradle@7c4cac0 Annotate listeners not supported for Gradle.addListener with CC
gradle/gradle@3aeb666 Allow DependencyResolutionListener to be used with CC
gradle/gradle@21d2d78 Merge pull request #24188 Simplify Java Compile result post-processing
gradle/gradle@6e930b5 Merge pull request #24245 Ensure flow actions cannot depend on tasks (yet)
gradle/gradle@f7e432e Upgrade smoke tested plugin versions
gradle/gradle@5306bda FreeFair AspectJ plugin now works with configuration caching
gradle/gradle@335c847 ProGuard task now passes validation
gradle/gradle@94f0b04 Split `setJvmArgs` and checking debug configuration for `JvmOptions`
gradle/gradle@ea14e48 Move new methods to `JavaForkOptionsInternal`
gradle/gradle@8610e25 Disallow mutations in `ImmutableJavaForkOptions`
gradle/gradle@59bf4ed Rename `installJvmArgs` to `setExtraJvmArgs` for clarity
gradle/gradle@ac73ef6 Polish `JvmOptions`
gradle/gradle@6b91cc9 Polish `JavaExec`
gradle/gradle@566f9f9 Merge pull request #22523 Report problem for task convention access at execution time
gradle/gradle@7176c6d Fix build listener-related tests
gradle/gradle@6d44cfd Merge branch 'release' into sigushkin/resource-groovy-methods-interceptors
gradle/gradle@d8545fa Merge pull request #24242 Improve performance of serializing file collection dependencies to configuration cache
gradle/gradle@478de35 Disable docs tests that use bintray plugin
gradle/gradle@134da90 Spotless now requires Java 11
gradle/gradle@31eda5d Micronaut now requires Java 11
gradle/gradle@ece5836 Merge pull request #24257 Fix JavaExecDebugIntegrationTest
gradle/gradle@9d3d6a1 Merge pull request #24165 Introduce a tool for generating JVM bytecode & Groovy interceptors; Add more `File` related APIs to configuration input tracking
gradle/gradle@91b6079 Merge pull request #24184 Warn when using deprecated listeners as loggers
gradle/gradle@03a2448 Add an upgrade entry about CACHEDIR.TAG
gradle/gradle@98f27ca Merge pull request #24250 Upgrade smoke tested plugin versions
gradle/gradle@d3ded0e Disable CC encryption in preparation for 8.1
gradle/gradle@7fd8e70 Merge pull request #24224 Mark `WorkerDaemonLoggingIntegrationTest."log messages are still delivered to the build process after a worker action runs"` as flaky
gradle/gradle@7c6929d Merge pull request #24278 Cherry-pick 24224 to release
gradle/gradle@4e5e04e Add flaky annotation
gradle/gradle@45c87fb Merge pull request #24284 Mark `DependencyArtifactDownloadProgressEventCrossVersionTest` as flaky
gradle/gradle@3b7de30 Merge pull request #24277 Disable CC encryption in preparation for 8.1
gradle/gradle@b93e58b Update upgrade guide reference
gradle/gradle@d9da796 Generate contributors list
gradle/gradle@b418922 Improve release notes check / update tasks
gradle/gradle@34b68f1 Improve release notes
gradle/gradle@88d9eb4 Add release highlights
gradle/gradle@a557a2b Improve CC documentation
gradle/gradle@e3711cc Make ToPlannedNodeConverterRegistry thread safe
gradle/gradle@f6b887c Merge pull request #24233 Misc release notes improvements
gradle/gradle@57ec884 Update performance baseline to a non-dangling commit
gradle/gradle@2bcc019 Fix javadoc
gradle/gradle@3587b1f Fix execution plan resolution in build operation
gradle/gradle@250062b Improve javadoc
gradle/gradle@524788a Make NodeType sets static
gradle/gradle@88ce8f4 Merge pull request #24305 Fix execution plan resolution in build operation
gradle/gradle@f8cd4e1 Add a special metadata for operations running transform actions
gradle/gradle@5b94e3b Rename TaskExecutionTracker -> WorkExecutionTracker
gradle/gradle@5a239d5 Track transform actions and allow them to start external processes
gradle/gradle@e13657a Do not treat files opened inside TransformAction as build inputs
gradle/gradle@f23c52b Unignore doc tests that pass now with CC enabled
gradle/gradle@3a0ba43 Upgradle to latest nightly
gradle/gradle@6a74393 Merge pull request #24292 Allow external processes and file reads in transforms
gradle/gradle@1a95024 Document cache marking feature
gradle/gradle@e7c619d Merge pull request #24291 Make ToPlannedNodeConverterRegistry thread safe
gradle/gradle@c9a188c Report problem for external process started at configuration time by default
gradle/gradle@9192d1c Merge pull request #24306 Unignore doc tests that pass now with CC enabled
gradle/gradle@6d0149d Merge pull request #24307 Upgradle to latest nightly
gradle/gradle@751a5b2 Merge pull request #24213 Report problem for external process started at configuration time by default
gradle/gradle@35b9dbe Merge pull request #24265 Add cache marking documentation
gradle/gradle@fb4bace Remove "lambdas unsupported" section from CC docs
gradle/gradle@92b9e72 Add `@ServiceScope(Global)` annotation to `FileLockManager`
gradle/gradle@a47a461 Implement unconditional CC encryption
gradle/gradle@f525144 Specify keystore type to use explicitly
gradle/gradle@a016bf1 Lock Gradle keystore to avoid race condition when creating it
gradle/gradle@76f8923 Simplify `EncryptionService`
gradle/gradle@0ac2072 Move keystore creation to cache initializer
gradle/gradle@e09d337 Set a password for checking the keystore integrity
gradle/gradle@da7afcc Recover from more keystore failures
gradle/gradle@921434e Use more explicit names for the cc keystore cache
gradle/gradle@e1b5bb3 Polish `EncryptionService`
gradle/gradle@71e5266 Update plugin support status for configuration cache
gradle/gradle@fdc50b0 Remove external processes note from STABLE_CONFIGURATION_CACHE doc
gradle/gradle@4deeeae Rebaseline performance tests
gradle/gradle@9630810 Merge pull request #24293 Encrypt configuration cache unconditionally
gradle/gradle@58b6883 Merge pull request #24316 Clean up obsolete CC warnings from the docs
gradle/gradle@47c92e2 Enable `load-after-store` for `diagnostics` project
gradle/gradle@69c174d Make `DependencyReportTaskIntegrationTest` CC compatible
gradle/gradle@36febf4 Make `DependencyInsightReportTask` load-after-store compatible
gradle/gradle@40c6f07 Mark some tests in `DependencyInsightReportTaskIntegrationTest` as `ToBeFixedForConfigurationCache`
gradle/gradle@7a4e83b Merge pull request #24350 Dependency insight load after store compatibility
gradle/gradle@e916a70 Mark `dependentComponents` task as `notCompatibleWithConfigurationCache`
gradle/gradle@0568a40 Remove `@ToBeFixedForConfigurationCache` from `NativeDependentComponentsReportIntegrationTest`
gradle/gradle@0285bfa Ignore illegal `Task.getProject` access from some AGP tasks
gradle/gradle@d478204 Un-ignore `Task.getProject` access in AGP smoke tests
gradle/gradle@0c80a31 Add a workaround for the enterprise plugin
gradle/gradle@a7e5155 Merge pull request #24359 Mark `dependentComponents` task as `notCompatibleWithConfigurationCache`
gradle/gradle@da58e17 Merge pull request #24344 Add a workaround for the enterprise plugin
gradle/gradle@995776f Add "Dataflow Actions" userguide page
gradle/gradle@c81f516 Link dataflow actions from the configuration cache userguide chapter
gradle/gradle@23992c0 Link to FlowProviders from deprecated buildFinished callbacks
gradle/gradle@7b1b2b2 Integrate release notes preamble
gradle/gradle@18d19f3 Integrate configuration cache release notes
gradle/gradle@4ad0942 Merge pull request #24358 Add workarounds for illegal `Task.getProject` access in AGP
gradle/gradle@cc14cb6 Integrate kotlin DSL release notes
gradle/gradle@b482a04 Integrate JVM and other improvements release notes
gradle/gradle@e2c5a64 Integrate IDE and promoted features release notes
gradle/gradle@3850d3e Merge pull request #24361 Release notes for Gradle 8.1
gradle/gradle@69fe4e5 Update dataflow_actions.adoc
gradle/gradle@f60a171 Merge pull request #24360 Flow actions docs
gradle/gradle@dde7adf Fix deadlock when finding resources to lock
gradle/gradle@61b5375 Add stub for BuildServiceRegistryInternal
gradle/gradle@ccd3b89 Update test as we no longer resolve providers
gradle/gradle@15b22a2 Unify Task#usesService() and ServiceReference
gradle/gradle@04edd51 Unify Task#usesService() and ServiceReference
gradle/gradle@9ca9891 Fix wording/links in javadoc
gradle/gradle@bc9c6d3 Revert unneeded changes
gradle/gradle@95b9b95 Revert unneeded changes
gradle/gradle@d01b348 Add a link to the dataflow userguide from release notes
gradle/gradle@1a9decd Merge pull request #24354 Fix deadlock when finding resources to lock
gradle/gradle@b33c0d3 Remove team member from external contributors
gradle/gradle@aafa8e3 Merge pull request #24364 Add a link to the dataflow userguide from release notes
gradle/gradle@67fe82f Refine clean up rules for Check/Promotion project
gradle/gradle@644e59c Rewrite Dataflow API release notes section
gradle/gradle@c87ec9f Add syntax highlighting to snippets missing it
gradle/gradle@a2184c7 Update subprojects/docs/src/docs/release/notes.md
gradle/gradle@f2af0e1 Merge pull request #24366 Dataflow release notes refined
gradle/gradle@d8f22fd whats-new-addition
gradle/gradle@68448ca Disable Kotlin DSL script compilation avoidance
gradle/gradle@58e5e60 Merge pull request #24374 whats-new-addition
gradle/gradle@ab5ffec Merge pull request #24378 Disable Kotlin DSL script compilation avoidance
gradle/gradle@e9becd4 Fix PlannedTransformStepIdentity.consumerProjectPath
gradle/gradle@7b04ff3 Merge pull request #24381 Fix PlannedTransformStepIdentity.consumerProjectPath
gradle/gradle@bec0ee9 Merge pull request #24365 Refine clean up rules for Check/Promotion project
gradle/gradle@3408576 Update release wrapper
gradle/gradle@f0d6e68 Merge pull request #24384 Update release wrapper
gradle/gradle@e4350c3 Rebaseline performance tests
gradle/gradle@cd44247 Merge pull request #24386 Rebaseline performance tests
gradle/gradle@8a68be3 Update GE Gradle plugin to 3.12.5
gradle/gradle@de88635 Merge pull request #24392 Update GE Gradle plugin to 3.12.5
gradle/gradle@b98a2ac Update wrapper to 8.1 RC1
gradle/gradle@940410f Merge pull request #24402 Update wrapper to 8.1 RC1
gradle/gradle@22fa9c4 Add a note about Kotlin assignment IDE issues
gradle/gradle@a4049d4 Add some spacing for Kotlin assignment IDE issues in release notes
gradle/gradle@503916d Merge pull request #24418 Add a note about Kotlin assignment IDE issues
gradle/gradle@bd7b186 Add regression test for version catalog accessor usage in KTS applied script
gradle/gradle@bd9f4e2 Let version catalog accessors be available in buildscript block of applied scripts
gradle/gradle@3ff0d0c Merge pull request #24391 Change CI so dependencies fail the promotion stage immediately
gradle/gradle@5be8a21 Merge pull request #24437 Cherry-pick #24391 to release
gradle/gradle@eb4cce6 Drop duplicates from GMM
gradle/gradle@b34664f Move deduplication logic
gradle/gradle@400a902 Document deduplication requirement
gradle/gradle@54de4ac Adds more tests for contract enforcement
gradle/gradle@7749aa2 Merge pull request #24339 Drop duplicates from GMM
gradle/gradle@5bbf738 Remove incubating from WriteProperties.getDestinationFile
gradle/gradle@48a193e Merge pull request #24427 Let version catalog accessors be available in `buildscript {}` block of applied KTS scripts
gradle/gradle@6a97fca Revert "Adjust test for VersionNumber deprecation"
gradle/gradle@0fd6211 Revert "Let org.gradle.util.VersionNumber report its deprecation"
gradle/gradle@0aba3ab Adjust GrettySmokeTest for VersionNumber un-nagging
gradle/gradle@e384c20 Update TODO in VersionNumber for future nagging
gradle/gradle@c53b1f7 Adjust PlayPluginSmokeTest for VersionNumber un-nagging
gradle/gradle@7d8caca Reduce changeset removing nagging in VersionNumber
gradle/gradle@079293f Warn about potential collisions with new API
gradle/gradle@a924f60 Merge pull request #24448 Warn about potential collisions with new API
gradle/gradle@a0fb14f Remove unused import in GrettySmokeTest
gradle/gradle@9b3a091 Merge pull request #24442 Remove incubating from destination file
gradle/gradle@bb45c5a Use identity path in TaskIdentity toString
gradle/gradle@45bff0b Extend transform operations test coverage
gradle/gradle@6a19034 Return a colon-prefixed build path for ProjectComponentIdentifier
gradle/gradle@5c6c3b0 JvmArgs are empty by default
gradle/gradle@de8c65d Fix non-deterministic ordering in interceptor code generation
gradle/gradle@438de97 Mention renaming of CC properties in upgrade guide
gradle/gradle@c6bbc9f Merge pull request #24434 Mention renaming of CC properties in upgrade guide
gradle/gradle@31061c9 Support multi-release JARs with agent-based instrumentation
gradle/gradle@4cf8329 Note that feature flag not required for external process detection
gradle/gradle@0d5bf64 Merge pull request #24441 Support multi-release JARs with agent-based instrumentation
gradle/gradle@3198ed4 Merge pull request #24451 Fix buildPath to return a colon-prefixed path in ProjectComponentIdentifier
gradle/gradle@d96e5a6 Merge pull request #24449 Revert deprecation nagging in `VersionNumber` because of IntelliJ and Android Studio
gradle/gradle@7d0c90e Fix cache layout value
gradle/gradle@15a5139 Merge pull request #24459 Fix cache layout value
gradle/gradle@ebf78f2 Merge pull request #24438 JvmArgs are empty by default
gradle/gradle@5c40caf Update subprojects/docs/src/docs/userguide/migration/upgrading_version_8.adoc
gradle/gradle@952aae0 Merge pull request #24454 Note that feature flag not required for external process detection
gradle/gradle@1a485c4 Revert classpath ordering of distribution-loaded test framework classes
gradle/gradle@c8a0fd7 Merge pull request #24472 Revert classpath ordering of distribution-loaded test framework classes
gradle/gradle@952a346 Demote CC debug/quiet/recreate-cache to internal
gradle/gradle@368fd81 Demote CC debug/quiet/recreate-cache to internal
gradle/gradle@7097e77 Merge pull request #24431 Demote CC quiet|debug|recreate-cache options to internal
gradle/gradle@827ca0b Fix cache layout and update docs
gradle/gradle@4077fe2 Disable CC for `--export-keys`
gradle/gradle@28e5fb6 Re-enable kotlin script compilation avoidance
gradle/gradle@0c0dadf Reproducer test for kotlin script compilation cache misses
gradle/gradle@05f685e Let kotlin script compilation avoidance fallback to a runtime classpath fingerprint
gradle/gradle@139797b Allow `notCompatibleWithConfigurationCache` tasks to configure others
gradle/gradle@9a7c410 Supply a dummy LocalTaskNode when calling ProjectBuilderSpec.execute
gradle/gradle@a452a7d Adjust CC test compatibility annotations in BuildScriptCompileAvoidanceIntegrationTest
gradle/gradle@75a4c4d Merge pull request #24480 Disable CC for `--export-keys`
gradle/gradle@ca1c61a Add Plugin Publish plugin changes to the upgrade guide
gradle/gradle@16acc31 Unignore tests that now pass with CC
gradle/gradle@d044dcf Merge pull request #24471 Allow `notCompatibleWithConfigurationCache` tasks to configure others
gradle/gradle@af094dd Add an escape hatch to disable kotlin script compilation avoidance
gradle/gradle@def01f3 Update Gradle Enterprise plugin to 3.12.6
gradle/gradle@28abcf5 Merge pull request #24479 Fix cache layout and update docs
gradle/gradle@4fec233 Merge pull request #24483 Fix and re-enable kotlin script compilation avoidance
gradle/gradle@911cb5b Merge pull request #24487 Update Gradle Enterprise plugin to 3.12.6
gradle/gradle@321b79e Add regression test for stage2 accessors in applied scripts
gradle/gradle@fb315b9 Move project accessors generation from Interpreter to its Host
gradle/gradle@457793d Applied scripts don't have second stage accessors
gradle/gradle@ef1ce49 Enhance regression test
gradle/gradle@d6f8402 Merge pull request #24499 Fix accessors generation for applied kotlin scripts
gradle/gradle@d9cc163 Don't nag about reported problems
gradle/gradle@e95305a Improve test to also cover deprecation
gradle/gradle@14e268e Update STABLE_CONFIGURATION_CACHE documentation
gradle/gradle@695f2c4 Describe configuration cache encryption in the docs
gradle/gradle@73c138f Polish configuration cache docs
gradle/gradle@5ac901b Merge pull request #24522 Don't nag about reported problems
gradle/gradle@2c3ac0a Revert "Merge pull request #23829 Deprecate COD-Kotlin DSL combination"
gradle/gradle@87efc7b Address review concerns
gradle/gradle@f5c749d Merge pull request #24486 Add Plugin Publish plugin changes to the upgrade guide
gradle/gradle@e948e20 Merge pull request #24533 Revert "Merge pull request #23829 Deprecate COD-Kotlin DSL combination"
gradle/gradle@21ff06d (minor) Sort method elements later in the pipeline
gradle/gradle@e716082 Add test coverage for `ConfigurationCacheInstrumentationProcessor`
gradle/gradle@1c1b6ea Keep code generation deterministic regardless of method processing order
gradle/gradle@a3411de Bump instrumentation decoration format version after changes
gradle/gradle@2f02679 Update subprojects.json
gradle/gradle@659f18e Merge pull request #24453 Fix non-deterministic ordering in interceptor code generation
gradle/gradle@7f2319f Update CC compatibility notes for `java-gradle-plugin`
gradle/gradle@0daeeec Update wrapper to latest 8.1 nightly snapshot
gradle/gradle@b2866d0 Merge pull request #24542 Update CC compatibility notes for `java-gradle-plugin`
gradle/gradle@b74032a Merge pull request #24543 Update wrapper to latest 8.1 nightly snapshot
gradle/gradle@21da4ec Rebaseline performance tests
gradle/gradle@b7cde67 Merge pull request #24548 Rebaseline performance tests
gradle/gradle@daabcf7 Upgradlew to 8.1 RC2
gradle/gradle@da1dda7 Merge pull request #24555 Upgradlew to 8.1 RC2
gradle/gradle@7a78608 Add integration test
gradle/gradle@d2b9fe1 Call toString on non-string keys
gradle/gradle@e6a9a64 Merge pull request #24601 Fix nested map properties with non-string keys
gradle/gradle@7eb689e Ignore failing native tests for now
gradle/gradle@6074da8 Update wrapper to 8.1 RC3
gradle/gradle@8049009 Merge pull request #24630 Update wrapper to 8.1 RC3
gradle/gradle@689ad68 Use convention plugin
gradle/gradle@5e78df6 Fix formatting
gradle/gradle@8ca0693 Remove unused import
gradle/gradle@9b90224 Fix fixture usage in integ test
gradle/gradle@31f8cd7 Merge pull request #24646 Use Foojay convention plugin when applying toolchains in Build Init
gradle/gradle@f6125cb Make JVM toolchain registry aware of the mutation barrier
gradle/gradle@770eee5 Realize jvm toolchain repositories when marked immutable
gradle/gradle@99f1d80 Add doc for --validate-only flag for publishPlugins task
gradle/gradle@06231c1 Add release notes for plugin publishing plugin 1.2.0
gradle/gradle@e76b4ef Merge pull request #24671 Release notes for plugin publishing 1.2.0
gradle/gradle@a63ac23 Merge pull request #24674 Make sure to finalize all `Property` when marking JVM toolchain repositories as immutable
gradle/gradle@0ac7ed5 Update wrapper to 8.1 RC4
gradle/gradle@40ba32c Merge pull request #24709 Update wrapper to 8.1 RC4
2023-04-12 12:32:43 +00:00
github-actions[bot]
fd6b333892 Updated Upstream (Paper & Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1d2fe64 fix: null SpawnReason for new player (#9015)
PaperMC/Paper@9893e2b Deprecate ChatColor (#9069)
PaperMC/Paper@0849144 Do not send expired keys to players on login (#9090)
PaperMC/Paper@641dafd Cleanup some patches (#9093)
PaperMC/Paper@497b919 Fix ignoreCancelled having no effect on events registered by direct EventExecutor (#9099)

Purpur Changes:
PurpurMC/Purpur@285f9f6 Updated Upstream (Paper)
2023-04-04 22:30:57 +00:00
github-actions[bot]
9d437f2fb7 [CI-Skip] Updated Dependencies (Paperweight)
Dependency has released updates that appear to apply and compile correctly

Paperweight Changes:
PaperMC/Paperweight@ac168e2 1.5.4-SNAPSHOT
PaperMC/Paperweight@4e63b80 Support using glob syntax in mc dev imports
PaperMC/Paperweight@30f1b60 remove bannedClasses logic
PaperMC/Paperweight@aa146cd Add Folia devbundle extension
PaperMC/Paperweight@b56b118 feat(userdev): Add experimental (for now) option for shared userdev caches (#187)
PaperMC/Paperweight@11ba590 chore(userdev): log a message when experimental shared caches are enabled
PaperMC/Paperweight@a260d33 release: Version 1.5.4
2023-04-04 19:27:47 +00:00
github-actions[bot]
0e3c7ce677 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@50e683d Added a config option for ticking markers (#9034)
2023-04-02 18:36:35 +00:00
github-actions[bot]
f8a60b0396 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5fb3ab0 Allow non player entities in scoreboards by default (#9082)
PaperMC/Paper@dc08c74 Remove duplicate animate packet for records (#8600)
2023-04-02 18:27:47 +00:00
github-actions[bot]
4aa7f613a7 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1704bf7 [ci skip] Edit Paper download link in README (#9077)
2023-03-31 16:44:35 +00:00
github-actions[bot]
6c73bdb3af Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@7a96bf2 Make debug dump file names consistent (#9075)
2023-03-31 11:35:57 +00:00
github-actions[bot]
613b2276ac Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@bd5c4b6 Updated Upstream (Paper)
2023-03-31 07:23:41 +00:00
github-actions[bot]
9f9706a976 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@11ab383 Don't use plugin-profiling to enable timings
2023-03-31 05:22:19 +00:00
github-actions[bot]
54dfb768de Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@06fdc02 [ci skip] Correct upstream/paper javadoc (#8286)
2023-03-31 04:29:07 +00:00
github-actions[bot]
02bf66a783 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@7f4822d [ci-skip] let's try using cache in github actions again
PurpurMC/Purpur@7cb1f46 Updated Upstream (Paper)
2023-03-31 03:25:53 +00:00
github-actions[bot]
f0db903bb5 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@bf92f3e Updated Upstream (Bukkit/CraftBukkit)
2023-03-30 13:57:03 +00:00
github-actions[bot]
8a333120da Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@1924a57 Updated Upstream (Paper)
2023-03-30 07:08:13 +00:00
AlphaKR93
424e876c7c Updated Upstream (Paper) 2023-03-30 12:56:38 +09:00
github-actions[bot]
e5e84f55ab Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@32875b4 8948: Nag when timings is enabled or a plugin creates a new Timing
2023-03-29 19:54:35 +00:00
github-actions[bot]
2bfa77be48 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@f5a789d Updated Upstream (Paper)
2023-03-28 04:52:02 +00:00
IPECTER 이팩터
8578903621 Port MemoryLeakFix (#39) 2023-03-28 12:53:31 +09:00
github-actions[bot]
6a3b842b90 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@5c78e77 Fix api checking banned ips (#9026)
2023-03-28 03:36:17 +00:00
github-actions[bot]
6c345e6680 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@ce2a36d Fix PluginMeta#getDisplayName (#9038)
PaperMC/Paper@9940019 Deprecate public Timings classes for removal (#8949)
2023-03-28 03:24:49 +00:00
github-actions[bot]
60b13b6213 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@bd62f2c Fix chat messages being logged without formatting to console (#9058)
2023-03-27 17:37:40 +00:00
github-actions[bot]
b602b8e073 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@7e014a8 Updated Upstream (Paper)
2023-03-27 07:08:26 +00:00
AlphaKR93
02a7f7c066 [CI-Skip] [CheckSkip] Update Upstream data 2023-03-27 12:36:46 +09:00
AlphaKR93
b46915c9b2 Updated Upstream (Paper & Purpur) 2023-03-27 12:35:18 +09:00
AlphaKR93
187067c505 [CI-Skip] [CheckSkip] Cleanup workflows 2023-03-27 00:35:47 +09:00
IPECTER 이팩터
8bb0b20868 Port FixMySpawnR (#37)
* Port FixMySpawnR

* Update

* Use DO_OPTIMIZE instead Boolean.getBoolean()

---------

Co-authored-by: AlphaKR93 <dev@alpha93.kr>
2023-03-26 23:30:02 +09:00
Alpha
a97ffba61f [CI-Skip] [CheckSkip] Push with token 2023-03-26 15:45:12 +09:00
Alpha
a5026805b7 [CI-Skip] [CheckSkip] Check release number before release 2023-03-26 15:43:38 +09:00
Alpha
907c10a1a2 Implement No Chat Reports (#36)
* Implement No Chat Reports

* Fix build & Fix reload command
2023-03-26 15:26:06 +09:00
477 changed files with 48615 additions and 40904 deletions

40
.editorconfig Normal file
View File

@@ -0,0 +1,40 @@
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true
max_line_length = 120
ij_visual_guides = 16, 80
[*.tiny]
indent_style=tab
[*.bat]
end_of_line=crlf
[*.yml]
indent_size=2
ij_visual_guides = 8, 80
[*.patch]
trim_trailing_whitespace=false
[*.java]
ij_continuation_indent_size = 4
ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false
ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *,|,$*
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
[*-Server/src/main/resources/data/**/*.json]
indent_size = 2
[paper-api-generator/generated/**/*.java]
ij_java_imports_layout = $*,|,*

7
.gitattributes vendored Normal file
View File

@@ -0,0 +1,7 @@
* text=auto eol=lf
*.sh text eol=lf
gradlew text eol=lf
*.bat text eol=crlf
*.jar binary

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

View File

@@ -1,105 +0,0 @@
name: Build Plazma
on:
push:
branches: [ "ver/*", "feat/*", "dev/*", "expr/*", "ench/*", "impl/*" ]
workflow_dispatch:
env:
ORG_NAME: PlazmaMC
MC_VERSION: 1.19.4
MAIN_BRANCH: ver/1.19.4
DEBUG: 'false'
jobs:
release:
strategy:
matrix:
base_jdk: [19]
graal: [latest]
os: [ubuntu-22.04]
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout action
uses: actions/checkout@v3
- name: Checkout pages
uses: actions/checkout@v3
with:
path: javadoc
ref: gh-pages
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up GraalVM ${{ matrix.jdk }}
uses: graalvm/setup-graalvm@v1
with:
github-token: ${{ secrets.GH_PAT }}
java-version: ${{ matrix.base_jdk }}
version: ${{ matrix.graal }}
cache: 'gradle'
- name: Configure Git
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
echo "release_num=$(git ls-remote --tags origin | grep "release" | wc -l)" >> $GITHUB_ENV
- name: Apply Patches
run: ./gradlew applyPatches --stacktrace
- name: Build
run: ./gradlew build --stacktrace
- name: Create Reobf Jar
run: ./gradlew createReobfPaperclipJar --stacktrace
- name: Create Mojmap Jar
run: ./gradlew createMojmapPaperclipJar --stacktrace
- name: Update Javadoc
continue-on-error: true
if: github.ref_name == env.MAIN_BRANCH
run: |
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
cd javadoc
git add . && git commit -m "Update Javadocs"
git push -f
- name: Publish Packages
if: github.ref_name == env.MAIN_BRANCH
run: |
export GITHUB_USERNAME=${{ env.ORG_NAME }}
export GITHUB_TOKEN=${{ secrets.GH_PAT }}
./gradlew publish --stacktrace
- name: Upload Artifacts
if: env.DEBUG == 'true' || !startsWith(github.ref_name, 'ver/')
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: |
build/libs
Plazma-API/build/docs/javadoc
- name: Release Artifacts
if: startsWith(github.ref_name, 'ver/')
uses: marvinpinto/action-automatic-releases@latest
with:
title: "Release #${{ env.release_num }}"
automatic_release_tag: release-${{ env.release_num }}
repo_token: "${{ secrets.GH_PAT }}"
files: build/libs/*.jar
prerelease: false
- name: Release Artifacts (Latest)
if: startsWith(github.ref_name, 'ver/')
uses: marvinpinto/action-automatic-releases@latest
with:
title: "Release #${{ env.release_num }}"
automatic_release_tag: latest-${{ env.MC_VERSION }}
repo_token: "${{ secrets.GH_PAT }}"
files: build/libs/*.jar
prerelease: false

View File

@@ -1,46 +0,0 @@
name: Deploy Javadocs
on:
push:
branches: ["gh-pages"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

View File

@@ -2,32 +2,37 @@ name: Test Gradle build script
on:
push:
branches: [ "ver/*", "feat/*", "dev/*", "expr/*", "ench/*", "impl/*" ]
branches: [ "ver/*", "dev/*", "feat/**/*" ]
paths:
- "*.kt"
- "*.kts"
- "*.toml"
- "gradle-wrapper.*"
workflow_dispatch:
jobs:
release:
check:
name: Test Gradle build script
strategy:
matrix:
base_jdk: [19]
graal: [latest]
jdk: [21]
java: ['zulu']
os: [ubuntu-22.04]
if: "!contains(github.event.commits[0].message, '[CheckSkip]')"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout action
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v4
- name: Set up GraalVM ${{ matrix.jdk }}
uses: graalvm/setup-graalvm@v1
- name: Set up JDK ${{ matrix.java }} ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
github-token: ${{ secrets.GH_PAT }}
java-version: ${{ matrix.base_jdk }}
version: ${{ matrix.graal }}
distribution: ${{ matrix.java }}
java-version: ${{ matrix.jdk }}
cache: 'gradle'
- name: Configure Git

12
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,12 @@
name: Release Plazma
on:
push:
branches: [ "ver/*", "dev/*", "feat/**/*" ]
workflow_dispatch:
jobs:
release:
name: Release Plazma (${{ github.ref_name }})
uses: PlazmaMC/PlazmaBukkit/.github/workflows/global.yaml@main
secrets: inherit

View File

@@ -1,36 +0,0 @@
name: Test build with Normal JDK
on:
push:
branches: [ "ver/*", "feat/*", "dev/*", "expr/*", "ench/*", "impl/*" ]
workflow_dispatch:
jobs:
release:
strategy:
matrix:
jdk: [19.0.2+7]
java: ['temurin']
os: [ubuntu-22.04]
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout action
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK ${{ matrix.java }} ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
distribution: ${{ matrix.java }}
java-version: ${{ matrix.jdk }}
cache: 'gradle'
- name: Test build
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" && git config --global user.name "github-actions[bot]"
./gradlew applyPatches --stacktrace
./gradlew build --stacktrace

238
.gitignore vendored
View File

@@ -1,59 +1,211 @@
# JVM crash related
core.*
# Generated from https://gitignore.io/
### Paperweight ###
run/
paper-api/
paper-server/
purpur-api/
purpur-server/
plazma-api/build.gradle.kts
plazma-server/build.gradle.kts
plazma-server/src/minecraft/
### Git ###
# Created by git when using merge tools for conflicts
*.orig
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt
### Java ###
*.class
*.log
*.jar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# Intellij
.idea/
*.iml
*.ipr
*.iws
out/
# Kotlin DSL
.kotlin/
# Eclipse
.classpath
.project
.settings/
# netbeans
nbproject/
nbactions.xml
# Gradle
!gradle-wrapper.jar
### Gradle ###
.gradle/
build/
*/build/
# we use maven!
build.xml
# Avoid ignore Gradle wrappper properties
!gradle-wrapper.jar
!gradle-wrapper.properties
# Maven
log/
target/
dependency-reduced-pom.xml
# Cache of project
.gradletasknamecache
# various other potential build files
build/
# Java heap dump
*.hprof
### Eclipse ###
*.tmp
*.bak
*.swp
*~.nib
local.properties
bin/
tmp/
.project/
.metadata/
.settings/
.loadpath/
.recommenders/
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Java annotation processor (APT)
.factorypath
# Annotation Processing
.apt_generated/
.apt_generated_test/
### JetBrains ###
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# Ignore everything but code style settings and run configurations
.idea/
!.idea/codeStyles
!.idea/runConfigurations
# IntelliJ
out/
# Fleet
.fleet/
### NetBeans ###
**/nbproject/private/
**/nbproject/Makefile-*.mk
**/nbproject/Package-*.bash
nbbuild/
dist/
manifest.mf
nbdist/
.nb-gradle/
# Mac
.DS_Store/
.DS_Store
### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# vim
.*.sw[a-p]
# Session
Session.vim
Sessionx.vim
# Linux temp files
# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Ignore all local history of files
.history
.ionide
### Linux ###
*~
# other stuff
run/
javadoc/
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
build-data/
*-API
*-MojangAPI
*-Server
*.jar
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# iCloud generated files
*.icloud
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk

View File

@@ -1,2 +0,0 @@
purpurCommit = 893ce2a77ae2c2c31638a4c1e73cde595c4c21ec
pufferfishCommit = d032415ca6fd0736d7cb0da28e3134b957fb83a0

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
# FixupAPI
PS1="$"
cd Plazma-API
git add .
git commit -m "fixup"
git format-patch -1
cd ../

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
# FixupServer
PS1="$"
cd Plazma-Server
git add .
git commit -m "fixup"
git format-patch -1
cd ../

View File

@@ -1,23 +0,0 @@
The MIT License (MIT)
=====================
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
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.

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# PatchAPI <Patch Name>
PS1="$"
cd Plazma-API
git add .
git commit -m $1
cd ../
./gradlew rebuildAPIPatches

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# PatchServer <Patch Name>
PS1="$"
cd Plazma-Server
git add .
git commit -m $1
cd ../
./gradlew rebuildServerPatches

View File

@@ -1,48 +0,0 @@
<div align="center">
![image](res/title-400.png)
### A Server Platform for Minecraft: Java Edition based on [Paper](https://github.com/PaperMC/Paper)
[![WIP](https://img.shields.io/badge/Work%20In%20Progress-red?style=for-the-badge)](README.md)
[![Build Status](https://img.shields.io/github/actions/workflow/status/PlazmaMC/Plazma/build.yml?branch=ver/1.19.4&logo=GoogleAnalytics&style=for-the-badge&logoColor=ffffff)](https://github.com/PlazmaMC/Plazma/actions/workflows/build.yml?query=branch:ver/1.19.4)
[![Upstream Status](https://img.shields.io/github/actions/workflow/status/PlazmaMC/AlwaysUpToDate/plazma.yml?label=Upstream&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGD0lEQVR4nO2dW4hVVRiAl5OjCFoMlpYx2WXMXjShi5FFTxFhhmFlQxlRU0kEXQiJorKIMoIiIoJegiiK8pKWZBTUg0ZpaHYhslBL8TKVTWWO00x98XP%2BicNhzt5rnb3P2WvtWd%2FjzDl7r%2FX%2F6%2FrfjjGRSCQSiUQikUgkEolEIpGIJwDHAHOA24CngTXA18Bu4BDwN3AUOAh8D3wOrAOeBLqBWUB70f0ICuBE4E7gXaCP7PwBrARuAqYU3T8vAdqB64EPgSGaxz%2F6joUyu8xoBzgOWAbsofXs0ndPNKMNoA24EThA8ezTPWZ0zAjgIt1IfWMbMM%2BUfJ1f3uQ1Po894rnSnZyAU3WEhcInwGmmDMi0BnozCGMA2KT3ADlKXgycAnQAY4HxwAnA6fouWc%2BfBzYCgxne%2BwtwgQkZ4Fq9KLlyBHgDWARMyPD%2BDr2QvamXNlf%2BAuabENGOu47AvcD9wOQmtOck4FG9NbsgfbjBhARwneNm26eCn9CCtk0EHtdZ5qKE%2BSEdM12WndVifiignbKPvOfQzsPA%2BSaA006vw%2Fq6pOD2jgHucRgw0rfpxkeAccBWBzPAHOMJMrIdBs4q4yNqArbhG2Ca8QxgBrDTov0yW8YaD9d9m013O3C88RRgmoUS%2Fm3FYcHVafKVhfB%2FAk42ngOcCfyc0I9txieApZYb7mwTCMBc4M8R%2BiGz%2FHLjC8CxlhebHhMYVDZmcXEO8wOwwPgEcJ%2BF8FebgAGmAp3GU%2FPyjxZLj5%2Fn5tBRH24aDxTdztICfGBhzp1UdDtLiYR3WJz7Hyy6naUFuCNF%2BGJ7n1p0O0uLRp8l8bYpIcAkYAXwKfAl8EzLg700pETCApPoNiUD6KpjppCTYFczXjimzt%2FPThH%2BULVHS00VfhmvGhO%2BeOvqsTc3JWgw7AagXx3i7wBnVf2%2FJ0UBn%2BnnZgLr9RniUfoYOM%2BUT%2Fj5KUGFP5IN5Dexj%2BhnniKZF9WWIt%2BppT8kJWAv%2FHyUoCM%2FyW8rgl2V0oiXU6KaPzLlFH42JejmKiM0CRHsfrIx6HscJo0LP7MSXCIFGkWU3GbKK%2FzGlaAZKM1mnSm%2F8BtTAnBGnc0zL%2BTZM8zoEH7DSpibU2rQiJu48RAqUXPNTBLZ4xT71AQleCt8AXid5vOacSFHJfgu%2FLYWHT4O17MuNFMJXgu%2FKqBMEjOy8Kve%2BNNMNO4mmQxK8F74wwBbEvoxoCmzafGtC1KUsMU0SgNKCEb4AnBZnVkwoIJ9KaW%2FK%2FQ59ZQgz77UZMFBCUEJfxjgSg09qY7iu1D%2FlxbzenPVc%2BapryD%2FcBYLJQQp%2FJoNuVOOpTXu17Q9YnadMMfO3G%2F9CZbO%2Fy2mZQJYYhF80FZE%2FORbmuS8T3OwvLzhZkX9IUmsyfySyMhIMLFF9MfSOl%2BPZAV4zCL6w9tw%2B6ChEnicFnywvuh2lhbgEdJZXHQ7SwkwXW03aXluQUd7eIlmTko0Rxp3G5%2BQ4hZVR9M%2B7cQsExhUyqWlccCrQk%2BaH3ywTr22YC5nwDkWgQnCLcYngFcTGisJbzON51AZRDJ709jqXVCBhTtvp4%2B5wTWVGr%2B1DKnxb0YDOywav8vHmUDFYPYddiw3PgK8YtmBXp9GEHCu5i%2FbsNnbUmZ6bk5Kbq5N9b%2FX2T%2Baf5t7LDdcNBrQv0zJaqS8l2ZF2vJ%2BERmUamCzOecPc8SnWZsIcIVjlax%2B4IlWJPNpoaaH9WhsixjbrjIBOjBcS5X1quUx95OSerQeaqBIrAj%2FahMiOhNclqPqTq%2FUHOTJGUf7Yr2Z267z1ch3FpmQ0T1B3HWNMqT1O18AbtdylV06osdrpn6Hlqu8RG6nwLOSoZOxXOX%2B4MtV1tiHRIihsNn7044rWlzV95LFg5p%2BOs6UFY2X8bF88RfBHDNziru5xqLKSiuQi%2BNdvqdLNQU9pSzT34JpNbu1VKU%2F9vyioJLEvVArr2SNUE5b4zdoRd%2FoRqyjjClaHV3O7r%2FnIHQJGV%2BrNe1i6IjjzGjXn6DqVlPFWq3ftkM9b0f10nZIfQ3bNX9ZkshvlVhN75wmkUgkEolEIpFIJBKJRCIRM5r5D9WH9bFOGhrhAAAAAElFTkSuQmCC&style=for-the-badge)](https://github.com/PlazmaMC/AlwaysUpToDate/actions/workflows/plazma.yml)
[![License](https://img.shields.io/github/license/PlazmaMC/Plazma?logo=github&style=for-the-badge&logoColor=ffffff)](LICENSE)
[![Discord](https://img.shields.io/discord/1083716853928558652?color=%235865F2&label=Discord&logo=discord&style=for-the-badge&logoColor=ffffff)](https://discord.gg/MmfC52K8A8)
[![MC Version](https://img.shields.io/badge/MC-1.19.4-6047ff?&logo=Webpack&style=for-the-badge&logoColor=ffffff)](https://github.com/PlazmaMC/Plazma/releases/latest-1.19.4)
[![Downloads](https://img.shields.io/github/downloads/PlazmaMC/Plazma/total?label=Downloads&logo=data:image/png;base64,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&style=flat-square&color=green)](https://github.com/PlazmaMC/Plazma/releases/tag/latest-1.19.4)
[![Stargazers](https://img.shields.io/github/stars/PlazmaMC/Plazma?label=stars&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9bxSIVh1YQcYhQnSyIiuimVShChVArtOpgcukXNGlIUlwcBdeCgx+LVQcXZ10dXAVB8APE0clJ0UVK/F9SaBHjwXE/3t173L0D/PUyU82OMUDVLCOViAuZ7KrQ9YogwujDEGYkZupzopiE5/i6h4+vdzGe5X3uz9Gj5EwG+ATiWaYbFvEG8dSmpXPeJ46woqQQnxOPGnRB4keuyy6/cS447OeZESOdmieOEAuFNpbbmBUNlXiSOKqoGuX7My4rnLc4q+Uqa96TvzCU01aWuU5zEAksYgkiBMioooQyLMRo1UgxkaL9uId/wPGL5JLJVQIjxwIqUCE5fvA/+N2tmZ8Yd5NCcaDzxbY/hoGuXaBRs+3vY9tunACBZ+BKa/krdWD6k/RaS4seAb3bwMV1S5P3gMsdoP9JlwzJkQI0/fk88H5G35QFwrdA95rbW3Mfpw9AmrpK3gAHh8BIgbLXPd4dbO/t3zPN/n4Ax9dyyerighsAAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfmCBMVNjtc7/hFAAABIElEQVQ4y62SzS5DURSFv6smXkAUCRU0UdKYGNTPyCsYYOYFGGi8Ao9QM0PxCh6CgQ4qfiLpBFEjdKCfySaXtDch1uScs9Ze62TvcyAD6o66zV+gjqpvalsd61XXl5GxBySx3/3t7UPqi1pTD9VXdaRbbZIyDQLTwBSwBqzGGaABnAInwCXQSJLk/tO4orb8jra6nwo/CC6NlrqMOq421Y5aVSfUXJe2cqFVo7b5NdwIuVaf1IWM2cyrD+qdOvlTLERIS53pYi6FdqMWet2wGP1tdNE2Q1vK+gfDsdbDlFfzwV3Ems8KmAXegcd4hSvgVq0Bz6GV0ob+HgF1YAA4Cn4LWA9tLusHnscTHavFFF8MrqOeZQVU1HKGXlYr/Cc+AKuOI2h/Jrf7AAAAAElFTkSuQmCC&style=flat-square&color=green)](https://github.com/PlazmaMC/Plazma/stargazers)
[![Forks](https://img.shields.io/github/forks/PlazmaMC/Plazma?label=forks&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9bxSIVh1YQcYhQnSyIiuimVShChVArtOpgcukXNGlIUlwcBdeCgx+LVQcXZ10dXAVB8APE0clJ0UVK/F9SaBHjwXE/3t173L0D/PUyU82OMUDVLCOViAuZ7KrQ9YogwujDEGYkZupzopiE5/i6h4+vdzGe5X3uz9Gj5EwG+ATiWaYbFvEG8dSmpXPeJ46woqQQnxOPGnRB4keuyy6/cS447OeZESOdmieOEAuFNpbbmBUNlXiSOKqoGuX7My4rnLc4q+Uqa96TvzCU01aWuU5zEAksYgkiBMioooQyLMRo1UgxkaL9uId/wPGL5JLJVQIjxwIqUCE5fvA/+N2tmZ8Yd5NCcaDzxbY/hoGuXaBRs+3vY9tunACBZ+BKa/krdWD6k/RaS4seAb3bwMV1S5P3gMsdoP9JlwzJkQI0/fk88H5G35QFwrdA95rbW3Mfpw9AmrpK3gAHh8BIgbLXPd4dbO/t3zPN/n4Ax9dyyerighsAAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfmCBMVNCYN3/YeAAAA/UlEQVQ4y7WTQUoDQRBFf01czlJcxUyOINGjjAvFHMFzZGdygOwDwTtk6UZcqLlAxCAuMigug89FamIzdAIN+qGhq/6v6qrqbumvAJwBj8AHMAQs4DJgBHy65jSW4Bl4AaZsUAbcufumrnmquSzIcSzpTtLA7XbA1fuBa9qxCob8YgUUAdcFqoC/iSXIgLELOhG+49w4nM+2BTP7ljR3M4/MufbNzYxdN1E0Sm2ialZnsVIllZKOJF24eyLpXdKtmS1S3sYMmO3THOwJziUdbrbkZvaVcnILeAh6vweylAQ9D7z2BXCS0sJS0lrSpdtrSW+pn6sPLIFX4Er/hR9C0wl1FTBzNwAAAABJRU5ErkJggg==&style=flat-square&color=green)](https://github.com/PPlazmaMC/Plazma/network/members)
[![Watchers](https://img.shields.io/github/watchers/PlazmaMC/Plazma?label=watchers&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9bxSIVh1YQcYhQnSyIiuimVShChVArtOpgcukXNGlIUlwcBdeCgx+LVQcXZ10dXAVB8APE0clJ0UVK/F9SaBHjwXE/3t173L0D/PUyU82OMUDVLCOViAuZ7KrQ9YogwujDEGYkZupzopiE5/i6h4+vdzGe5X3uz9Gj5EwG+ATiWaYbFvEG8dSmpXPeJ46woqQQnxOPGnRB4keuyy6/cS447OeZESOdmieOEAuFNpbbmBUNlXiSOKqoGuX7My4rnLc4q+Uqa96TvzCU01aWuU5zEAksYgkiBMioooQyLMRo1UgxkaL9uId/wPGL5JLJVQIjxwIqUCE5fvA/+N2tmZ8Yd5NCcaDzxbY/hoGuXaBRs+3vY9tunACBZ+BKa/krdWD6k/RaS4seAb3bwMV1S5P3gMsdoP9JlwzJkQI0/fk88H5G35QFwrdA95rbW3Mfpw9AmrpK3gAHh8BIgbLXPd4dbO/t3zPN/n4Ax9dyyerighsAAAAGYktHRAAAAAAAAPlDu38AAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfmCBMVNw4TRw0nAAAA3UlEQVQ4y83SP04CURAG8I0lewHOwAFUaiwkdmAlp8CL4FHopfIvtOIJWE3opIBK489mQPKy6xYWOskkL9/MN/PNzMuyf2fIcYkZVuGzwPI68gle8Yl7jMIfAntBp4o8wAeecFgSP8I8cgZp8DwC12j8oLCBCd7R34ItbHCzT8ZZSC7QTYrcYo1WhjGWaCbdCt+2SGLN4IwPfnu07QjrkhG6oWKB0+TMd7sRAuzHYuqWmO8tsVd1xjmOS8htPEfORVWHTmweHnEVPg2sqPxIicxhFFjhLd7D2q/8J/YFHSJt9VSqQ08AAAAASUVORK5CYII=&style=flat-square&color=green)](https://github.com/PlazmaMC/Plazma/watchers)
</div>
## ⚠️ Warning
- Plazma may cause **<u>unexpected problems</u>**, so **don't use** it in production server!
## 💬 About Plazma...
- **Plazma** is created from the merger of **[Andromeda](https://github.com/TeamEarendel/Andromeda)** and **[Fusion](https://github.com/RuinedTechnologyUnify/Fusion)**
- Compatible and effective patches from other bukkits and mods
- We're always trying to keep it compatible and performance high.
## ⚙️ Features
- **Based on [Paper](https://github.com/PaperMC/Paper)** - Most plugins of Bukkit, Craft Bukkit, Spigot, and Paper are available
- **Including [Pufferfish](https://github.com/pufferfish-gg/Pufferfish) and [Purpur](https://github.com/PurpurMC/Purpur)** - Provides multiple optimizations and customizations
## ⬇️ Downloads
- You can download the file from [Releases](https://github.com/PlazmaMC/Plazma/releases)
- Direct latest download: [Click here](https://github.com/PlazmaMC/Plazma/releases/download/latest-1.19.4/plazma-paperclip-1.19.4-R0.1-SNAPSHOT-reobf.jar)
- NOTE: If you don't know about Mojmap or Bundler, download `plazma-paperclip-*-reobf.jar`
## ⚖️ License
- This project and all patches are licensed under the [MIT license](LICENSE.md) unless otherwise noted in the patch headers.
## 🌀 Sponsorship - Minecraft Development Dictionary (KOREAN)
[![Discord](https://img.shields.io/discord/911980670123905054?color=%239c91fd&label=MDD&logo=discord&style=for-the-badge&logoColor=ffffff)](https://discord.gg/AZwXTA9Pgx)
- 한글로 번역&정리된 Minecraft와 서드파티 버킷들의 소식들을 빠르게 만나볼 수 있습니다.
- Skript와 Plugin등 서버 개발과 관련된 질문에 대한 답변을 받으실 수 있습니다.
## 📈 bStats
[![](https://bstats.org/signatures/server-implementation/Plazma.svg)](https://bstats.org/plugin/server-implementation/Plazma/18047)

View File

@@ -1,113 +1,85 @@
import io.papermc.paperweight.patcher.*
import io.papermc.paperweight.util.*
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.patcher") version "1.5.3"
id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/") {
content {
onlyForConfigurations(PAPERCLIP_CONFIG)
paperweight {
upstreams.register("purpur") {
repo = github("PurpurMC", "Purpur")
ref = providers.gradleProperty("purpurRef")
patchFile {
path = "purpur-server/build.gradle.kts"
outputFile = file("plazma-server/build.gradle.kts")
patchFile = file("plazma-server/build.gradle.kts.patch")
}
patchFile {
path = "purpur-api/build.gradle.kts"
outputFile = file("plazma-api/build.gradle.kts")
patchFile = file("plazma-api/build.gradle.kts.patch")
}
patchRepo("paperApi") {
upstreamPath = "paper-api"
patchesDir = file("plazma-api/paper-patches")
outputDir = file("paper-api")
}
patchDir("purpurApi") {
upstreamPath = "purpur-api"
excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches")
patchesDir = file("plazma-api/purpur-patches")
outputDir = file("purpur-api")
}
}
}
dependencies {
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
decompiler("net.minecraftforge:forgeflower:2.0.605.2")
paperclip("io.papermc:paperclip:3.0.3")
}
subprojects {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
java {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion = JavaLanguageVersion.of(21)
}
}
}
subprojects {
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.release.set(17)
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
tasks.withType<Test> {
minHeapSize = "2g"
maxHeapSize = "2g"
}
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://ci.emc.gs/nexus/content/groups/aikar/")
maven("https://repo.aikar.co/content/groups/aikar")
maven("https://repo.md-5.net/content/repositories/releases/")
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
}
}
paperweight {
serverProject.set(project(":plazma-server"))
remapRepo.set("https://maven.fabricmc.net/")
decompileRepo.set("https://files.minecraftforge.net/maven/")
usePaperUpstream(providers.gradleProperty("paperCommit")) {
withPaperPatcher {
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
apiOutputDir.set(layout.projectDirectory.dir("Plazma-API"))
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
serverOutputDir.set(layout.projectDirectory.dir("Plazma-Server"))
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release = 21
options.isFork = true
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
tasks.withType<Test> {
testLogging {
showStackTraces = true
exceptionFormat = TestExceptionFormat.FULL
events(TestLogEvent.STANDARD_OUT)
}
}
}
val upstreamTask = tasks.register("updateUpstream") {
finalizedBy("applyPatches")
val tempDir = layout.cacheDir("updateUpstream");
val file = "gradle.properties";
doFirst {
val apiResponse = layout.cache.resolve("apiResponse.json");
download.get().download("https://api.github.com/repos/PaperMC/Paper/commits/master", apiResponse);
val latestCommit = gson.fromJson<paper.libs.com.google.gson.JsonObject>(apiResponse)["sha"].asString;
copy {
from(file)
into(tempDir)
filter { line: String ->
line.replace("paperCommit = .*".toRegex(), "paperCommit = $latestCommit")
extensions.configure<PublishingExtension> {
repositories {
/*
maven("https://repo.papermc.io/repository/maven-snapshots/") {
name = "paperSnapshots"
credentials(PasswordCredentials::class)
}
}
}
doLast {
copy {
from(tempDir.file("gradle.properties"))
into(project.file(file).parent)
*/
}
}
}

View File

@@ -1,9 +1,10 @@
group = org.plazmamc.plazma
version = 1.19.4-R0.1-SNAPSHOT
group=org.plazmamc.plazma
version=1.21.4-R0.1-SNAPSHOT
mcVersion=1.21.4
paperCommit = d5abb94e69ceed6e73116c13e7634b57b5ad84cf
purpurRef=a9862d7ec77a2b7690e73e635a5829f1596be84e
org.gradle.caching = true
org.gradle.parallel = true
org.gradle.vfs.watch = false
org.gradle.jvmargs = -Xmx4G -Dfile.encoding=UTF-8 -Dgraal.CompilerConfiguration=community -Dgraal.UsePriorityInlining=true -Dgraal.Vectorization=true -Dgraal.OptDuplication=true -Dgraal.SpeculativeGuardMovement=true -Dgraal.WriteableCodeCache=true
org.gradle.configuration-cache=true
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.vfs.watch=false

View File

@@ -0,0 +1,2 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

Binary file not shown.

View File

@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

33
gradlew vendored
View File

@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +133,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -197,11 +200,15 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \

22
gradlew.bat vendored
View File

@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail

View File

@@ -1,527 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 23 Mar 2023 10:28:40 +0900
Subject: [PATCH] Pufferfish API Changes
Original: Kevin Raneri <kevin.raneri@gmail.com>
Copyright (C) 2023 Pufferfish Studios LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/build.gradle.kts b/build.gradle.kts
index cad12a2632b9ebb569280441c42869685db1f31a..b83e2c5a0a094002d12aee55ec0cf8d12bf33f3e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -42,6 +42,7 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
api("org.apache.logging.log4j:log4j-api:2.17.1")
api("org.slf4j:slf4j-api:1.8.0-beta4")
+ api("io.sentry:sentry:5.4.0") // Pufferfish
implementation("org.ow2.asm:asm:9.4")
implementation("org.ow2.asm:asm-commons:9.4")
@@ -85,6 +86,13 @@ val generateApiVersioningFile by tasks.registering {
}
}
+// Pufferfish Start
+tasks.withType<JavaCompile> {
+ val compilerArgs = options.compilerArgs
+ compilerArgs.add("--add-modules=jdk.incubator.vector")
+}
+// Pufferfish End
+
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
diff --git a/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java b/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java
new file mode 100644
index 0000000000000000000000000000000000000000..10310fdd53de28efb8a8250f6d3b0c8eb08fb68a
--- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java
@@ -0,0 +1,161 @@
+package gg.pufferfish.pufferfish.sentry;
+
+import com.google.gson.Gson;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Map;
+import java.util.TreeMap;
+import org.apache.logging.log4j.ThreadContext;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Event;
+import org.bukkit.event.player.PlayerEvent;
+import org.bukkit.plugin.Plugin;
+import org.bukkit.plugin.RegisteredListener;
+import org.jetbrains.annotations.Nullable;
+
+public class SentryContext {
+
+ private static final Gson GSON = new Gson();
+
+ public static void setPluginContext(@Nullable Plugin plugin) {
+ if (plugin != null) {
+ ThreadContext.put("pufferfishsentry_pluginname", plugin.getName());
+ ThreadContext.put("pufferfishsentry_pluginversion", plugin.getDescription().getVersion());
+ }
+ }
+
+ public static void removePluginContext() {
+ ThreadContext.remove("pufferfishsentry_pluginname");
+ ThreadContext.remove("pufferfishsentry_pluginversion");
+ }
+
+ public static void setSenderContext(@Nullable CommandSender sender) {
+ if (sender != null) {
+ ThreadContext.put("pufferfishsentry_playername", sender.getName());
+ if (sender instanceof Player player) {
+ ThreadContext.put("pufferfishsentry_playerid", player.getUniqueId().toString());
+ }
+ }
+ }
+
+ public static void removeSenderContext() {
+ ThreadContext.remove("pufferfishsentry_playername");
+ ThreadContext.remove("pufferfishsentry_playerid");
+ }
+
+ public static void setEventContext(Event event, RegisteredListener registration) {
+ setPluginContext(registration.getPlugin());
+
+ try {
+ // Find the player that was involved with this event
+ Player player = null;
+ if (event instanceof PlayerEvent) {
+ player = ((PlayerEvent) event).getPlayer();
+ } else {
+ Class<? extends Event> eventClass = event.getClass();
+
+ Field playerField = null;
+
+ for (Field field : eventClass.getDeclaredFields()) {
+ if (field.getType().equals(Player.class)) {
+ playerField = field;
+ break;
+ }
+ }
+
+ if (playerField != null) {
+ playerField.setAccessible(true);
+ player = (Player) playerField.get(event);
+ }
+ }
+
+ if (player != null) {
+ setSenderContext(player);
+ }
+ } catch (Exception e) {} // We can't really safely log exceptions.
+
+ ThreadContext.put("pufferfishsentry_eventdata", GSON.toJson(serializeFields(event)));
+ }
+
+ public static void removeEventContext() {
+ removePluginContext();
+ removeSenderContext();
+ ThreadContext.remove("pufferfishsentry_eventdata");
+ }
+
+ private static Map<String, String> serializeFields(Object object) {
+ Map<String, String> fields = new TreeMap<>();
+ fields.put("_class", object.getClass().getName());
+ for (Field declaredField : object.getClass().getDeclaredFields()) {
+ try {
+ if (Modifier.isStatic(declaredField.getModifiers())) {
+ continue;
+ }
+
+ String fieldName = declaredField.getName();
+ if (fieldName.equals("handlers")) {
+ continue;
+ }
+ declaredField.setAccessible(true);
+ Object value = declaredField.get(object);
+ if (value != null) {
+ fields.put(fieldName, value.toString());
+ } else {
+ fields.put(fieldName, "<null>");
+ }
+ } catch (Exception e) {} // We can't really safely log exceptions.
+ }
+ return fields;
+ }
+
+ public static class State {
+
+ private Plugin plugin;
+ private Command command;
+ private String commandLine;
+ private Event event;
+ private RegisteredListener registeredListener;
+
+ public Plugin getPlugin() {
+ return plugin;
+ }
+
+ public void setPlugin(Plugin plugin) {
+ this.plugin = plugin;
+ }
+
+ public Command getCommand() {
+ return command;
+ }
+
+ public void setCommand(Command command) {
+ this.command = command;
+ }
+
+ public String getCommandLine() {
+ return commandLine;
+ }
+
+ public void setCommandLine(String commandLine) {
+ this.commandLine = commandLine;
+ }
+
+ public Event getEvent() {
+ return event;
+ }
+
+ public void setEvent(Event event) {
+ this.event = event;
+ }
+
+ public RegisteredListener getRegisteredListener() {
+ return registeredListener;
+ }
+
+ public void setRegisteredListener(RegisteredListener registeredListener) {
+ this.registeredListener = registeredListener;
+ }
+ }
+}
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
new file mode 100644
index 0000000000000000000000000000000000000000..ab5fea0b03224bf249352ce340e94704ff713345
--- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
@@ -0,0 +1,40 @@
+package gg.pufferfish.pufferfish.simd;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import jdk.incubator.vector.FloatVector;
+import jdk.incubator.vector.IntVector;
+import jdk.incubator.vector.VectorSpecies;
+
+/**
+ * Basically, java is annoying and we have to push this out to its own class.
+ */
+@Deprecated
+public class SIMDChecker {
+
+ @Deprecated
+ public static boolean canEnable(Logger logger) {
+ try {
+ if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18 && SIMDDetection.getJavaVersion() != 19) {
+ return false;
+ } else {
+ SIMDDetection.testRun = true;
+
+ VectorSpecies<Integer> ISPEC = IntVector.SPECIES_PREFERRED;
+ VectorSpecies<Float> FSPEC = FloatVector.SPECIES_PREFERRED;
+
+ logger.log(Level.INFO, "Max SIMD vector size on this system is " + ISPEC.vectorBitSize() + " bits (int)");
+ logger.log(Level.INFO, "Max SIMD vector size on this system is " + FSPEC.vectorBitSize() + " bits (float)");
+
+ if (ISPEC.elementSize() < 2 || FSPEC.elementSize() < 2) {
+ logger.log(Level.WARNING, "SIMD is not properly supported on this system!");
+ return false;
+ }
+
+ return true;
+ }
+ } catch (NoClassDefFoundError | Exception ignored) {} // Basically, we don't do anything. This lets us detect if it's not functional and disable it.
+ return false;
+ }
+
+}
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
new file mode 100644
index 0000000000000000000000000000000000000000..a84889d3e9cfc4d7ab5f867820a6484c6070711b
--- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
@@ -0,0 +1,35 @@
+package gg.pufferfish.pufferfish.simd;
+
+import java.util.logging.Logger;
+
+@Deprecated
+public class SIMDDetection {
+
+ public static boolean isEnabled = false;
+ public static boolean versionLimited = false;
+ public static boolean testRun = false;
+
+ @Deprecated
+ public static boolean canEnable(Logger logger) {
+ try {
+ return SIMDChecker.canEnable(logger);
+ } catch (NoClassDefFoundError | Exception ignored) {
+ return false;
+ }
+ }
+
+ @Deprecated
+ public static int getJavaVersion() {
+ // https://stackoverflow.com/a/2591122
+ String version = System.getProperty("java.version");
+ if(version.startsWith("1.")) {
+ version = version.substring(2, 3);
+ } else {
+ int dot = version.indexOf(".");
+ if(dot != -1) { version = version.substring(0, dot); }
+ }
+ version = version.split("-")[0]; // Azul is stupid
+ return Integer.parseInt(version);
+ }
+
+}
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
new file mode 100644
index 0000000000000000000000000000000000000000..ae2464920c9412ac90b819a540ee58be0741465f
--- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
@@ -0,0 +1,83 @@
+package gg.pufferfish.pufferfish.simd;
+
+import java.awt.Color;
+import jdk.incubator.vector.FloatVector;
+import jdk.incubator.vector.IntVector;
+import jdk.incubator.vector.VectorMask;
+import jdk.incubator.vector.VectorSpecies;
+import org.bukkit.map.MapPalette;
+
+@Deprecated
+public class VectorMapPalette {
+
+ private static final VectorSpecies<Integer> I_SPEC = IntVector.SPECIES_PREFERRED;
+ private static final VectorSpecies<Float> F_SPEC = FloatVector.SPECIES_PREFERRED;
+
+ @Deprecated
+ public static void matchColorVectorized(int[] in, byte[] out) {
+ int speciesLength = I_SPEC.length();
+ int i;
+ for (i = 0; i < in.length - speciesLength; i += speciesLength) {
+ float[] redsArr = new float[speciesLength];
+ float[] bluesArr = new float[speciesLength];
+ float[] greensArr = new float[speciesLength];
+ int[] alphasArr = new int[speciesLength];
+
+ for (int j = 0; j < speciesLength; j++) {
+ alphasArr[j] = (in[i + j] >> 24) & 0xFF;
+ redsArr[j] = (in[i + j] >> 16) & 0xFF;
+ greensArr[j] = (in[i + j] >> 8) & 0xFF;
+ bluesArr[j] = (in[i + j] >> 0) & 0xFF;
+ }
+
+ IntVector alphas = IntVector.fromArray(I_SPEC, alphasArr, 0);
+ FloatVector reds = FloatVector.fromArray(F_SPEC, redsArr, 0);
+ FloatVector greens = FloatVector.fromArray(F_SPEC, greensArr, 0);
+ FloatVector blues = FloatVector.fromArray(F_SPEC, bluesArr, 0);
+ IntVector resultIndex = IntVector.zero(I_SPEC);
+ VectorMask<Integer> modificationMask = VectorMask.fromLong(I_SPEC, 0xffffffff);
+
+ modificationMask = modificationMask.and(alphas.lt(128).not());
+ FloatVector bestDistances = FloatVector.broadcast(F_SPEC, Float.MAX_VALUE);
+
+ for (int c = 4; c < MapPalette.colors.length; c++) {
+ // We're using 32-bit floats here because it's 2x faster and nobody will know the difference.
+ // For correctness, the original algorithm uses 64-bit floats instead. Completely unnecessary.
+ FloatVector compReds = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getRed());
+ FloatVector compGreens = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getGreen());
+ FloatVector compBlues = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getBlue());
+
+ FloatVector rMean = reds.add(compReds).div(2.0f);
+ FloatVector rDiff = reds.sub(compReds);
+ FloatVector gDiff = greens.sub(compGreens);
+ FloatVector bDiff = blues.sub(compBlues);
+
+ FloatVector weightR = rMean.div(256.0f).add(2);
+ FloatVector weightG = FloatVector.broadcast(F_SPEC, 4.0f);
+ FloatVector weightB = FloatVector.broadcast(F_SPEC, 255.0f).sub(rMean).div(256.0f).add(2.0f);
+
+ FloatVector distance = weightR.mul(rDiff).mul(rDiff).add(weightG.mul(gDiff).mul(gDiff)).add(weightB.mul(bDiff).mul(bDiff));
+
+ // Now we compare to the best distance we've found.
+ // This mask contains a "1" if better, and a "0" otherwise.
+ VectorMask<Float> bestDistanceMask = distance.lt(bestDistances);
+ bestDistances = bestDistances.blend(distance, bestDistanceMask); // Update the best distances
+
+ // Update the result array
+ // We also AND with the modification mask because we don't want to interfere if the alpha value isn't large enough.
+ resultIndex = resultIndex.blend(c, bestDistanceMask.cast(I_SPEC).and(modificationMask)); // Update the results
+ }
+
+ for (int j = 0; j < speciesLength; j++) {
+ int index = resultIndex.lane(j);
+ out[i + j] = (byte) (index < 128 ? index : -129 + (index - 127));
+ }
+ }
+
+ // For the final ones, fall back to the regular method
+ for (; i < in.length; i++) {
+ out[i] = MapPalette.matchColor(new Color(in[i], true));
+ }
+ }
+
+}
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
index 3a9aaca2e76411a9c27f9f5e0f22d060d5a66d06..9584e245144b561b4f6745b2f26a4f69a6f92891 100644
--- a/src/main/java/org/bukkit/map/MapPalette.java
+++ b/src/main/java/org/bukkit/map/MapPalette.java
@@ -1,6 +1,7 @@
package org.bukkit.map;
import com.google.common.base.Preconditions;
+import gg.pufferfish.pufferfish.simd.SIMDDetection; // Pufferfish
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Image;
@@ -40,7 +41,7 @@ public final class MapPalette {
}
@NotNull
- static final Color[] colors = {
+ public static final Color[] colors = { // Pufferfish - public access
c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0),
c(89, 125, 39), c(109, 153, 48), c(127, 178, 56), c(67, 94, 29),
c(174, 164, 115), c(213, 201, 140), c(247, 233, 163), c(130, 123, 86),
@@ -211,9 +212,15 @@ public final class MapPalette {
temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth());
byte[] result = new byte[temp.getWidth() * temp.getHeight()];
+ // Pufferfish start
+ if (!SIMDDetection.isEnabled) {
for (int i = 0; i < pixels.length; i++) {
result[i] = matchColor(new Color(pixels[i], true));
}
+ } else {
+ gg.pufferfish.pufferfish.simd.VectorMapPalette.matchColorVectorized(pixels, result);
+ }
+ // Pufferfish end
return result;
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..bd4d1a40f53784662174d426533ef4b5433a15b7 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -584,7 +584,9 @@ public final class SimplePluginManager implements PluginManager {
// Paper start
private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
server.getLogger().log(Level.SEVERE, msg, ex);
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerPluginEnableDisableException(msg, ex, plugin)));
}
// Paper end
@@ -654,9 +656,11 @@ public final class SimplePluginManager implements PluginManager {
));
}
} catch (Throwable ex) {
+ gg.pufferfish.pufferfish.sentry.SentryContext.setEventContext(event, registration); // Pufferfish
// Paper start - error reporting
String msg = "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName();
server.getLogger().log(Level.SEVERE, msg, ex);
+ gg.pufferfish.pufferfish.sentry.SentryContext.removeEventContext(); // Pufferfish
if (!(event instanceof com.destroystokyo.paper.event.server.ServerExceptionEvent)) { // We don't want to cause an endless event loop
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bacacd7ef6c 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -336,7 +336,13 @@ public final class JavaPluginLoader implements PluginLoader {
try {
jPlugin.setEnabled(true);
} catch (Throwable ex) {
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
+ // Paper start - Disable plugins that fail to load
+ this.server.getPluginManager().disablePlugin(jPlugin);
+ return;
+ // Paper end
}
// Perhaps abort here, rather than continue going, but as it stands,
@@ -361,7 +367,9 @@ public final class JavaPluginLoader implements PluginLoader {
try {
jPlugin.setEnabled(false);
} catch (Throwable ex) {
+ gg.pufferfish.pufferfish.sentry.SentryContext.setPluginContext(plugin); // Pufferfish
server.getLogger().log(Level.SEVERE, "Error occurred while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ gg.pufferfish.pufferfish.sentry.SentryContext.removePluginContext(); // Pufferfish
}
if (cloader instanceof PluginClassLoader) {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 1758e8a89c85eea8c2161ddcb5b0e745151a1f5e..fe21d31b463317eb90d58cbca5f098958ca93938 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -48,6 +48,8 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
private io.papermc.paper.plugin.provider.classloader.PluginClassLoaderGroup classLoaderGroup; // Paper
public io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext; // Paper
+ private boolean closed = false; // Pufferfish
+
static {
ClassLoader.registerAsParallelCapable();
}
@@ -183,6 +185,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
throw new ClassNotFoundException(name);
}
+ public boolean _airplane_hasClass(@NotNull String name) { return this.classes.containsKey(name); } // Pufferfish
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
@@ -190,7 +193,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
}
Class<?> result = classes.get(name);
- if (result == null) {
+ if (result == null && !this.closed) { // Pufferfish
String path = name.replace('.', '/').concat(".class");
JarEntry entry = jar.getJarEntry(path);
@@ -237,6 +240,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
this.setClass(name, result); // Paper
}
+ if (result == null) throw new ClassNotFoundException(name); // Pufferfish
return result;
}
@@ -251,6 +255,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
// Paper end
super.close();
} finally {
+ this.closed = true; // Pufferfish
jar.close();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Thu, 22 Dec 2022 20:20:03 +0900
Subject: [PATCH] Plazma Configurations
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index e0f69edf603c2ec99bc92b16b18912272cc41bd9..188cd7b3270422719297a6fd3ecec4a20d9b4f3c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1971,6 +1971,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
}
// Paper end
+ // Plazma start
+ @NotNull
+ public org.bukkit.configuration.file.YamlConfiguration getPlazmaConfiguration() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Plazma end
+
// Purpur start
@NotNull
public org.bukkit.configuration.file.YamlConfiguration getPurpurConfig() {

View File

@@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Thu, 22 Dec 2022 20:29:45 +0900
Subject: [PATCH] Bump Bungeecord Chat API to 1.19-R0.1-SNAPSHOT
diff --git a/build.gradle.kts b/build.gradle.kts
index b5835fa536f90b7f88a5ee4df78733cf43e1cb23..42de5c470a2fbb1e0bc9b809c033e3afe30502fa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -25,7 +25,7 @@ dependencies {
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:31.1-jre")
api("com.google.code.gson:gson:2.10")
- api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
+ api("net.md-5:bungeecord-chat:1.19-R0.1-SNAPSHOT") // Paper // Plazma
api("org.yaml:snakeyaml:1.33")
api("org.joml:joml:1.10.5")
// Paper start

View File

@@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Fri, 6 Jan 2023 17:11:31 +0900
Subject: [PATCH] Publish Packages
diff --git a/build.gradle.kts b/build.gradle.kts
index 42de5c470a2fbb1e0bc9b809c033e3afe30502fa..c2c506afd44c7f14de51bd93004aa8a32ff2103e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -155,3 +155,23 @@ tasks.check {
dependsOn(scanJar)
}
// Paper end
+
+// Plazma start
+publishing {
+ repositories {
+ maven {
+ name = "githubPackage"
+ url = uri("https://maven.pkg.github.com/PlazmaMC/Plazma")
+
+ credentials.username = System.getenv("GITHUB_USERNAME")
+ credentials.password = System.getenv("GITHUB_TOKEN")
+ }
+
+ publications {
+ register<MavenPublication>("gpr") {
+ from(components["java"])
+ }
+ }
+ }
+}
+// Plazma end

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 14 Dec 2024 12:25:43 +0900
Subject: [PATCH] Add option to shoot fireball
diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
index 361db256296d776c27e601c923b2cdc61967122b..8a740bdd99b683255fdd7ebf81f28ceca8b030f8 100644
--- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
+++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
@@ -224,6 +224,12 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
/**
* When an entity is missing a SpawnReason
*/
- DEFAULT
+ DEFAULT,
+ // Plazma start - Option to shoot fireballs
+ /*
+ * When a player shoots a fire charge
+ */
+ FIRE_CHARGE,
+ // Plazma end - Option to shoot fireballs
}
}

View File

@@ -0,0 +1,342 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Mon, 4 Nov 2024 16:04:55 +0900
Subject: [PATCH] Reduce allocations
diff --git a/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java b/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java
index c89d6c4c38e2390cb11ffba182f8741d3726cfd1..2451f466ae6f953b01ad2cbaeac7d163f09f1c5c 100644
--- a/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java
+++ b/src/main/java/io/papermc/paper/command/brigadier/BasicCommand.java
@@ -16,6 +16,17 @@ import org.jspecify.annotations.Nullable;
@FunctionalInterface
public interface BasicCommand {
+ // Plazma start - Reduce allocations
+ /**
+ * Executes the command with the given {@link CommandSourceStack} and arguments.
+ *
+ * @param commandSourceStack the commandSourceStack of the command
+ */
+ default void execute(CommandSourceStack commandSourceStack) {
+ this.execute(commandSourceStack, org.plazmamc.plazma.constants.Null.STRING);
+ }
+ // Plazma end - Reduce allocations
+
/**
* Executes the command with the given {@link CommandSourceStack} and arguments.
*
diff --git a/src/main/java/org/bukkit/Fluid.java b/src/main/java/org/bukkit/Fluid.java
index a3ff4fefaf50f3e99a69ba68cbe8e30c95dac5df..5bbecd907e222f9adcf726bccab63c9ef59f5c14 100644
--- a/src/main/java/org/bukkit/Fluid.java
+++ b/src/main/java/org/bukkit/Fluid.java
@@ -10,6 +10,7 @@ import org.jetbrains.annotations.NotNull;
* Represents a fluid type.
*/
public interface Fluid extends OldEnum<Fluid>, Keyed {
+ Fluid[] EMPTY_ARRAY = new Fluid[0]; // Plazma - Reduce allocations
/**
* No fluid.
@@ -57,6 +58,6 @@ public interface Fluid extends OldEnum<Fluid>, Keyed {
@NotNull
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Fluid[] values() {
- return Lists.newArrayList(Registry.FLUID).toArray(new Fluid[0]);
+ return Lists.newArrayList(Registry.FLUID).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java
index 521f035409ee61a9ad73d39bec938f2938892570..6e53135579426cb677bf34a0813db8268d550428 100644
--- a/src/main/java/org/bukkit/attribute/Attribute.java
+++ b/src/main/java/org/bukkit/attribute/Attribute.java
@@ -15,6 +15,7 @@ import org.jetbrains.annotations.NotNull;
* Types of attributes which may be present on an {@link Attributable}.
*/
public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
+ Attribute[] EMPTY_ARRAY = new Attribute[0]; // Plazma - Reduce allocations
/**
* Maximum health of an Entity.
@@ -170,6 +171,6 @@ public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.
@NotNull
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Attribute[] values() {
- return Lists.newArrayList(Registry.ATTRIBUTE).toArray(new Attribute[0]);
+ return Lists.newArrayList(Registry.ATTRIBUTE).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
diff --git a/src/main/java/org/bukkit/block/Biome.java b/src/main/java/org/bukkit/block/Biome.java
index 20fc2b30fdcdedb012dfe129e746d0b9e162fc36..ca97debfd1a204d15bf5f6c176612cccc2596537 100644
--- a/src/main/java/org/bukkit/block/Biome.java
+++ b/src/main/java/org/bukkit/block/Biome.java
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
* which can be accessed via {@link Registry#BIOME}.
*/
public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
+ Biome[] EMPTY_ARRAY = new Biome[0]; // Plazma - Reduce allocations
Biome OCEAN = getBiome("ocean");
Biome PLAINS = getBiome("plains");
@@ -125,7 +126,7 @@ public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.transl
@NotNull
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Biome[] values() {
- return Lists.newArrayList(Registry.BIOME).toArray(new Biome[0]);
+ return Lists.newArrayList(Registry.BIOME).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
// Paper start
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
index 24b58ed80f3dd7c6b35bb18071000af845d18ba4..13ad0ba6320acd054a665d1749871a14cfd1a520 100644
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
@@ -12,6 +12,8 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface PatternType extends OldEnum<PatternType>, Keyed {
+ PatternType[] EMPTY_ARRAY = new PatternType[0]; // Plazma - Reduce allocations
+
PatternType BASE = getType("base");
PatternType SQUARE_BOTTOM_LEFT = getType("square_bottom_left");
PatternType SQUARE_BOTTOM_RIGHT = getType("square_bottom_right");
@@ -140,6 +142,6 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
@NotNull
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static PatternType[] values() {
- return Lists.newArrayList(Registry.BANNER_PATTERN).toArray(new PatternType[0]);
+ return Lists.newArrayList(Registry.BANNER_PATTERN).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 74384a56eebbce41d431db2507c55eddbcf50a41..ef3afe91312de1d0fb38d985e0421ceae59d7e57 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -58,6 +58,19 @@ public abstract class Command {
this.activeAliases = new ArrayList<String>(aliases);
}
+ // Plazma start - Reduce allocations
+ /**
+ * Executes the command, returning its success
+ *
+ * @param sender Source object which is executing this command
+ * @param commandLabel The alias of the command used
+ * @return true if the command was successful, otherwise false
+ */
+ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel) {
+ return this.execute(sender, commandLabel, org.plazmamc.plazma.constants.Null.STRING);
+ }
+ // Plazma end - Reduce allocations
+
/**
* Executes the command, returning its success
*
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index a824ac90e78d3d7f90b01397270e54422d88e8b9..95df10ad8a53942de435cec7db57c1bb496097dc 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -15,6 +15,8 @@ import org.jetbrains.annotations.Nullable;
* The various type of enchantments that may be added to armour or weapons
*/
public abstract class Enchantment implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
+ private static final Enchantment[] EMPTY_ARRAY = new Enchantment[0]; // Plazma - Reduce allocations
+
/**
* Provides protection against environmental damage
*/
@@ -536,6 +538,6 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
@NotNull
@Deprecated(since = "1.20.3")
public static Enchantment[] values() {
- return Lists.newArrayList(Registry.ENCHANTMENT).toArray(new Enchantment[0]);
+ return Lists.newArrayList(Registry.ENCHANTMENT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
index fca4671c6976aee9e981ef344244f9322651d0c9..7dc1744fba576683155e7970832794c05ceff768 100644
--- a/src/main/java/org/bukkit/entity/Cat.java
+++ b/src/main/java/org/bukkit/entity/Cat.java
@@ -51,6 +51,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
* Represents the various different cat types there are.
*/
interface Type extends OldEnum<Type>, Keyed {
+ Type[] EMPTY_ARRAY = new Type[0]; // Plazma - Reduce allocations
Type TABBY = getType("tabby");
Type BLACK = getType("black");
@@ -89,7 +90,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
@NotNull
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Type[] values() {
- return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
+ return Lists.newArrayList(Registry.CAT_VARIANT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
diff --git a/src/main/java/org/bukkit/entity/Frog.java b/src/main/java/org/bukkit/entity/Frog.java
index f661a6b4797dd814a197e9245bcb2ddf2fca773f..58bf414cd753299abc54c45b3036d3fdbf9170dc 100644
--- a/src/main/java/org/bukkit/entity/Frog.java
+++ b/src/main/java/org/bukkit/entity/Frog.java
@@ -49,6 +49,7 @@ public interface Frog extends Animals {
* Represents the variant of a frog - ie its color.
*/
interface Variant extends OldEnum<Variant>, Keyed {
+ Variant[] EMPTY_ARRAY = new Variant[0]; // Plazma - Reduce allocations
/**
* Temperate (brown-orange) frog.
@@ -88,7 +89,7 @@ public interface Frog extends Animals {
@NotNull
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Variant[] values() {
- return Lists.newArrayList(Registry.FROG_VARIANT).toArray(new Variant[0]);
+ return Lists.newArrayList(Registry.FROG_VARIANT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
}
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
index 9c722a762c88a88bb5ef18c3b9eab8b371360dac..127bc2aab7fb36df206d53f3e6042bb6c920878e 100644
--- a/src/main/java/org/bukkit/entity/Villager.java
+++ b/src/main/java/org/bukkit/entity/Villager.java
@@ -170,6 +170,7 @@ public interface Villager extends AbstractVillager {
* in.
*/
interface Type extends OldEnum<Type>, Keyed {
+ Type[] EMPTY_ARRAY = new Type[0]; // Plazma - Reduce allocations
Type DESERT = getType("desert");
Type JUNGLE = getType("jungle");
@@ -204,7 +205,7 @@ public interface Villager extends AbstractVillager {
@NotNull
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Type[] values() {
- return Lists.newArrayList(Registry.VILLAGER_TYPE).toArray(new Type[0]);
+ return Lists.newArrayList(Registry.VILLAGER_TYPE).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
@@ -213,6 +214,7 @@ public interface Villager extends AbstractVillager {
* Villagers have different trading options depending on their profession,
*/
interface Profession extends OldEnum<Profession>, Keyed, net.kyori.adventure.translation.Translatable {
+ Profession[] EMPTY_ARRAY = new Profession[0]; // Plazma - Reduce allocations
Profession NONE = getProfession("none");
/**
@@ -311,7 +313,7 @@ public interface Villager extends AbstractVillager {
@NotNull
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Profession[] values() {
- return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
+ return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
// Paper start
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index 7f5682c80ff25142e7c8fa14e03b4a62fc5c01d3..5fbcdf637b1e0162276e668d9ebe4a8648a29b8a 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -286,6 +286,7 @@ public final class MapCursor {
* resource pack.
*/
public interface Type extends OldEnum<Type>, Keyed {
+ Type[] EMPTY_ARRAY = new Type[0]; // Plazma - Reduce allocations
Type PLAYER = getType("player");
Type FRAME = getType("frame");
@@ -387,7 +388,7 @@ public final class MapCursor {
@NotNull
@Deprecated(since = "1.21", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Type[] values() {
- return Lists.newArrayList(Registry.MAP_DECORATION_TYPE).toArray(new Type[0]);
+ return Lists.newArrayList(Registry.MAP_DECORATION_TYPE).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 2f8d3b7a5b25e323f892d2ec5eb7c3412a816ea4..22e358f7a83d84745c32ff9f04d79d51d8d92131 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -47,6 +47,7 @@ import org.jetbrains.annotations.Nullable;
@Deprecated(forRemoval = true) // Paper - This implementation may be replaced in a future version of Paper.
// Plugins may still reflect into this class to modify permission logic for the time being.
public final class SimplePluginManager implements PluginManager {
+ public static final Plugin[] EMPTY_PLUGIN = new Plugin[0]; // Plazma - Reduce allocations
private final Server server;
private final Map<Pattern, PluginLoader> fileAssociations = new HashMap<Pattern, PluginLoader>();
private final List<Plugin> plugins = new ArrayList<Plugin>();
@@ -133,7 +134,7 @@ public final class SimplePluginManager implements PluginManager {
this.server.getLogger().log(Level.SEVERE, "Plugin loading error!", e);
}
}
- return pluginList.toArray(new Plugin[0]);
+ return pluginList.toArray(EMPTY_PLUGIN); // Plazma - Reduce allocations
}
Preconditions.checkArgument(directory != null, "Directory cannot be null");
Preconditions.checkArgument(directory.isDirectory(), "Directory must be a directory");
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index e4cfdc80c9e49fc7992183022bdf2f36aae0d95a..0cd7987e935e2b7ede759af3db9af04366930e19 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -19,6 +19,7 @@ import org.jetbrains.annotations.Nullable;
*/
public abstract class PotionEffectType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable, io.papermc.paper.world.flag.FeatureDependant { // Paper - implement Translatable & feature flag API
private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create();
+ private static final PotionEffectType[] EMPTY_ARRAY = new PotionEffectType[0]; // Plazma - Reduce allocations
/**
* Increases movement speed.
@@ -358,7 +359,7 @@ public abstract class PotionEffectType implements Keyed, Translatable, net.kyori
@NotNull
@Deprecated(since = "1.20.3")
public static PotionEffectType[] values() {
- return Lists.newArrayList(Registry.EFFECT).toArray(new PotionEffectType[0]);
+ return Lists.newArrayList(Registry.EFFECT).toArray(EMPTY_ARRAY); // Plazma - Reduce allocations
}
// Paper start
diff --git a/src/main/java/org/plazmamc/plazma/Constants.java b/src/main/java/org/plazmamc/plazma/Constants.java
new file mode 100644
index 0000000000000000000000000000000000000000..137f4f511998828476c2ac408a9a76289a44d071
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/Constants.java
@@ -0,0 +1,7 @@
+package org.plazmamc.plazma;
+
+public interface Constants {
+
+ int[] ZERO_INT_ARRAY = new int[]{0};
+
+}
diff --git a/src/main/java/org/plazmamc/plazma/constants/Null.java b/src/main/java/org/plazmamc/plazma/constants/Null.java
new file mode 100644
index 0000000000000000000000000000000000000000..6018a9230d0d92e23f09cc5b5cc042446bed9962
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/constants/Null.java
@@ -0,0 +1,25 @@
+package org.plazmamc.plazma.constants;
+
+import net.md_5.bungee.api.chat.BaseComponent;
+import java.net.URL;
+import java.util.concurrent.CompletableFuture;
+import java.util.regex.Pattern;
+
+public interface Null {
+
+ byte[] BYTE = new byte[0];
+ short[] SHORT = new short[0];
+ int[] INT = new int[0];
+ long[] LONG = new long[0];
+
+ Object[] OBJECT = new Object[0];
+ String[] STRING = new String[0];
+ URL[] URL = new URL[0];
+ Pattern[] REGEX = new Pattern[0];
+
+ BaseComponent[] COMPONENT = new BaseComponent[0];
+
+ @SuppressWarnings("rawtypes")
+ CompletableFuture[] FUTURE = new CompletableFuture[0];
+
+}

View File

@@ -0,0 +1,91 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Mon, 10 Jun 2024 12:27:08 -0300
Subject: [PATCH] Add ClientboundPacketPreDispatchEvent
diff --git a/src/main/java/net/sparklypower/sparklypaper/event/packet/ClientboundPacketPreDispatchEvent.java b/src/main/java/net/sparklypower/sparklypaper/event/packet/ClientboundPacketPreDispatchEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..9a279ad0b0f9b63f5f3a37977076e0bb805cd56d
--- /dev/null
+++ b/src/main/java/net/sparklypower/sparklypaper/event/packet/ClientboundPacketPreDispatchEvent.java
@@ -0,0 +1,79 @@
+package net.sparklypower.sparklypaper.event.packet;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Called before a packet is dispatched to a connection.
+ * <p>
+ * Compared to other solutions like ProtocolLib, this has the advantage that this is called eariler on the packet sending cycle, before the packet is added to the packet queue, allowing for
+ * main thread access of resources without worrying about race conditions.
+ * <p>
+ * The asynchronously state of this event is undefined, the event may be called on an async or on a sync thread, depending on where the packet was sent.
+ */
+public class ClientboundPacketPreDispatchEvent extends Event implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean isCancelled = false;
+ private final Player player;
+ private Object packet;
+
+ public ClientboundPacketPreDispatchEvent(boolean isAsync, @Nullable Player player, @NotNull Object packet) {
+ super(isAsync);
+ this.player = player;
+ this.packet = packet;
+ }
+
+ /**
+ * Gets the player associated with this packet.
+ * <p>
+ * Depending on which phase the packet is from, the player may be null
+ *
+ * @return the player associated with this packet
+ */
+ @Nullable
+ public Player getPlayer() {
+ return player;
+ }
+
+ /**
+ * Gets the packet associated with this event.
+ *
+ * @return the packet associated with this event
+ */
+ @NotNull
+ public Object getPacket() {
+ return packet;
+ }
+
+ /**
+ * Sets the packet associated with this event.
+ */
+ public void setPacket(@NotNull Object packet) {
+ this.packet = packet;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return isCancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ this.isCancelled = cancel;
+ }
+}

View File

@@ -0,0 +1,76 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Mon, 10 Jun 2024 14:38:59 -0300
Subject: [PATCH] Add PlayerBlockDestroySpeedEvent
diff --git a/src/main/java/net/sparklypower/sparklypaper/event/block/PlayerBlockDestroySpeedEvent.java b/src/main/java/net/sparklypower/sparklypaper/event/block/PlayerBlockDestroySpeedEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..d5e097dad04ed62088aade42ba59866029369326
--- /dev/null
+++ b/src/main/java/net/sparklypower/sparklypaper/event/block/PlayerBlockDestroySpeedEvent.java
@@ -0,0 +1,64 @@
+package net.sparklypower.sparklypaper.event.block;
+
+import org.bukkit.block.Block;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.block.BlockEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called when the block destroy speed is calculated for a block that a player is breaking.
+ * <p>
+ * Useful for custom blocks to override a server side block destroy speed to fix desynchronization issues between the server and the client. (Example: Chiseled bookshelves on the server side that are overriden by target blocks on the client side)
+ * <p>
+ * Keep in mind that you should use this event to synchronize the block destroy speed between the server and the client! Not keeping both destroy speeds in sync will cause desync issues!
+ */
+public class PlayerBlockDestroySpeedEvent extends BlockEvent {
+ private static final HandlerList handlers = new HandlerList();
+ private final Player player;
+ private float destroySpeed;
+
+ public PlayerBlockDestroySpeedEvent(@NotNull Player player, @NotNull Block block, float destroySpeed) {
+ super(block);
+ this.player = player;
+ this.destroySpeed = destroySpeed;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ /**
+ * Gets the Player that is breaking the block involved in this event.
+ *
+ * @return The Player that is breaking the block involved in this event
+ */
+ @NotNull
+ public Player getPlayer() {
+ return player;
+ }
+
+ /**
+ * Gets the block destroy speed of the block involved in this event.
+ *
+ * @return the block destroy speed of the block involved in this event.
+ */
+ public float getDestroySpeed() {
+ return destroySpeed;
+ }
+
+ /**
+ * Sets the block destroy speed of the block involved in this event.
+ */
+ public void setDestroySpeed(float destroySpeed) {
+ this.destroySpeed = destroySpeed;
+ }
+}

View File

@@ -0,0 +1,83 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Tue, 25 Jun 2024 02:54:47 -0300
Subject: [PATCH] Add CraftItemRecipeEvent
Used when a player OR a crafter block crafts an item, as an alternative to PrepareItemCraftEvent and CraftItemEvent, because both events are not triggered when a item is crafted from a crafter
diff --git a/src/main/java/net/sparklypower/sparklypaper/event/inventory/CraftItemRecipeEvent.java b/src/main/java/net/sparklypower/sparklypaper/event/inventory/CraftItemRecipeEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..129e5244fd0928fc21d9aa7d4bc28e89c1408be0
--- /dev/null
+++ b/src/main/java/net/sparklypower/sparklypaper/event/inventory/CraftItemRecipeEvent.java
@@ -0,0 +1,70 @@
+package net.sparklypower.sparklypaper.event.inventory;
+
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.inventory.*;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Called when the recipe of an Item is completed inside a crafting matrix.
+ *
+ * This is an alternate version of [org.bukkit.event.inventory.CraftItemEvent], where this one is called for player crafting items and crafters.
+ */
+public class CraftItemRecipeEvent extends Event implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private final Recipe recipe;
+ private final ItemStack @Nullable [] matrix;
+ private ItemStack result;
+ private boolean isCancelled = false;
+
+ public CraftItemRecipeEvent(@NotNull ItemStack @Nullable [] matrix, @NotNull Recipe recipe, @Nullable ItemStack result) {
+ this.matrix = matrix;
+ this.recipe = recipe;
+ this.result = result;
+ }
+
+ public void setResult(@Nullable ItemStack result) {
+ this.result = result;
+ }
+
+ @Nullable
+ public ItemStack getResult() {
+ return result;
+ }
+
+ /**
+ * @return A copy of the current recipe on the crafting matrix.
+ */
+ @NotNull
+ public Recipe getRecipe() {
+ return recipe;
+ }
+
+ public @Nullable ItemStack[] getCraftingMatrix() {
+ return matrix;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return isCancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ this.isCancelled = cancel;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
+

View File

@@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Mon, 10 Jun 2024 12:22:15 -0300
Subject: [PATCH] Add ClientboundPacketPreDispatchEvent
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 3e550f8e7cd4f4e16f499a8a2a4b95420270f07a..3bcff05a99662c28cc490579162a1f05b55b1cda 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -450,6 +450,18 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
return;
}
+ // SparklyPaper start - Add ClientboundPacketPreDispatchEvent
+ net.minecraft.server.level.ServerPlayer serverPlayer = this.getPlayer();
+ org.bukkit.craftbukkit.entity.CraftPlayer craftPlayer = null;
+ if (serverPlayer != null)
+ craftPlayer = serverPlayer.getBukkitEntity();
+ net.sparklypower.sparklypaper.event.packet.ClientboundPacketPreDispatchEvent event = new net.sparklypower.sparklypaper.event.packet.ClientboundPacketPreDispatchEvent(!org.bukkit.Bukkit.isPrimaryThread(), craftPlayer, packet);
+ org.bukkit.Bukkit.getPluginManager().callEvent(event);
+ if (event.isCancelled())
+ return;
+ packet = (Packet<?>) event.getPacket();
+ // SparklyPaper end
+
packet.onPacketDispatch(this.getPlayer());
if (connected && (InnerUtil.canSendImmediate(this, packet)
|| (io.papermc.paper.util.MCUtil.isMainThread() && packet.isReady() && this.pendingActions.isEmpty()

View File

@@ -0,0 +1,43 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Mon, 10 Jun 2024 14:39:10 -0300
Subject: [PATCH] Add PlayerBlockDestroySpeedEvent
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 99fd67a78539133adf78d65e2c520ff3dd260301..96640ae707c9babe1c4f4895f39d4d7cfc71a765 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -336,6 +336,14 @@ public abstract class BlockBehaviour implements FeatureElement {
protected float getDestroyProgress(BlockState state, Player player, BlockGetter world, BlockPos pos) {
float f = state.getDestroySpeed(world, pos);
+ // SparklyPaper start - Add PlayerBlockDestroySpeedEvent
+ // *Technically* it seems that all getDestroyProgress calls use a LevelAccessor, but anyway...
+ if (world instanceof LevelAccessor) {
+ net.sparklypower.sparklypaper.event.block.PlayerBlockDestroySpeedEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerBlockDestroySpeedEvent(player, (LevelAccessor) world, pos, f);
+ f = event.getDestroySpeed();
+ }
+ // SparklyPaper end
+
if (f == -1.0F) {
return 0.0F;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e37aaf77f94b97b736cc20ef070cefdff0400188..a46f0c810ee2b9679c0530e5e6d3505b3d1f661c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2271,4 +2271,13 @@ public class CraftEventFactory {
return event;
}
// Paper end - add EntityFertilizeEggEvent
+
+ // SparklyPaper start - add PlayerBlockDestroySpeedEvent
+ public static net.sparklypower.sparklypaper.event.block.PlayerBlockDestroySpeedEvent callPlayerBlockDestroySpeedEvent(net.minecraft.world.entity.player.Player player, LevelAccessor world, BlockPos blockPos, float destroySpeed) {
+ org.bukkit.block.Block block = CraftBlock.at(world, blockPos);
+ net.sparklypower.sparklypaper.event.block.PlayerBlockDestroySpeedEvent event = new net.sparklypower.sparklypaper.event.block.PlayerBlockDestroySpeedEvent((Player) player.getBukkitEntity(), block, destroySpeed);
+ event.callEvent();
+ return event;
+ }
+ // SparklyPaper end
}

View File

@@ -0,0 +1,80 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Tue, 25 Jun 2024 02:52:32 -0300
Subject: [PATCH] Add CraftItemRecipeEvent
Used when a player OR a crafter block crafts an item, as an alternative to PrepareItemCraftEvent and CraftItemEvent, because both events are not triggered when a item is crafted from a crafter
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b5d5dbc50a7b8c40739a15f164ffd08fdc534f9c..01a67fde6c823cac52a6b09720f09acc825d3f86 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3218,6 +3218,21 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} else {
event = new CraftItemEvent(recipe, inventory, type, packet.getSlotNum(), click, action);
}
+ // SparklyPaper start - add CraftItemRecipeEvent
+ // We will pigback a bit on the current implementation
+ net.sparklypower.sparklypaper.event.inventory.CraftItemRecipeEvent craftItemRecipeEvent = new net.sparklypower.sparklypaper.event.inventory.CraftItemRecipeEvent(
+ ((CraftingInventory) top).getMatrix(), // We cannot use the top inventory directly because (it seems) that the first slot is the "result" slot
+ recipe,
+ event.getCurrentItem()
+ );
+ if (craftItemRecipeEvent.callEvent()) {
+ event.setCurrentItem(craftItemRecipeEvent.getResult());
+ } else {
+ event.setCancelled(true);
+ cancelled = true;
+ event.setCurrentItem(craftItemRecipeEvent.getResult());
+ }
+ // SparklyPaper end
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
index 0e609b1e3abd50b415d8376dc550375a8a0251b6..8dbac20e32b70879eeee1c3563948e36c2eae342 100644
--- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java
@@ -203,6 +203,13 @@ public class CrafterBlock extends BaseEntityBlock {
}
itemstack = CraftItemStack.asNMSCopy(event.getResult());
// CraftBukkit end
+ // SparklyPaper - add CraftItemRecipeEvent
+ net.sparklypower.sparklypaper.event.inventory.CraftItemRecipeEvent sparklyEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callCraftItemRecipeEvent(crafterblockentity, recipeholder.toBukkitRecipe(), itemstack);
+ if (sparklyEvent.isCancelled()) {
+ return;
+ }
+ itemstack = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(sparklyEvent.getResult());
+ // SparklyPaper end
if (itemstack.isEmpty()) {
world.levelEvent(1050, pos, 0);
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index a46f0c810ee2b9679c0530e5e6d3505b3d1f661c..85926a55066ac793b2e4cfe3502f9ab201df91a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1471,6 +1471,24 @@ public class CraftEventFactory {
Bukkit.getPluginManager().callEvent(crafterCraftEvent);
return crafterCraftEvent;
}
+
+ // SparklyPaper start - add CraftItemRecipeEvent
+ public static net.sparklypower.sparklypaper.event.inventory.CraftItemRecipeEvent callCraftItemRecipeEvent(net.minecraft.world.inventory.CraftingContainer container, Recipe recipe, ItemStack result) {
+ org.bukkit.inventory.ItemStack[] matrix = new org.bukkit.inventory.ItemStack[container.getItems().size()];
+ int i = 0;
+ for (ItemStack item : container.getItems()) {
+ matrix[i] = CraftItemStack.asCraftMirror(item);
+ i++;
+ }
+ org.bukkit.inventory.ItemStack bukkitResult = CraftItemStack.asCraftMirror(result);
+
+ net.sparklypower.sparklypaper.event.inventory.CraftItemRecipeEvent event = new net.sparklypower.sparklypaper.event.inventory.CraftItemRecipeEvent(matrix, recipe, bukkitResult);
+ Bukkit.getPluginManager().callEvent(event);
+
+ return event;
+ }
+ // SparklyPaper end
+
// Paper start
@Deprecated
public static com.destroystokyo.paper.event.entity.ProjectileCollideEvent callProjectileCollideEvent(Entity entity, EntityHitResult position) {

View File

@@ -0,0 +1,79 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 15:04:25 +0900
Subject: [PATCH] Optimize Spigot event bus
diff --git a/src/main/java/org/bukkit/event/Event.java b/src/main/java/org/bukkit/event/Event.java
index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..f1b3559bf9d2023ca59330c65e6e34714759dd9d 100644
--- a/src/main/java/org/bukkit/event/Event.java
+++ b/src/main/java/org/bukkit/event/Event.java
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
*/
public abstract class Event {
private String name;
- private final boolean async;
+ private final net.kyori.adventure.util.TriState async; // Plazma - Optimize spigot event bus
/**
* The default constructor is defined for cleaner code. This constructor
@@ -32,9 +32,35 @@ public abstract class Event {
* by default from default constructor
*/
public Event(boolean isAsync) {
+ this(net.kyori.adventure.util.TriState.byBoolean(isAsync)); // Plazma - Optimize spigot event bus
+ }
+
+ // Plazma start - Optimize spigot event bus
+ /**
+ * This constructor is used to explicitly declare an event as synchronous
+ * or asynchronous or potentially unset.
+ *
+ * @param isAsync true indicates the event will fire asynchronously, false
+ * by default from default constructor, unset indicates that the event may be called on either the server thread or off the server
+ * thread.
+ */
+ public Event(@NotNull final net.kyori.adventure.util.TriState isAsync) {
this.async = isAsync;
}
+ /**
+ * Returns a tristate that, when resolving to true or false, has the exact indications defined by {@link #isAsynchronous()}.
+ * <p>
+ * If the tristate resolves to NOT_SET, the event may or may not have been fired off the main thread, meaning a plugin would have
+ * to validate what thread the spigot event bus was called on.
+ *
+ * @return the tristate enum.
+ */
+ public final @NotNull net.kyori.adventure.util.TriState asynchronous() {
+ return this.async;
+ }
+ // Plazma end - Optimize Spigot event bus
+
// Paper start
/**
* Calls the event and tests if cancelled.
@@ -92,7 +118,7 @@ public abstract class Event {
* @return false by default, true if the event fires asynchronously
*/
public final boolean isAsynchronous() {
- return async;
+ return this.async == net.kyori.adventure.util.TriState.TRUE; // Plazma - Optimize spigot event bus
}
public enum Result {
diff --git a/src/main/java/org/bukkit/plugin/RegisteredListener.java b/src/main/java/org/bukkit/plugin/RegisteredListener.java
index 3b3d9642a8d63798dc28f2f8df77f0466451cbff..0702e1692f7e671188ac18e22ca29f369b0b6352 100644
--- a/src/main/java/org/bukkit/plugin/RegisteredListener.java
+++ b/src/main/java/org/bukkit/plugin/RegisteredListener.java
@@ -62,8 +62,8 @@ public class RegisteredListener {
* @throws EventException If an event handler throws an exception.
*/
public void callEvent(@NotNull final Event event) throws EventException {
- if (event instanceof Cancellable) {
- if (((Cancellable) event).isCancelled() && isIgnoringCancelled()) {
+ if (isIgnoringCancelled()) { // Plazma - Optimize spigot event bus
+ if (event instanceof Cancellable cancellable && cancellable.isCancelled()) { // Plazma - Optimize spigot event bus
return;
}
}

View File

@@ -0,0 +1,35 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sun, 5 May 2019 12:58:19 -0500
Subject: [PATCH] LivingEntity safeFallDistance
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index b777e530122549455dcce6fac8d4a151c1c0af42..57a3e330043077f042a284c99e2631e1582cb32c 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1447,4 +1447,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setBodyYaw(float bodyYaw);
// Paper end - body yaw API
+
+ // Purpur start
+ /**
+ * Gets the distance (in blocks) this entity can safely fall without taking damage
+ *
+ * @return Safe fall distance
+ * @deprecated use {@link org.bukkit.attribute.Attribute#GENERIC_SAFE_FALL_DISTANCE} instead
+ */
+ @Deprecated
+ float getSafeFallDistance();
+
+ /**
+ * Set the distance (in blocks) this entity can safely fall without taking damage
+ *
+ * @param safeFallDistance Safe fall distance
+ * @deprecated use {@link org.bukkit.attribute.Attribute#GENERIC_SAFE_FALL_DISTANCE} instead
+ */
+ @Deprecated
+ void setSafeFallDistance(float safeFallDistance);
+ // Purpur end
}

View File

@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Mon, 17 Aug 2020 21:50:32 -0500
Subject: [PATCH] LivingEntity#broadcastItemBreak
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 5c29956c6db53440322330ff723c7087193641f1..e1079c5c4be99e75a646c090189678dd131f210e 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1447,4 +1447,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setBodyYaw(float bodyYaw);
// Paper end - body yaw API
+
+ // Purpur start
+ /**
+ * Play item break animation for the item in specified equipment slot
+ *
+ * @param slot Equipment slot to play break animation for
+ */
+ void broadcastItemBreak(@NotNull org.bukkit.inventory.EquipmentSlot slot);
+ // Purpur end
}

View File

@@ -0,0 +1,204 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Racci <tangentmoons@gmail.com>
Date: Fri, 3 Dec 2021 23:48:26 +1100
Subject: [PATCH] Potion NamespacedKey
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
index c8ab330ef171795d08fa201cf8320703c7f1c66b..93e2ea220dc03c122f82af65d5e9fda5b582290c 100644
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
@@ -33,6 +33,7 @@ public class PotionEffect implements ConfigurationSerializable {
private static final String AMBIENT = "ambient";
private static final String PARTICLES = "has-particles";
private static final String ICON = "has-icon";
+ private static final String KEY = "namespacedKey"; // Purpur
private final int amplifier;
private final int duration;
private final PotionEffectType type;
@@ -40,6 +41,7 @@ public class PotionEffect implements ConfigurationSerializable {
private final boolean particles;
private final boolean icon;
private final PotionEffect hiddenEffect; // Paper
+ @Nullable private final NamespacedKey key; // Purpur
/**
* Creates a potion effect.
@@ -50,11 +52,12 @@ public class PotionEffect implements ConfigurationSerializable {
* @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
* @param particles the particle status, see {@link PotionEffect#hasParticles()}
* @param icon the icon status, see {@link PotionEffect#hasIcon()}
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
* @param hiddenEffect the hidden PotionEffect
* @hidden Internal-- hidden effects are only shown internally
*/
@org.jetbrains.annotations.ApiStatus.Internal // Paper
- public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable PotionEffect hiddenEffect) { // Paper
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable PotionEffect hiddenEffect, @Nullable NamespacedKey key) { // Paper // Purpur
Preconditions.checkArgument(type != null, "effect type cannot be null");
this.type = type;
this.duration = duration;
@@ -62,6 +65,7 @@ public class PotionEffect implements ConfigurationSerializable {
this.ambient = ambient;
this.particles = particles;
this.icon = icon;
+ this.key = key; // Purpur
// Paper start
this.hiddenEffect = hiddenEffect;
}
@@ -77,10 +81,27 @@ public class PotionEffect implements ConfigurationSerializable {
* @param icon the icon status, see {@link PotionEffect#hasIcon()}
*/
public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) {
- this(type, duration, amplifier, ambient, particles, icon, null);
+ this(type, duration, amplifier, ambient, particles, icon, null, null); // Purpur
// Paper end
}
+ // Purpur start
+ /**
+ * Creates a potion effect.
+ * @param type effect type
+ * @param duration measured in ticks, see {@link
+ * PotionEffect#getDuration()}
+ * @param amplifier the amplifier, see {@link PotionEffect#getAmplifier()}
+ * @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
+ * @param particles the particle status, see {@link PotionEffect#hasParticles()}
+ * @param icon the icon status, see {@link PotionEffect#hasIcon()}
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
+ */
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable NamespacedKey key) {
+ this(type, duration, amplifier, ambient, particles, icon, null, key);
+ }
+ // Purpur end
+
/**
* Creates a potion effect with no defined color.
*
@@ -126,33 +147,33 @@ public class PotionEffect implements ConfigurationSerializable {
* @param map the map to deserialize from
*/
public PotionEffect(@NotNull Map<String, Object> map) {
- this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), (PotionEffect) map.get(HIDDEN_EFFECT)); // Paper
+ this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), (PotionEffect) map.get(HIDDEN_EFFECT), getKey(map)); // Paper // Purpur - getKey
}
// Paper start
@NotNull
public PotionEffect withType(@NotNull PotionEffectType type) {
- return new PotionEffect(type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
@NotNull
public PotionEffect withDuration(int duration) {
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
@NotNull
public PotionEffect withAmplifier(int amplifier) {
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
@NotNull
public PotionEffect withAmbient(boolean ambient) {
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
@NotNull
public PotionEffect withParticles(boolean particles) {
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
@NotNull
public PotionEffect withIcon(boolean icon) {
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
/**
@@ -169,6 +190,13 @@ public class PotionEffect implements ConfigurationSerializable {
}
// Paper end
+ // Purpur start
+ @NotNull
+ public PotionEffect withKey(@Nullable NamespacedKey key) {
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key);
+ }
+ // Purpur end
+
@NotNull
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
PotionEffectType effect;
@@ -201,6 +229,17 @@ public class PotionEffect implements ConfigurationSerializable {
return def;
}
+ // Purpur start
+ @Nullable
+ private static NamespacedKey getKey(@NotNull Map<?, ?> map) {
+ Object key = map.get(KEY);
+ if (key instanceof String stringKey) {
+ return NamespacedKey.fromString(stringKey);
+ }
+ return null;
+ }
+ // Purpur end
+
@Override
@NotNull
public Map<String, Object> serialize() {
@@ -215,6 +254,11 @@ public class PotionEffect implements ConfigurationSerializable {
if (this.hiddenEffect != null) {
builder.put(HIDDEN_EFFECT, this.hiddenEffect);
}
+ // Purpur start
+ if (key != null) {
+ builder.put(KEY, key.toString());
+ }
+ // Purpur end
return builder.build();
// Paper end
}
@@ -243,7 +287,7 @@ public class PotionEffect implements ConfigurationSerializable {
return false;
}
PotionEffect that = (PotionEffect) obj;
- return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon && java.util.Objects.equals(this.hiddenEffect, that.hiddenEffect); // Paper
+ return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon && java.util.Objects.equals(this.hiddenEffect, that.hiddenEffect) && this.key == that.key; // Paper // Purpur - add key
}
/**
@@ -339,6 +383,24 @@ public class PotionEffect implements ConfigurationSerializable {
return icon;
}
+
+ // Purpur start
+ /**
+ * @return if the key isn't the default namespacedKey
+ */
+ public boolean hasKey() {
+ return key != null;
+ }
+
+ /**
+ * @return the key attached to the potion
+ */
+ @Nullable
+ public NamespacedKey getKey() {
+ return key;
+ }
+ // Purpur end
+
@Override
public int hashCode() {
int hash = 1;
@@ -354,6 +416,6 @@ public class PotionEffect implements ConfigurationSerializable {
@Override
public String toString() {
- return "PotionEffect{" + "amplifier=" + amplifier + ", duration=" + duration + ", type=" + type + ", ambient=" + ambient + ", particles=" + particles + ", icon=" + icon + ", hiddenEffect=" + hiddenEffect + '}'; // Paper
+ return "PotionEffect{" + "amplifier=" + amplifier + ", duration=" + duration + ", type=" + type + ", ambient=" + ambient + ", particles=" + particles + ", icon=" + icon + ", hiddenEffect=" + hiddenEffect + ", key=" + key + '}'; // Paper // Purpur - add key
}
}

View File

@@ -0,0 +1,60 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MelnCat <melncatuwu@gmail.com>
Date: Sat, 24 Sep 2022 10:50:33 -0700
Subject: [PATCH] Add item packet serialize event
diff --git a/src/main/java/org/purpurmc/purpur/event/packet/NetworkItemSerializeEvent.java b/src/main/java/org/purpurmc/purpur/event/packet/NetworkItemSerializeEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..c0da73d2ea83a6055e34894ba1c7506fc8667712
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/event/packet/NetworkItemSerializeEvent.java
@@ -0,0 +1,48 @@
+package org.purpurmc.purpur.event.packet;
+
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Called when an item is about to be written to a packet.
+ */
+public class NetworkItemSerializeEvent extends Event {
+ private ItemStack itemStack;
+
+ public NetworkItemSerializeEvent(@NotNull ItemStack itemStack) {
+ super(!org.bukkit.Bukkit.isPrimaryThread());
+ this.itemStack = itemStack;
+ }
+
+ /**
+ * @return The item that is about to be serialized. Not mutable
+ */
+ @NotNull
+ public ItemStack getItemStack() {
+ return itemStack;
+ }
+
+ /**
+ * Sets the item that will be serialized.
+ *
+ * @param itemStack The item
+ */
+ public void setItemStack(@Nullable ItemStack itemStack) {
+ this.itemStack = itemStack;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}

View File

@@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Meln Cat <melncatuwu@gmail.com>
Date: Mon, 2 Oct 2023 17:42:19 -0700
Subject: [PATCH] Add hover lines API
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 98a970a6582dca22e719a31559c7becea4725cb2..1cd2962ceb4fa0a0a3e28a09fa4ccef5802cd5c4 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -353,4 +353,14 @@ public interface ItemFactory {
*/
@NotNull ItemStack enchantWithLevels(@NotNull ItemStack itemStack, @org.jetbrains.annotations.Range(from = 1, to = 30) int levels, boolean allowTreasure, @NotNull java.util.Random random);
// Paper end - enchantWithLevels API
+
+ // Purpur start
+ /**
+ * Returns the lines of text shown when hovering over an item
+ * @param itemStack The ItemStack
+ * @param advanced Whether advanced tooltips are shown
+ * @return the list of Components
+ */
+ @NotNull java.util.List<net.kyori.adventure.text.@NotNull Component> getHoverLines(@NotNull ItemStack itemStack, boolean advanced);
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 6e9b4cbc81878616b1c48add5db534286d267b05..e497575b2f44bb8b3bb6fdda3ae2f5247cbb4679 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1644,5 +1644,14 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
}
return random.nextInt(unbreaking + 1) > 0;
}
+
+ /**
+ * Returns the lines of text shown when hovering over the item
+ * @param advanced Whether advanced tooltips are shown
+ * @return the list of Components
+ */
+ public @NotNull List<net.kyori.adventure.text.@NotNull Component> getHoverLines(boolean advanced) {
+ return Bukkit.getItemFactory().getHoverLines(this, advanced);
+ }
// Purpur end
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 23 Mar 2023 12:08:57 +0900
Subject: [PATCH] Build Fix
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 141b25060905f598208cb1a39f4c2b2e9f3ef766..d67bc2abe9590b1b0b86e450c9fabe5e2237be6c 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -946,7 +946,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
this.goalSelector.tickRunningGoals(false);
//this.level.getProfiler().pop(); // Purpur
} else {
- this.level.getProfiler().push("targetSelector");
+ //this.level.getProfiler().push("targetSelector"); // Plazma - build fix
if (this.targetSelector.inactiveTick(this.activatedPriority, false)) // Pufferfish - use this to alternate ticking
this.targetSelector.tick();
//this.level.getProfiler().pop(); // Purpur

View File

@@ -1,390 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@outlook.com>
Date: Wed, 21 Dec 2022 19:31:24 +0900
Subject: [PATCH] Rebrand
diff --git a/build.gradle.kts b/build.gradle.kts
index 6c5b3f6a2c4f7b20e3388b63c36b7c4bc4cf179f..e4de94641d33b3deadc44bbb5f23f666d79737ea 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,7 +7,7 @@ plugins {
}
dependencies {
- implementation(project(":purpur-api")) // Purpur
+ implementation(project(":plazma-api")) // Purpur
implementation("io.papermc.paper:paper-mojangapi:1.19.4-R0.1-SNAPSHOT") // Purpur
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
@@ -82,7 +82,7 @@ tasks.jar {
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
- "Implementation-Version" to "git-Purpur-$implementationVersion", // Pufferfish // Purpur
+ "Implementation-Version" to "git-Plazma-$implementationVersion", // Pufferfish // Purpur // Plazma
"Implementation-Vendor" to date, // Paper
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76098a79da 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur
+ Metrics metrics = new Metrics("Plazma", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur // Plazma
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
@@ -603,7 +603,7 @@ public class Metrics {
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur
- metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
+ metrics.addCustomChart(new Metrics.SimplePie("plazma_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur // Plazma
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199f27babbd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -20,7 +20,7 @@ import java.util.stream.StreamSupport;
public class PaperVersionFetcher implements VersionFetcher {
private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
// Purpur start
- private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads";
+ private static final String DOWNLOAD_PAGE = "https://github.com/PlazmaMC/Plazma/releases"; // Plazma
private static int distance = -2; public int distance() { return distance; }
// Purpur end
private static @Nullable String mcVer;
@@ -33,8 +33,8 @@ public class PaperVersionFetcher implements VersionFetcher {
@Nonnull
@Override
public Component getVersionMessage(@Nonnull String serverVersion) {
- String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur
- final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Purpur
+ String[] parts = serverVersion.substring("git-Plazma-".length()).split("[-\\s]"); // Purpur // Plazma
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma
final Component history = getHistory();
return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
@@ -47,7 +47,7 @@ public class PaperVersionFetcher implements VersionFetcher {
String result = matcher.group();
mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
} else {
- org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Purpur!"); // Purpur
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Plazma!"); // Purpur // Plazma
org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
}
@@ -57,6 +57,7 @@ public class PaperVersionFetcher implements VersionFetcher {
}
private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
+ /* // Plazma - Disable CI Checking
//int distance; // Purpur - use field
try {
int jenkinsBuild = Integer.parseInt(versionInfo);
@@ -65,6 +66,11 @@ public class PaperVersionFetcher implements VersionFetcher {
versionInfo = versionInfo.replace("\"", "");
distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
}
+ // Plazma start - Disable CI Checking
+ */
+ versionInfo = versionInfo.replace("\"", ""); // Plazma
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo); // Plazma
+ // Plazma end
switch (distance) {
case -1:
@@ -83,6 +89,7 @@ public class PaperVersionFetcher implements VersionFetcher {
}
}
+ /* // Plazma - Disable CI Checking
private static int fetchDistanceFromSiteApi(int jenkinsBuild, @Nullable String siteApiVersion) {
if (siteApiVersion == null) { return -1; }
try {
@@ -102,6 +109,7 @@ public class PaperVersionFetcher implements VersionFetcher {
return -1;
}
}
+ */ // Plazma - Disable CI Checking
// Contributed by Techcable <Techcable@outlook.com> in GH-65
private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) {
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
index 3cb56595822799926a8141e60a42f5d1edfc6de5..19d1d136fc28d6c114f6bc44c6450d2df51c3cb9 100644
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
@Override
protected LineReader buildReader(LineReaderBuilder builder) {
builder
- .appName("Purpur") // Purpur
+ .appName("Plazma") // Purpur // Plazma
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
.completer(new ConsoleCommandCompleter(this.server))
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
index b5b6657e52e4f7a630229bd3ba433438af293e22..c468733f44ccb3ff4ba3c20921a4ec52658f0689 100644
--- a/src/main/java/net/minecraft/CrashReport.java
+++ b/src/main/java/net/minecraft/CrashReport.java
@@ -35,7 +35,7 @@ public class CrashReport {
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(cause); // Paper
this.title = message;
this.exception = cause;
- this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
+ this.systemReport.setDetail("Plazma Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma
}
public String getTitle() {
@@ -125,7 +125,7 @@ public class CrashReport {
stringbuilder.append("---- Minecraft Crash Report ----\n");
// Purpur start
stringbuilder.append("// ");
- stringbuilder.append("// DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!");
+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO PLAZMA INSTEAD!"); // Plazma
// Purpur end
stringbuilder.append("// ");
stringbuilder.append(CrashReport.getErrorComment());
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index c6fa6bcd66d61359124a8426b919493c6ec43f06..e0eaa847526431ac58d00f18f0fca6b1ef9a79cd 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -81,6 +81,17 @@ public class Main {
@DontObfuscate
public static void main(final OptionSet optionset) { // CraftBukkit - replaces main(String[] astring)
+ // Plazma start - Branding
+ System.out.println("""
+ \033[38;2;236;61;151m┏\033[38;2;236;61;157m━\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m━\033[38;2;239;63;187m┓\033[38;2;239;63;193m \033[38;2;239;64;200m┏\033[38;2;240;64;206m━\033[38;2;240;64;212m┓\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m \033[38;2;232;67;243m┏\033[38;2;227;67;244m━\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m━\033[38;2;205;69;245m┓\033[38;2;200;69;246m \033[38;2;195;69;246m┏\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m━\033[38;2;173;71;247m━\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┓\033[38;2;152;72;249m┏\033[38;2;147;73;249m━\033[38;2;141;73;250m━\033[38;2;136;74;250m┓\033[38;2;131;74;250m \033[38;2;125;74;251m \033[38;2;120;75;251m \033[38;2;115;75;251m┏\033[38;2;109;76;252m━\033[38;2;104;76;252m━\033[38;2;99;77;252m┓\033[38;2;94;77;253m \033[38;2;88;77;253m┏\033[38;2;83;78;253m━\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m━\033[38;2;80;97;255m┓\033[38;2;80;103;255m\s
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m┏\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m┓\033[38;2;239;63;187m┗\033[38;2;239;63;193m┓\033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┏\033[38;2;232;67;243m┛\033[38;2;227;67;244m┏\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┓\033[38;2;205;69;245m┗\033[38;2;200;69;246m┓\033[38;2;195;69;246m┗\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m┓\033[38;2;173;71;247m \033[38;2;168;71;248m \033[38;2;163;72;248m┏\033[38;2;157;72;249m┛\033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m \033[38;2;136;74;250m┗\033[38;2;131;74;250m┓\033[38;2;125;74;251m \033[38;2;120;75;251m┏\033[38;2;115;75;251m┛\033[38;2;109;76;252m \033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┏\033[38;2;88;77;253m┛\033[38;2;83;78;253m┏\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┓\033[38;2;80;97;255m┗\033[38;2;80;103;255m┓
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m┗\033[38;2;237;62;163m━\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m┛\033[38;2;239;63;187m┏\033[38;2;239;63;193m┛\033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┗\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┛\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m \033[38;2;189;70;246m \033[38;2;184;70;247m┏\033[38;2;179;70;247m┛\033[38;2;173;71;247m \033[38;2;168;71;248m┏\033[38;2;163;72;248m┛\033[38;2;157;72;249m \033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┏\033[38;2;136;74;250m┓\033[38;2;131;74;250m┗\033[38;2;125;74;251m━\033[38;2;120;75;251m┛\033[38;2;115;75;251m┏\033[38;2;109;76;252m┓\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┗\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┛\033[38;2;80;97;255m \033[38;2;80;103;255m┃
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m \033[38;2;237;62;163m┏\033[38;2;237;62;169m━\033[38;2;238;62;175m━\033[38;2;238;63;181m━\033[38;2;239;63;187m┛\033[38;2;239;63;193m \033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┃\033[38;2;241;65;218m \033[38;2;241;65;224m \033[38;2;242;65;230m \033[38;2;242;66;236m \033[38;2;242;66;242m \033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┏\033[38;2;221;67;244m━\033[38;2;216;68;244m━\033[38;2;211;68;245m┓\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m \033[38;2;189;70;246m┏\033[38;2;184;70;247m┛\033[38;2;179;70;247m \033[38;2;173;71;247m┏\033[38;2;168;71;248m┛\033[38;2;163;72;248m \033[38;2;157;72;249m \033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┃\033[38;2;136;74;250m┗\033[38;2;131;74;250m┓\033[38;2;125;74;251m \033[38;2;120;75;251m┏\033[38;2;115;75;251m┛\033[38;2;109;76;252m┃\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┏\033[38;2;78;79;254m━\033[38;2;79;85;254m━\033[38;2;79;91;254m┓\033[38;2;80;97;255m \033[38;2;80;103;255m┃
+ \033[38;2;236;61;151m┃\033[38;2;236;61;157m \033[38;2;237;62;163m┃\033[38;2;237;62;169m \033[38;2;238;62;175m \033[38;2;238;63;181m \033[38;2;239;63;187m \033[38;2;239;63;193m \033[38;2;239;64;200m┃\033[38;2;240;64;206m \033[38;2;240;64;212m┗\033[38;2;241;65;218m━\033[38;2;241;65;224m━\033[38;2;242;65;230m━\033[38;2;242;66;236m━\033[38;2;242;66;242m┓\033[38;2;237;66;243m┃\033[38;2;232;67;243m \033[38;2;227;67;244m┃\033[38;2;221;67;244m \033[38;2;216;68;244m \033[38;2;211;68;245m┃\033[38;2;205;69;245m \033[38;2;200;69;246m┃\033[38;2;195;69;246m┏\033[38;2;189;70;246m┛\033[38;2;184;70;247m \033[38;2;179;70;247m \033[38;2;173;71;247m┗\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┓\033[38;2;152;72;249m┃\033[38;2;147;73;249m \033[38;2;141;73;250m┃\033[38;2;136;74;250m \033[38;2;131;74;250m┗\033[38;2;125;74;251m━\033[38;2;120;75;251m┛\033[38;2;115;75;251m \033[38;2;109;76;252m┃\033[38;2;104;76;252m \033[38;2;99;77;252m┃\033[38;2;94;77;253m┃\033[38;2;88;77;253m \033[38;2;83;78;253m┃\033[38;2;78;79;254m \033[38;2;79;85;254m \033[38;2;79;91;254m┃\033[38;2;80;97;255m \033[38;2;80;103;255m┃
+ \033[38;2;236;61;151m┗\033[38;2;236;61;157m━\033[38;2;237;62;163m┛\033[38;2;237;62;169m \033[38;2;238;62;175m \033[38;2;238;63;181m \033[38;2;239;63;187m \033[38;2;239;63;193m \033[38;2;239;64;200m┗\033[38;2;240;64;206m━\033[38;2;240;64;212m━\033[38;2;241;65;218m━\033[38;2;241;65;224m━\033[38;2;242;65;230m━\033[38;2;242;66;236m━\033[38;2;242;66;242m┛\033[38;2;237;66;243m┗\033[38;2;232;67;243m━\033[38;2;227;67;244m┛\033[38;2;221;67;244m \033[38;2;216;68;244m \033[38;2;211;68;245m┗\033[38;2;205;69;245m━\033[38;2;200;69;246m┛\033[38;2;195;69;246m┗\033[38;2;189;70;246m━\033[38;2;184;70;247m━\033[38;2;179;70;247m━\033[38;2;173;71;247m━\033[38;2;168;71;248m━\033[38;2;163;72;248m━\033[38;2;157;72;249m┛\033[38;2;152;72;249m┗\033[38;2;147;73;249m━\033[38;2;141;73;250m┛\033[38;2;136;74;250m \033[38;2;131;74;250m \033[38;2;125;74;251m \033[38;2;120;75;251m \033[38;2;115;75;251m \033[38;2;109;76;252m┗\033[38;2;104;76;252m━\033[38;2;99;77;252m┛\033[38;2;94;77;253m┗\033[38;2;88;77;253m━\033[38;2;83;78;253m┛\033[38;2;78;79;254m \033[38;2;79;85;254m \033[38;2;79;91;254m┗\033[38;2;80;97;255m━\033[38;2;80;103;255m┛
+ """);
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so DO NOT USE it on a production server!");
+ // Plazma end
SharedConstants.tryDetectVersion();
/* CraftBukkit start - Replace everything
OptionParser optionparser = new OptionParser();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5416b64c3000c9b17a78991218e068bf5ef33db7..180ea5edb002856f975c074e319998b68b67a7af 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -929,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
if (!isSameThread()) {
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PURPUR)"); // Purpur
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PLAZMA)"); // Purpur // Plazma
while (this.getRunningThread().isAlive()) {
this.getRunningThread().stop();
try {
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
index c07918aa1ed2469ad7a76a0add60ab648ff7f421..d14e42612752ef1d5c37c492b62ed4a6d65c1e0e 100644
--- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
+++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
@@ -51,7 +51,7 @@ public class MinecraftServerGui extends JComponent {
;
}
- final JFrame jframe = new JFrame("Minecraft server");
+ final JFrame jframe = new JFrame("Plazma"); // Plazma
final MinecraftServerGui servergui = new MinecraftServerGui(server);
jframe.setDefaultCloseOperation(2);
@@ -59,7 +59,7 @@ public class MinecraftServerGui extends JComponent {
jframe.pack();
jframe.setLocationRelativeTo((Component) null);
jframe.setVisible(true);
- jframe.setName("Minecraft server"); // Paper
+ jframe.setName("Plazma"); // Paper // Plazma
// Paper start - Add logo as frame image
try {
@@ -71,7 +71,7 @@ public class MinecraftServerGui extends JComponent {
jframe.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent windowevent) {
if (!servergui.isClosing.getAndSet(true)) {
- jframe.setTitle("Minecraft server - shutting down!");
+ jframe.setTitle("Plazma - shutting down"); // Plazma
server.halt(true);
servergui.runFinalizers();
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b8001bca2a33ec1e60566948a651400418a6e9e7..92b440b24c6b083f81837611d08fbd6773a2a6e6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1041,7 +1041,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition);
// Spigot start
if (tickingblockentity == null) {
- this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
+ this.getCraftServer().getLogger().severe("Plazma has detected a null entity and has removed it, preventing a crash"); // Plazma
tilesThisCycle--;
continue;
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d25f79db1f 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -113,7 +113,7 @@ public class RegionFileStorage implements AutoCloseable {
// Paper start
private static void printOversizedLog(String msg, Path file, int x, int z) {
- org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
+ org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PLAZMA - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Plazma
}
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bc1a2df0a7ddaf030917e4723994464d77e55d02..e59532dda47d0f9635b5393cb4ef0484fd6bb9ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
- private final String serverName = "Purpur"; // Paper // Pufferfish // Purpur
+ private final String serverName = "Plazma"; // Paper // Pufferfish // Purpur // Plazma
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index cf7ba8724ab68f6955b5ebfa1ba46c4397da32b3..54cbe906619a30b5f7b5dbb344eebf3452e1b200 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -883,7 +883,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return EntityCategory.WATER;
}
- throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Purpur."); // Purpur
+ throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Plazma."); // Purpur // Plazma
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 5402098dce0d64d3dceea51f248d7d366850a74f..c49bed43a34549936b5751678f2389c2d9a6e1ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -504,7 +504,7 @@ public class CraftScheduler implements BukkitScheduler {
this.parsePending();
} else {
//this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
- task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Purpur"); // Paper // Purpur
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Plazma"); // Paper // Purpur // Plazma
// We don't need to parse pending
// (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/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616d4e857c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -8,22 +8,25 @@ import java.util.logging.Logger;
import org.bukkit.Bukkit;
public final class Versioning {
- public static String getBukkitVersion() {
- String result = "Unknown-Version";
-
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.purpurmc.purpur/purpur-api/pom.properties"); // Pufferfish // Purpur
+ // Plazma start
+ public static String version = "Unknown-Version";
+ static {
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties");
Properties properties = new Properties();
if (stream != null) {
try {
properties.load(stream);
- result = properties.getProperty("version");
+ version = properties.getProperty("version");
} catch (IOException ex) {
- Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Bukkit version!", ex);
+ Logger.getLogger(Versioning.class.getName()).log(Level.SEVERE, "Could not get Plazma version!", ex);
}
}
+ }
- return result;
+ public static String getBukkitVersion() {
+ return version;
}
+ // Plazma end
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 0bcbe1f07ff8e552d2abd6e432af5710005acc04..ac238eeea791180b66677870401c0b756f0db07b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -227,7 +227,7 @@ public class PurpurConfig {
deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer);
}
- public static String serverModName = "Purpur";
+ public static String serverModName = "Plazma"; // Plazma
private static void serverModName() {
serverModName = getString("settings.server-mod-name", serverModName);
}
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index a810bfd3b8d6bd4d8f2ef8797e4281ae4fe8a67f..a7017a0f8326e307397d357774d39216e525bdd8 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -96,7 +96,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
private WatchdogThread(long timeoutTime, boolean restart)
{
- super( "Watchdog Thread" ); // Purpur - use a generic name
+ super( "Plazma Watchdog Thread" ); // Purpur - use a generic name // Plazma
this.timeoutTime = timeoutTime;
this.restart = restart;
earlyWarningEvery = Math.min(io.papermc.paper.configuration.GlobalConfiguration.get().watchdog.earlyWarningEvery, timeoutTime); // Paper
@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
if (isLongTimeout) {
// Paper end
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Purpur bug." ); // Paper // Purpur
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Plazma bug." ); // Paper // Purpur // Plazma
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
- log.log( Level.SEVERE, "If you are unsure or still think this is a Purpur bug, please report this to https://github.com/PurpurMC/Purpur/issues" ); // Purpur
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Plazma bug, please report this to https://github.com/PlazmaMC/Plazma/issues" ); // Purpur // Plazma
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
- log.log( Level.SEVERE, "Purpur version: " + Bukkit.getServer().getVersion() ); // Purpur
+ log.log( Level.SEVERE, "Plazma version: " + Bukkit.getServer().getVersion() ); // Purpur
//
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
{
@@ -185,12 +185,12 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
// Paper end
} else
{
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
}
// Paper end - Different message for short timeout
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Purpur!):" ); // Paper // Purpur
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Plazma!):" ); // Paper // Purpur // Plazma
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
this.dumpTickingInfo(); // Paper - log detailed tick information
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
@@ -206,7 +206,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
WatchdogThread.dumpThread( thread, log );
}
} else {
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---"); // Purpur
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma
}
log.log( Level.SEVERE, "------------------------------" );

View File

@@ -1,430 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@gmail.com>
Date: Fri, 10 Mar 2023 22:08:56 +0900
Subject: [PATCH] Rebrand Logo
diff --git a/src/main/resources/logo.png b/src/main/resources/logo.png
index a7d785f60c884ee4ee487cc364402d66c3dc2ecc..278de5d47a7802ab89d9ae39c1560ef87d6d6fc4 100644
GIT binary patch
literal 7999
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
E0k}Z_!T<mO
literal 14310
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%0ABLt+m?son?j
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
WX&3$!%>|s_1IbA#OV)^+1pg1OmmZn`

File diff suppressed because it is too large Load Diff

View File

@@ -1,75 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 24 Mar 2023 23:54:51 +0900
Subject: [PATCH] Add more metrics
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..067bcbcb81802a3a52ecff737ddf2c033696ecfb 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -636,12 +636,63 @@ public class Metrics {
return map;
}));
+ // Plazma start
+ metrics.addCustomChart(new Metrics.DrilldownPie("datapacks", () -> {
+ Map<String, Map<String, Integer>> map = new HashMap<>();
+ int datapacks = Bukkit.getServer().getDatapackManager().getEnabledPacks().size();
+ Map<String, Integer> entry = new HashMap<>();
+ entry.put(String.valueOf(datapacks), 1);
+
+ if (datapacks == 0)
+ map.put("0", entry);
+ else if (datapacks <= 5)
+ map.put("1-5", entry);
+ else if (datapacks <= 10)
+ map.put("6-10", entry);
+ else if (datapacks <= 25)
+ map.put("11-25", entry);
+ else
+ map.put("26+", entry);
+
+ return map;
+ }));
+
+ List<Plugin> plugins = new ArrayList<>();
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
+ if (plugin.isEnabled()) {
+ plugins.add(plugin);
+ }
+ }
+
+ metrics.addCustomChart(new Metrics.DrilldownPie("plugins", () -> {
+ Map<String, Map<String, Integer>> map = new HashMap<>();
+ int plugins1 = plugins.size();
+ Map<String, Integer> entry = new HashMap<>();
+ entry.put(String.valueOf(plugins1), 1);
+
+ if (plugins1 == 0)
+ map.put("0", entry);
+ else if (plugins1 <= 5)
+ map.put("1-5", entry);
+ else if (plugins1 <= 10)
+ map.put("6-10", entry);
+ else if (plugins1 <= 25)
+ map.put("11-25", entry);
+ else if (plugins1 <= 50)
+ map.put("26-50", entry);
+ else
+ map.put("51+", entry);
+
+ return map;
+ }));
+ // Plazma end
+
metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
// count legacy plugins
int legacy = 0;
- for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
+ for (Plugin plugin : plugins) { // Plazma
if (CraftMagicNumbers.isLegacy(plugin.getDescription())) {
legacy++;
}

View File

@@ -1,501 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Tue, 7 Mar 2023 12:28:34 +0900
Subject: [PATCH] Optimize Default Configurations
Original: YouHaveTrouble/minecraft-optimization, AkiraDevelopment/SimplyMC
Copyright (C) 2023 YouHaveTrouble, AkiraDevelopment
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
index c0f44f0593aab16d5ceab493f4075772f454732e..7aa260293a12c0b9b9efcd2d8bc470fb06a32cf1 100644
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -72,7 +72,7 @@ public class PufferfishConfig {
getString("info.version", "1.0");
setComment("info",
"Pufferfish Configuration",
- "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host",
+ //"Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma
"Join our Discord for support: https://discord.gg/reZw4vQV9H",
"Download new builds at https://ci.pufferfish.host/job/Pufferfish");
@@ -220,7 +220,7 @@ public class PufferfishConfig {
public static int maxProjectileLoadsPerProjectile;
private static void projectileLoading() {
maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick.");
- maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
+ maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 8, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed."); // Plazma - Optimize Default Configurations
setComment("projectile", "Optimizes projectile settings");
}
@@ -233,7 +233,7 @@ public class PufferfishConfig {
public static int activationDistanceMod;
private static void dynamicActivationOfBrains() throws IOException {
- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Purpur // Plazma - Optimize Default Configurations
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
"This value determines how far away an entity has to be",
"from the player to start being effected by DEAR.");
@@ -241,7 +241,7 @@ public class PufferfishConfig {
maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20,
"This value defines how often in ticks, the furthest entity",
"will get their pathfinders and behaviors ticked. 20 = 1s");
- activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
+ activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 7, // Plazma - Optimize Default Configurations
"This value defines how much distance modifies an entity's",
"tick frequency. freq = (distanceToPlayer^2) / (2^value)",
"If you want further away entities to tick less often, use 7.",
@@ -277,7 +277,7 @@ public class PufferfishConfig {
public static boolean throttleInactiveGoalSelectorTick;
private static void inactiveGoalSelectorThrottle() {
- getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", false, // Purpur
+ getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", !Boolean.getBoolean("Plazma.disableConfigOptimization"), // Purpur // Plazma - Optimize Default Configurations
"Throttles the AI goal selector in entity inactive ticks.",
"This can improve performance by a few percent, but has minor gameplay implications.");
}
@@ -307,10 +307,10 @@ public class PufferfishConfig {
}
- public static boolean disableMethodProfiler;
+ public static boolean disableMethodProfiler = true; // Plazma
public static boolean disableOutOfOrderChat;
private static void miscSettings() {
- disableMethodProfiler = getBoolean("misc.disable-method-profiler", true);
+ //disableMethodProfiler = getBoolean("misc.disable-method-profiler", true); // Plazma
disableOutOfOrderChat = getBoolean("misc.disable-out-of-order-chat", false);
setComment("misc", "Settings for things that don't belong elsewhere");
}
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 6bf14183a3fcd2b3d166752ce33240d2ff1ffa7c..4398c1b992f53248bb13180d4a69e55c0e742387 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -114,7 +114,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Watchdog extends ConfigurationPart {
public int earlyWarningEvery = 5000;
- public int earlyWarningDelay = 10000;
+ public int earlyWarningDelay = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10000 : 180000; // Plazma - Optimize Default Configurations
}
public SpamLimiter spamLimiter;
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7a65d5262 100644
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
@@ -84,15 +84,15 @@ public class WorldConfiguration extends ConfigurationPart {
public class AntiXray extends ConfigurationPart {
public boolean enabled = false;
- public EngineMode engineMode = EngineMode.HIDE;
+ public EngineMode engineMode = Boolean.getBoolean("Plazma.disableConfigOptimization") ? EngineMode.HIDE : EngineMode.OBFUSCATE; // Plazma - Optimize Default Configurations
public int maxBlockHeight = 64;
public int updateRadius = 2;
public boolean lavaObscures = false;
public boolean usePermission = false;
- public List<String> hiddenBlocks = List.of("copper_ore", "deepslate_copper_ore", "gold_ore", "deepslate_gold_ore", "iron_ore", "deepslate_iron_ore",
- "coal_ore", "deepslate_coal_ore", "lapis_ore", "deepslate_lapis_ore", "mossy_cobblestone", "obsidian", "chest", "diamond_ore", "deepslate_diamond_ore",
- "redstone_ore", "deepslate_redstone_ore", "clay", "emerald_ore", "deepslate_emerald_ore", "ender_chest"); // TODO update type to List<Block>
- public List<String> replacementBlocks = List.of("stone", "oak_planks", "deepslate"); // TODO update type to List<Block>
+ // Plazma start - Optimize Default Configurations
+ public List<String> hiddenBlocks = List.of("air", "copper_ore", "deepslate_copper_ore", "raw_copper_block", "diamond_ore", "deepslate_diamond_ore", "gold_ore", "deepslate_gold_ore", "iron_ore", "deepslate_iron_ore", "raw_iron_block", "lapis_ore", "deepslate_lapis_ore", "redstone_ore", "deepslate_redstone_ore"); // TODO update type to List<Block>
+ public List<String> replacementBlocks = List.of("chest", "amethyst_block", "andesite", "budding_amethyst", "calcite", "coal_ore", "deepslate_coal_ore", "deepslate", "diorite", "dirt", "emerald_ore", "deepslate_emerald_ore", "granite", "gravel", "oak_planks", "smooth_basalt", "stone", "tuff"); // TODO update type to List<Block>
+ // Plazma end
}
}
@@ -133,7 +133,7 @@ public class WorldConfiguration extends ConfigurationPart {
@MergeMap
public Reference2IntMap<MobCategory> spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
@MergeMap
- public Map<MobCategory, DespawnRange> despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), category.getDespawnDistance())));
+ public Map<MobCategory, DespawnRange> despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), Boolean.getBoolean("Plazma.disableConfigOptimization") ? category.getDespawnDistance() : (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8))); // Plazma - Optimize Default Configurations
@ConfigSerializable
public record DespawnRange(@Required int soft, @Required int hard) {
@@ -317,7 +317,7 @@ public class WorldConfiguration extends ConfigurationPart {
public class Environment extends ConfigurationPart {
public boolean disableThunder = false;
public boolean disableIceAndSnow = false;
- public boolean optimizeExplosions = false;
+ public boolean optimizeExplosions = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
public boolean disableExplosionKnockback = false;
public boolean generateFlatBedrock = false;
public FrostedIce frostedIce;
@@ -397,9 +397,9 @@ public class WorldConfiguration extends ConfigurationPart {
public class Collisions extends ConfigurationPart {
public boolean onlyPlayersCollide = false;
public boolean allowVehicleCollisions = true;
- public boolean fixClimbingBypassingCrammingRule = false;
+ public boolean fixClimbingBypassingCrammingRule = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
@RequiresSpigotInitialization(MaxEntityCollisionsInitializer.class)
- public int maxEntityCollisions = 8;
+ public int maxEntityCollisions = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 2; // Plazma - Optimize Default Configurations
public boolean allowPlayerCrammingDamage = false;
}
@@ -407,18 +407,40 @@ public class WorldConfiguration extends ConfigurationPart {
public class Chunks extends ConfigurationPart {
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
- public int maxAutoSaveChunksPerTick = 24;
+ public int maxAutoSaveChunksPerTick = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 24 : 8; // Plazma - Optimize Default Configurations
public int fixedChunkInhabitedTime = -1;
- public boolean preventMovingIntoUnloadedChunks = false;
+ public boolean preventMovingIntoUnloadedChunks = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
public Duration delayChunkUnloadsBy = Duration.of("10s");
public Reference2IntMap<EntityType<?>> entityPerChunkSaveLimit = Util.make(new Reference2IntOpenHashMap<>(BuiltInRegistries.ENTITY_TYPE.size()), map -> {
- map.defaultReturnValue(-1);
- map.put(EntityType.EXPERIENCE_ORB, -1);
- map.put(EntityType.SNOWBALL, -1);
- map.put(EntityType.ENDER_PEARL, -1);
- map.put(EntityType.ARROW, -1);
- map.put(EntityType.FIREBALL, -1);
- map.put(EntityType.SMALL_FIREBALL, -1);
+ // Plazma start - Optimize Default Configurations
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
+ map.put(EntityType.AREA_EFFECT_CLOUD, 8);
+ map.put(EntityType.ARROW, 16);
+ map.put(EntityType.DRAGON_FIREBALL, 3);
+ map.put(EntityType.EGG, 8);
+ map.put(EntityType.ENDER_PEARL, 8);
+ map.put(EntityType.EXPERIENCE_BOTTLE, 3);
+ map.put(EntityType.EXPERIENCE_ORB, 16);
+ map.put(EntityType.EYE_OF_ENDER, 8);
+ map.put(EntityType.FIREBALL, 8);
+ map.put(EntityType.FIREWORK_ROCKET, 8);
+ map.put(EntityType.LLAMA_SPIT, 3);
+ map.put(EntityType.POTION, 8);
+ map.put(EntityType.SHULKER_BULLET, 8);
+ map.put(EntityType.SMALL_FIREBALL, 8);
+ map.put(EntityType.SNOWBALL, 8);
+ map.put(EntityType.SPECTRAL_ARROW, 16);
+ map.put(EntityType.TRIDENT, 16);
+ map.put(EntityType.WITHER_SKULL, 4);
+ } else {
+ map.put(EntityType.EXPERIENCE_ORB, -1);
+ map.put(EntityType.SNOWBALL, -1);
+ map.put(EntityType.ENDER_PEARL, -1);
+ map.put(EntityType.ARROW, -1);
+ map.put(EntityType.FIREBALL, -1);
+ map.put(EntityType.SMALL_FIREBALL, -1);
+ }
+ // Plazma end
});
}
@@ -432,11 +454,30 @@ public class WorldConfiguration extends ConfigurationPart {
public TickRates tickRates;
public class TickRates extends ConfigurationPart {
- public int grassSpread = 1;
+ public int grassSpread = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 4; // Plazma - Optimize Default Configurations
public int containerUpdate = 1;
- public int mobSpawner = 1;
- public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
- public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "validatenearbypoi", -1));
+ public int mobSpawner = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 2; // Plazma - Optimize Default Configurations
+ // Plazma start - Optimize Default Configurations
+ public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> {
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 80);
+ table.put(EntityType.VILLAGER, "nearestbedsensor", 80);
+ table.put(EntityType.VILLAGER, "villagerbabiessensor", 40);
+ table.put(EntityType.VILLAGER, "playersensor", 40);
+ table.put(EntityType.VILLAGER, "nearestlivingentitysensor", 40);
+ } else {
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 40);
+ }
+ });
+ public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> {
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
+ table.put(EntityType.VILLAGER, "acquirepoi", 120);
+ table.put(EntityType.VILLAGER, "validatenearbypoi", 60);
+ } else {
+ table.put(EntityType.VILLAGER, "validatenearbypoi", -1);
+ }
+ });
+ // Plazma end
}
@Setting(FeatureSeedsGeneration.FEATURE_SEEDS_KEY)
@@ -458,9 +499,9 @@ public class WorldConfiguration extends ConfigurationPart {
public class Misc extends ConfigurationPart {
public int lightQueueSize = 20;
- public boolean updatePathfindingOnBlockUpdate = true;
+ public boolean updatePathfindingOnBlockUpdate = Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
public boolean showSignClickCommandFailureMsgsToPlayer = false;
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
+ public RedstoneImplementation redstoneImplementation = Boolean.getBoolean("Plazma.disableConfigOptimization") ? RedstoneImplementation.VANILLA : RedstoneImplementation.ALTERNATE_CURRENT; // Plazma - Optimize Default Configurations
public boolean disableEndCredits = false;
public float maxLeashDistance = 10f;
public boolean disableSprintInterruptionOnAttack = false;
diff --git a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
index 24763d3d270c29c95e0b3e85111145234f660a62..18bc271a34ffba8c83743fef7eaf4a2c1a2bfdec 100644
--- a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
+++ b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
@@ -29,6 +29,7 @@ public class ArrowDespawnRate extends FallbackValue.Int {
@Override
protected int fallback() {
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) return 100; // Plazma - Optimize Default Configurations
return this.get(FallbackValue.SPIGOT_WORLD_CONFIG).arrowDespawnRate;
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index e0eaa847526431ac58d00f18f0fca6b1ef9a79cd..214690b1531d8b25e9bddb54f630e0d9b3504f96 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -154,7 +154,7 @@ public class Main {
File configFile = (File) optionset.valueOf("bukkit-settings");
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
configuration.options().copyDefaults(true);
- configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
+ configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream(Boolean.getBoolean("Plazma.disableConfigOptimization") ? "configurations/bukkit.yml" : "configurations/bukkit_optimized.yml"), Charsets.UTF_8))); // Plazma - Optimize Default Configurations
configuration.save(configFile);
File commandFile = (File) optionset.valueOf("commands-settings");
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d76d390d0f 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -120,7 +120,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.levelName = this.get("level-name", "world");
this.serverPort = this.get("server-port", 25565);
this.announcePlayerAchievements = this.getLegacyBoolean("announce-player-achievements");
- this.enableQuery = this.get("enable-query", false);
+ this.enableQuery = this.get("enable-query", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Plazma - Optimize Default Configurations
this.queryPort = this.get("query.port", 25565);
this.enableRcon = this.get("enable-rcon", false);
this.rconPort = this.get("rcon.port", 25575);
@@ -129,15 +129,15 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.allowNether = this.get("allow-nether", true);
this.spawnMonsters = this.get("spawn-monsters", true);
this.useNativeTransport = this.get("use-native-transport", true);
- this.enableCommandBlock = this.get("enable-command-block", false);
- this.spawnProtection = this.get("spawn-protection", 16);
+ this.enableCommandBlock = this.get("enable-command-block", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Plazma - Optimize Default Configurations
+ this.spawnProtection = this.get("spawn-protection", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 16 : 0); // Plazma - Optimize Default Configurations
this.opPermissionLevel = this.get("op-permission-level", 4);
this.functionPermissionLevel = this.get("function-permission-level", 2);
this.maxTickTime = this.get("max-tick-time", TimeUnit.MINUTES.toMillis(1L));
this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", 1000000);
this.rateLimitPacketsPerSecond = this.get("rate-limit", 0);
- this.viewDistance = this.get("view-distance", 10);
- this.simulationDistance = this.get("simulation-distance", 10);
+ this.viewDistance = this.get("view-distance", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 7); // Plazma - Optimize Default Configurations
+ this.simulationDistance = this.get("simulation-distance", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 4); // Plazma - Optimize Default Configurations
this.maxPlayers = this.get("max-players", 20);
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.maxWorldSize = this.get("max-world-size", (integer) -> {
return Mth.clamp(integer, 1, 29999984);
}, 29999984);
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag
+ this.syncChunkWrites = Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag // Plazma - Optimize Default Configurations
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
this.enableStatus = this.get("enable-status", true);
this.hideOnlinePlayers = this.get("hide-online-players", false);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7b7c9c8aa1bb949b6076161f5b175941e407b9b6..5f06d41d74d769281a05d98db806172c92b88388 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -346,7 +346,7 @@ public final class CraftServer implements Server {
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.configuration.options().copyDefaults(true);
- this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
+ this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(Boolean.getBoolean("Plazma.disableConfigOptimization") ? "configurations/bukkit.yml" : "configurations/bukkit_optimized.yml"), Charsets.UTF_8))); // Plazma - Optimize Default Configurations
ConfigurationSection legacyAlias = null;
if (!this.configuration.isString("aliases")) {
legacyAlias = this.configuration.getConfigurationSection("aliases");
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index ac238eeea791180b66677870401c0b756f0db07b..ce960bc620d84e56c4e7fc9b721fd45c4cfc4dac 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -49,7 +49,10 @@ public class PurpurConfig {
+ "join us in our Discord guild.\n"
+ "\n"
+ "Website: https://purpurmc.org \n"
- + "Docs: https://purpurmc.org/docs \n";
+ // Plazma start
+ + "Docs: https://purpurmc.org/docs \n"
+ + "Vanilla Food Properties: https://gist.github.com/BillyGalbreath/4fdfba991bd020e814eabf5143e3b225 \n";
+ // Plazma end
private static File CONFIG_FILE;
public static YamlConfiguration config;
@@ -237,7 +240,7 @@ public class PurpurConfig {
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
}
- public static boolean useAlternateKeepAlive = false;
+ public static boolean useAlternateKeepAlive = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
private static void useAlternateKeepAlive() {
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index fe903b1e1bd211651e3808becd34a2d28dc57f34..bd87af1ebde124ba405d3e1d1698b78724e112c4 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -425,7 +425,7 @@ public class PurpurWorldConfig {
public boolean playerInvulnerableWhileAcceptingResourcePack = false;
public String playerDeathExpDropEquation = "expLevel * 7";
public int playerDeathExpDropMax = 100;
- public boolean teleportIfOutsideBorder = false;
+ public boolean teleportIfOutsideBorder = !Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
public boolean teleportOnNetherCeilingDamage = false;
public boolean totemOfUndyingWorksInInventory = false;
public boolean playerFixStuckPortal = false;
@@ -3026,7 +3026,7 @@ public class PurpurWorldConfig {
public boolean zombieJockeyOnlyBaby = true;
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
- public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
+ public boolean zombieAggressiveTowardsVillagerWhenLagging = Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
public boolean zombieBypassMobGriefing = false;
public boolean zombieTakeDamageFromWater = false;
public boolean zombieAlwaysDropExp = false;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 5503ad6a93d331771a0e92c0da6adedf2ac81aff..0125edd56ff021c2c719965ff6eb921ba8c4935c 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -146,14 +146,14 @@ public class SpigotWorldConfig
public double itemMerge;
private void itemMerge()
{
- this.itemMerge = this.getDouble("merge-radius.item", 2.5 );
+ this.itemMerge = this.getDouble("merge-radius.item", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 2.5 : 3.5 ); // Plazma - Optimize Default Configurations
this.log( "Item Merge Radius: " + this.itemMerge );
}
public double expMerge;
private void expMerge()
{
- this.expMerge = this.getDouble("merge-radius.exp", 3.0 );
+ this.expMerge = this.getDouble("merge-radius.exp", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 3.0 : 4.0 ); // Plazma - Optimize Default Configurations
this.log( "Experience Merge Radius: " + this.expMerge );
}
@@ -192,7 +192,7 @@ public class SpigotWorldConfig
public byte mobSpawnRange;
private void mobSpawnRange()
{
- this.mobSpawnRange = (byte) getInt( "mob-spawn-range", 8 ); // Paper - Vanilla
+ this.mobSpawnRange = (byte) getInt( "mob-spawn-range", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 3 ); // Paper - Vanilla // Plazma - Optimize Default Configurations
this.log( "Mob Spawn Range: " + this.mobSpawnRange );
}
@@ -203,26 +203,26 @@ public class SpigotWorldConfig
this.log( "Item Despawn Rate: " + this.itemDespawnRate );
}
- public int animalActivationRange = 32;
- public int monsterActivationRange = 32;
+ public int animalActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 16; // Plazma - Optimize Default Configurations
+ public int monsterActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 24; // Plazma - Optimize Default Configurations
public int raiderActivationRange = 48;
- public int miscActivationRange = 16;
+ public int miscActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 16 : 8; // Plazma - Optimize Default Configurations
// Paper start
- public int flyingMonsterActivationRange = 32;
- public int waterActivationRange = 16;
- public int villagerActivationRange = 32;
+ public int flyingMonsterActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 48; // Plazma - Optimize Default Configurations
+ public int waterActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 16 : 8; // Plazma - Optimize Default Configurations
+ public int villagerActivationRange = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 32 : 16; // Plazma - Optimize Default Configurations
public int wakeUpInactiveAnimals = 4;
public int wakeUpInactiveAnimalsEvery = 60*20;
- public int wakeUpInactiveAnimalsFor = 5*20;
- public int wakeUpInactiveMonsters = 8;
+ public int wakeUpInactiveAnimalsFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 40; // Plazma - Optimize Default Configurations
+ public int wakeUpInactiveMonsters = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 4; // Plazma - Optimize Default Configurations
public int wakeUpInactiveMonstersEvery = 20*20;
- public int wakeUpInactiveMonstersFor = 5*20;
- public int wakeUpInactiveVillagers = 4;
+ public int wakeUpInactiveMonstersFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 60; // Plazma - Optimize Default Configurations
+ public int wakeUpInactiveVillagers = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 4 : 1; // Plazma - Optimize Default Configurations
public int wakeUpInactiveVillagersEvery = 30*20;
- public int wakeUpInactiveVillagersFor = 5*20;
- public int wakeUpInactiveFlying = 8;
+ public int wakeUpInactiveVillagersFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 20; // Plazma - Optimize Default Configurations
+ public int wakeUpInactiveFlying = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 1; // Plazma - Optimize Default Configurations
public int wakeUpInactiveFlyingEvery = 10*20;
- public int wakeUpInactiveFlyingFor = 5*20;
+ public int wakeUpInactiveFlyingFor = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 5*20 : 60; // Plazma - Optimize Default Configurations
public int villagersWorkImmunityAfter = 5*20;
public int villagersWorkImmunityFor = 20;
public boolean villagersActiveForPanic = true;
@@ -293,7 +293,7 @@ public class SpigotWorldConfig
{
this.set( "ticks-per.hopper-check", 1 );
}
- this.hopperCheck = this.getInt( "ticks-per.hopper-check", 1 );
+ this.hopperCheck = this.getInt( "ticks-per.hopper-check", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 8 ); // Plazma - Optimize Default Configurations
this.hopperAmount = this.getInt( "hopper-amount", 1 );
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
@@ -303,7 +303,7 @@ public class SpigotWorldConfig
public int tridentDespawnRate;
private void arrowDespawnRate()
{
- this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 1200 );
+ this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1200 : 300 ); // Plazma - Optimize Default Configurations
this.tridentDespawnRate = this.getInt( "trident-despawn-rate", this.arrowDespawnRate );
this.log( "Arrow Despawn Rate: " + this.arrowDespawnRate + " Trident Respawn Rate:" + this.tridentDespawnRate );
}
diff --git a/src/main/resources/configurations/bukkit_optimized.yml b/src/main/resources/configurations/bukkit_optimized.yml
new file mode 100644
index 0000000000000000000000000000000000000000..eb33b0a19d6060f78d7ead7a2ad63b1b2581293d
--- /dev/null
+++ b/src/main/resources/configurations/bukkit_optimized.yml
@@ -0,0 +1,45 @@
+# This is the main configuration file for Bukkit.
+# As you can see, there's actually not that much to configure without any plugins.
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
+# https://www.spigotmc.org/go/bukkit-yml
+#
+# If you need help on this file, feel free to join us on Discord or leave a message
+# on the forums asking for advice.
+#
+# Discord: https://www.spigotmc.org/go/discord
+# Forums: https://www.spigotmc.org/
+# Bug tracker: https://www.spigotmc.org/go/bugs
+
+
+settings:
+ allow-end: true
+ warn-on-overload: true
+ permissions-file: permissions.yml
+ update-folder: update
+ plugin-profiling: false
+ connection-throttle: 4000
+ query-plugins: true
+ deprecated-verbose: default
+ shutdown-message: Server closed
+ minimum-api: none
+ use-map-color-cache: true
+spawn-limits:
+ monsters: 20
+ animals: 5
+ water-animals: 2
+ water-ambient: 2
+ water-underground-creature: 3
+ axolotls: 3
+ ambient: 1
+chunk-gc:
+ period-in-ticks: 400
+ticks-per:
+ animal-spawns: 400
+ monster-spawns: 10
+ water-spawns: 400
+ water-ambient-spawns: 400
+ water-underground-creature-spawns: 400
+ axolotl-spawns: 400
+ ambient-spawns: 400
+ autosave: 6000
+aliases: now-in-commands.yml

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Thu, 23 Mar 2023 14:25:09 +0900
Subject: [PATCH] Implement ChunkSending - Configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 857ddc62dd9affbbebcd7cde8a6d675dbb5f68ae..8ba1c5b6731d43c02b415e4d79a20c1de0c03ad5 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -22,4 +22,12 @@ public class LevelConfigurations extends ConfigurationPart {
@Setting(Configuration.VERSION_FIELD)
public int version = CURRENT_VERSION;
+
+ public ChunkSending chunkSending;
+ public class ChunkSending extends ConfigurationPart {
+
+ public boolean enabled = true;
+ public int maxChunksPerTick = 5;
+
+ }
}

View File

@@ -1,90 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Thu, 23 Mar 2023 14:32:26 +0900
Subject: [PATCH] Implement ChunkSending
Original: someaddons/chunksending
Copyright (C) 2023 someaddons
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 904fcdeb7937d36208cc9a8d5eca9ef3a5b2cd9e..7f749579fe056a8436e6625204ae31f1fcc15f32 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -362,15 +362,14 @@ public class ChunkHolder {
}
Object[] backingSet = players.getBackingSet();
- for (int i = 0, len = backingSet.length; i < len; ++i) {
- if (!(backingSet[i] instanceof ServerPlayer player)) {
- continue;
- }
- if (!this.chunkMap.playerChunkManager.isChunkSent(player, this.pos.x, this.pos.z, onlyOnWatchDistanceEdge)) {
- continue;
- }
+ // Plazma start - Implement ChunkSending
+ for (Object o : backingSet) {
+ if (!(o instanceof ServerPlayer player)
+ || !this.chunkMap.playerChunkManager.isChunkSent(player, this.pos.x, this.pos.z, onlyOnWatchDistanceEdge)
+ || (this.chunkMap.level.plazmaLevelConfiguration().chunkSending.enabled && player.attachToPending(pos, packet))) continue;
player.connection.send(packet);
}
+ // Plazma end
// Paper end - per player view distance
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 74238a87d1ff3391aac5812b24b84af228baeaa4..3d900e323e1e11b56ad2a7d8f8ebcb71c069cfe0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -727,8 +727,36 @@ public class ServerPlayer extends Player {
}
}
// Purpur end
+ // Plazma start - Implement ChunkSending
+ if (this.level.plazmaLevelConfiguration().chunkSending.enabled) {
+ if (chunksToSend.isEmpty()) return;
+
+ if (disconnected) {
+ chunksToSend.clear();
+ return;
+ }
+
+ final List<java.util.Map.Entry<ChunkPos, List<Packet<?>>>> packets = new java.util.ArrayList<>(chunksToSend.entrySet());
+ packets.sort(java.util.Comparator.comparingDouble(e -> e.getKey().getMiddleBlockPosition(getBlockY()).distSqr(blockPosition())));
+
+ for (int i = 0; i < packets.size() && i < this.level.plazmaLevelConfiguration().chunkSending.maxChunksPerTick; i++) {
+ final java.util.Map.Entry<ChunkPos, List<Packet<?>>> entry = packets.get(i);
+ for (final Packet<?> packet : entry.getValue()) {
+ connection.send(packet);
+ }
+ chunksToSend.remove(entry.getKey());
+ }
+ }
}
+ public boolean attachToPending(final ChunkPos pos, final Packet<?> packet) {
+ final List<Packet<?>> packetList = chunksToSend.get(pos);
+ if (packetList == null) return false;
+ packetList.add(packet);
+ return true;
+ }
+ // Plazma end
+
public void doTick() {
try {
if (valid && !this.isSpectator() || !this.touchingUnloadedChunk()) { // Paper - don't tick dead players that are not in the world currently (pending respawn)
@@ -2345,7 +2373,14 @@ public class ServerPlayer extends Player {
return true; // Paper
}
+ // Plazma start - Implement ChunkSending
+ private final java.util.Map<ChunkPos, List<Packet<?>>> chunksToSend = java.util.Collections.synchronizedMap(new java.util.HashMap<>());
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
+ if (this.level.plazmaLevelConfiguration().chunkSending.enabled) {
+ List<Packet<?>> packetList = chunksToSend.computeIfAbsent(chunkPos, k -> new java.util.ArrayList<>());
+ packetList.add(chunkDataPacket);
+ }
+ // Plazma end
this.connection.send(chunkDataPacket);
// Paper start
if(io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0){

View File

@@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@gmail.com>
Date: Fri, 10 Mar 2023 20:35:27 +0900
Subject: [PATCH] Console Log Configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 6714947455c1e4c887a5f13ba1a3aeb57324ee0a..3c70653b720d3d55be199e000e89c627b90e65da 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -20,4 +20,10 @@ public class GlobalConfiguration extends ConfigurationPart {
@Setting(Configuration.VERSION_FIELD)
public int version = CURRENT_VERSION;
+
+ public ConsoleLogs consoleLogs;
+ public class ConsoleLogs extends ConfigurationPart {
+
+
+ }
}

View File

@@ -1,101 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <alphakr93@gmail.com>
Date: Fri, 10 Mar 2023 21:45:37 +0900
Subject: [PATCH] Console log tweaks
[Offine Warning Configuration Patch]
Original by Irochi <me@irochi.moe>
Licensed under the GPL 3.0
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
index 4d9bc4a62ebae0f3707900503576c64733de639f..20265e7c71c125bc5b77039f4901e230738e849f 100644
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
@@ -353,7 +353,7 @@ public final class ChatProcessor {
private void sendToServer(final ChatType.Bound chatType, final @Nullable Function<Audience, net.minecraft.network.chat.Component> msgFunction) {
final PlayerChatMessage toConsoleMessage = msgFunction == null ? ChatProcessor.this.message : ChatProcessor.this.message.withUnsignedContent(msgFunction.apply(ChatProcessor.this.server.console));
- ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) ? null : "Not Secure");
+ ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) || !org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableSecureChatMarker ? null : "Not Secure");
}
}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 429ccd583ecd136a63862e94b8eb36b371e28d0f..efcee39cd7154493de04ca903edbd32b5901b191 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -179,16 +179,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
- // Paper start - detect running as root
- if (io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
- DedicatedServer.LOGGER.warn("****************************");
- DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
- DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
- DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
- DedicatedServer.LOGGER.warn("****************************");
- }
- // Paper end
-
DedicatedServer.LOGGER.info("Loading properties");
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
@@ -320,7 +310,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
// Paper end
- if (!this.usesAuthentication()) {
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableOfflineWarnings && !this.usesAuthentication()) { // Plazma
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
// Spigot start
@@ -333,9 +323,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
}
// Spigot end
- DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
+ DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the \"server.properties\" file or set \"console-logs.offline-warning\" to \"false\" in the \"plazma.yml\" file."); // Plazma
}
+ // Plazma start - Moved down
+ // Paper start - detect running as root
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableRootUserWarnings && io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
+ DedicatedServer.LOGGER.warn("****************************");
+ DedicatedServer.LOGGER.warn("YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.");
+ DedicatedServer.LOGGER.warn("YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.");
+ DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
+ DedicatedServer.LOGGER.warn("****************************");
+ }
+ // Paper end
+ // Plazma end
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 1a288ebcaade0cc44c7d09478f4f2f8eee7a4269..916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1426,7 +1426,7 @@ public abstract class PlayerList {
}
public void broadcastChatMessage(PlayerChatMessage message, Predicate<ServerPlayer> shouldSendFiltered, @Nullable ServerPlayer sender, ChatType.Bound params, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
// Paper end
- boolean flag = this.verifyChatTrusted(message);
+ boolean flag = this.verifyChatTrusted(message) || !org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.enableSecureChatMarker;
this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper
OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message);
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 3c70653b720d3d55be199e000e89c627b90e65da..ba542542cbab63b0764d437049123a76ccaca716 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -24,6 +24,9 @@ public class GlobalConfiguration extends ConfigurationPart {
public ConsoleLogs consoleLogs;
public class ConsoleLogs extends ConfigurationPart {
+ public boolean enableOfflineWarnings = true;
+ public boolean enableRootUserWarnings = true;
+ public boolean enableSecureChatMarker = DO_OPTIMIZE;
}
}

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 23 Mar 2023 21:18:47 +0900
Subject: [PATCH] Player configuration section
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index ba542542cbab63b0764d437049123a76ccaca716..3590442906a3f1cf27f621a1e093c1c4cc0887ac 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -28,5 +28,12 @@ public class GlobalConfiguration extends ConfigurationPart {
public boolean enableRootUserWarnings = true;
public boolean enableSecureChatMarker = DO_OPTIMIZE;
+ }
+
+ public Player player;
+ public class Player extends ConfigurationPart {
+
+
+
}
}

View File

@@ -1,32 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 23 Mar 2023 21:20:20 +0900
Subject: [PATCH] Add option to allow any usernames
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index f719f8aafe7c75e2ef8fcb05f556a8d6bd94b9a0..06ff5dd9e39e2be8dd8397a764813111019ceaed 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -239,7 +239,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@Override
public void handleHello(ServerboundHelloPacket packet) {
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", new Object[0]);
- Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]);
+ if (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.allowAnyUsername) Validate.validState(ServerLoginPacketListenerImpl.isValidUsername(packet.name()), "Invalid characters in username", new Object[0]); // Plazma
// Paper start - validate usernames
if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.performUsernameValidation) {
if (!this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation && !validateUsername(packet.name())) {
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 3590442906a3f1cf27f621a1e093c1c4cc0887ac..b9a04a8042f1bedaeb27681f84f9e2df7cf1794d 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -33,7 +33,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Player player;
public class Player extends ConfigurationPart {
-
+ public boolean allowAnyUsername = false;
}
}

View File

@@ -1,28 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 23 Mar 2023 21:35:15 +0900
Subject: [PATCH] Add permission to bypass reducedDebugInfo gamerule
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d..0615c92894f42ccc320a5a6f5e6c5289a2dee5f9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -268,7 +268,7 @@ public abstract class PlayerList {
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player);
GameRules gamerules = worldserver1.getGameRules();
boolean flag = gamerules.getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN);
- boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
+ boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) || !player.getBukkitEntity().hasPermission("plazma.bypass-reduced-debug-info-gamerule"); // Plazma
// Spigot - view distance
playerconnection.send(new ClientboundLoginPacket(player.getId(), worlddata.isHardcore(), player.gameMode.getGameModeForPlayer(), player.gameMode.getPreviousGameModeForPlayer(), this.server.levelKeys(), this.synchronizedRegistries, worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), this.getMaxPlayers(), worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetSendDistance(), worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetTickViewDistance(), flag1, !flag, worldserver1.isDebug(), worldserver1.isFlat(), player.getLastDeathLocation())); // Paper - replace old player chunk management
@@ -1293,7 +1293,7 @@ public abstract class PlayerList {
player.getEntityData().refresh(player); // CraftBukkkit - SPIGOT-7218: sync metadata
player.connection.send(new ClientboundSetCarriedItemPacket(player.getInventory().selected));
// CraftBukkit start - from GameRules
- int i = player.level.getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) ? 22 : 23;
+ int i = player.level.getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) && !player.getBukkitEntity().hasPermission("plazma.bypass-reduced-debug-info-gamerule") ? 22 : 23; // Plazma
player.connection.send(new ClientboundEntityEventPacket(player, (byte) i));
float immediateRespawn = player.level.getGameRules().getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN) ? 1.0F: 0.0F;
player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.IMMEDIATE_RESPAWN, immediateRespawn));

View File

@@ -1,251 +1,246 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 00:52:11 +0900
Subject: [PATCH] Add missing purpur configuration options
Subject: [PATCH] Add missing Purpur configuration options
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
index e95540122ae6a486ce12a5f50fb4d2d073239554..86c9b549e3e75adf9bd5562c4c8d303cf2080e45 100644
index 67ff60909dee395d42619c310bafc381b9bfce5d..42fc51827240f9f0091e006fa84a17c2fb51dddd 100644
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
@@ -154,6 +154,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
@@ -162,6 +162,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.allayMaxHealth);
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.allayScale);
}
// Purpur end
+ // Plazma start - Add missing purpur config options
+
+ // Plazma start - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level.purpurConfig.allayTakeDamageFromWater;
+ return level().purpurConfig.allayTakeDamageFromWater;
+ }
+
+ @Override
+ public boolean isAlwaysExperienceDropper() {
+ return level.purpurConfig.allayAlwaysDropExp;
+ return level().purpurConfig.allayAlwaysDropExp;
+ }
+
+ @Override
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.allayMaxHealth);
+ }
+ // Plazma end
+
+ // Plazma end - Add missing purpur configuration options
// Purpur end - Configurable entity base attributes
@Override
protected Brain.Provider<Allay> brainProvider() {
return Brain.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES);
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index 31922ac1139f34e0da61a719e3645c1aaa188890..94536f25980cf642edbfcf0c3d338a0172e0b77f 100644
index 36f8bb5cf25566784e11988c91e1c7409f1ac5c8..d364866de67341e4a781b4f2bf3e7c187ee2bc8c 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -90,6 +90,23 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
@@ -99,6 +99,18 @@ public class Camel extends AbstractHorse {
public int getPurpurBreedTime() {
return this.level().purpurConfig.camelBreedingTicks;
}
// Purpur end
+ // Plazma start - Add missing purpur config options
+ @Override
+ public boolean dismountsUnderwater() {
+ return level.purpurConfig.useDismountsUnderwaterTag ? super.dismountsUnderwater() : !level.purpurConfig.camelRidableInWater;
+ }
+
+ // Plazma start - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level.purpurConfig.camelTakeDamageFromWater;
+ return level().purpurConfig.camelTakeDamageFromWater;
+ }
+
+ @Override
+ public boolean isAlwaysExperienceDropper() {
+ return level.purpurConfig.camelAlwaysDropExp;
+ return level().purpurConfig.camelAlwaysDropExp;
+ }
+ // Plazma end
+
+ // Plazma end - Add missing purpur configuration options
// Purpur end - Make entity breeding times configurable
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
index c355aaed76663d37a5da8b2f49f9808828b4ef9b..dcc1b75361fe9eb250e3946e54454253a8f0e788 100644
index d09aa48e20c9a6e0d465b93e3759556638041394..70772863011ce270bceaf679ea3776fb36d4f0b9 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
@@ -145,6 +145,23 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
@@ -163,6 +163,23 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
public float getJumpPower() {
return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower();
}
// Purpur end
+ // Plazma start - Add missing purpur config options
+
+ // Plazma start - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level.purpurConfig.frogTakeDamageFromWater;
+ return level().purpurConfig.frogTakeDamageFromWater;
+ }
+
+ @Override
+ public boolean isAlwaysExperienceDropper() {
+ return level.purpurConfig.frogAlwaysDropExp;
+ return level().purpurConfig.frogAlwaysDropExp;
+ }
+
+ @Override
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.frogMaxHealth);
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
+ }
+ // Plazma end
+
@Override
protected Brain.Provider<Frog> brainProvider() {
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
+ // Plazma end - Add missing purpur configuration options
// Purpur end - Ridables
// Purpur start - Make entity breeding times configurable
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
index aadc6743deb195ac3368548a75be641ffd3da404..90314f86e17ac7756f8211519fc5cde5a411677d 100644
index 33429a9afeefce9238969b2894d0a9c033baca51..fee263bd88c19188f6ec8017893dfc12bdd15737 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -89,6 +89,23 @@ public class Tadpole extends AbstractFish {
@@ -93,6 +93,23 @@ public class Tadpole extends AbstractFish {
protected void registerGoals() {
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur - Ridables
}
// Purpur end
+ // Plazma start - Add missing purpur config options
+
+ // Plazma start - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level.purpurConfig.tadpoleTakeDamageFromWater;
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
+ }
+
+ @Override
+ public boolean isAlwaysExperienceDropper() {
+ return level.purpurConfig.tadpoleAlwaysDropExp;
+ return level().purpurConfig.tadpoleAlwaysDropExp;
+ }
+
+ @Override
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.tadpoleMaxHealth);
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
+ }
+ // Plazma end
+
+ // Plazma end - Add missing purpur configuration options
// Purpur end - Ridables
@Override
protected PathNavigation createNavigation(Level world) {
return new WaterBoundPathNavigation(this, world);
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index 0c5efd0b364e4c1f510d30094757ddb7dc979a68..304de4844e822431e41ce685ed94e5307612482b 100644
index 3fa391b638062196675d102b8731a96a51df8e15..86988932dc79e9ca33998044995187709ad5373b 100644
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -108,6 +108,18 @@ public class Sniffer extends Animal {
@@ -119,6 +119,18 @@ public class Sniffer extends Animal {
public int getPurpurBreedTime() {
return this.level().purpurConfig.snifferBreedingTicks;
}
// Purpur end
+ // Plazma start - Add missing purpur config options
+
+ // Plazma start - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level.purpurConfig.snifferTakeDamageFromWater;
+ return level().purpurConfig.snifferTakeDamageFromWater;
+ }
+
+ @Override
+ public boolean isAlwaysExperienceDropper() {
+ return level.purpurConfig.snifferAlwaysDropExp;
+ return level().purpurConfig.snifferAlwaysDropExp;
+ }
+ // Plazma end
+
// CraftBukkit start - SPIGOT-7295: moved from constructor to appropriate location
+ // Plazma end - Add missing purpur configuration options
// Purpur end - Make entity breeding times configurable
@Override
protected void defineSynchedData() {
protected void defineSynchedData(SynchedEntityData.Builder builder) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
index 69e5b4b6c8d5725bc2fb7cd819219e4ff9df45bd..41301ad56fbcbe0f13447bd3b515d15bf58554c4 100644
index 74011f1ab7e48490109ad93d658bba216eef9e80..5313f4c1ca76b120c0eb6beddc993b562f79344e 100644
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
@@ -146,6 +146,23 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
@@ -151,6 +151,23 @@ public class Warden extends Monster implements VibrationSystem {
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur - Ridables
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur - Ridables
}
// Purpur end
+ // Plazma start - Add missing purpur config options
+
+ // Plazma start - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level.purpurConfig.wardenTakeDamageFromWater;
+ return level().purpurConfig.wardenTakeDamageFromWater;
+ }
+
+ @Override
+ public boolean isAlwaysExperienceDropper() {
+ return level.purpurConfig.wardenAlwaysDropExp;
+ return level().purpurConfig.wardenAlwaysDropExp;
+ }
+
+ @Override
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level.purpurConfig.wardenMaxHealth);
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
+ }
+ // Plazma end
+
@Override
public Packet<ClientGamePacketListener> getAddEntityPacket() {
return new ClientboundAddEntityPacket(this, this.hasPose(Pose.EMERGING) ? 1 : 0);
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
index 3a720375c3daa961a34363f78c2c51d301c3fa06..90bd114feb0924669e61f92f301cdcf7f69405a4 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
@@ -41,7 +41,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
+ // Plazma end - Add missing purpur configuration options
// Purpur end - Ridables
public ChestBoat(EntityType<? extends Boat> type, Level world) {
super(type, world);
@Override
@@ -305,7 +322,7 @@ public class Warden extends Monster implements VibrationSystem {
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("wardenBrain");
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing Purpur configurations
this.getBrain().tick(world, this);
gameprofilerfiller.pop();
super.customServerAiStep(world);
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
index 1f4cc08e84a23213bb9786ea09ad77caeec2d336..f888f1dd2e3c228b0a370fe920b63d547bbba571 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
@@ -46,7 +46,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
public AbstractChestBoat(EntityType<? extends AbstractChestBoat> type, Level world, Supplier<Item> itemSupplier) {
super(type, world, itemSupplier);
- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur config options
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur configuration options
}
public ChestBoat(Level world, double d0, double d1, double d2) {
@@ -160,7 +160,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
@Override
@@ -142,7 +142,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
@Override
public int getContainerSize() {
- return 27;
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma - Add missing purpur config options
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma - Add missing purpur configuration options
}
@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index ce960bc620d84e56c4e7fc9b721fd45c4cfc4dac..57534bdf23b8373078a5f39c930cdb1defd31416 100644
index f29059798c9dc642187b4939dd917ee15cbe120d..7a482099a69759659038e10632e7dd4626c187a1 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -327,6 +327,7 @@ public class PurpurConfig {
@@ -331,6 +331,7 @@ public class PurpurConfig {
}
public static int barrelRows = 3;
+ public static int chestBoatRows = 3; // Plazma - Add missing purpur config options
+ public static int chestBoatRows = 3; // Plazma - Add missing purpur configuration options
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
public static boolean cryingObsidianValidForPortalFrame = false;
@@ -367,6 +368,7 @@ public class PurpurConfig {
@@ -373,6 +374,7 @@ public class PurpurConfig {
case 1 -> 9;
default -> 27;
});
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma - Add missing purpur config options
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma - Add missing purpur configuration options
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
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/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index bd87af1ebde124ba405d3e1d1698b78724e112c4..26db2140458405eb93997c784b3a47b161804007 100644
index 43ad38dadfe14b3dd0565c536b276eb3f9dbd813..474bab426175d8dece524faeffd8977a6e1bb074 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1084,7 +1084,15 @@ public class PurpurWorldConfig {
public boolean allayRidableInWater = true;
@@ -1144,7 +1144,13 @@ public class PurpurWorldConfig {
public boolean allayControllable = true;
public List<String> allayRespectNBT = new ArrayList<>();
public double allayMaxHealth = 20.0D;
public double allayScale = 1.0D;
+ // Plazma start - Add missing purpur config options
+ public double allayMaxHealth = 20.0D;
+ public boolean allayTakeDamageFromWater = false;
+ public boolean allayAlwaysDropExp = false;
private void allaySettings() {
+ allayMaxHealth = getDouble("mobs.allay.max-health", allayMaxHealth);
+ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater);
+ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp);
+ // Plazma end
+ // Plazma end - Add missing purpur configuration options
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
@@ -1195,7 +1203,15 @@ public class PurpurWorldConfig {
public double camelJumpStrengthMax = 0.42D;
@@ -1299,7 +1305,13 @@ public class PurpurWorldConfig {
public double camelMovementSpeedMin = 0.09D;
public double camelMovementSpeedMax = 0.09D;
public int camelBreedingTicks = 6000;
+ // Plazma start - Add missing purpur config options
+ public boolean camelRidableInWater = false;
+ public boolean camelTakeDamageFromWater = false;
+ public boolean camelAlwaysDropExp = false;
private void camelSettings() {
+ camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
+ // Plazma end
+ // Plazma end - Add missing purpur configuration options
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax);
camelJumpStrengthMin = getDouble("mobs.camel.attributes.jump_strength.min", camelJumpStrengthMin);
@@ -1622,7 +1638,15 @@ public class PurpurWorldConfig {
@@ -1764,7 +1776,15 @@ public class PurpurWorldConfig {
public boolean frogControllable = true;
public float frogRidableJumpHeight = 0.65F;
public int frogBreedingTicks = 6000;
@@ -257,13 +252,13 @@ index bd87af1ebde124ba405d3e1d1698b78724e112c4..26db2140458405eb93997c784b3a47b1
+ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth);
+ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater);
+ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp);
+ // Plazma end
+ // Plazma end - Add missing purpur configuration options
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
@@ -2573,7 +2597,13 @@ public class PurpurWorldConfig {
public boolean snifferControllable = true;
@@ -2776,7 +2796,13 @@ public class PurpurWorldConfig {
public double snifferMaxHealth = 14.0D;
public double snifferScale = 1.0D;
public int snifferBreedingTicks = 6000;
+ // Plazma start - Add missing purpur config options
+ public boolean snifferTakeDamageFromWater = false;
@@ -271,11 +266,11 @@ index bd87af1ebde124ba405d3e1d1698b78724e112c4..26db2140458405eb93997c784b3a47b1
private void snifferSettings() {
+ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater);
+ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp);
+ // Plazma end
+ // Plazma end - Add missing purpur configuration options
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
@@ -2672,7 +2702,15 @@ public class PurpurWorldConfig {
@@ -2884,7 +2910,15 @@ public class PurpurWorldConfig {
public boolean tadpoleRidable = false;
public boolean tadpoleRidableInWater = true;
public boolean tadpoleControllable = true;
@@ -287,11 +282,11 @@ index bd87af1ebde124ba405d3e1d1698b78724e112c4..26db2140458405eb93997c784b3a47b1
+ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth);
+ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater);
+ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp);
+ // Plazma end
+ // Plazma end - Add missing purpur configuration options
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
@@ -2882,7 +2920,15 @@ public class PurpurWorldConfig {
@@ -3116,7 +3150,15 @@ public class PurpurWorldConfig {
public boolean wardenRidable = false;
public boolean wardenRidableInWater = true;
public boolean wardenControllable = true;
@@ -303,7 +298,7 @@ index bd87af1ebde124ba405d3e1d1698b78724e112c4..26db2140458405eb93997c784b3a47b1
+ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth);
+ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater);
+ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp);
+ // Plazma end
+ // Plazma end - Add missing purpur configuration options
wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable);
wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater);
wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable);

View File

@@ -1,32 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 00:04:41 +0900
Subject: [PATCH] Structure Configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 8ba1c5b6731d43c02b415e4d79a20c1de0c03ad5..4ee9f3ca88e89a8dcbfe6c807036386ef679da0a 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -30,4 +30,21 @@ public class LevelConfigurations extends ConfigurationPart {
public int maxChunksPerTick = 5;
}
+
+ public Structure structure;
+ public class Structure extends ConfigurationPart {
+
+ public Portal portal;
+ public class Portal extends ConfigurationPart {
+
+ public NetherPortal netherPortal;
+ public class NetherPortal extends ConfigurationPart {
+
+
+
+ }
+
+ }
+
+ }
}

View File

@@ -1,85 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 00:10:52 +0900
Subject: [PATCH] Configurable nether portal size
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
index e7554ec800f321e4e34c926c53f2375a8c3aa979..677f546cee0ebda24a6e77cb5fedd41078c7fff4 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
@@ -100,7 +100,7 @@ public class PortalShape {
private int calculateWidth() {
int i = this.getDistanceUntilEdgeAboveFrame(this.bottomLeft, this.rightDir);
- return i >= 2 && i <= 21 ? i : 0;
+ return i >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.min() && i <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.max() ? i : 0; // Plazma
}
private int getDistanceUntilEdgeAboveFrame(BlockPos pos, Direction direction) {
@@ -133,7 +133,7 @@ public class PortalShape {
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
int i = this.getDistanceUntilTop(blockposition_mutableblockposition);
- return i >= 3 && i <= 21 && this.hasTopFrame(blockposition_mutableblockposition, i) ? i : 0;
+ return i >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.min() && i <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.max() && this.hasTopFrame(blockposition_mutableblockposition, i) ? i : 0; // Plazma
}
private boolean hasTopFrame(BlockPos.MutableBlockPos pos, int height) {
@@ -187,7 +187,7 @@ public class PortalShape {
}
public boolean isValid() {
- return this.bottomLeft != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
+ return this.bottomLeft != null && this.width >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.min() && this.width <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.width.max() && this.height >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.min() && this.height <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.portal.netherPortal.size.height.max(); // Plazma
}
// CraftBukkit start - return boolean
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 4ee9f3ca88e89a8dcbfe6c807036386ef679da0a..1cf5344d3ade76f6c24c7ea68d98b02e0dc62001 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -40,7 +40,43 @@ public class LevelConfigurations extends ConfigurationPart {
public NetherPortal netherPortal;
public class NetherPortal extends ConfigurationPart {
+ public Size size;
+ public class Size extends ConfigurationPart {
+ public Width width;
+ public Height height;
+
+ public class Width extends ConfigurationPart {
+
+ int min = 2;
+ int max = 21;
+
+ public int min() {
+ return Math.max(this.min, 1);
+ }
+
+ public int max() {
+ return Math.max(this.min, this.max);
+ }
+
+ }
+
+ public class Height extends ConfigurationPart {
+
+ int min = 3;
+ int max = 21;
+
+ public int min() {
+ return Math.max(this.min, 2);
+ }
+
+ public int max() {
+ return Math.max(this.min, this.max);
+ }
+
+ }
+
+ }
}

View File

@@ -1,40 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 19:52:12 +0900
Subject: [PATCH] Misc configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index b9a04a8042f1bedaeb27681f84f9e2df7cf1794d..1e979bb87ec743e87909927a517692da38e7b18f 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -35,5 +35,12 @@ public class GlobalConfiguration extends ConfigurationPart {
public boolean allowAnyUsername = false;
+ }
+
+ public Misc misc;
+ public class Misc extends ConfigurationPart {
+
+
+
}
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 1cf5344d3ade76f6c24c7ea68d98b02e0dc62001..9416ce600d46fad167befe8d42f9a1a7d891a37f 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -82,5 +82,12 @@ public class LevelConfigurations extends ConfigurationPart {
}
+ }
+
+ public Misc misc;
+ public class Misc extends ConfigurationPart {
+
+
+
}
}

View File

@@ -1,202 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 20:02:59 +0900
Subject: [PATCH] Reduce create random instance
diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
index 591163d8f8300b084ac734800efee902c4def958..d74401ca3182145d136ad668704f5c043b163317 100644
--- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
+++ b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
@@ -65,7 +65,7 @@ public class SpreadPlayersCommand {
if (maxY < j) {
throw SpreadPlayersCommand.ERROR_INVALID_MAX_HEIGHT.create(maxY, j);
} else {
- RandomSource randomsource = RandomSource.create();
+ RandomSource randomsource = worldserver.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? worldserver.getRandom() : RandomSource.create(); // Plazma
double d0 = (double) (center.x - maxRange);
double d1 = (double) (center.y - maxRange);
double d2 = (double) (center.x + maxRange);
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c79e2b5160c41ce77ebd5355aebcefb3cb9151ca..735655847f75584a985c896637f47c2481b0cae6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -402,7 +402,7 @@ public class ServerPlayer extends Player {
long l = k * k;
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
int j1 = this.getCoprime(i1);
- int k1 = RandomSource.create().nextInt(i1);
+ int k1 = (worldserver.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? worldserver.getRandom() : RandomSource.create()).nextInt(i1); // Plazma
for (int l1 = 0; l1 < i1; ++l1) {
int i2 = (k1 + j1 * l1) % i1;
@@ -439,7 +439,7 @@ public class ServerPlayer extends Player {
long l = k * k;
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
int j1 = this.getCoprime(i1);
- int k1 = RandomSource.create().nextInt(i1);
+ int k1 = (world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create()).nextInt(i1);
for (int l1 = 0; l1 < i1; ++l1) {
int i2 = (k1 + j1 * l1) % i1;
diff --git a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
index 1ef089dbf83de35d875c00efdf468c397be56978..dc111e0d1e7303c56cd12fa83be3ff85ab989e1b 100644
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
+++ b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
@@ -349,7 +349,7 @@ public class QueryThreadGs4 extends GenericThread {
this.identBytes[2] = bs[5];
this.identBytes[3] = bs[6];
this.ident = new String(this.identBytes, StandardCharsets.UTF_8);
- this.challenge = RandomSource.create().nextInt(16777216);
+ this.challenge = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceCreateRandomInstance ? java.util.concurrent.ThreadLocalRandom.current().nextInt(16777216) : RandomSource.create().nextInt(16777216); // Plazma
this.challengeBytes = String.format(Locale.ROOT, "\t%s%d\u0000", this.ident, this.challenge).getBytes(StandardCharsets.UTF_8);
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index d77410588a1c10d8ac902f21a8bd7e35f74fecd2..95bf0537d7793391eae9dd67655dc0189eb047df 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -80,7 +80,7 @@ public class FishingHook extends Projectile {
private FishingHook(EntityType<? extends FishingHook> type, Level world, int luckOfTheSeaLevel, int lureLevel) {
super(type, world);
- this.syncronizedRandom = RandomSource.create();
+ this.syncronizedRandom = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
this.openWater = true;
this.currentState = FishingHook.FishHookState.FLYING;
this.noCulling = true;
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java
index 879c3bb661e24b9682b654def57c2800f4f8ca92..4c465466543e51ff1e8343d3af7ee31a8b04b839 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java
@@ -110,7 +110,7 @@ public class Raid {
public Raid(int id, ServerLevel world, BlockPos pos) {
this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10);
- this.random = RandomSource.create();
+ this.random = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
this.waveSpawnPos = Optional.empty();
this.id = id;
this.level = world;
@@ -124,7 +124,7 @@ public class Raid {
public Raid(ServerLevel world, CompoundTag nbt) {
this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10);
- this.random = RandomSource.create();
+ this.random = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
this.waveSpawnPos = Optional.empty();
this.level = world;
this.id = nbt.getInt("Id");
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
index 69ae671be07b1928e778399551991777829e432a..e39ac3557c7abd6081ae25df71d0fd134c9cc342 100644
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
@@ -94,7 +94,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
}
// Purpur end
};
- this.random = RandomSource.create();
+ this.random = playerInventory.player.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? playerInventory.player.getRandom() : RandomSource.create(); // Plazma
this.enchantmentSeed = DataSlot.standalone();
this.costs = new int[3];
this.enchantClue = new int[]{-1, -1, -1};
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 4beaedc5ec3562df62a7a9e6b2f40728bd933044..62c1b93ef872a40832ae6c223e99409aba2427db 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -81,7 +81,7 @@ public class Explosion {
}
public Explosion(Level world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction destructionType) {
- this.random = RandomSource.create();
+ this.random = world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create(); // Plazma
this.toBlow = new ObjectArrayList();
this.hitPlayers = Maps.newHashMap();
this.level = world;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 058449f24eb3260dc230dad2a0b4c552d0b7f40e..cf0ad841267cac84ed058dee6cdd62a835325feb 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -125,7 +125,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public final Thread thread;
private final boolean isDebug;
private int skyDarken;
- protected int randValue = RandomSource.create().nextInt();
+ protected int randValue = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceCreateRandomInstance ? java.util.concurrent.ThreadLocalRandom.current().nextInt() : RandomSource.create().nextInt(); // Plazma
protected final int addend = 1013904223;
protected float oRainLevel;
public float rainLevel;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
index 43ca8471d7d4d2d561cba7e2a952a16ed200a961..2260ddd570e40ce97c6a14de99afa550d9686178 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
@@ -369,7 +369,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
}
private static void spawnGatewayPortal(ServerLevel world, BlockPos pos, EndGatewayConfiguration config) {
- Feature.END_GATEWAY.place(config, world, world.getChunkSource().getGenerator(), RandomSource.create(), pos);
+ Feature.END_GATEWAY.place(config, world, world.getChunkSource().getGenerator(), (world.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? world.getRandom() : RandomSource.create()), pos); // Plazma
}
@Override
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index e9eb32469a5c03f7a3677ef50fd4541c1ed662ad..75665373c291faaea1cbf5f54c3634fdb042556c 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -411,7 +411,7 @@ public class EndDragonFight {
this.level.registryAccess().registry(Registries.CONFIGURED_FEATURE).flatMap((registry) -> {
return registry.getHolder(EndFeatures.END_GATEWAY_DELAYED);
}).ifPresent((reference) -> {
- reference.value().place(this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), pos);
+ reference.value().place(this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? this.level.getRandom() : RandomSource.create()), pos); // Plazma
});
}
@@ -427,7 +427,7 @@ public class EndDragonFight {
this.portalLocation = this.portalLocation.atY(this.level.getMinBuildHeight() + 1);
}
// Paper end
- endPodiumFeature.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation);
+ endPodiumFeature.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? this.level.getRandom() : RandomSource.create()), this.portalLocation); // Plazma
}
@Nullable
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java b/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java
index 9e9ac64764cf0a84e25e75d8d6f516cde6047284..2d197a7de77657a19b1b527c0aa53ef9918eb15f 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootContext.java
@@ -202,7 +202,7 @@ public class LootContext {
} else {
RandomSource randomSource = this.random;
if (randomSource == null) {
- randomSource = RandomSource.create();
+ randomSource = this.level.plazmaLevelConfiguration().misc.reduceCreateRandomInstance ? this.level.getRandom() : RandomSource.create();
}
MinecraftServer minecraftServer = this.level.getServer();
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 1e979bb87ec743e87909927a517692da38e7b18f..66436d4eb66b5a71f18b7db359ab1d63bbac74c0 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -40,7 +40,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Misc misc;
public class Misc extends ConfigurationPart {
-
+ public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
}
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 9416ce600d46fad167befe8d42f9a1a7d891a37f..2836447cf43e145d1fc1d24f6d054be49e9a14d9 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -87,7 +87,7 @@ public class LevelConfigurations extends ConfigurationPart {
public Misc misc;
public class Misc extends ConfigurationPart {
-
+ public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
}
}

View File

@@ -1,32 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 20:38:21 +0900
Subject: [PATCH] Entity Configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 2836447cf43e145d1fc1d24f6d054be49e9a14d9..f560db0cd544c96264ebad8af3ed3dd8379bab1b 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -90,4 +90,21 @@ public class LevelConfigurations extends ConfigurationPart {
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
}
+
+ public Entity entity;
+ public class Entity extends ConfigurationPart {
+
+ public Monster monster;
+ public class Monster extends ConfigurationPart {
+
+ public Phantom phantom;
+ public class Phantom extends ConfigurationPart {
+
+
+
+ }
+
+ }
+
+ }
}

View File

@@ -1,107 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 20:42:23 +0900
Subject: [PATCH] Various Optimizations
[ORIGINAL PATCHES]
0007 - Avoid double I/O operation on load player file (Akarin)
0008 - Don't trigger Lootable Refresh for non player interaction
(Akarin)
0011 - Swaps the predicate order of collision (Akarin)
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b2ee73a2ef6042694ca84c27d592e5fb13b4a0fe..d6e20ebb1e07da767f6571bbaf0dc882cdf4503f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1991,8 +1991,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void playerTouch(Player player) {}
public void push(Entity entity) {
+ if (entity.noPhysics && this.noPhysics) return; // Plazma
if (!this.isPassengerOfSameVehicle(entity)) {
- if (!entity.noPhysics && !this.noPhysics) {
+ //if (!entity.noPhysics && !this.noPhysics) { // Plazma
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
double d0 = entity.getX() - this.getX();
double d1 = entity.getZ() - this.getZ();
@@ -2021,7 +2022,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}
- }
+ //} // Plazma
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
index 6d62cc8fb347ccafd51df05896e616995990f005..c26e4795afd0bd450d304f4528d0b8e4cfa761ce 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
@@ -70,6 +70,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
}
public void unpackLootTable(@Nullable Player player) {
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.doNotTriggerLootTableRefreshForNonPlayerInteraction && player == null) return; // Plazma
if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper
LootTable lootTable = this.level.getServer().getLootTables().get(this.lootTable);
if (player instanceof ServerPlayer) {
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
index f55c50f6637a4f930b15565d6ac82bb4f27b9059..9c4e65a67bda331625a0891be10495eaae5f3f5e 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
@@ -73,6 +73,7 @@ public class PhantomSpawner implements CustomSpawner {
if (randomsource.nextInt(j) >= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper
BlockPos blockposition1 = blockposition.above(20 + randomsource.nextInt(15)).east(-10 + randomsource.nextInt(21)).south(-10 + randomsource.nextInt(21));
+ if (world.plazmaLevelConfiguration().entity.monster.phantom.doNotLoadChunksToSpawn && world.hasChunkAt(blockposition1)) continue; // Plazma
BlockState iblockdata = world.getBlockState(blockposition1);
FluidState fluid = world.getFluidState(blockposition1);
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
index 36af81f0957d17e170d229059c66f4eb4539dfeb..039c952f0c157cba6e79fa9b976958bd1763a922 100644
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
@@ -56,7 +56,8 @@ public class PlayerDataStorage {
File file = new File(this.playerDir, player.getStringUUID() + ".dat");
// Spigot Start
boolean usingWrongFile = false;
- if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
+ boolean normalFile = file.exists() && file.isFile(); // Plazma - Avoid double I/O operation
+ if ( org.bukkit.Bukkit.getOnlineMode() && !normalFile ) // Paper - Check online mode first // Plazma - Avoid double I/O operation
{
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
if ( file.exists() )
@@ -67,7 +68,7 @@ public class PlayerDataStorage {
}
// Spigot End
- if (file.exists() && file.isFile()) {
+ if (normalFile) { // Plazma - Avoid double I/O operation
nbttagcompound = NbtIo.readCompressed(file);
}
// Spigot Start
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 66436d4eb66b5a71f18b7db359ab1d63bbac74c0..87a85fb1cd9a19541df04a5d1c457d86cf7f68eb 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -41,6 +41,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Misc extends ConfigurationPart {
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
+ public boolean doNotTriggerLootTableRefreshForNonPlayerInteraction = DO_OPTIMIZE;
}
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index f560db0cd544c96264ebad8af3ed3dd8379bab1b..80ee8293d73ecdb1a942ca88f1aa00813d600849 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -100,7 +100,7 @@ public class LevelConfigurations extends ConfigurationPart {
public Phantom phantom;
public class Phantom extends ConfigurationPart {
-
+ public boolean doNotLoadChunksToSpawn = DO_OPTIMIZE;
}

View File

@@ -1,32 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 20:46:40 +0900
Subject: [PATCH] Add configuration to disable moved to quickly check for
spectators
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ae3c1bd67c144fe971d4df6df2ca171b431b6fc5..dee076d1e6e30f108a79565546182b4751737baa 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1534,7 +1534,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (!this.player.isChangingDimension() && (!this.player.getLevel().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
- if (d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
+ if (!(this.player.getLevel().plazmaLevelConfiguration().misc.checkSpectatorMovedToQuickly && this.player.isSpectator()) && d11 - d10 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // Plazma
// CraftBukkit end
ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d7, d8, d9});
this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot());
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 80ee8293d73ecdb1a942ca88f1aa00813d600849..e6c22ab535ab8fecaadbf06d4982440fd5863f17 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -88,6 +88,7 @@ public class LevelConfigurations extends ConfigurationPart {
public class Misc extends ConfigurationPart {
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
+ public boolean checkSpectatorMovedToQuickly = DO_OPTIMIZE;
}

View File

@@ -1,471 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 21:50:25 +0900
Subject: [PATCH] Apply faster random
diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
index e5ea9f27a1936ed9e329e74317c91c5df89b9fbd..7e7a4d872983cd2efdc575bc33353f94d73cc641 100644
--- a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
+++ b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
@@ -13,7 +13,7 @@ import java.util.UUID;
public class PaperLootableInventoryData {
- private static final Random RANDOM = new Random();
+ private static final Random RANDOM = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
private long lastFill = -1;
private long nextRefill = -1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6d2d1d99977d33fdd8c9a34b65bbca189852d1c0..6e2713a2f3c30a09f54bab4d0746d84dad66be2e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -693,7 +693,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition());
// CraftBukkit start
if (world.generator != null) {
- Random rand = new Random(world.getSeed());
+ Random rand = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); rand.setSeed(world.getSeed()); // Plazma
org.bukkit.Location spawn = world.generator.getFixedSpawnLocation(world.getWorld(), rand);
if (spawn != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c6a3b59c65466f9f2b16cefe0059a6e5dd84044c..a3499de4efb45f598b3fae796618531164e0b209 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -226,7 +226,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
// Paper end
- private static final Random rand = new Random();
+ private static final Random rand = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
public CraftWorld(ServerLevel world, ChunkGenerator gen, BiomeProvider biomeProvider, Environment env) {
this.world = world;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index d1c7ab67cba881d96b7a5e9220130d86d0514304..6018c5332410a5a0db29f35c0b4cb628df07f596 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -15,7 +15,7 @@ import org.bukkit.inventory.meta.FireworkMeta;
public class CraftFirework extends CraftProjectile implements Firework {
- private final Random random = new Random();
+ private final Random random = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
//private CraftItemStack item; // Paper - Remove usage, not accurate representation of current item.
public CraftFirework(CraftServer server, FireworkRocketEntity entity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index a9673a804d597599c35c83f4f245510c83005328..202ac2b0d96b870ce853959da89e82a4949ca585 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -48,7 +48,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
private final net.minecraft.world.level.chunk.ChunkGenerator delegate;
private final ChunkGenerator generator;
private final ServerLevel world;
- private final Random random = new Random();
+ private final Random random = Boolean.getBoolean("Plazma.doNotUseFasterRandom") ? new Random() : new org.plazmamc.plazma.Random(); // Plazma
private boolean newApi;
private boolean implementBaseHeight = true;
diff --git a/src/main/java/org/plazmamc/plazma/Random.java b/src/main/java/org/plazmamc/plazma/Random.java
new file mode 100644
index 0000000000000000000000000000000000000000..e72e96be3938bdcc1ae1aa94f7465f644e1b3e16
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/Random.java
@@ -0,0 +1,394 @@
+package org.plazmamc.plazma;
+
+/**
+ + This is a faster implementation of java.util.Random
+ + Code from <a href="https://gist.github.com/Xyene/4637619">...</a> by Xyene
+ + Licensed unser GNU LGPL v3.0
+ + <p>
+ * A random number generator based on the simple and fast xor-shift pseudo
+ * random number generator (RNG) specified in:
+ * Marsaglia, George. (2003). Xorshift RNGs.
+ * <a href="http://www.jstatsoft.org/v08/i14/xorshift.pdf">...</a>
+ * Translated from:
+ * <a href="http://www.codeproject.com/Articles/9187/A-fast-equivalent-for-System-Random">...</a>.
+ */
+@SuppressWarnings("SuspiciousNameCombination")
+public class Random extends java.util.Random {
+ final double REAL_UNIT_INT = 1.0 / (0x7FFFFFFFL);
+ final double REAL_UNIT_UINT = 1.0 / (0xFFFFFFFFL);
+ final long Y = 842502087L, Z = 3579807591L, W = 273326509L;
+ long x, y, z, w;
+
+ public Random() {
+ seed((int) System.currentTimeMillis());
+ }
+
+ @Override
+ public void setSeed(long seed) {
+ seed((int) seed);
+ }
+
+ public void seed(int seed) {
+ // The only stipulation stated for the xorshift RNG is that at least one of
+ // the seeds x,y,z,w is non-zero. We fulfill that requirement by only allowing
+ // resetting of the x seed
+ x = seed;
+ y = Y;
+ z = Z;
+ w = W;
+ }
+
+ long boolBuffer;
+ int boolBufferBits = 0;
+
+ @Override
+ public boolean nextBoolean() {
+ if (boolBufferBits == 0) {
+ boolBuffer = nextUInt();
+ boolBufferBits = 32;
+ }
+ boolBuffer >>= 1;
+ boolean bit = (boolBuffer & 1) == 0;
+ --boolBufferBits;
+ return bit;
+ }
+
+ @Override
+ public void nextBytes(byte[] buffer) {
+ // Fill up the bulk of the buffer in chunks of 4 bytes at a time.
+ long x = this.x, y = this.y, z = this.z, w = this.w;
+ int i = 0;
+ long t;
+ for (int bound = buffer.length - 3; i < bound; ) {
+ // Generate 4 bytes.
+ // Increased performance is achieved by generating 4 random bytes per loop.
+ // Also note that no mask needs to be applied to zero out the higher order bytes before
+ // casting because the cast ignores thos bytes. Thanks to Stefan Trosch黷z for pointing this out.
+ t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
+
+ buffer[i++] = (byte) w;
+ buffer[i++] = (byte) (w >> 8);
+ buffer[i++] = (byte) (w >> 16);
+ buffer[i++] = (byte) (w >> 24);
+ }
+
+ // Fill up any remaining bytes in the buffer.
+ if (i < buffer.length) {
+ // Generate 4 bytes.
+ t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
+
+ buffer[i++] = (byte) w;
+ if (i < buffer.length) {
+ buffer[i++] = (byte) (w >> 8);
+ if (i < buffer.length) {
+ buffer[i++] = (byte) (w >> 16);
+ if (i < buffer.length) {
+ buffer[i] = (byte) (w >> 24);
+ }
+ }
+ }
+ }
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ @Override
+ public double nextDouble() {
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+
+ // Here we can gain a 2x speed improvement by generating a value that can be cast to
+ // an int instead of the more easily available uint. If we then explicitly cast to an
+ // int the compiler will then cast the int to a double to perform the multiplication,
+ // this final cast is a lot faster than casting from a uint to a double. The extra cast
+ // to an int is very fast (the allocated bits remain the same) and so the overall effect
+ // of the extra cast is a significant performance improvement.
+ //
+ // Also note that the loss of one bit of precision is equivalent to what occurs within
+ // System.Random.
+ return (REAL_UNIT_INT * (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))));
+ }
+
+ public double random() {
+ return nextDouble();
+ }
+
+ @Override
+ public float nextFloat() {
+ return (float) nextDouble();
+ }
+
+ @Override
+ public int nextInt() {
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ return (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))));
+ }
+
+ @Override
+ public int nextInt(int upperBound) {
+ if (upperBound < 0)
+ throw new IllegalArgumentException("upperBound must be >=0");
+
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+
+ return (int) ((REAL_UNIT_INT * (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))))) * upperBound);
+ }
+
+ public int nextInt(int lowerBound, int upperBound) {
+ if (lowerBound > upperBound)
+ throw new IllegalArgumentException("upperBound must be >=lowerBound");
+
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+
+ // The explicit int cast before the first multiplication gives better performance.
+ // See comments in NextDouble.
+ int range = upperBound - lowerBound;
+ if (range < 0) {
+ // If range is <0 then an overflow has occured and must resort to using long integer arithmetic instead (slower).
+ // We also must use all 32 bits of precision, instead of the normal 31, which again is slower.
+ return lowerBound + (int) ((REAL_UNIT_UINT * (double) (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))) * (double) ((long) upperBound - (long) lowerBound));
+ }
+ // 31 bits of precision will suffice if range<=int.MaxValue. This allows us to cast to an int and gain
+ // a little more performance.
+ return lowerBound + (int) ((REAL_UNIT_INT * (double) (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))))) * (double) range);
+ }
+
+ public long nextUInt() {
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))) & (0xFFFFFFFFL);
+ }
+
+ @Override
+ public long nextLong() {
+ return nextUInt() << 32 + nextUInt();
+ }
+
+ double gaussNext;
+ boolean hasGaussNext;
+ final double TWOPI = Math.PI * 2;
+
+ /**
+ * Get a random number in the range [min, max) or [min, max] depending on rounding.
+ *
+ * @param min Low bound
+ * @param max High bound
+ * @return A uniformly distributed double
+ */
+ public double uniform(double min, double max) {
+ return min + (max - min) * nextDouble();
+ }
+
+ /**
+ * Triangular distribution.
+ * <p/>
+ * Continuous distribution bounded by given lower and upper limits,
+ * and having a given mode value in-between.
+ * http://en.wikipedia.org/wiki/Triangular_distribution
+ *
+ * @param low Low bound
+ * @param high High bound
+ * @param mode Mode
+ * @return A number from the triangular distribution specified
+ */
+ public double triangular(int low, int high, int mode) {
+ double u = nextDouble();
+ double c = (mode - low) / (high - low);
+ if (u > c) {
+ u = 1.0 - u;
+ c = 1.0 - c;
+ int k = low;
+ low = high;
+ high = k;
+ }
+ return low + (high - low) * Math.sqrt(u * c);
+ }
+
+ /**
+ * Gaussian distribution, mean is 0 and standard deviation is 1.
+ * <p/>
+ * mu is the mean, and sigma is the standard deviation.
+ *
+ * @return A double in Gaussian distribution
+ */
+ public double gauss() {
+ return nextGaussian();
+ }
+
+ /**
+ * Gaussian distribution, with user-specified mean and standard deviation.
+ * <p/>
+ * mu is the mean, and sigma is the standard deviation.
+ *
+ * @return A double in Gaussian distribution
+ */
+ public double gauss(double mu, double sigma) {
+ return mu + sigma * nextGaussian();
+ }
+
+ public double gaussUnsigned(double mu, double sigma) {
+ double out = gauss(mu, sigma);
+ return out > 1 ? out : 1;
+ }
+
+ /**
+ * Log normal distribution.
+ * <p/>
+ * If you take the natural logarithm of this distribution, you'll get a
+ * normal distribution with mean mu and standard deviation sigma.
+ * mu can have any value, and sigma must be greater than zero.
+ *
+ * @param mu Mean
+ * @param sigma Standard deviation
+ * @return A number from the log normal distribution specified
+ */
+ public double logNormal(double mu, double sigma) {
+ return Math.exp(gauss(mu, sigma));
+ }
+
+ /**
+ * Exponential distribution.
+ * <p/>
+ * lambda is 1.0 divided by the desired mean. It should be
+ * nonzero. Returned values range from 0 to positive infinity
+ * if lambda is positive, and from negative infinity to 0
+ * if lambda is negative.
+ *
+ * @param lambda A non-zero value
+ */
+ public double exponential(double lambda) {
+ return -Math.log(1.0 - random()) / lambda;
+ }
+
+ /**
+ * Circular data distribution.
+ * <p/>
+ * If kappa is equal to zero, this distribution reduces
+ * to a uniform random angle over the range 0 to 2*pi.
+ *
+ * @param mu the mean angle, expressed in radians between 0 and 2*pi.
+ * @param kappa the concentration parameter, which must be greater than or
+ * equal to zero.
+ * @return A number from the circular data distribution specified
+ */
+ public double circularData(double mu, double kappa) {
+ if (kappa <= 1e-6)
+ return TWOPI * nextDouble();
+
+ double a = 1.0 + Math.sqrt(1.0 + 4.0 * kappa * kappa);
+ double b = (a - Math.sqrt(2.0 * a)) / (2.0 * kappa);
+ double r = (1.0 + b * b) / (2.0 * b);
+ double u1, u2, u3, f, c, z, theta = 0;
+
+ while (true) {
+ u1 = nextDouble();
+
+ z = Math.cos(Math.PI * u1);
+ f = (1.0 + r * z) / (r + z);
+ c = kappa * (r - f);
+
+ u2 = nextDouble();
+
+ if (u2 < c * (2.0 - c) || u2 <= c * Math.exp(1.0 - c))
+ break;
+
+ u3 = nextDouble();
+ if (u3 > 0.5)
+ theta = (mu % TWOPI) + Math.acos(f);
+ else
+ theta = (mu % TWOPI) - Math.acos(f);
+ }
+ return theta;
+ }
+
+
+ final double LOG4 = Math.log(4);
+ final double SG_MAGICCONST = 1.0 + Math.log(4.5);
+
+ /**
+ * Gamma distribution. Not the gamma function!
+ * Conditions on the parameters are alpha > 0 and beta > 0.
+ * <p/>
+ * The probability distribution function is:
+ * pdf(x) = (x ** (alpha - 1) * math.exp(-x / beta)) / (math.gamma(alpha) * beta ** alpha)
+ *
+ * @param alpha Alpha
+ * @param beta Beta
+ * @return A number from the gamma distribution specified
+ */
+ public double gamma(double alpha, double beta) {
+ if (alpha <= 0.0 || beta <= 0.0)
+ throw new IllegalArgumentException("alpha and beta must be > 0.0");
+
+ if (alpha > 1.0) {
+ double ainv = Math.sqrt(2.0 * alpha - 1.0);
+ double bbb = alpha - LOG4;
+ double ccc = alpha + ainv;
+ double u1, u2, v, x, z, r;
+
+ while (true) {
+ u1 = random();
+ if (!(1e-7 < u1 && u1 < .9999999))
+ continue;
+ u2 = 1.0 - random();
+ v = Math.log(u1 / (1.0 - u1)) / ainv;
+ x = alpha * Math.exp(v);
+ z = u1 * u1 * u2;
+ r = bbb + ccc * v - x;
+ if (r + SG_MAGICCONST - 4.5 * z >= 0.0 || r >= Math.log(z))
+ return x * beta;
+ }
+ } else if (alpha == 1.0) {
+ // exponential(1)
+ double u;
+ u = random();
+ while (u <= 1e-7)
+ u = random();
+ return -Math.log(u) * beta;
+ } else {
+ // alpha is between 0 and 1 (exclusive)
+ // Uses ALGORITHM GS of Statistical Computing -Kennedy & Gentle
+
+ double u, b, p, x, u1;
+ while (true) {
+ u = random();
+ b = (Math.E + alpha) / Math.E;
+ p = b * u;
+ if (p <= 1.0)
+ x = Math.pow(p, (1.0 / alpha));
+ else
+ x = -Math.log((b - p) / alpha);
+ u1 = random();
+ if (p > 1.0) {
+ if (u1 <= Math.pow(x, (alpha - 1.0)))
+ break;
+ } else if (u1 <= Math.exp(-x))
+ break;
+ }
+ return x * beta;
+ }
+ }
+}

View File

@@ -1,52 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 25 Mar 2023 22:07:39 +0900
Subject: [PATCH] Do not send useless entity packets
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 6afee2a744a3498d4a0eee35f77cde444f73d12c..dbb987d5896e199aeae3bcd86c69bf3327af8ada 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -207,6 +207,7 @@ public class ServerEntity {
flag4 = true;
flag5 = true;
}
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.doNotSendUselessEntityPackets && isUselessEntityPacket(packet1)) packet1 = null; // Plazma
}
if ((this.trackDelta || this.entity.hasImpulse || this.entity instanceof LivingEntity && ((LivingEntity) this.entity).isFallFlying()) && this.tickCount > 0) {
@@ -281,6 +282,21 @@ public class ServerEntity {
}));
}
+ // Plazma start
+ private boolean isUselessEntityPacket(@Nullable Packet<?> packet) {
+ if (packet == null) return false;
+ if (packet instanceof ClientboundMoveEntityPacket p) {
+ if (p instanceof ClientboundMoveEntityPacket.Pos)
+ return p.getXa() == 0 && p.getYa() == 0 && p.getZa() == 0;
+ else if (p instanceof ClientboundMoveEntityPacket.Rot)
+ return p.getxRot() == 0 && p.getyRot() == 0;
+ else if (p instanceof ClientboundMoveEntityPacket.PosRot)
+ return p.getXa() == 0 && p.getYa() == 0 && p.getZa() == 0 && p.getxRot() == 0 && p.getyRot() == 0;
+ }
+ return false;
+ }
+ // Plazma end
+
public void removePairing(ServerPlayer player) {
this.entity.stopSeenByPlayer(player);
player.connection.send(new ClientboundRemoveEntitiesPacket(new int[]{this.entity.getId()}));
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 87a85fb1cd9a19541df04a5d1c457d86cf7f68eb..989b6d20818dec0a527a170ad2b19d456ca023d9 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -42,6 +42,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
public boolean doNotTriggerLootTableRefreshForNonPlayerInteraction = DO_OPTIMIZE;
+ public boolean doNotSendUselessEntityPackets = DO_OPTIMIZE;
}
}

View File

@@ -0,0 +1,603 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 27 Sep 2023 16:42:17 +0900
Subject: [PATCH] Optimize default configurations
[REFERENCE]
- YouHaveTrouble/minecraft-optimization
- AkiraDevelopment/SimplyMC
- YouHaveTrouble/minecraft-exploits-and-how-to-fix-them
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
index c867796f6..ecced2072 100644
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
@@ -181,7 +222,7 @@ public class WorldConfiguration extends ConfigurationPart {
@MergeMap
public Reference2IntMap<MobCategory> spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
@MergeMap
- public Map<MobCategory, DespawnRange> despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), category.getDespawnDistance())));
+ public Map<MobCategory, DespawnRange> despawnRanges = Arrays.stream(MobCategory.values()).collect(Collectors.toMap(Function.identity(), category -> new DespawnRange(category.getNoDespawnDistance(), org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? (net.minecraft.server.MinecraftServer.getServer().server.getSimulationDistance() * 16) + 8 : category.getDespawnDistance()))); // Plazma - Optimize default configurations
@MergeMap
public Reference2IntMap<MobCategory> ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
index 3ff4f092a59242a8cb930c084915a774db881652..66f797f5205b9b259cc6f6cfd710293fc73cdf59 100644
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -61,7 +61,7 @@ public class PufferfishConfig {
getString("info.version", "1.0");
setComment("info",
"Pufferfish Configuration",
- "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host",
+ // "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma - Sponsorblock
"Join our Discord for support: https://discord.gg/reZw4vQV9H",
"Download new builds at https://ci.pufferfish.host/job/Pufferfish");
@@ -216,7 +216,7 @@ public class PufferfishConfig {
public static int maxProjectileLoadsPerTick;
public static int maxProjectileLoadsPerProjectile;
private static void projectileLoading() {
- maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick.");
+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", plazma.Config.optimize() ? 8 : 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma - Optimize default configurations
maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
setComment("projectile", "Optimizes projectile settings");
@@ -230,12 +230,12 @@ public class PufferfishConfig {
public static int activationDistanceMod;
private static void dynamicActivationOfBrains() throws IOException {
- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur - Fix pufferfish issues
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", plazma.Config.optimize()); // Purpur - Fix pufferfish issues // Plazma - Optimize default configurations
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
"This value determines how far away an entity has to be",
"from the player to start being effected by DEAR.");
startDistanceSquared = startDistance * startDistance;
- maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20,
+ maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", plazma.Config.optimize() ? 7 : 8, // Plazma - Optimize default configurations
"This value defines how often in ticks, the furthest entity",
"will get their pathfinders and behaviors ticked. 20 = 1s");
activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 088b8fe5d144807f4da1e85b2fa34dfd21286f8c..8c3c7987a269733a0f530e8f22c3f1a005de21ac 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -148,7 +148,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Watchdog extends ConfigurationPart {
public int earlyWarningEvery = 5000;
- public int earlyWarningDelay = 10000;
+ public int earlyWarningDelay = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 180000 : 10000; // Plazma - Optimize default configurations
}
public SpamLimiter spamLimiter;
@@ -188,7 +188,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Commands commands;
public class Commands extends ConfigurationPart {
- public boolean suggestPlayerNamesWhenNullTabCompletions = true;
+ public boolean suggestPlayerNamesWhenNullTabCompletions = !org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public boolean fixTargetSelectorTagCompletion = true;
public boolean timeCommandAffectsAllWorlds = false;
}
@@ -253,7 +253,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public BookSize bookSize;
public class BookSize extends ConfigurationPart {
- public IntOr.Disabled pageMax = new IntOr.Disabled(OptionalInt.of(2560)); // TODO this appears to be a duplicate setting with one above
+ public IntOr.Disabled pageMax = new IntOr.Disabled(OptionalInt.of(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1024 : 2560)); // TODO this appears to be a duplicate setting with one above // Plazma - Optimize default configurations
public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class
}
public boolean resolveSelectorsInBooks = false;
@@ -264,7 +264,15 @@ public class GlobalConfiguration extends ConfigurationPart {
public class PacketLimiter extends ConfigurationPart {
public Component kickMessage = Component.translatable("disconnect.exceeded_packet_rate", NamedTextColor.RED);
public PacketLimit allPackets = new PacketLimit(7.0, 500.0, PacketLimit.ViolateAction.KICK);
- public Map<Class<? extends Packet<?>>, PacketLimit> overrides = Map.of(ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP));
+ // Plazma start - Optimize default configurations
+ public Map<Class<? extends Packet<?>>, PacketLimit> overrides = new java.util.HashMap<>() {{
+ put(ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP));
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) {
+ put(net.minecraft.network.protocol.game.ServerboundCommandSuggestionPacket.class, new PacketLimit(1.0, 15.0, PacketLimit.ViolateAction.DROP));
+ put(net.minecraft.network.protocol.game.ServerboundPlaceRecipePacket.class, new PacketLimit(4.0, 5.0, PacketLimit.ViolateAction.DROP));
+ }
+ }};
+ // Plazma end
@ConfigSerializable
public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) {
@@ -332,7 +340,7 @@ public class GlobalConfiguration extends ConfigurationPart {
executor.setMaximumPoolSize(_chatExecutorMaxSize);
}
}
- public int maxJoinsPerTick = 5;
+ public int maxJoinsPerTick = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3 : 5; // Plazma - Optimize default configurations
public boolean fixEntityPositionDesync = true;
public boolean loadPermissionsYmlBeforePlugins = true;
@Constraints.Min(4)
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
index 82210667376fd466d5d4cdcb56b62f6165bd5cde..3c6e9ec236bfd851700ce7fae2599b725ec899eb 100644
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
@@ -103,12 +103,32 @@ public class WorldConfiguration extends ConfigurationPart {
public class AntiXray extends ConfigurationPart {
public boolean enabled = false;
- public EngineMode engineMode = EngineMode.HIDE;
+ public EngineMode engineMode = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? EngineMode.OBFUSCATE_LAYER : EngineMode.HIDE; // Plazma - Optimize default configurations
public int maxBlockHeight = 64;
public int updateRadius = 2;
- public boolean lavaObscures = false;
+ public boolean lavaObscures = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public boolean usePermission = false;
- public List<Block> hiddenBlocks = List.of(
+ // Plazma start - Optimize default configurations
+ public List<Block> hiddenBlocks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? List.of(
+ //<editor-fold desc="Anti-Xray Hidden Blocks" defaultstate="collapsed">
+ Blocks.AIR,
+ Blocks.COPPER_ORE,
+ Blocks.DEEPSLATE_COPPER_ORE,
+ Blocks.RAW_COPPER_BLOCK,
+ Blocks.IRON_ORE,
+ Blocks.DEEPSLATE_IRON_ORE,
+ Blocks.RAW_IRON_BLOCK,
+ Blocks.GOLD_ORE,
+ Blocks.DEEPSLATE_GOLD_ORE,
+ Blocks.RAW_GOLD_BLOCK,
+ Blocks.REDSTONE_ORE,
+ Blocks.DEEPSLATE_REDSTONE_ORE,
+ Blocks.LAPIS_ORE,
+ Blocks.DEEPSLATE_LAPIS_ORE,
+ Blocks.DIAMOND_ORE,
+ Blocks.DEEPSLATE_DIAMOND_ORE
+ //</editor-fold>
+ ) : List.of(
//<editor-fold desc="Anti-Xray Hidden Blocks" defaultstate="collapsed">
Blocks.COPPER_ORE,
Blocks.DEEPSLATE_COPPER_ORE,
@@ -135,7 +155,28 @@ public class WorldConfiguration extends ConfigurationPart {
Blocks.ENDER_CHEST
//</editor-fold>
);
- public List<Block> replacementBlocks = List.of(Blocks.STONE, Blocks.OAK_PLANKS, Blocks.DEEPSLATE);
+ public List<Block> replacementBlocks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? List.of(
+ //<editor-fold desc="Anti-Xray Replacement Blocks" defaultstate="collapsed">
+ Blocks.CHEST,
+ Blocks.AMETHYST_BLOCK,
+ Blocks.ANDESITE,
+ Blocks.BUDDING_AMETHYST,
+ Blocks.CALCITE,
+ Blocks.COAL_ORE,
+ Blocks.DEEPSLATE_COAL_ORE,
+ Blocks.DEEPSLATE,
+ Blocks.DIORITE,
+ Blocks.DIRT,
+ Blocks.EMERALD_ORE,
+ Blocks.GRANITE,
+ Blocks.GRAVEL,
+ Blocks.OAK_PLANKS,
+ Blocks.SMOOTH_BASALT,
+ Blocks.STONE,
+ Blocks.TUFF
+ //</editor-fold>
+ ) : List.of(Blocks.STONE, Blocks.OAK_PLANKS, Blocks.DEEPSLATE);
+ // Plazma end
}
}
@@ -157,14 +198,14 @@ public class WorldConfiguration extends ConfigurationPart {
public ArmorStands armorStands;
public class ArmorStands extends ConfigurationPart {
- public boolean doCollisionEntityLookups = true;
- public boolean tick = true;
+ public boolean doCollisionEntityLookups = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
+ public boolean tick = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
}
public Markers markers;
public class Markers extends ConfigurationPart {
- public boolean tick = true;
+ public boolean tick = !org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
}
public Sniffer sniffer;
@@ -415,7 +456,7 @@ public class WorldConfiguration extends ConfigurationPart {
public class Environment extends ConfigurationPart {
public boolean disableThunder = false;
public boolean disableIceAndSnow = false;
- public boolean optimizeExplosions = false;
+ public boolean optimizeExplosions = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public boolean disableExplosionKnockback = false;
public boolean generateFlatBedrock = false;
public FrostedIce frostedIce;
@@ -471,7 +512,7 @@ public class WorldConfiguration extends ConfigurationPart {
public Fixes fixes;
public class Fixes extends ConfigurationPart {
- public boolean fixItemsMergingThroughWalls = false;
+ public boolean fixItemsMergingThroughWalls = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public boolean disableUnloadedChunkEnderpearlExploit = false;
public boolean preventTntFromMovingInWater = false;
public boolean splitOverstackedLoot = true;
@@ -499,9 +540,9 @@ public class WorldConfiguration extends ConfigurationPart {
public class Collisions extends ConfigurationPart {
public boolean onlyPlayersCollide = false;
public boolean allowVehicleCollisions = true;
- public boolean fixClimbingBypassingCrammingRule = false;
+ public boolean fixClimbingBypassingCrammingRule = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
@RequiresSpigotInitialization(MaxEntityCollisionsInitializer.class)
- public int maxEntityCollisions = 8;
+ public int maxEntityCollisions = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 2 : 8; // Plazma - Optimize default configurations
public boolean allowPlayerCrammingDamage = false;
}
@@ -509,18 +550,41 @@ public class WorldConfiguration extends ConfigurationPart {
public class Chunks extends ConfigurationPart {
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
- public int maxAutoSaveChunksPerTick = 24;
+ public int maxAutoSaveChunksPerTick = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 24; // Plazma - Optimize default configurations
public int fixedChunkInhabitedTime = -1;
- public boolean preventMovingIntoUnloadedChunks = false;
+ public boolean preventMovingIntoUnloadedChunks = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public Duration delayChunkUnloadsBy = Duration.of("10s");
public Reference2IntMap<EntityType<?>> entityPerChunkSaveLimit = Util.make(new Reference2IntOpenHashMap<>(BuiltInRegistries.ENTITY_TYPE.size()), map -> {
map.defaultReturnValue(-1);
- map.put(EntityType.EXPERIENCE_ORB, -1);
- map.put(EntityType.SNOWBALL, -1);
- map.put(EntityType.ENDER_PEARL, -1);
- map.put(EntityType.ARROW, -1);
- map.put(EntityType.FIREBALL, -1);
- map.put(EntityType.SMALL_FIREBALL, -1);
+ // Plazma start - Optimize default configurations
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) {
+ map.put(EntityType.AREA_EFFECT_CLOUD, 8);
+ map.put(EntityType.ARROW, 16);
+ map.put(EntityType.DRAGON_FIREBALL, 3);
+ map.put(EntityType.EGG, 8);
+ map.put(EntityType.ENDER_PEARL, 8);
+ map.put(EntityType.EXPERIENCE_BOTTLE, 3);
+ map.put(EntityType.EXPERIENCE_ORB, 16);
+ map.put(EntityType.EYE_OF_ENDER, 8);
+ map.put(EntityType.FIREBALL, 8);
+ map.put(EntityType.FIREWORK_ROCKET, 8);
+ map.put(EntityType.LLAMA_SPIT, 3);
+ map.put(EntityType.POTION, 8);
+ map.put(EntityType.SHULKER_BULLET, 8);
+ map.put(EntityType.SMALL_FIREBALL, 8);
+ map.put(EntityType.SNOWBALL, 8);
+ map.put(EntityType.SPECTRAL_ARROW, 16);
+ map.put(EntityType.TRIDENT, 16);
+ map.put(EntityType.WITHER_SKULL, 4);
+ } else {
+ map.put(EntityType.EXPERIENCE_ORB, -1);
+ map.put(EntityType.SNOWBALL, -1);
+ map.put(EntityType.ENDER_PEARL, -1);
+ map.put(EntityType.ARROW, -1);
+ map.put(EntityType.FIREBALL, -1);
+ map.put(EntityType.SMALL_FIREBALL, -1);
+ }
+ // Plazma end
});
public boolean flushRegionsOnSave = false;
}
@@ -535,9 +599,9 @@ public class WorldConfiguration extends ConfigurationPart {
public TickRates tickRates;
public class TickRates extends ConfigurationPart {
- public int grassSpread = 1;
+ public int grassSpread = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 1; // Plazma - Optimize default configurations
public int containerUpdate = 1;
- public int mobSpawner = 1;
+ public int mobSpawner = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 2 : 1; // Plazma - Optimize default configurations
public int wetFarmland = 1;
public int dryFarmland = 1;
public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
@@ -571,9 +635,9 @@ public class WorldConfiguration extends ConfigurationPart {
public class Misc extends ConfigurationPart {
public int lightQueueSize = 20;
- public boolean updatePathfindingOnBlockUpdate = true;
+ public boolean updatePathfindingOnBlockUpdate = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
public boolean showSignClickCommandFailureMsgsToPlayer = false;
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
+ public RedstoneImplementation redstoneImplementation = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? RedstoneImplementation.ALTERNATE_CURRENT : RedstoneImplementation.VANILLA; // Plazma - Optimize default configurations
public AlternateCurrentUpdateOrder alternateCurrentUpdateOrder = AlternateCurrentUpdateOrder.HORIZONTAL_FIRST_OUTWARD;
public boolean disableEndCredits = false;
public DoubleOr.Default maxLeashDistance = DoubleOr.Default.USE_DEFAULT;
diff --git a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357d9c7d62a 100644
--- a/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
+++ b/src/main/java/io/papermc/paper/configuration/type/fallback/ArrowDespawnRate.java
@@ -29,6 +29,7 @@ public class ArrowDespawnRate extends FallbackValue.Int {
@Override
protected int fallback() {
+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) return 100; // Plazma - Optimize default configurations
return this.get(FallbackValue.SPIGOT_WORLD_CONFIG).arrowDespawnRate;
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index fc378b08c10c7f670be93d52937c7642b986ed0d..9a436132faa04efbf25d8be9d5488e13f2111dac 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -166,7 +166,7 @@ public class Main {
File configFile = (File) optionset.valueOf("bukkit-settings");
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
configuration.options().copyDefaults(true);
- configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
+ configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(Main.class.getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations
configuration.save(configFile);
File commandFile = (File) optionset.valueOf("commands-settings");
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 8f7e922ceca286b1a590181c301fbe9bff55c024..3dd5c7441bb300ca17d717af37edbefb89db4b2f 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -132,14 +132,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.spawnMonsters = this.get("spawn-monsters", true);
this.useNativeTransport = this.get("use-native-transport", true);
this.enableCommandBlock = this.get("enable-command-block", false);
- this.spawnProtection = this.get("spawn-protection", 16);
+ this.spawnProtection = this.get("spawn-protection", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 0 : 16); // Plazma - Optimize default configurations
this.opPermissionLevel = this.get("op-permission-level", 4);
this.functionPermissionLevel = this.get("function-permission-level", 2);
this.maxTickTime = this.get("max-tick-time", TimeUnit.MINUTES.toMillis(1L));
- this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", 1000000);
+ this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 10000 : 1000000); // Plazma - Optimize default configurations
this.rateLimitPacketsPerSecond = this.get("rate-limit", 0);
- this.viewDistance = this.get("view-distance", 10);
- this.simulationDistance = this.get("simulation-distance", 10);
+ this.viewDistance = this.get("view-distance", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 7 : 10); // Plazma - Optimize default configurations
+ this.simulationDistance = this.get("simulation-distance", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 10); // Plazma - Optimize default configurations
this.maxPlayers = this.get("max-players", 20);
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
@@ -147,7 +147,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.maxWorldSize = this.get("max-world-size", (integer) -> {
return Mth.clamp(integer, 1, 29999984);
}, 29999984);
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag
+ this.syncChunkWrites = Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Completely remove this setting
this.regionFileComression = this.get("region-file-compression", "deflate");
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
this.enableStatus = this.get("enable-status", true);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 090cb821a43ccfea21a990580e47b592df9d030f..4177a12d333925dd7f3422861847119f344a441b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -449,7 +449,7 @@ public final class CraftServer implements Server {
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.configuration.options().copyDefaults(true);
- this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
+ this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations
ConfigurationSection legacyAlias = null;
if (!this.configuration.isString("aliases")) {
legacyAlias = this.configuration.getConfigurationSection("aliases");
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
index 5d41bd4d4b86ca0c7c03d3ac6e75b3f1f1abe73b..c608770ea0df26859a09b794e93292f4aa6881b4 100644
--- a/src/main/java/org/plazmamc/plazma/Options.java
+++ b/src/main/java/org/plazmamc/plazma/Options.java
@@ -7,5 +7,6 @@ public interface Options {
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing");
+ boolean AGGRESSIVE = getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE;
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
index 09053b4ccf268fd204c81dbb8d4f10fa9edcad5f..93f67f125b3674e645cfdae27e579e12d31a236e 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
@@ -35,6 +35,15 @@ public class PlazmaConfigurations extends Configurations<GlobalConfiguration, Wo
static final String WORLD_CONFIG_FILE_NAME = "plazma-world.yml";
static final boolean OPTIMIZE = !Options.NO_OPTIMIZE;
+ static {
+ if (Options.AGGRESSIVE) {
+ LOGGER.warn("Aggressive configuration optimization is enabled. It can greatly affect gameplay.");
+ } else if (OPTIMIZE) {
+ LOGGER.warn("Default configuration optimization is enabled. It may have some impact on gameplay.");
+ LOGGER.warn("To disable default configuration optimization, type \"-DPlazma.disableConfigOptimization\" before the -jar in the server startup command.");
+ }
+ }
+
private static final String HEADER_START = """
#### ENGLISH ####
This is the %s configuration file for Plazma.
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 7690441b5059ae6c7ca8519875ea8a515c5c5e93..f29059798c9dc642187b4939dd917ee15cbe120d 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -244,7 +244,7 @@ public class PurpurConfig {
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
}
- public static boolean useAlternateKeepAlive = false;
+ public static boolean useAlternateKeepAlive = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
private static void useAlternateKeepAlive() {
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
}
@@ -491,7 +491,7 @@ public class PurpurConfig {
}
public static boolean useUPnP = false;
- public static boolean maxJoinsPerSecond = false;
+ public static boolean maxJoinsPerSecond = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public static boolean kickForOutOfOrderChat = true;
private static void networkSettings() {
useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 0d5a0e14cbaacc63eeced78a6c28cc64ad918522..43ad38dadfe14b3dd0565c536b276eb3f9dbd813 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -426,7 +426,7 @@ public class PurpurWorldConfig {
public boolean idleTimeoutTargetPlayer = true;
public String playerDeathExpDropEquation = "expLevel * 7";
public int playerDeathExpDropMax = 100;
- public boolean teleportIfOutsideBorder = false;
+ public boolean teleportIfOutsideBorder = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public boolean teleportOnNetherCeilingDamage = false;
public boolean totemOfUndyingWorksInInventory = false;
public boolean playerFixStuckPortal = false;
@@ -3271,7 +3271,7 @@ public class PurpurWorldConfig {
public boolean zombieJockeyOnlyBaby = true;
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
- public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
+ public boolean zombieAggressiveTowardsVillagerWhenLagging = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize(); // Plazma - Optimize default configurations
public boolean zombieBypassMobGriefing = false;
public boolean zombieTakeDamageFromWater = false;
public boolean zombieAlwaysDropExp = false;
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 2c408fa4abcbe1171c58aee8799c8cf7867d0f0a..aadad0a1e3c7e20b0ab97095ee6e6fb7dbfbd234 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -150,14 +150,14 @@ public class SpigotWorldConfig
public double itemMerge;
private void itemMerge()
{
- this.itemMerge = this.getDouble("merge-radius.item", 0.5 );
+ this.itemMerge = this.getDouble("merge-radius.item", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3.5 : 0.5); // Plazma - Optimize default configurations
this.log( "Item Merge Radius: " + this.itemMerge );
}
public double expMerge;
private void expMerge()
{
- this.expMerge = this.getDouble("merge-radius.exp", -1 );
+ this.expMerge = this.getDouble("merge-radius.exp", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4.0 : -1); // Plazma - Optimize default configurations
this.log( "Experience Merge Radius: " + this.expMerge );
}
@@ -196,7 +196,7 @@ public class SpigotWorldConfig
public byte mobSpawnRange;
private void mobSpawnRange()
{
- this.mobSpawnRange = (byte) getInt( "mob-spawn-range", 8 ); // Paper - Vanilla
+ this.mobSpawnRange = (byte) getInt( "mob-spawn-range", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 3 : 8 ); // Paper - Vanilla // Plazma - Optimize default configurations
this.log( "Mob Spawn Range: " + this.mobSpawnRange );
}
@@ -207,27 +207,29 @@ public class SpigotWorldConfig
this.log( "Item Despawn Rate: " + this.itemDespawnRate );
}
- public int animalActivationRange = 32;
- public int monsterActivationRange = 32;
- public int raiderActivationRange = 64;
- public int miscActivationRange = 16;
- // Paper start
- public int flyingMonsterActivationRange = 32;
- public int waterActivationRange = 16;
- public int villagerActivationRange = 32;
- public int wakeUpInactiveAnimals = 4;
- public int wakeUpInactiveAnimalsEvery = 60*20;
- public int wakeUpInactiveAnimalsFor = 5*20;
- public int wakeUpInactiveMonsters = 8;
- public int wakeUpInactiveMonstersEvery = 20*20;
- public int wakeUpInactiveMonstersFor = 5*20;
- public int wakeUpInactiveVillagers = 4;
- public int wakeUpInactiveVillagersEvery = 30*20;
- public int wakeUpInactiveVillagersFor = 5*20;
- public int wakeUpInactiveFlying = 8;
- public int wakeUpInactiveFlyingEvery = 10*20;
- public int wakeUpInactiveFlyingFor = 5*20;
- public int villagersWorkImmunityAfter = 5*20;
+ // Plazma start - Optimize default configurations
+ public int animalActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 16 : 32;
+ public int monsterActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 24 : 32;
+ public int raiderActivationRange = 64; // diff on changes
+ public int miscActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 16;
+ // Paper start // diff on changes
+ public int flyingMonsterActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 48 : 32;
+ public int waterActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 16;
+ public int villagerActivationRange = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 16 : 32;
+ public int wakeUpInactiveAnimals = 4; // diff on changes
+ public int wakeUpInactiveAnimalsEvery = 1200;
+ public int wakeUpInactiveAnimalsFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 40 : 100;
+ public int wakeUpInactiveMonsters = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 4 : 8;
+ public int wakeUpInactiveMonstersEvery = 400;
+ public int wakeUpInactiveMonstersFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 60 : 100;
+ public int wakeUpInactiveVillagers = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1 : 4;
+ public int wakeUpInactiveVillagersEvery = 600;
+ public int wakeUpInactiveVillagersFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 20 : 100;
+ public int wakeUpInactiveFlying = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 1 : 8;
+ public int wakeUpInactiveFlyingEvery = 200;
+ public int wakeUpInactiveFlyingFor = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 60 : 100;
+ public int villagersWorkImmunityAfter = 100;
+ // Plazma end - Optimize default configurations
public int villagersWorkImmunityFor = 20;
public boolean villagersActiveForPanic = true;
// Paper end
@@ -299,7 +301,7 @@ public class SpigotWorldConfig
{
this.set( "ticks-per.hopper-check", 1 );
}
- this.hopperCheck = this.getInt( "ticks-per.hopper-check", 1 );
+ this.hopperCheck = this.getInt( "ticks-per.hopper-check", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8: 1 ); // Plazma - Optimize default configurations
this.hopperAmount = this.getInt( "hopper-amount", 1 );
this.hopperCanLoadChunks = this.getBoolean( "hopper-can-load-chunks", false );
this.log( "Hopper Transfer: " + this.hopperTransfer + " Hopper Check: " + this.hopperCheck + " Hopper Amount: " + this.hopperAmount + " Hopper Can Load Chunks: " + this.hopperCanLoadChunks );
@@ -309,7 +311,7 @@ public class SpigotWorldConfig
public int tridentDespawnRate;
private void arrowDespawnRate()
{
- this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", 1200 );
+ this.arrowDespawnRate = this.getInt( "arrow-despawn-rate", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 300 : 1200 ); // Plazma - Optimize default configurations
this.tridentDespawnRate = this.getInt( "trident-despawn-rate", this.arrowDespawnRate );
this.log( "Arrow Despawn Rate: " + this.arrowDespawnRate + " Trident Respawn Rate:" + this.tridentDespawnRate );
}
diff --git a/src/main/resources/configurations/bukkit_optimized.yml b/src/main/resources/configurations/bukkit_optimized.yml
new file mode 100644
index 0000000000000000000000000000000000000000..eb33b0a19d6060f78d7ead7a2ad63b1b2581293d
--- /dev/null
+++ b/src/main/resources/configurations/bukkit_optimized.yml
@@ -0,0 +1,45 @@
+# This is the main configuration file for Bukkit.
+# As you can see, there's actually not that much to configure without any plugins.
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
+# https://www.spigotmc.org/go/bukkit-yml
+#
+# If you need help on this file, feel free to join us on Discord or leave a message
+# on the forums asking for advice.
+#
+# Discord: https://www.spigotmc.org/go/discord
+# Forums: https://www.spigotmc.org/
+# Bug tracker: https://www.spigotmc.org/go/bugs
+
+
+settings:
+ allow-end: true
+ warn-on-overload: true
+ permissions-file: permissions.yml
+ update-folder: update
+ plugin-profiling: false
+ connection-throttle: 4000
+ query-plugins: true
+ deprecated-verbose: default
+ shutdown-message: Server closed
+ minimum-api: none
+ use-map-color-cache: true
+spawn-limits:
+ monsters: 20
+ animals: 5
+ water-animals: 2
+ water-ambient: 2
+ water-underground-creature: 3
+ axolotls: 3
+ ambient: 1
+chunk-gc:
+ period-in-ticks: 400
+ticks-per:
+ animal-spawns: 400
+ monster-spawns: 10
+ water-spawns: 400
+ water-ambient-spawns: 400
+ water-underground-creature-spawns: 400
+ axolotl-spawns: 400
+ ambient-spawns: 400
+ autosave: 6000
+aliases: now-in-commands.yml

View File

@@ -0,0 +1,196 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 15 May 2024 16:13:17 +0900
Subject: [PATCH] Add an option to apply the configuration to the vanilla
default
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 8c3c7987a269733a0f530e8f22c3f1a005de21ac..20def77109eb9cd98a7677e73b4316544be86283 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -88,7 +88,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Component flyingVehicle = Component.translatable("multiplayer.disconnect.flying");
}
- public Component noPermission = Component.text("I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error.", NamedTextColor.RED);
+ public Component noPermission = org.plazmamc.plazma.Options.VANILLAIZE ? Component.translatable("command.unknown.command") : Component.text("I'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error.", NamedTextColor.RED);
public boolean useDisplayNameInQuitMessage = false;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4177a12d333925dd7f3422861847119f344a441b..15527e902484496a6804c879d1de589bed3f8713 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -449,7 +449,19 @@ public final class CraftServer implements Server {
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.configuration.options().copyDefaults(true);
- this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? "configurations/bukkit_optimized.yml" : "configurations/bukkit.yml"), Charsets.UTF_8))); // Plazma - Optimize default configurations
+ // Plazma start - Add an option to apply the configuration to the vanilla default
+ String configPath;
+ if (org.plazmamc.plazma.Options.NO_OPTIMIZE) {
+ if (org.plazmamc.plazma.Options.VANILLAIZE) configPath = "configurations/bukkit_vanillaized.yml";
+ else configPath = "configurations/bukkit.yml";
+ } else {
+ if (org.plazmamc.plazma.Options.VANILLAIZE) configPath = "configurations/bukkit_optimized_vanillaized.yml";
+ else configPath = "configurations/bukkit_optimized.yml";
+ }
+ this.configuration.setDefaults(YamlConfiguration.loadConfiguration(
+ new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(configPath), Charsets.UTF_8)
+ )); // Plazma - Optimize default configurations
+ // Plazma end - Add an option to apply the configuration to the vanilla default
ConfigurationSection legacyAlias = null;
if (!this.configuration.isString("aliases")) {
legacyAlias = this.configuration.getConfigurationSection("aliases");
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
index c608770ea0df26859a09b794e93292f4aa6881b4..063b71b3043a69a90130a81686b6a5f1e5f22fd1 100644
--- a/src/main/java/org/plazmamc/plazma/Options.java
+++ b/src/main/java/org/plazmamc/plazma/Options.java
@@ -8,5 +8,7 @@ public interface Options {
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing");
boolean AGGRESSIVE = getBoolean("Plazma.aggressiveOptimize") && !NO_OPTIMIZE;
+ boolean VANILLAIZE = getBoolean("Plazma.vanillaize") && !AGGRESSIVE;
+ boolean USE_VANILLA = getBoolean("Plazma.useVanillaConfiguration") && !AGGRESSIVE && NO_OPTIMIZE;
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 4dbb109d0526afee99b9190fc256585121aac9b5..3835a7aa3e3c60a6f50f1d6e781f280ea8a83fb3 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -193,8 +193,8 @@ public class SpigotConfig
public static String whitelistMessage;
public static String unknownCommandMessage;
public static String serverFullMessage;
- public static String outdatedClientMessage = "Outdated client! Please use {0}";
- public static String outdatedServerMessage = "Outdated server! I\'m still on {0}";
+ public static String outdatedClientMessage = org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.outdated_client>" : "Outdated client! Please use {0}";
+ public static String outdatedServerMessage = org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.outdated_server>" : "Outdated server! I'm still on {0}";
private static String transform(String s)
{
return ChatColor.translateAlternateColorCodes( '&', s ).replaceAll( "\\\\n", "\n" );
@@ -207,9 +207,9 @@ public class SpigotConfig
SpigotConfig.set( "messages.outdated-server", SpigotConfig.outdatedServerMessage );
}
- SpigotConfig.whitelistMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.whitelist", "You are not whitelisted on this server!" ) );
- SpigotConfig.unknownCommandMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.unknown-command", "Unknown command. Type \"/help\" for help." ) );
- SpigotConfig.serverFullMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.server-full", "The server is full!" ) );
+ SpigotConfig.whitelistMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.whitelist", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.not_whitelisted>" : "You are not whitelisted on this server!" ) ); // Plazma - Add an option to apply the configuration to the vanilla default
+ SpigotConfig.unknownCommandMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.unknown-command", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:command.unknown.command>" : "Unknown command. Type \"/help\" for help." ) );
+ SpigotConfig.serverFullMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.server-full", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:multiplayer.disconnect.server_full>" : "The server is full!" ) );
SpigotConfig.outdatedClientMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.outdated-client", SpigotConfig.outdatedClientMessage ) );
SpigotConfig.outdatedServerMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.outdated-server", SpigotConfig.outdatedServerMessage ) );
}
@@ -223,7 +223,7 @@ public class SpigotConfig
SpigotConfig.timeoutTime = SpigotConfig.getInt( "settings.timeout-time", SpigotConfig.timeoutTime );
SpigotConfig.restartOnCrash = SpigotConfig.getBoolean( "settings.restart-on-crash", SpigotConfig.restartOnCrash );
SpigotConfig.restartScript = SpigotConfig.getString( "settings.restart-script", SpigotConfig.restartScript );
- SpigotConfig.restartMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.restart", "Server is restarting" ) );
+ SpigotConfig.restartMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.restart", org.plazmamc.plazma.Options.VANILLAIZE ? "<lang:disconnect.quitting>" : "Server is restarting" ) );
SpigotConfig.commands.put( "restart", new RestartCommand( "restart" ) );
// WatchdogThread.doStart( SpigotConfig.timeoutTime, SpigotConfig.restartOnCrash ); // Paper - moved to after paper config initialization
}
diff --git a/src/main/resources/configurations/bukkit_optimized_vanillaized.yml b/src/main/resources/configurations/bukkit_optimized_vanillaized.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b7ed456b0172caebdf5b548052ff2ae688377020
--- /dev/null
+++ b/src/main/resources/configurations/bukkit_optimized_vanillaized.yml
@@ -0,0 +1,45 @@
+# This is the main configuration file for Bukkit.
+# As you can see, there's actually not that much to configure without any plugins.
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
+# https://www.spigotmc.org/go/bukkit-yml
+#
+# If you need help on this file, feel free to join us on Discord or leave a message
+# on the forums asking for advice.
+#
+# Discord: https://www.spigotmc.org/go/discord
+# Forums: https://www.spigotmc.org/
+# Bug tracker: https://www.spigotmc.org/go/bugs
+
+
+settings:
+ allow-end: true
+ warn-on-overload: true
+ permissions-file: permissions.yml
+ update-folder: update
+ plugin-profiling: false
+ connection-throttle: 4000
+ query-plugins: true
+ deprecated-verbose: default
+ shutdown-message: <lang:multiplayer.disconnect.server_shutdown>
+ minimum-api: none
+ use-map-color-cache: true
+spawn-limits:
+ monsters: 20
+ animals: 5
+ water-animals: 2
+ water-ambient: 2
+ water-underground-creature: 3
+ axolotls: 3
+ ambient: 1
+chunk-gc:
+ period-in-ticks: 400
+ticks-per:
+ animal-spawns: 400
+ monster-spawns: 10
+ water-spawns: 400
+ water-ambient-spawns: 400
+ water-underground-creature-spawns: 400
+ axolotl-spawns: 400
+ ambient-spawns: 400
+ autosave: 6000
+aliases: now-in-commands.yml
diff --git a/src/main/resources/configurations/bukkit_vanillaized.yml b/src/main/resources/configurations/bukkit_vanillaized.yml
new file mode 100644
index 0000000000000000000000000000000000000000..22fe392b9970bb82db293d638b0dd5727bd60e5a
--- /dev/null
+++ b/src/main/resources/configurations/bukkit_vanillaized.yml
@@ -0,0 +1,45 @@
+# This is the main configuration file for Bukkit.
+# As you can see, there's actually not that much to configure without any plugins.
+# For a reference for any variable inside this file, check out the Bukkit Wiki at
+# https://www.spigotmc.org/go/bukkit-yml
+#
+# If you need help on this file, feel free to join us on Discord or leave a message
+# on the forums asking for advice.
+#
+# Discord: https://www.spigotmc.org/go/discord
+# Forums: https://www.spigotmc.org/
+# Bug tracker: https://www.spigotmc.org/go/bugs
+
+
+settings:
+ allow-end: true
+ warn-on-overload: true
+ permissions-file: permissions.yml
+ update-folder: update
+ plugin-profiling: false
+ connection-throttle: 4000
+ query-plugins: true
+ deprecated-verbose: default
+ shutdown-message: <lang:multiplayer.disconnect.server_shutdown>
+ minimum-api: none
+ use-map-color-cache: true
+spawn-limits:
+ monsters: 70
+ animals: 10
+ water-animals: 5
+ water-ambient: 20
+ water-underground-creature: 5
+ axolotls: 5
+ ambient: 15
+chunk-gc:
+ period-in-ticks: 600
+ticks-per:
+ animal-spawns: 400
+ monster-spawns: 1
+ water-spawns: 1
+ water-ambient-spawns: 1
+ water-underground-creature-spawns: 1
+ axolotl-spawns: 1
+ ambient-spawns: 1
+ autosave: 6000
+aliases: now-in-commands.yml

View File

@@ -0,0 +1,81 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Tue, 5 Dec 2023 13:29:28 +0900
Subject: [PATCH] Add entity spawn deadlock timer
[REFERENCE]
- AbsolemJackdaw/FixMySpawnR
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 79a8e5dd1d189c4eaf93999925ea0790eb6ce368..ac3b0f95926aba8e99375f74dfca9d83ca1fbd57 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -50,6 +50,8 @@ public abstract class BaseSpawner {
public int requiredPlayerRange = 16;
public int spawnRange = 4;
private int tickDelay = 0; // Paper - Configurable mob spawner tick rate
+ private int blockExistsTick = 0; // Plazma - Add entity spawn deadlock timer
+ private boolean blockLockedByTime = false; // Plazma - Add entity spawn deadlock timer
public BaseSpawner() {}
@@ -85,6 +87,17 @@ public abstract class BaseSpawner {
}
public void serverTick(ServerLevel world, BlockPos pos) {
+ // Plazma start - Add entity spawn deadlock timer
+ if (world.plazmaConfig().entity.spawnDeadlockTimer.enabled) {
+ if (!this.blockLockedByTime) {
+ if (this.blockExistsTick > world.plazmaConfig().entity.spawnDeadlockTimer.timerTimeout)
+ blockLockedByTime = true;
+ else blockExistsTick++;
+ }
+
+ if (blockLockedByTime && world.getBestNeighborSignal(pos) > 0) return;
+ }
+ // Plazma end - Add entity spawn deadlock timer
if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick
// Paper start - Configurable mob spawner tick rate
if (spawnDelay > 0 && --tickDelay > 0) return;
@@ -290,6 +303,13 @@ public abstract class BaseSpawner {
this.spawnRange = nbt.getShort("SpawnRange");
}
+ // Plazma start - Add entity spawn deadlock timer
+ if (nbt.contains("Plazma.SpawnerTicks", 99)) {
+ this.blockExistsTick = nbt.getInt("Plazma.SpawnerTicks");
+ this.blockLockedByTime = nbt.getBoolean("Plazma.SpawnerLocked");
+ }
+ // Plazma end - Add entity spawn deadlock timer
+
this.displayEntity = null;
}
@@ -318,6 +338,8 @@ public abstract class BaseSpawner {
}));
}
+ nbt.putInt("Plazma.SpawnerTicks", this.blockExistsTick); // Plazma - Add entity spawn deadlock timer
+ nbt.putBoolean("Plazma.SpawnerLocked", this.blockLockedByTime); // Plazma - Add entity spawn deadlock timer
nbt.put("SpawnPotentials", (Tag) SpawnData.LIST_CODEC.encodeStart(NbtOps.INSTANCE, this.spawnPotentials).getOrThrow());
return nbt;
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index a371893777a2c2d1de22e7d52f2fd3f55b82d74d..d366e8755ba91c329164c16659f6b07245577fba 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -51,6 +51,14 @@ public class WorldConfigurations extends ConfigurationPart {
}
+ public SpawnDeadlockTimer spawnDeadlockTimer;
+ public class SpawnDeadlockTimer extends ConfigurationPart {
+
+ public boolean enabled = OPTIMIZE;
+ public int timerTimeout = 0;
+
+ }
+
}
public Block block;

View File

@@ -0,0 +1,306 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 10 Jan 2024 18:08:59 +0900
Subject: [PATCH] Lithium - HashedList
diff --git a/src/main/java/me/jellysquid/mods/lithium/common/util/collections/HashedReferenceList.java b/src/main/java/me/jellysquid/mods/lithium/common/util/collections/HashedReferenceList.java
new file mode 100644
index 0000000000000000000000000000000000000000..d11579075e653868a43fe826bdf9b41ddc031b85
--- /dev/null
+++ b/src/main/java/me/jellysquid/mods/lithium/common/util/collections/HashedReferenceList.java
@@ -0,0 +1,277 @@
+package me.jellysquid.mods.lithium.common.util.collections;
+
+import it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap;
+import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
+import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.*;
+
+/**
+ * Wraps a {@link List} with a hash table which provides O(1) lookups for {@link Collection#contains(Object)}. The type
+ * contained by this list must use reference-equality semantics.
+ */
+@SuppressWarnings("SuspiciousMethodCalls")
+public class HashedReferenceList<T> implements List<T> {
+ private final ReferenceArrayList<T> list;
+ private final Reference2IntOpenHashMap<T> counter;
+
+ public HashedReferenceList(List<T> list) {
+ this.list = new ReferenceArrayList<>();
+ this.list.addAll(list);
+
+ this.counter = new Reference2IntOpenHashMap<>();
+ this.counter.defaultReturnValue(0);
+
+ for (T obj : this.list) {
+ this.counter.addTo(obj, 1);
+ }
+ }
+
+ @Override
+ public int size() {
+ return this.list.size();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return this.list.isEmpty();
+ }
+
+ @Override
+ public boolean contains(Object o) {
+ return this.counter.containsKey(o);
+ }
+
+ @Override
+ public @NotNull Iterator<T> iterator() {
+ return this.listIterator();
+ }
+
+ @Override
+ public Object @NotNull [] toArray() {
+ return this.list.toArray();
+ }
+
+ @Override
+ public <T1> T1 @NotNull [] toArray(T1 @NotNull [] a) {
+ return this.list.toArray(a);
+ }
+
+ @Override
+ public boolean add(T t) {
+ this.trackReferenceAdded(t);
+
+ return this.list.add(t);
+ }
+
+ @Override
+ public boolean remove(Object o) {
+ this.trackReferenceRemoved(o);
+
+ return this.list.remove(o);
+ }
+
+ @Override
+ public boolean containsAll(Collection<?> c) {
+ for (Object obj : c) {
+ if (!this.counter.containsKey(obj)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean addAll(Collection<? extends T> c) {
+ for (T obj : c) {
+ this.trackReferenceAdded(obj);
+ }
+
+ return this.list.addAll(c);
+ }
+
+ @Override
+ public boolean addAll(int index, Collection<? extends T> c) {
+ for (T obj : c) {
+ this.trackReferenceAdded(obj);
+ }
+
+ return this.list.addAll(index, c);
+ }
+
+ @Override
+ public boolean removeAll(@NotNull Collection<?> c) {
+ if (this.size() >= 2 && c.size() > 4 && c instanceof List) {
+ //HashReferenceList uses reference equality, so using ReferenceOpenHashSet is fine
+ c = new ReferenceOpenHashSet<>(c);
+ }
+ this.counter.keySet().removeAll(c);
+ return this.list.removeAll(c);
+ }
+
+ @Override
+ public boolean retainAll(@NotNull Collection<?> c) {
+ this.counter.keySet().retainAll(c);
+ return this.list.retainAll(c);
+ }
+
+ @Override
+ public void clear() {
+ this.counter.clear();
+ this.list.clear();
+ }
+
+ @Override
+ public T get(int index) {
+ return this.list.get(index);
+ }
+
+ @Override
+ public T set(int index, T element) {
+ T prev = this.list.set(index, element);
+
+ if (prev != element) {
+ if (prev != null) {
+ this.trackReferenceRemoved(prev);
+ }
+
+ this.trackReferenceAdded(element);
+ }
+
+ return prev;
+ }
+
+ @Override
+ public void add(int index, T element) {
+ this.trackReferenceAdded(element);
+
+ this.list.add(index, element);
+ }
+
+ @Override
+ public T remove(int index) {
+ T prev = this.list.remove(index);
+
+ if (prev != null) {
+ this.trackReferenceRemoved(prev);
+ }
+
+ return prev;
+ }
+
+ @Override
+ public int indexOf(Object o) {
+ return this.list.indexOf(o);
+ }
+
+ @Override
+ public int lastIndexOf(Object o) {
+ return this.list.lastIndexOf(o);
+ }
+
+ @Override
+ public @NotNull ListIterator<T> listIterator() {
+ return this.listIterator(0);
+ }
+
+ @Override
+ public @NotNull ListIterator<T> listIterator(int index) {
+ return new ListIterator<>() {
+ private final ListIterator<T> inner = HashedReferenceList.this.list.listIterator(index);
+
+ @Override
+ public boolean hasNext() {
+ return this.inner.hasNext();
+ }
+
+ @Override
+ public T next() {
+ return this.inner.next();
+ }
+
+ @Override
+ public boolean hasPrevious() {
+ return this.inner.hasPrevious();
+ }
+
+ @Override
+ public T previous() {
+ return this.inner.previous();
+ }
+
+ @Override
+ public int nextIndex() {
+ return this.inner.nextIndex();
+ }
+
+ @Override
+ public int previousIndex() {
+ return this.inner.previousIndex();
+ }
+
+ @Override
+ public void remove() {
+ int last = this.previousIndex();
+
+ if (last == -1) {
+ throw new NoSuchElementException();
+ }
+
+ T prev = HashedReferenceList.this.get(last);
+
+ if (prev != null) {
+ HashedReferenceList.this.trackReferenceRemoved(prev);
+ }
+
+ this.inner.remove();
+ }
+
+ @Override
+ public void set(T t) {
+ int last = this.previousIndex();
+
+ if (last == -1) {
+ throw new NoSuchElementException();
+ }
+
+ T prev = HashedReferenceList.this.get(last);
+
+ if (prev != t) {
+ if (prev != null) {
+ HashedReferenceList.this.trackReferenceRemoved(prev);
+ }
+
+ HashedReferenceList.this.trackReferenceAdded(t);
+ }
+
+ this.inner.remove();
+ }
+
+ @Override
+ public void add(T t) {
+ HashedReferenceList.this.trackReferenceAdded(t);
+
+ this.inner.add(t);
+ }
+ };
+ }
+
+ @Override
+ public @NotNull List<T> subList(int fromIndex, int toIndex) {
+ return this.list.subList(fromIndex, toIndex);
+ }
+
+ private void trackReferenceAdded(T t) {
+ this.counter.addTo(t, 1);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void trackReferenceRemoved(Object o) {
+ if (this.counter.addTo((T) o, -1) <= 1) {
+ this.counter.removeInt(o);
+ }
+ }
+
+}
diff --git a/src/main/java/net/minecraft/util/random/WeightedRandomList.java b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
index ef44047c3ea850fe52370b8176efbdf0515d20d6..30efa8704c1ae94027272602687cbc4a2bc8a772 100644
--- a/src/main/java/net/minecraft/util/random/WeightedRandomList.java
+++ b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
@@ -10,10 +10,10 @@ import net.minecraft.util.RandomSource;
public class WeightedRandomList<E extends WeightedEntry> {
private final int totalWeight;
- private final ImmutableList<E> items;
+ private final List<E> items; // Plazma - Lithium: collections.mob_spawning
WeightedRandomList(List<? extends E> entries) {
- this.items = ImmutableList.copyOf(entries);
+ this.items = entries.size() > 4 ? ImmutableList.copyOf(entries) : java.util.Collections.unmodifiableList(new me.jellysquid.mods.lithium.common.util.collections.HashedReferenceList<>(entries)); // Plazma - Lithium: collections.mob_spawning
this.totalWeight = WeightedRandom.getTotalWeight(entries);
}

View File

@@ -0,0 +1,182 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Mon, 29 Apr 2024 14:49:37 +0900
Subject: [PATCH] Implement FreedomChat
ocelotpotpie/FreedomChat
Copyright (C) 2022-2024 ocelotpotpie, Licensed under GNU GPL v3.0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 32ebee3620b5ec1ff57b92a581fb2d7f5dfe17cf..214bd8084182ebd0d36cf9ddfac4411a5dce78be 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -697,6 +697,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// Paper start - Add setting for proxy online mode status
return dedicatedserverproperties.enforceSecureProfile
&& io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
+ && !org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.freedomChat.enabled // Plazma - Implement FreedomChat
&& this.services.canValidateProfileKeys();
// Paper end - Add setting for proxy online mode status
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 459eea7dae68afdf7e1443f29f6f8d0c68668b74..aead28160c7a5067340ec80a833eafcab1817d67 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -135,6 +135,7 @@ public abstract class PlayerList {
private static final Logger LOGGER = LogUtils.getLogger();
private static final int SEND_PLAYER_INFO_INTERVAL = 600;
private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
+ private static final ru.bk.oharass.freedomchat.FreedomChat FREEDOM_HANDLER = new ru.bk.oharass.freedomchat.FreedomChat(); // Plazma - Implement FreedomChat
private final MinecraftServer server;
public final List<ServerPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
@@ -285,6 +286,7 @@ public abstract class PlayerList {
// CraftBukkit - Moved message to after join
// PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{entityplayer.getName().getString(), s1, entityplayer.getId(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ()});
LevelData worlddata = worldserver1.getLevelData();
+ connection.channel.pipeline().addAfter("packet_handler", "freedom_handler", FREEDOM_HANDLER); // Plazma - Implement FreedomChat
player.loadGameTypes((CompoundTag) optional.orElse(null)); // CraftBukkit - decompile error
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, clientData);
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 5450d2a784511122a8236d30485f6b1f798822f3..a0b1239e302f0366743949a895a0539348817077 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -45,6 +45,15 @@ public class GlobalConfiguration extends ConfigurationPart {
public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;
+ public FreedomChat freedomChat;
+ public class FreedomChat extends ConfigurationPart {
+
+ public boolean enabled = false;
+ public boolean rewriteChat = true;
+ public boolean noChatReports = true;
+
+ }
+
}
@Setting("world-generation")
diff --git a/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java b/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java
new file mode 100644
index 0000000000000000000000000000000000000000..49290983ef6b63bbacdef30f774ce683228e5755
--- /dev/null
+++ b/src/main/java/ru/bk/oharass/freedomchat/FreedomChat.java
@@ -0,0 +1,103 @@
+package ru.bk.oharass.freedomchat;
+
+import com.mojang.serialization.Codec;
+import com.mojang.serialization.codecs.RecordCodecBuilder;
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelHandlerContext;
+import io.netty.handler.codec.MessageToByteEncoder;
+import net.minecraft.network.FriendlyByteBuf;
+import net.minecraft.network.RegistryFriendlyByteBuf;
+import net.minecraft.network.chat.CommonComponents;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.ComponentSerialization;
+import net.minecraft.network.codec.StreamCodec;
+import net.minecraft.network.protocol.Packet;
+import net.minecraft.network.protocol.game.ClientGamePacketListener;
+import net.minecraft.network.protocol.game.ClientboundPlayerChatPacket;
+import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
+import net.minecraft.network.protocol.game.GameProtocols;
+import net.minecraft.network.protocol.status.ClientboundStatusResponsePacket;
+import net.minecraft.network.protocol.status.ServerStatus;
+import net.minecraft.server.MinecraftServer;
+
+import java.util.Objects;
+import java.util.Optional;
+
+import static org.plazmamc.plazma.configurations.GlobalConfiguration.get;
+
+@ChannelHandler.Sharable
+public class FreedomChat extends MessageToByteEncoder<Packet<?>> {
+
+ private static final StreamCodec<ByteBuf, Packet<? super ClientGamePacketListener>> CODEC = GameProtocols.CLIENTBOUND_TEMPLATE
+ .bind(RegistryFriendlyByteBuf.decorator(MinecraftServer.getServer().registryAccess())).codec();
+
+ @Override
+ public boolean acceptOutboundMessage(final Object msg) {
+ return get().player.freedomChat.rewriteChat && msg instanceof ClientboundPlayerChatPacket
+ || get().player.freedomChat.noChatReports && msg instanceof ClientboundStatusResponsePacket;
+ }
+
+ @Override
+ protected void encode(
+ final ChannelHandlerContext context, final Packet<?> packet, final ByteBuf byteBuf
+ ) throws Exception {
+ final FriendlyByteBuf buf = new FriendlyByteBuf(byteBuf);
+
+ switch (packet) {
+ case ClientboundPlayerChatPacket chat -> encodeChat(context, chat, buf);
+ case ClientboundStatusResponsePacket data -> encodeQuery(context, data, buf);
+ default -> {}
+ }
+ }
+
+ private static void encodeChat(
+ final ChannelHandlerContext ignored, final ClientboundPlayerChatPacket packet, final FriendlyByteBuf byteBuf
+ ) {
+ final Component content = Objects.requireNonNullElseGet(
+ packet.unsignedContent(),
+ () -> Component.literal(packet.body().content())
+ );
+
+ CODEC.encode(byteBuf, new ClientboundSystemChatPacket(packet.chatType().decorate(content), false));
+ }
+
+ private static void encodeQuery(
+ final ChannelHandlerContext ignored, final ClientboundStatusResponsePacket packet, final FriendlyByteBuf byteBuf
+ ) {
+ byteBuf.writeVarInt(0x00);
+ byteBuf.writeJsonWithCodec(NCRMetadata.CODEC, NCRMetadata.from(packet.status()));
+ }
+
+ private record NCRMetadata(
+ Component description,
+ Optional<ServerStatus.Players> players,
+ Optional<ServerStatus.Version> version,
+ Optional<ServerStatus.Favicon> favicon,
+ boolean enforcesSecureChat,
+ boolean preventsChatReports
+ ) {
+
+ private static final Codec<NCRMetadata> CODEC = RecordCodecBuilder.create(instance -> instance.group(
+ ComponentSerialization.CODEC.lenientOptionalFieldOf("description", CommonComponents.EMPTY).forGetter(NCRMetadata::description),
+ ServerStatus.Players.CODEC.lenientOptionalFieldOf("players").forGetter(NCRMetadata::players),
+ ServerStatus.Version.CODEC.lenientOptionalFieldOf("version").forGetter(NCRMetadata::version),
+ ServerStatus.Favicon.CODEC.lenientOptionalFieldOf("favicon").forGetter(NCRMetadata::favicon),
+ Codec.BOOL.lenientOptionalFieldOf("enforcesSecureChat", true).forGetter(NCRMetadata::enforcesSecureChat),
+ Codec.BOOL.lenientOptionalFieldOf("preventsChatReports", false).forGetter(NCRMetadata::preventsChatReports)
+ ).apply(instance, NCRMetadata::new));
+
+ private static NCRMetadata from(final ServerStatus status) {
+ return new NCRMetadata(
+ status.description(),
+ status.players(),
+ status.version(),
+ status.favicon(),
+ status.enforcesSecureChat() && !get().player.freedomChat.enabled,
+ get().player.freedomChat.noChatReports
+ );
+ }
+
+ }
+
+}

View File

@@ -0,0 +1,373 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 26 Oct 2024 12:33:57 +0900
Subject: [PATCH] Implement Rail Optimazition
Based on EasterGhost/RailOptimization, Original by FxMorin.
Copyright (C) 2024 EasterGhost, Licensed under GPL v3.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/ca/fxco/railoptimization/RailLogic.java b/src/main/java/ca/fxco/railoptimization/RailLogic.java
new file mode 100644
index 0000000000000000000000000000000000000000..6c0a70c8902623991977c19a1c649488c9ad4afa
--- /dev/null
+++ b/src/main/java/ca/fxco/railoptimization/RailLogic.java
@@ -0,0 +1,302 @@
+package ca.fxco.railoptimization;
+
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.PoweredRailBlock;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.block.state.properties.RailShape;
+
+import java.util.HashMap;
+
+import static net.minecraft.world.level.block.PoweredRailBlock.POWERED;
+import static net.minecraft.world.level.block.PoweredRailBlock.SHAPE;
+import static net.minecraft.world.level.redstone.ExperimentalRedstoneUtils.initialOrientation;
+
+public class RailLogic {
+
+ private static final Direction[] EAST_WEST_DIR = new Direction[]{Direction.WEST, Direction.EAST};
+ private static final Direction[] NORTH_SOUTH_DIR = new Direction[]{Direction.SOUTH, Direction.NORTH};
+
+ private static final int UPDATE_FORCE_PLACE = Block.UPDATE_MOVE_BY_PISTON | Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_CLIENTS;
+
+ public static void customUpdateState(PoweredRailBlock self, BlockState state, Level level, BlockPos pos) {
+ boolean shouldBePowered = level.hasNeighborSignal(pos) ||
+ self.findPoweredRailSignal(level, pos, state, true, 0) ||
+ self.findPoweredRailSignal(level, pos, state, false, 0);
+ if (shouldBePowered == state.getValue(POWERED)) return;
+
+ RailShape railShape = state.getValue(SHAPE);
+ if (railShape.isSlope()) {
+ level.setBlock(pos, state.setValue(POWERED, shouldBePowered), 3);
+ level.updateNeighborsAtExceptFromFacing(pos.below(), self, Direction.UP, initialOrientation(level, Direction.DOWN, Direction.UP));
+ level.updateNeighborsAtExceptFromFacing(pos.above(), self, Direction.DOWN, initialOrientation(level, Direction.UP, Direction.DOWN)); //isAscending
+ return;
+ }
+
+ if (shouldBePowered) powerLane(self, level, pos, state, railShape);
+ else dePowerLane(self, level, pos, state, railShape);
+ }
+
+ private static void giveShapeUpdate(Level level, BlockState state, BlockPos pos, BlockPos fromPos, Direction direction) {
+ BlockState oldState = level.getBlockState(pos);
+ Block.updateOrDestroy(
+ oldState,
+ oldState.updateShape(level, level, pos, direction.getOpposite(), fromPos, state, level.getRandom()),
+ level,
+ pos,
+ Block.UPDATE_CLIENTS & -34,
+ 0
+ );
+ }
+
+ private static boolean findPoweredRailSignalFaster(PoweredRailBlock self, Level level, BlockPos pos, boolean bl, int distance, RailShape shape, HashMap<BlockPos,Boolean> checkedPos) {
+ BlockState blockState = level.getBlockState(pos);
+ if (checkedPos.containsKey(pos) && checkedPos.get(pos))
+ return level.hasNeighborSignal(pos) || findPoweredRailSignalFaster(self, level, pos, blockState, bl, distance + 1, checkedPos);
+
+ if (!blockState.is(self)) return false;
+
+ RailShape railShape = blockState.getValue(SHAPE);
+ if (shape == RailShape.EAST_WEST && (railShape == RailShape.NORTH_SOUTH || railShape == RailShape.ASCENDING_NORTH || railShape == RailShape.ASCENDING_SOUTH) ||
+ shape == RailShape.NORTH_SOUTH && (railShape == RailShape.EAST_WEST || railShape == RailShape.ASCENDING_EAST || railShape == RailShape.ASCENDING_WEST)) {
+ return false;
+ }
+
+ if (!blockState.getValue(POWERED)) return false;
+
+ return level.hasNeighborSignal(pos) ||
+ findPoweredRailSignalFaster(self, level, pos, blockState, bl, distance + 1, checkedPos);
+ }
+
+ private static boolean findPoweredRailSignalFaster(PoweredRailBlock self, Level level, BlockPos pos, BlockState state, boolean bl, int distance, HashMap<BlockPos, Boolean> checkedPos) {
+ if (distance >= level.purpurConfig.railActivationRange) return false;
+
+ int x = pos.getX();
+ int y = pos.getY();
+ int z = pos.getZ();
+ boolean bl2 = true;
+ RailShape railShape = state.getValue(SHAPE);
+
+ switch (railShape.ordinal()) {
+ case 0 -> {
+ if (bl) ++z;
+ else --z;
+ }
+ case 1 -> {
+ if (bl) --x;
+ else ++x;
+ }
+ case 2 -> {
+ if (bl) {
+ --x;
+ } else {
+ ++x;
+ ++y;
+ bl2 = false;
+ }
+ railShape = RailShape.EAST_WEST;
+ }
+ case 3 -> {
+ if (bl) {
+ --x;
+ ++y;
+ bl2 = false;
+ } else {
+ ++x;
+ }
+ railShape = RailShape.EAST_WEST;
+ }
+ case 4 -> {
+ if (bl) {
+ ++z;
+ } else {
+ --z;
+ ++y;
+ bl2 = false;
+ }
+ railShape = RailShape.NORTH_SOUTH;
+ }
+ case 5 -> {
+ if (bl) {
+ ++z;
+ ++y;
+ bl2 = false;
+ } else {
+ --z;
+ }
+ railShape = RailShape.NORTH_SOUTH;
+ }
+ }
+ return findPoweredRailSignalFaster(self, level, new BlockPos(x, y, z), bl, distance, railShape, checkedPos) ||
+ (bl2 && findPoweredRailSignalFaster(self, level, new BlockPos(x, y - 1, z), bl, distance, railShape, checkedPos));
+ }
+
+ private static void powerLane(PoweredRailBlock self, Level level, BlockPos pos, BlockState state, RailShape shape) {
+ level.setBlock(pos, state.setValue(POWERED, true), UPDATE_FORCE_PLACE);
+ HashMap<BlockPos,Boolean> checkedPos = new HashMap<>();
+ checkedPos.put(pos, true);
+ int[] count = new int[2];
+ if (shape == RailShape.NORTH_SOUTH) { //Order: +z, -z
+ for (int i = 0; i < NORTH_SOUTH_DIR.length; ++i) {
+ setRailPositionsPower(self, level, pos, checkedPos, count, i, NORTH_SOUTH_DIR[i]);
+ }
+ updateRailsNS(self, level, pos, state, count);
+ } else if (shape == RailShape.EAST_WEST) { //Order: -x, +x
+ for (int i = 0; i < EAST_WEST_DIR.length; ++i) {
+ setRailPositionsPower(self, level, pos, checkedPos, count, i, EAST_WEST_DIR[i]);
+ }
+ updateRailsEW(self, level, pos, state, count);
+ }
+ }
+
+ private static void dePowerLane(PoweredRailBlock self, Level level, BlockPos pos, BlockState state, RailShape shape) {
+ level.setBlock(pos, state.setValue(POWERED, false), UPDATE_FORCE_PLACE);
+ int[] count = new int[2];
+ if (shape == RailShape.NORTH_SOUTH) { //Order: +z, -z
+ for (int i = 0; i < NORTH_SOUTH_DIR.length; ++i) {
+ setRailPositionsDePower(self, level, pos, count, i, NORTH_SOUTH_DIR[i]);
+ }
+ updateRailsNS(self, level, pos, state, count);
+ } else if (shape == RailShape.EAST_WEST) { //Order: -x, +x
+ for (int i = 0; i < EAST_WEST_DIR.length; ++i) {
+ setRailPositionsDePower(self, level, pos, count, i, EAST_WEST_DIR[i]);
+ }
+ updateRailsEW(self, level, pos, state, count);
+ }
+ }
+
+ private static void setRailPositionsPower(PoweredRailBlock self, Level level, BlockPos pos, HashMap<BlockPos, Boolean> checkedPos, int[] count, int i, Direction dir) {
+ for (int z = 1; z < level.purpurConfig.railActivationRange; z++) {
+ BlockPos newPos = pos.relative(dir, z);
+ BlockState state = level.getBlockState(newPos);
+
+ if (checkedPos.containsKey(newPos)) {
+ if (!checkedPos.get(newPos)) break;
+ count[i]++;
+ continue;
+ }
+
+ if (!state.is(self) || state.getValue(POWERED) || !(
+ level.hasNeighborSignal(newPos) ||
+ findPoweredRailSignalFaster(self, level, newPos, state, true, 0, checkedPos) ||
+ findPoweredRailSignalFaster(self, level, newPos, state, false, 0, checkedPos)
+ )) {
+ checkedPos.put(newPos,false);
+ break;
+ }
+
+ checkedPos.put(newPos,true);
+ level.setBlock(newPos, state.setValue(POWERED, true), UPDATE_FORCE_PLACE);
+ count[i]++;
+ }
+ }
+
+ private static void setRailPositionsDePower(PoweredRailBlock self, Level level, BlockPos pos, int[] count, int i, Direction dir) {
+ for (int z = 1; z < level.purpurConfig.railActivationRange; z++) {
+ BlockPos newPos = pos.relative(dir, z);
+ BlockState state = level.getBlockState(newPos);
+ if (!state.is(self) || !state.getValue(POWERED) || level.hasNeighborSignal(newPos) ||
+ self.findPoweredRailSignal(level, newPos, state, true, 0) ||
+ self.findPoweredRailSignal(level, newPos, state, false, 0)) break;
+ level.setBlock(newPos, state.setValue(POWERED, false), UPDATE_FORCE_PLACE);
+ count[i]++;
+ }
+ }
+
+ private static void shapeUpdateEnd(PoweredRailBlock self, Level level, BlockPos pos, BlockState state, int endPos, Direction direction, int currentPos, BlockPos blockPos) {
+ if (currentPos != endPos) return;
+
+ BlockPos newPos = pos.relative(direction, currentPos+1);
+ giveShapeUpdate(level, state, newPos, pos, direction);
+
+ BlockState blockState = level.getBlockState(blockPos);
+ if (blockState.is(self) && blockState.getValue(SHAPE).isSlope()) giveShapeUpdate(level, state, newPos.above(), pos, direction);
+ }
+
+ private static void neighborUpdateEnd(PoweredRailBlock self, Level level, BlockPos pos, int endPos, Direction dir, Block block, int currentPos, BlockPos blockPos) {
+ if (currentPos != endPos) return;
+
+ BlockPos newPos = pos.relative(dir, currentPos+1);
+ level.neighborChanged(newPos, block, null); // TODO: Orientation
+
+ BlockState blockState = level.getBlockState(blockPos);
+ if (blockState.is(self) && blockState.getValue(SHAPE).isSlope()) level.neighborChanged(newPos.above(), block, null); // TODO: Orientation
+ }
+
+ private static void updateRailsNeighborEW(PoweredRailBlock self, Level level, BlockPos pos, int c, Block block, Direction dir, int[] count, int countAmt) {
+ BlockPos pos1 = pos.relative(dir, c);
+ if (c == 0 && count[1] == 0) level.neighborChanged(pos1.relative(dir.getOpposite()), block, null); // TODO: Orientation
+ neighborUpdateEnd(self, level, pos, countAmt, dir, block, c, pos1);
+ level.neighborChanged(pos1.below(), block, null); // TODO: Orientation
+ level.neighborChanged(pos1.above(), block, null); // TODO: Orientation
+ level.neighborChanged(pos1.north(), block, null); // TODO: Orientation
+ level.neighborChanged(pos1.south(), block, null); // TODO: Orientation
+ BlockPos pos2 = pos.relative(dir, c).below();
+ level.neighborChanged(pos2.below(), block, null); // TODO: Orientation
+ level.neighborChanged(pos2.north(), block, null); // TODO: Orientation
+ level.neighborChanged(pos2.south(), block, null); // TODO: Orientation
+ if (c == countAmt) level.neighborChanged(pos.relative(dir, c + 1).below(), block, null); // TODO: Orientation
+ if (c == 0 && count[1] == 0) level.neighborChanged(pos1.relative(dir.getOpposite()).below(), block, null); // TODO: Orientation
+ }
+
+ private static void updateRailsSectionEW(PoweredRailBlock self, Level level, BlockPos pos, int c, BlockState mainState, Direction dir, int[] count, int countAmt) {
+ BlockPos blockPos = pos.relative(dir, c);
+ if (c == 0 && count[1] == 0) giveShapeUpdate(level, mainState, blockPos.relative(dir.getOpposite()), pos, dir.getOpposite());
+ shapeUpdateEnd(self, level, pos, mainState, countAmt, dir, c, blockPos);
+ giveShapeUpdate(level, mainState, blockPos.below(), pos, Direction.DOWN);
+ giveShapeUpdate(level, mainState, blockPos.above(), pos, Direction.UP);
+ giveShapeUpdate(level, mainState, blockPos.north(), pos, Direction.NORTH);
+ giveShapeUpdate(level, mainState, blockPos.south(), pos, Direction.SOUTH);
+ }
+
+ private static void updateRailsNeighborNS(PoweredRailBlock self, Level level, BlockPos pos, int c, Block block, Direction dir, int[] count, int countAmt) {
+ BlockPos pos1 = pos.relative(dir,c);
+ level.neighborChanged(pos1.west(), block, null); // TODO: Orientation
+ level.neighborChanged(pos1.east(), block, null); // TODO: Orientation
+ level.neighborChanged(pos1.below(), block, null); // TODO: Orientation
+ level.neighborChanged(pos1.above(), block, null); // TODO: Orientation
+ neighborUpdateEnd(self, level, pos, countAmt, dir, block, c, pos1);
+ if (c == 0 && count[1] == 0) level.neighborChanged(pos1.relative(dir.getOpposite()), block, null); // TODO: Orientation
+ BlockPos pos2 = pos.relative(dir,c).below();
+ level.neighborChanged(pos2.west(), block, null); // TODO: Orientation
+ level.neighborChanged(pos2.east(), block, null); // TODO: Orientation
+ level.neighborChanged(pos2.below(), block, null); // TODO: Orientation
+ if (c == countAmt) level.neighborChanged(pos.relative(dir,c + 1).below(), block, null); // TODO: Orientation
+ if (c == 0 && count[1] == 0) level.neighborChanged(pos1.relative(dir.getOpposite()).below(), block, null); // TODO: Orientation
+ }
+
+ private static void updateRailsSectionNS(PoweredRailBlock self, Level level, BlockPos pos, int c, BlockState state, Direction dir, int[] count, int countAmt) {
+ BlockPos blockPos = pos.relative(dir, c);
+ giveShapeUpdate(level, state, blockPos.west(), pos, Direction.WEST);
+ giveShapeUpdate(level, state, blockPos.east(), pos, Direction.EAST);
+ giveShapeUpdate(level, state, blockPos.below(), pos, Direction.DOWN);
+ giveShapeUpdate(level, state, blockPos.above(), pos, Direction.UP);
+ shapeUpdateEnd(self, level, pos, state, countAmt, dir, c, blockPos);
+ if (c == 0 && count[1] == 0) giveShapeUpdate(level, state, blockPos.relative(dir.getOpposite()), pos, dir.getOpposite());
+ }
+
+ private static void updateRailsEW(PoweredRailBlock self, Level level, BlockPos pos, BlockState state, int[] count) {
+ for (int i = 0; i < EAST_WEST_DIR.length; ++i) {
+ int countAmt = count[i];
+ if (i == 1 && countAmt == 0) continue;
+ Direction dir = EAST_WEST_DIR[i];
+ Block block = state.getBlock();
+ for (int c = countAmt; c >= i; c--) updateRailsNeighborEW(self, level, pos, c, block, dir, count, countAmt);
+ for (int c = countAmt; c >= i; c--) updateRailsSectionEW(self, level, pos, c, state, dir, count, countAmt);
+ }
+ }
+
+ private static void updateRailsNS(PoweredRailBlock self, Level level, BlockPos pos, BlockState state, int[] count) {
+ for (int i = 0; i < NORTH_SOUTH_DIR.length; ++i) {
+ int countAmt = count[i];
+ if (i == 1 && countAmt == 0) continue;
+ Direction dir = NORTH_SOUTH_DIR[i];
+ Block block = state.getBlock();
+ for (int c = countAmt; c >= i; c--) updateRailsNeighborNS(self, level, pos, c, block, dir, count, countAmt);
+ for (int c = countAmt; c >= i; c--) updateRailsSectionNS(self, level, pos, c, state, dir, count, countAmt);
+ }
+ }
+
+}
diff --git a/src/main/java/net/minecraft/world/level/block/PoweredRailBlock.java b/src/main/java/net/minecraft/world/level/block/PoweredRailBlock.java
index bd14c08defe8afc5ceca59d16a5b1dbad178f594..99dc44c569b6003b271ce2ea3f80cb194173ff95 100644
--- a/src/main/java/net/minecraft/world/level/block/PoweredRailBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PoweredRailBlock.java
@@ -29,7 +29,7 @@ public class PoweredRailBlock extends BaseRailBlock {
this.registerDefaultState((BlockState) ((BlockState) ((BlockState) ((BlockState) this.stateDefinition.any()).setValue(PoweredRailBlock.SHAPE, RailShape.NORTH_SOUTH)).setValue(PoweredRailBlock.POWERED, false)).setValue(PoweredRailBlock.WATERLOGGED, false));
}
- protected boolean findPoweredRailSignal(Level world, BlockPos pos, BlockState state, boolean flag, int distance) {
+ public boolean findPoweredRailSignal(Level world, BlockPos pos, BlockState state, boolean flag, int distance) { // Plazma - protected -> public
if (distance >= world.purpurConfig.railActivationRange) { // Purpur
return false;
} else {
@@ -117,6 +117,12 @@ public class PoweredRailBlock extends BaseRailBlock {
@Override
protected void updateState(BlockState state, Level world, BlockPos pos, Block neighbor) {
+ // Plazma start - Optimize powered rail processing
+ if (world.plazmaConfig().block.rail.useFasterSignalSearch) {
+ ca.fxco.railoptimization.RailLogic.customUpdateState(this, state, world, pos);
+ return;
+ }
+ // Plazma end - Optimize powered rail processing
boolean flag = (Boolean) state.getValue(PoweredRailBlock.POWERED);
boolean flag1 = world.hasNeighborSignal(pos) || this.findPoweredRailSignal(world, pos, state, true, 0) || this.findPoweredRailSignal(world, pos, state, false, 0);
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index 9cfab16b9cdf40ccb709c0af66c406954560c0ef..0e27e4a1f767842d1dcd2ed235a6a45f120bf32e 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -72,6 +72,13 @@ public class WorldConfigurations extends ConfigurationPart {
}
+ public Rail rail;
+ public class Rail extends ConfigurationPart {
+
+ public boolean useFasterSignalSearch = OPTIMIZE;
+
+ }
+
}
public Item item;

View File

@@ -0,0 +1,847 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 26 Oct 2024 18:30:26 +0900
Subject: [PATCH] Configurable RandomSource factory/provider
Xorshift Random: https://gist.github.com/Xyene/4637619
Based on AnOpenSauceDev/FastRandom
Copyright (C) 2024 AnOpenSauceDev
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
diff --git a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
index 861bff267cb397e13e8e1c79bd0776b130c6e5da..266e56f2c2e6d8b760209b5d58c58333af5bd0c1 100644
--- a/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
+++ b/src/main/java/com/destroystokyo/paper/loottable/PaperLootableInventoryData.java
@@ -21,7 +21,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
@DefaultQualifier(NonNull.class)
public class PaperLootableInventoryData {
- private static final Random RANDOM = new Random();
+ private static final Random RANDOM = java.util.concurrent.ThreadLocalRandom.current(); // Plazma - reduce creating random instance
private long lastFill = -1;
private long nextRefill = -1;
diff --git a/src/main/java/com/github/anopensaucedev/fasterrandom/util/math/random/RandomGeneratorRandom.java b/src/main/java/com/github/anopensaucedev/fasterrandom/util/math/random/RandomGeneratorRandom.java
new file mode 100644
index 0000000000000000000000000000000000000000..a060fdbdc4daaffd9aafc707dc567cb56067d1e2
--- /dev/null
+++ b/src/main/java/com/github/anopensaucedev/fasterrandom/util/math/random/RandomGeneratorRandom.java
@@ -0,0 +1,115 @@
+package com.github.anopensaucedev.fasterrandom.util.math.random;
+
+import com.google.common.annotations.VisibleForTesting;
+import net.minecraft.core.BlockPos;
+import net.minecraft.util.Mth;
+import net.minecraft.world.level.levelgen.BitRandomSource;
+import net.minecraft.world.level.levelgen.PositionalRandomFactory;
+import net.minecraft.util.RandomSource;
+import org.jspecify.annotations.NonNull;
+
+import java.util.random.RandomGenerator;
+import java.util.random.RandomGeneratorFactory;
+
+public class RandomGeneratorRandom implements BitRandomSource {
+ private static final @NonNull RandomGeneratorFactory<RandomGenerator.SplittableGenerator> FACTORY = RandomGeneratorFactory.of(org.plazmamc.plazma.Options.RANDOM_ALGOL);
+ private static final int INT_BITS = 48;
+ private static final long SEED_MASK = 0xFFFFFFFFFFFFL;
+ private static final long MULTIPLIER = 25214903917L;
+ private static final long INCREMENT = 11L;
+
+ private long seed;
+ private RandomGenerator.SplittableGenerator randomGenerator;
+
+ public RandomGeneratorRandom(long seed) {
+ this.seed = seed;
+ this.randomGenerator = FACTORY.create(seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fork() {
+ return new RandomGeneratorRandom(this.nextLong());
+ }
+
+ @Override
+ public @NonNull PositionalRandomFactory forkPositional() {
+ return new RandomGeneratorRandomFactory(this.nextLong());
+ }
+
+ @Override
+ public void setSeed(long seed) {
+ this.seed = seed;
+ this.randomGenerator = FACTORY.create(seed);
+ }
+
+ @Override
+ public int next(int bits) {
+ // >>> instead of Mojang's >> fixes MC-239059
+ return (int) ((seed * MULTIPLIER + INCREMENT & SEED_MASK) >>> INT_BITS - bits);
+ }
+
+ @Override
+ public int nextInt() {
+ return randomGenerator.nextInt();
+ }
+
+ @Override
+ public int nextInt(int bound) {
+ return randomGenerator.nextInt(bound);
+ }
+
+ @Override
+ public long nextLong() {
+ return randomGenerator.nextLong();
+ }
+
+ @Override
+ public boolean nextBoolean() {
+ return randomGenerator.nextBoolean();
+ }
+
+ @Override
+ public float nextFloat() {
+ return randomGenerator.nextFloat();
+ }
+
+ @Override
+ public double nextDouble() {
+ return randomGenerator.nextDouble();
+ }
+
+ @Override
+ public double nextGaussian() {
+ return randomGenerator.nextGaussian();
+ }
+
+ private record RandomGeneratorRandomFactory(long seed) implements PositionalRandomFactory {
+ @SuppressWarnings("deprecation")
+ @Override
+ public @NonNull RandomSource at(int x, int y, int z) {
+ return new RandomGeneratorRandom(Mth.getSeed(x, y, z) ^ this.seed);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public @NonNull RandomSource at(final @NonNull BlockPos pos) {
+ return new RandomGeneratorRandom(Mth.getSeed(pos.getX(), pos.getY(), pos.getZ()) ^ this.seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fromHashOf(@NonNull String seed) {
+ return new RandomGeneratorRandom((long) seed.hashCode() ^ this.seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fromSeed(final long seed) {
+ return new RandomGeneratorRandom(seed);
+ }
+
+ @Override
+ @VisibleForTesting
+ public void parityConfigString(@NonNull StringBuilder info) {
+ info.append("RandomGeneratorRandom$RandomGeneratorRandomFactory{").append(this.seed).append("}");
+ }
+ }
+}
diff --git a/src/main/java/net/minecraft/util/RandomSource.java b/src/main/java/net/minecraft/util/RandomSource.java
index 252aef3ffe0fecd47ebea1ed7df48e14fa873eb9..f73f8faac05f90c646a23fadf3da565938a4f788 100644
--- a/src/main/java/net/minecraft/util/RandomSource.java
+++ b/src/main/java/net/minecraft/util/RandomSource.java
@@ -10,18 +10,39 @@ import net.minecraft.world.level.levelgen.ThreadSafeLegacyRandomSource;
public interface RandomSource {
@Deprecated
double GAUSSIAN_SPREAD_FACTOR = 2.297;
+ // Plazma start - Implement RandomGenerator support
+ java.util.function.LongFunction<RandomSource> FACTORY = switch (org.plazmamc.plazma.Options.RANDOM_FACTORY) {
+ case "legacy" -> LegacyRandomSource::new;
+ case "xoroshiro" -> net.minecraft.world.level.levelgen.XoroshiroRandomSource::new;
+ case "xorshift" -> org.plazmamc.plazma.util.random.XorshiftRandomSource::new;
+ case "secure" -> org.plazmamc.plazma.util.random.SecureRandomSource::new;
+ case "generator" -> {
+ try {
+ java.util.random.RandomGeneratorFactory.of(org.plazmamc.plazma.Options.RANDOM_ALGOL).create();
+ yield com.github.anopensaucedev.fasterrandom.util.math.random.RandomGeneratorRandom::new;
+ } catch (IllegalArgumentException ignored) {
+ net.minecraft.server.MinecraftServer.LOGGER.error("Your JDK does not support RandomGenerator! Update JDK or remove \"-DPlazma.randomSourceFactory\" from the startup flag");
+ net.minecraft.server.MinecraftServer.LOGGER.warn("Falling back to legacy random");
+ yield LegacyRandomSource::new;
+ }
+ }
+ default -> throw new IllegalArgumentException("Invalid RandomSource: " + org.plazmamc.plazma.Options.RANDOM_FACTORY + ". Valid RandomSources are: legacy, xoroshiro, xorshift, generator");
+ };
+ @org.jspecify.annotations.Nullable RandomSource SHARED = org.plazmamc.plazma.Options.SHARED_RANDOM ? create() : null;
+ // Plazma end - Implement RandomGenerator support
static RandomSource create() {
- return create(RandomSupport.generateUniqueSeed());
+ return SHARED == null ? create(RandomSupport.generateUniqueSeed()) : SHARED; // Plazma - Configurable RandomSource
}
@Deprecated
static RandomSource createThreadSafe() {
+ if (org.plazmamc.plazma.Options.NO_THREAD_SAFE) return create(); // Plazma - Configurable RandomSource
return new ThreadSafeLegacyRandomSource(RandomSupport.generateUniqueSeed());
}
static RandomSource create(long seed) {
- return new LegacyRandomSource(seed);
+ return org.plazmamc.plazma.Options.IGNORE_SEED ? create() : FACTORY.apply(seed); // Plazma - Configurable RandomSource
}
static RandomSource createNewThreadLocalInstance() {
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index 27a6de70530c2a1cbe2f77a7fb493038121710ea..bbe093f7d5e0dc8e875f237058aa74c739967dd9 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -395,7 +395,7 @@ public class PiglinAi {
}
private static boolean wantsToDance(LivingEntity piglin, LivingEntity target) {
- return target.getType() != EntityType.HOGLIN ? false : RandomSource.create(piglin.level().getGameTime()).nextFloat() < 0.1F;
+ return target.getType() != EntityType.HOGLIN ? false : (org.plazmamc.plazma.Options.SHARED_RANDOM ? piglin.random.nextFloat() : RandomSource.create(piglin.level().getGameTime()).nextFloat()) < 0.1F; // Plazma - reduce creating random instance
}
protected static boolean wantsToPickup(Piglin piglin, ItemStack stack) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
index 0e4c17c7246093d7fdb64a8f98536a84a8cfd978..0147a7be5fd147ffa9bd42a90e85a324bc317a81 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/StructureBlockEntity.java
@@ -343,7 +343,7 @@ public class StructureBlockEntity extends BlockEntity {
}
public static RandomSource createRandom(long seed) {
- return seed == 0L ? RandomSource.create(Util.getMillis()) : RandomSource.create(seed);
+ return seed == 0L ? RandomSource.create() : RandomSource.create(seed); // Plazma - reduce creating random instance
}
public boolean placeStructureIfSameSize(ServerLevel world) {
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java
index f1e0d3d7b1f458fcce83cf67762a16309123cdcb..6a8d5948f127ea87a0b4554ece4ad2c4c49a47c6 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java
@@ -120,7 +120,7 @@ public class StructurePlaceSettings {
}
public RandomSource getRandom(@Nullable BlockPos pos) {
- return this.random != null ? this.random : (pos == null ? RandomSource.create(Util.getMillis()) : RandomSource.create(Mth.getSeed(pos)));
+ return this.random != null ? this.random : (pos == null ? RandomSource.create() : RandomSource.create(Mth.getSeed(pos))); // Plazma - reduce creating random instance
}
public boolean isIgnoreEntities() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5d7af6c1ec557d2a2813b87a64b8c8a99d2f87e0..deddf588826dda9b15beff3acf20be56837d240b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -289,7 +289,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
// Paper end
- private static final Random rand = new Random();
+ private static final Random rand = java.util.concurrent.ThreadLocalRandom.current(); // Plazma - reduce creating random instance
public CraftWorld(ServerLevel world, ChunkGenerator gen, BiomeProvider biomeProvider, Environment env) {
this.world = world;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index 759b6e54db93792c9862b1f1625118ac6fa49d7a..e81fa9aefc76af906ed1b6903f416f4d123689f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -14,7 +14,7 @@ import org.bukkit.inventory.meta.FireworkMeta;
public class CraftFirework extends CraftProjectile implements Firework {
- private final Random random = new Random();
+ private final net.minecraft.util.RandomSource random = net.minecraft.util.RandomSource.create(); // Plazma - Configurable RandomSource
//private CraftItemStack item; // Paper - Remove usage, not accurate representation of current item.
public CraftFirework(CraftServer server, FireworkRocketEntity entity) {
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
index e7092aeb5abce5aa5f9bd434adc6acd4e43dec13..5673e587247d0cd644e694ca68bdbb340676a73d 100644
--- a/src/main/java/org/plazmamc/plazma/Options.java
+++ b/src/main/java/org/plazmamc/plazma/Options.java
@@ -11,5 +11,10 @@ public interface Options {
boolean VANILLAIZE = getBoolean("Plazma.vanillaize") && !AGGRESSIVE;
boolean USE_VANILLA = getBoolean("Plazma.useVanillaConfiguration") && !AGGRESSIVE && NO_OPTIMIZE;
boolean VANILLA_ICO = getBoolean("Plazma.useVanillaFavicon");
+ String RANDOM_FACTORY = getProperty("Plazma.randomSourceFactory", "legacy");
+ String RANDOM_ALGOL = getProperty("Plazma.randomSourceAlgorithm", "L64X128MixRandom");
+ boolean SHARED_RANDOM = getBoolean("Plazma.sharedRandomSource");
+ boolean IGNORE_SEED = getBoolean("Plazma.ignoreSeed") && SHARED_RANDOM;
+ boolean NO_THREAD_SAFE = getBoolean("Plazma.overrideThreadSafeRandom");
}
diff --git a/src/main/java/org/plazmamc/plazma/util/random/SecureRandomSource.java b/src/main/java/org/plazmamc/plazma/util/random/SecureRandomSource.java
new file mode 100644
index 0000000000000000000000000000000000000000..5d08f040a05df5d24f4bf9747177c1720fe246fe
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/util/random/SecureRandomSource.java
@@ -0,0 +1,100 @@
+package org.plazmamc.plazma.util.random;
+
+import com.google.common.annotations.VisibleForTesting;
+import net.minecraft.core.BlockPos;
+import net.minecraft.util.Mth;
+import net.minecraft.util.RandomSource;
+import net.minecraft.world.level.levelgen.PositionalRandomFactory;
+import org.jetbrains.annotations.NotNull;
+import org.jspecify.annotations.NonNull;
+import java.security.SecureRandom;
+
+public class SecureRandomSource implements RandomSource {
+
+ private final SecureRandom random = new SecureRandom();
+
+ public SecureRandomSource(long seed) {
+ this.setSeed(seed);
+ }
+
+ @Override
+ public @NotNull RandomSource fork() {
+ return new SecureRandomSource(this.nextLong());
+ }
+
+ @Override
+ public @NotNull PositionalRandomFactory forkPositional() {
+ return new SecureRandomSourceFactory(this.nextLong());
+ }
+
+ @Override
+ public void setSeed(final long seed) {
+ this.random.setSeed(seed);
+ }
+
+ @Override
+ public int nextInt() {
+ return this.random.nextInt();
+ }
+
+ @Override
+ public int nextInt(final int bound) {
+ return this.random.nextInt(bound);
+ }
+
+ @Override
+ public long nextLong() {
+ return this.random.nextLong();
+ }
+
+ @Override
+ public boolean nextBoolean() {
+ return this.random.nextBoolean();
+ }
+
+ @Override
+ public float nextFloat() {
+ return this.random.nextFloat();
+ }
+
+ @Override
+ public double nextDouble() {
+ return this.random.nextDouble();
+ }
+
+ @Override
+ public double nextGaussian() {
+ return this.random.nextGaussian();
+ }
+
+ private record SecureRandomSourceFactory(long seed) implements PositionalRandomFactory {
+ @SuppressWarnings("deprecation")
+ @Override
+ public @NonNull RandomSource at(int x, int y, int z) {
+ return new SecureRandomSource(Mth.getSeed(x, y, z) ^ this.seed);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public @NonNull RandomSource at(final @NonNull BlockPos pos) {
+ return new SecureRandomSource(Mth.getSeed(pos.getX(), pos.getY(), pos.getZ()) ^ this.seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fromHashOf(@NonNull String seed) {
+ return new SecureRandomSource((long) seed.hashCode() ^ this.seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fromSeed(final long seed) {
+ return new SecureRandomSource(seed);
+ }
+
+ @Override
+ @VisibleForTesting
+ public void parityConfigString(@NonNull StringBuilder info) {
+ info.append("SecureRandomSource$SecureRandomSourceFactory{").append(this.seed).append("}");
+ }
+ }
+
+}
diff --git a/src/main/java/org/plazmamc/plazma/util/random/XorshiftRandom.java b/src/main/java/org/plazmamc/plazma/util/random/XorshiftRandom.java
new file mode 100644
index 0000000000000000000000000000000000000000..d9f08546997adb7e4f9b70ce913a4e92eced3a95
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/util/random/XorshiftRandom.java
@@ -0,0 +1,391 @@
+package org.plazmamc.plazma.util.random;
+
+import java.util.Random;
+
+/**
+ * A random number generator based on the simple and fast xor-shift pseudo
+ * random number generator (RNG) specified in:
+ * Marsaglia, George. (2003). <a href="https://web.archive.org/web/20070211044403/http://www.jstatsoft.org/v08/i14/xorshift.pdf">Xorshift RNGs.</a>
+ * Translated from: <a href="https://web.archive.org/web/20230919193645/https://www.codeproject.com/Articles/9187/A-fast-equivalent-for-System-Random">A fast equivalent for System.Random</a>.
+ * Original Code from: <a href="https://gist.github.com/Xyene/4637619">Xyene/Random.java</a>
+ */
+@SuppressWarnings("SuspiciousNameCombination")
+public class XorshiftRandom extends Random {
+ final double REAL_UNIT_INT = 1.0 / (0x7FFFFFFFL);
+ final double REAL_UNIT_UINT = 1.0 / (0xFFFFFFFFL);
+ final long Y = 842502087L, Z = 3579807591L, W = 273326509L;
+ long x, y, z, w;
+
+ public XorshiftRandom() {
+ seed((int) System.currentTimeMillis());
+ }
+
+ @Override
+ public void setSeed(long seed) {
+ seed((int) seed);
+ }
+
+ public void seed(int seed) {
+ // The only stipulation stated for the xorshift RNG is that at least one of
+ // the seeds x,y,z,w is non-zero. We fulfill that requirement by only allowing
+ // resetting of the x seed
+ x = seed;
+ y = Y;
+ z = Z;
+ w = W;
+ }
+
+ long boolBuffer;
+ int boolBufferBits = 0;
+
+ @Override
+ public boolean nextBoolean() {
+ if (boolBufferBits == 0) {
+ boolBuffer = nextUInt();
+ boolBufferBits = 32;
+ }
+ boolBuffer >>= 1;
+ boolean bit = (boolBuffer & 1) == 0;
+ --boolBufferBits;
+ return bit;
+ }
+
+ @Override
+ public void nextBytes(byte[] buffer) {
+ // Fill up the bulk of the buffer in chunks of 4 bytes at a time.
+ long x = this.x, y = this.y, z = this.z, w = this.w;
+ int i = 0;
+ long t;
+ for (int bound = buffer.length - 3; i < bound; ) {
+ // Generate 4 bytes.
+ // Increased performance is achieved by generating 4 random bytes per loop.
+ // Also note that no mask needs to be applied to zero out the higher order bytes before
+ // casting because the cast ignores thos bytes. Thanks to Stefan Trosch黷z for pointing this out.
+ t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
+
+ buffer[i++] = (byte) w;
+ buffer[i++] = (byte) (w >> 8);
+ buffer[i++] = (byte) (w >> 16);
+ buffer[i++] = (byte) (w >> 24);
+ }
+
+ // Fill up any remaining bytes in the buffer.
+ if (i < buffer.length) {
+ // Generate 4 bytes.
+ t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
+
+ buffer[i++] = (byte) w;
+ if (i < buffer.length) {
+ buffer[i++] = (byte) (w >> 8);
+ if (i < buffer.length) {
+ buffer[i++] = (byte) (w >> 16);
+ if (i < buffer.length) {
+ buffer[i] = (byte) (w >> 24);
+ }
+ }
+ }
+ }
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.w = w;
+ }
+
+ @Override
+ public double nextDouble() {
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+
+ // Here we can gain a 2x speed improvement by generating a value that can be cast to
+ // an int instead of the more easily available uint. If we then explicitly cast to an
+ // int the compiler will then cast the int to a double to perform the multiplication,
+ // this final cast is a lot faster than casting from a uint to a double. The extra cast
+ // to an int is very fast (the allocated bits remain the same) and so the overall effect
+ // of the extra cast is a significant performance improvement.
+ //
+ // Also note that the loss of one bit of precision is equivalent to what occurs within
+ // System.Random.
+ return (REAL_UNIT_INT * (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))));
+ }
+
+ public double random() {
+ return nextDouble();
+ }
+
+ @Override
+ public float nextFloat() {
+ return (float) nextDouble();
+ }
+
+ @Override
+ public int nextInt() {
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ return (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))));
+ }
+
+ @Override
+ public int nextInt(int upperBound) {
+ if (upperBound < 0)
+ throw new IllegalArgumentException("upperBound must be >=0");
+
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+
+ return (int) ((REAL_UNIT_INT * (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))))) * upperBound);
+ }
+
+ public int nextInt(int lowerBound, int upperBound) {
+ if (lowerBound > upperBound)
+ throw new IllegalArgumentException("upperBound must be >=lowerBound");
+
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+
+ // The explicit int cast before the first multiplication gives better performance.
+ // See comments in NextDouble.
+ int range = upperBound - lowerBound;
+ if (range < 0) {
+ // If range is <0 then an overflow has occured and must resort to using long integer arithmetic instead (slower).
+ // We also must use all 32 bits of precision, instead of the normal 31, which again is slower.
+ return lowerBound + (int) ((REAL_UNIT_UINT * (double) (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)))) * (double) ((long) upperBound - (long) lowerBound));
+ }
+ // 31 bits of precision will suffice if range<=int.MaxValue. This allows us to cast to an int and gain
+ // a little more performance.
+ return lowerBound + (int) ((REAL_UNIT_INT * (double) (int) (0x7FFFFFFF & (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))))) * (double) range);
+ }
+
+ public long nextUInt() {
+ long t = (x ^ (x << 11));
+ x = y;
+ y = z;
+ z = w;
+ return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8))) & (0xFFFFFFFFL);
+ }
+
+ @Override
+ public long nextLong() {
+ return nextUInt() << 32 + nextUInt();
+ }
+
+ double gaussNext;
+ boolean hasGaussNext;
+ final double TWOPI = Math.PI * 2;
+
+ /**
+ * Get a random number in the range [min, max) or [min, max] depending on rounding.
+ *
+ * @param min Low bound
+ * @param max High bound
+ * @return A uniformly distributed double
+ */
+ public double uniform(double min, double max) {
+ return min + (max - min) * nextDouble();
+ }
+
+ /**
+ * Triangular distribution.
+ * <p/>
+ * Continuous distribution bounded by given lower and upper limits,
+ * and having a given mode value in-between.
+ * See: <a href="http://en.wikipedia.org/wiki/Triangular_distribution">Triangular distribution</a>
+ *
+ * @param low Low bound
+ * @param high High bound
+ * @param mode Mode
+ * @return A number from the triangular distribution specified
+ */
+ public double triangular(int low, int high, int mode) {
+ double u = nextDouble();
+ double c = (double) (mode - low) / (high - low);
+ if (u > c) {
+ u = 1.0 - u;
+ c = 1.0 - c;
+ int k = low;
+ low = high;
+ high = k;
+ }
+ return low + (high - low) * Math.sqrt(u * c);
+ }
+
+ /**
+ * Gaussian distribution, mean is 0 and standard deviation is 1.
+ * <p/>
+ * mu is the mean, and sigma is the standard deviation.
+ *
+ * @return A double in Gaussian distribution
+ */
+ public double gauss() {
+ return nextGaussian();
+ }
+
+ /**
+ * Gaussian distribution, with user-specified mean and standard deviation.
+ * <p/>
+ * mu is the mean, and sigma is the standard deviation.
+ *
+ * @return A double in Gaussian distribution
+ */
+ public double gauss(double mu, double sigma) {
+ return mu + sigma * nextGaussian();
+ }
+
+ public double gaussUnsigned(double mu, double sigma) {
+ double out = gauss(mu, sigma);
+ return out > 1 ? out : 1;
+ }
+
+ /**
+ * Log normal distribution.
+ * <p/>
+ * If you take the natural logarithm of this distribution, you'll get a
+ * normal distribution with mean mu and standard deviation sigma.
+ * mu can have any value, and sigma must be greater than zero.
+ *
+ * @param mu Mean
+ * @param sigma Standard deviation
+ * @return A number from the log normal distribution specified
+ */
+ public double logNormal(double mu, double sigma) {
+ return Math.exp(gauss(mu, sigma));
+ }
+
+ /**
+ * Exponential distribution.
+ * <p/>
+ * lambda is 1.0 divided by the desired mean. It should be
+ * nonzero. Returned values range from 0 to positive infinity
+ * if lambda is positive, and from negative infinity to 0
+ * if lambda is negative.
+ *
+ * @param lambda A non-zero value
+ */
+ public double exponential(double lambda) {
+ return -Math.log(1.0 - random()) / lambda;
+ }
+
+ /**
+ * Circular data distribution.
+ * <p/>
+ * If kappa is equal to zero, this distribution reduces
+ * to a uniform random angle over the range 0 to 2*pi.
+ *
+ * @param mu the mean angle, expressed in radians between 0 and 2*pi.
+ * @param kappa the concentration parameter, which must be greater than or
+ * equal to zero.
+ * @return A number from the circular data distribution specified
+ */
+ public double circularData(double mu, double kappa) {
+ if (kappa <= 1e-6)
+ return TWOPI * nextDouble();
+
+ double a = 1.0 + Math.sqrt(1.0 + 4.0 * kappa * kappa);
+ double b = (a - Math.sqrt(2.0 * a)) / (2.0 * kappa);
+ double r = (1.0 + b * b) / (2.0 * b);
+ double u1, u2, u3, f, c, z, theta = 0;
+
+ while (true) {
+ u1 = nextDouble();
+
+ z = Math.cos(Math.PI * u1);
+ f = (1.0 + r * z) / (r + z);
+ c = kappa * (r - f);
+
+ u2 = nextDouble();
+
+ if (u2 < c * (2.0 - c) || u2 <= c * Math.exp(1.0 - c))
+ break;
+
+ u3 = nextDouble();
+ if (u3 > 0.5)
+ theta = (mu % TWOPI) + Math.acos(f);
+ else
+ theta = (mu % TWOPI) - Math.acos(f);
+ }
+ return theta;
+ }
+
+
+ final double LOG4 = Math.log(4);
+ final double SG_MAGICCONST = 1.0 + Math.log(4.5);
+
+ /**
+ * Gamma distribution. Not the gamma function!
+ * Conditions on the parameters are alpha > 0 and beta > 0.
+ * <p/>
+ * The probability distribution function is:
+ * pdf(x) = (x ** (alpha - 1) * math.exp(-x / beta)) / (math.gamma(alpha) * beta ** alpha)
+ *
+ * @param alpha Alpha
+ * @param beta Beta
+ * @return A number from the gamma distribution specified
+ */
+ public double gamma(double alpha, double beta) {
+ if (alpha <= 0.0 || beta <= 0.0)
+ throw new IllegalArgumentException("alpha and beta must be > 0.0");
+
+ if (alpha > 1.0) {
+ double ainv = Math.sqrt(2.0 * alpha - 1.0);
+ double bbb = alpha - LOG4;
+ double ccc = alpha + ainv;
+ double u1, u2, v, x, z, r;
+
+ while (true) {
+ u1 = random();
+ if (!(1e-7 < u1 && u1 < .9999999))
+ continue;
+ u2 = 1.0 - random();
+ v = Math.log(u1 / (1.0 - u1)) / ainv;
+ x = alpha * Math.exp(v);
+ z = u1 * u1 * u2;
+ r = bbb + ccc * v - x;
+ if (r + SG_MAGICCONST - 4.5 * z >= 0.0 || r >= Math.log(z))
+ return x * beta;
+ }
+ } else if (alpha == 1.0) {
+ // exponential(1)
+ double u;
+ u = random();
+ while (u <= 1e-7)
+ u = random();
+ return -Math.log(u) * beta;
+ } else {
+ // alpha is between 0 and 1 (exclusive)
+ // Uses ALGORITHM GS of Statistical Computing -Kennedy & Gentle
+
+ double u, b, p, x, u1;
+ while (true) {
+ u = random();
+ b = (Math.E + alpha) / Math.E;
+ p = b * u;
+ if (p <= 1.0)
+ x = Math.pow(p, (1.0 / alpha));
+ else
+ x = -Math.log((b - p) / alpha);
+ u1 = random();
+ if (p > 1.0) {
+ if (u1 <= Math.pow(x, (alpha - 1.0)))
+ break;
+ } else if (u1 <= Math.exp(-x))
+ break;
+ }
+ return x * beta;
+ }
+ }
+}
diff --git a/src/main/java/org/plazmamc/plazma/util/random/XorshiftRandomSource.java b/src/main/java/org/plazmamc/plazma/util/random/XorshiftRandomSource.java
new file mode 100644
index 0000000000000000000000000000000000000000..646e9689f17211112f8d253099fb075666d942e9
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/util/random/XorshiftRandomSource.java
@@ -0,0 +1,56 @@
+package org.plazmamc.plazma.util.random;
+
+import com.google.common.annotations.VisibleForTesting;
+import net.minecraft.core.BlockPos;
+import net.minecraft.util.Mth;
+import net.minecraft.util.RandomSource;
+import net.minecraft.world.level.levelgen.PositionalRandomFactory;
+import org.jspecify.annotations.NonNull;
+
+public class XorshiftRandomSource extends XorshiftRandom implements RandomSource {
+
+ public XorshiftRandomSource(long seed) {
+ this.setSeed(seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fork() {
+ return new XorshiftRandomSource(this.nextLong());
+ }
+
+ @Override
+ public @NonNull PositionalRandomFactory forkPositional() {
+ return new XorshiftRandomSourceFactory(this.nextLong());
+ }
+
+ private record XorshiftRandomSourceFactory(long seed) implements PositionalRandomFactory {
+ @SuppressWarnings("deprecation")
+ @Override
+ public @NonNull RandomSource at(int x, int y, int z) {
+ return new XorshiftRandomSource(Mth.getSeed(x, y, z) ^ this.seed);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public @NonNull RandomSource at(final @NonNull BlockPos pos) {
+ return new XorshiftRandomSource(Mth.getSeed(pos.getX(), pos.getY(), pos.getZ()) ^ this.seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fromHashOf(@NonNull String seed) {
+ return new XorshiftRandomSource((long) seed.hashCode() ^ this.seed);
+ }
+
+ @Override
+ public @NonNull RandomSource fromSeed(final long seed) {
+ return new XorshiftRandomSource(seed);
+ }
+
+ @Override
+ @VisibleForTesting
+ public void parityConfigString(@NonNull StringBuilder info) {
+ info.append("XorshiftRandomSource$XorshiftRandomSourceFactory{").append(this.seed).append("}");
+ }
+ }
+
+}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,244 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 26 Oct 2024 13:42:26 +0900
Subject: [PATCH] Implement alternative noise chunk generator
Based on Steveplays28/noisium.
Copyright (C) 2024 Darion Spaargaren, Licensed under GPL v3.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
index e4ae25c83ab9dd1aaa530a5456275ef63cdb8511..03a5effa6f0ef4d5c46a03a39cf336493873cfea 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
@@ -19,9 +19,9 @@ public class LevelChunkSection implements ca.spottedleaf.moonrise.patches.block_
public static final int SECTION_HEIGHT = 16;
public static final int SECTION_SIZE = 4096;
public static final int BIOME_CONTAINER_BITS = 2;
- short nonEmptyBlockCount; // Paper - package private
- private short tickingBlockCount;
- private short tickingFluidCount;
+ public short nonEmptyBlockCount; // Paper - package private // Plazma -> public
+ public short tickingBlockCount; // Plazma - private -> public
+ public short tickingFluidCount; // Plazma - private -> public
public final PalettedContainer<BlockState> states;
private PalettedContainer<Holder<Biome>> biomes; // CraftBukkit - read/write
@@ -35,8 +35,8 @@ public class LevelChunkSection implements ca.spottedleaf.moonrise.patches.block_
private boolean isClient;
private static final short CLIENT_FORCED_SPECIAL_COLLIDING_BLOCKS = (short)9999;
- private short specialCollidingBlocks;
- private final ca.spottedleaf.moonrise.common.list.ShortList tickingBlocks = new ca.spottedleaf.moonrise.common.list.ShortList();
+ public short specialCollidingBlocks; // Plazma - private -> public
+ public final ca.spottedleaf.moonrise.common.list.ShortList tickingBlocks = new ca.spottedleaf.moonrise.common.list.ShortList(); // Plazma - private -> public
@Override
public final boolean moonrise$hasSpecialCollidingBlocks() {
@@ -309,18 +309,14 @@ public class LevelChunkSection implements ca.spottedleaf.moonrise.patches.block_
// CraftBukkit end
public void fillBiomesFromNoise(BiomeResolver biomeSupplier, Climate.Sampler sampler, int x, int y, int z) {
- PalettedContainer<Holder<Biome>> datapaletteblock = this.biomes.recreate();
- boolean flag = true;
+ // Plazma start - Optimize noise
+ PalettedContainer<Holder<Biome>> block = this.biomes.recreate();
- for (int l = 0; l < 4; ++l) {
- for (int i1 = 0; i1 < 4; ++i1) {
- for (int j1 = 0; j1 < 4; ++j1) {
- datapaletteblock.getAndSetUnchecked(l, i1, j1, biomeSupplier.getNoiseBiome(x + l, y + i1, z + j1, sampler));
- }
- }
- }
+ for (int dY = 0; dY < 4; ++dY) for (int dZ = 0; dZ < 4; ++dZ) for (int dX = 0; dX < 4; ++dX)
+ block.getAndSetUnchecked(dX, dY, dZ, biomeSupplier.getNoiseBiome(x + dX, y + dY, z + dZ, sampler));
- this.biomes = datapaletteblock;
+ this.biomes = block;
+ // Plazma end - Optimize noise
}
public LevelChunkSection copy() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
index 8b84bf2272556ac3321cbf16361d7f48a1cc6873..84047336fbd8833cc95bf5afa721f983aee97d4d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
@@ -30,7 +30,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
public final IdMap<T> registry;
private final T @org.jetbrains.annotations.Nullable [] presetValues; // Paper - Anti-Xray - Add preset values
public volatile PalettedContainer.Data<T> data; // Paper - optimise collisions - public
- private final PalettedContainer.Strategy strategy;
+ public final PalettedContainer.Strategy strategy; // Plazma - private -> public
// private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer"); // Paper - unused
public void acquire() {
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
index 0346fd4ab7095d66c0eef5a440afbc7a8ba52466..35b589fa6d53cce957365e1cfcb5cf1978390546 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
@@ -51,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableObject;
public final class NoiseBasedChunkGenerator extends ChunkGenerator {
+ public static boolean PLAZMA_USE_NOISIUM = false; // Plazma - Optimize noise chunk generation
public static final MapCodec<NoiseBasedChunkGenerator> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
return instance.group(BiomeSource.CODEC.fieldOf("biome_source").forGetter((chunkgeneratorabstract) -> {
return chunkgeneratorabstract.biomeSource;
@@ -270,6 +271,24 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
int k = Mth.floorDiv(noisesettings.height(), noisesettings.getCellHeight());
return k <= 0 ? CompletableFuture.completedFuture(chunk) : CompletableFuture.supplyAsync(() -> {
+ // Plazma start - Optimize noise chunk generation
+ if (PLAZMA_USE_NOISIUM) {
+ int l = chunk.getSectionIndex(k * noisesettings.getCellHeight() - 1 + i);
+ int i1 = chunk.getSectionIndex(i);
+
+ var set = chunk.getSections();
+ for (int j1 = l; j1 >= i1; --j1) set[j1].acquire();
+
+ ChunkAccess ichunkaccess1;
+ try {
+ ichunkaccess1 = this.doFill(blender, structureAccessor, noiseConfig, chunk, j, k);
+ } finally {
+ for (int j1 = l; j1 >= i1; --j1) set[j1].release();
+ }
+
+ return ichunkaccess1;
+ }
+ // Plazma end - Optimize noise chunk generation
int l = chunk.getSectionIndex(k * noisesettings.getCellHeight() - 1 + i);
int i1 = chunk.getSectionIndex(i);
Set<LevelChunkSection> set = Sets.newHashSet();
@@ -377,6 +396,18 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
iblockdata = this.debugPreliminarySurfaceLevel(noisechunk, j4, j3, i5, iblockdata);
if (iblockdata != NoiseBasedChunkGenerator.AIR && !SharedConstants.debugVoidTerrain(chunk.getPos())) {
+ // Plazma start - Optimize noise
+ if (PLAZMA_USE_NOISIUM) {
+ var id = chunksection.states.data.palette().idFor(iblockdata);
+ chunksection.states.data.storage().getAndSet(chunksection.states.strategy.getIndex(k4, k3, j5), id);
+
+ ++chunksection.nonEmptyBlockCount;
+ if (iblockdata.isRandomlyTicking()) ++chunksection.tickingBlockCount;
+ if (iblockdata.getFluidState().isRandomlyTicking()) ++chunksection.tickingFluidCount;
+ if (ca.spottedleaf.moonrise.patches.collisions.CollisionUtil.isSpecialCollidingBlock(iblockdata)) ++chunksection.specialCollidingBlocks;
+ if (chunksection.isRandomlyTicking()) chunksection.tickingBlocks.add((short) (k4 | (k3 << 4) | (j5 << (4+4))));
+ } else
+ // Plazma end - Optimize noise
chunksection.setBlockState(k4, k3, j5, iblockdata, false);
heightmap.update(k4, j3, j5, iblockdata);
heightmap1.update(k4, j3, j5, iblockdata);
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseSettings.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseSettings.java
index 932d1d9bd717b1176f8c82b0cf65d2eb6403ad40..a54a279cbaa30c58df572242ad5cf9786c715b66 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseSettings.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseSettings.java
@@ -8,7 +8,7 @@ import net.minecraft.core.QuartPos;
import net.minecraft.world.level.LevelHeightAccessor;
import net.minecraft.world.level.dimension.DimensionType;
-public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical) {
+public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int noiseSizeVertical, int horizontalCellBlockCount, int verticalCellBlockCount) { // Plazma - Optimize noise
public static final Codec<NoiseSettings> CODEC = RecordCodecBuilder.<NoiseSettings>create(
instance -> instance.group(
Codec.intRange(DimensionType.MIN_Y, DimensionType.MAX_Y).fieldOf("min_y").forGetter(NoiseSettings::minY),
@@ -16,7 +16,7 @@ public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int n
Codec.intRange(1, 4).fieldOf("size_horizontal").forGetter(NoiseSettings::noiseSizeHorizontal),
Codec.intRange(1, 4).fieldOf("size_vertical").forGetter(NoiseSettings::noiseSizeVertical)
)
- .apply(instance, NoiseSettings::new)
+ .apply(instance, NoiseSettings::create) // Plazma - Optimize noise
)
.comapFlatMap(NoiseSettings::guardY, Function.identity());
protected static final NoiseSettings OVERWORLD_NOISE_SETTINGS = create(-64, 384, 1, 2);
@@ -36,7 +36,7 @@ public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int n
}
public static NoiseSettings create(int minimumY, int height, int horizontalSize, int verticalSize) {
- NoiseSettings noiseSettings = new NoiseSettings(minimumY, height, horizontalSize, verticalSize);
+ NoiseSettings noiseSettings = new NoiseSettings(minimumY, height, horizontalSize, verticalSize, QuartPos.toBlock(horizontalSize), QuartPos.toBlock(verticalSize)); // Plazma - Optimize noise
guardY(noiseSettings).error().ifPresent(error -> {
throw new IllegalStateException(error.message());
});
@@ -44,16 +44,16 @@ public record NoiseSettings(int minY, int height, int noiseSizeHorizontal, int n
}
public int getCellHeight() {
- return QuartPos.toBlock(this.noiseSizeVertical());
+ return this.horizontalCellBlockCount; // Plazma - Optimize noise
}
public int getCellWidth() {
- return QuartPos.toBlock(this.noiseSizeHorizontal());
+ return this.verticalCellBlockCount; // Plazma - Optimize noise
}
public NoiseSettings clampToHeightAccessor(LevelHeightAccessor world) {
int i = Math.max(this.minY, world.getMinY());
int j = Math.min(this.minY + this.height, world.getMaxY() + 1) - i;
- return new NoiseSettings(i, j, this.noiseSizeHorizontal, this.noiseSizeVertical);
+ return new NoiseSettings(i, j, this.noiseSizeHorizontal, this.noiseSizeVertical, QuartPos.toBlock(this.noiseSizeHorizontal), QuartPos.toBlock(this.noiseSizeVertical)); // Plazma - Optimize noise
}
}
diff --git a/src/main/java/net/minecraft/world/level/levelgen/material/MaterialRuleList.java b/src/main/java/net/minecraft/world/level/levelgen/material/MaterialRuleList.java
index 0e6dfe2635ea5f5e410049b05f94f5083b2f18a4..584311a00c5037a6d5bc05b1261969aad1c38a4c 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/material/MaterialRuleList.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/material/MaterialRuleList.java
@@ -9,12 +9,15 @@ public record MaterialRuleList(NoiseChunk.BlockStateFiller[] materialRuleList) i
@Nullable
@Override
public BlockState calculate(DensityFunction.FunctionContext pos) {
- for (NoiseChunk.BlockStateFiller blockStateFiller : this.materialRuleList) {
- BlockState blockState = blockStateFiller.calculate(pos);
- if (blockState != null) {
- return blockState;
- }
+ // Plazma start - Optimize noise
+ //noinspection ForLoopReplaceableByForEach
+ for (int i = 0; i < this.materialRuleList.length; i++) {
+ BlockState state = this.materialRuleList[i].calculate(pos);
+ if (state == null) continue;
+
+ return state;
}
+ // Plazma end - Optimize noise
return null;
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 92de32ee00bc9c4e8750773bca95a9cf5fbae067..fbcbbba15e8f7f8ea812a75d807908925305cb29 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -61,6 +61,8 @@ public class GlobalConfiguration extends ConfigurationPart {
public WorldGeneration worldgen;
public class WorldGeneration extends ConfigurationPart {
+ boolean useAlternativeNoiseGenerator = OPTIMIZE;
+
public LavaSea lavaSea;
public class LavaSea extends ConfigurationPart {
@@ -80,6 +82,11 @@ public class GlobalConfiguration extends ConfigurationPart {
}
+ @PostProcess
+ void post() {
+ net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator.PLAZMA_USE_NOISIUM = this.useAlternativeNoiseGenerator;
+ }
+
}
public Entity entity;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,236 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Tue, 5 Nov 2024 18:31:09 +0900
Subject: [PATCH] Hashed rcon password
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 3dd5c7441bb300ca17d717af37edbefb89db4b2f..df367fbb8c582614aaf2087aa37d5e47247af810 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -73,7 +73,6 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
public final int queryPort;
public final boolean enableRcon;
public final int rconPort;
- public final String rconPassword;
public final boolean hardcore;
public final boolean allowNether;
public final boolean spawnMonsters;
@@ -113,6 +112,25 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
public final String rconIp; // Paper - Configurable rcon ip
+ // Plazma start - hashed rcon password
+ private final boolean rconHash;
+ private final int rconHashIterationCount;
+ private final byte[] rconSalt;
+ private final String rconPassword;
+
+ private static final @Nullable javax.crypto.SecretKeyFactory HASH_INSTANCE;
+ static {
+ @Nullable javax.crypto.SecretKeyFactory factory;
+ try {
+ factory = javax.crypto.SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512/256");
+ } catch (Exception e) {
+ LOGGER.error("Failed to initialize rcon hash instance", e);
+ factory = null;
+ }
+ HASH_INSTANCE = factory;
+ }
+ // Plazma end - hashed rcon password
+
// CraftBukkit start
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
super(properties, optionset);
@@ -126,7 +144,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.queryPort = this.get("query.port", 25565);
this.enableRcon = this.get("enable-rcon", false);
this.rconPort = this.get("rcon.port", 25575);
- this.rconPassword = this.get("rcon.password", "");
+ // this.rconPassword = this.get("rcon.password", ""); // Plazma - hashed rcon password
this.hardcore = this.get("hardcore", false);
this.allowNether = this.get("allow-nether", true);
this.spawnMonsters = this.get("spawn-monsters", true);
@@ -179,7 +197,82 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
final String rconIp = this.getStringRaw("rcon.ip");
this.rconIp = rconIp == null ? this.serverIp : rconIp;
// Paper end - Configurable rcon ip
+
+ // Plazma start - hashed rcon password
+ this.rconHash = this.get("rcon.hash", false);
+ this.rconHashIterationCount = this.get("rcon.hash.iteration-count", Character.MAX_VALUE);
+ this.rconSalt = this.rconSalt();
+ this.rconPassword = this.rconPassword();
+ // Plazma end - hashed rcon password
+ }
+
+ // Plazma start - hashed rcon password
+ private byte[] rconSalt() {
+ if (!this.rconHash) return org.plazmamc.plazma.constants.Null.BYTE;
+
+ String salt = this.get("rcon.hash.salt", "");
+ if (!salt.isBlank()) {
+ try {
+ return java.util.HexFormat.of().parseHex(salt);
+ } catch (Exception e) {
+ LOGGER.error("Invalid RCON salt detected! RCON will be disabled");
+ return org.plazmamc.plazma.constants.Null.BYTE;
+ }
+ }
+
+ byte[] newSalt = new byte[16];
+ (new java.security.SecureRandom()).nextBytes(newSalt);
+ salt = java.util.HexFormat.of().formatHex(newSalt);
+ this.set("rcon.hash.salt", salt);
+ return newSalt;
+ }
+
+ private String rconPassword() {
+ String hashed = this.get("rcon.hash.password", "");
+ if (!hashed.isBlank()) {
+ try {
+ java.util.HexFormat.of().parseHex(hashed);
+ } catch (Exception e) {
+ LOGGER.error("Invalid hashed RCON password detected! RCON will be disabled");
+ return "";
+ }
+ return hashed;
+ }
+
+ String decoded = this.get("rcon.password", "");
+ if (decoded.isBlank() || HASH_INSTANCE == null || this.rconSalt.length == 0) return decoded;
+
+ try {
+ final java.security.spec.KeySpec spec = new javax.crypto.spec.PBEKeySpec(decoded.toCharArray(), this.rconSalt, this.rconHashIterationCount, 256);
+ byte[] hashedByte = HASH_INSTANCE.generateSecret(spec).getEncoded();
+ hashed = java.util.HexFormat.of().formatHex(hashedByte);
+ this.set("rcon.hash.password", hashed);
+ this.remove("rcon.password");
+ return hashed;
+ } catch (Exception e) {
+ LOGGER.error("Failed to encode rcon password", e);
+ return "";
+ }
+ }
+
+ public Boolean shouldStartRCON() {
+ return this.enableRcon && !this.rconPassword.isBlank();
+ }
+
+ public Boolean matchRconPassword(String value) {
+ if (this.rconSalt.length == 0 || HASH_INSTANCE == null) return this.rconPassword.equals(value);
+
+ try {
+ final java.security.spec.KeySpec spec = new javax.crypto.spec.PBEKeySpec(value.toCharArray(), this.rconSalt, this.rconHashIterationCount, 256);
+ byte[] hashedByte = HASH_INSTANCE.generateSecret(spec).getEncoded();
+ String hashed = java.util.HexFormat.of().formatHex(hashedByte);
+ return this.rconPassword.equals(hashed);
+ } catch (Exception e) {
+ LOGGER.error("Failed to validate rcon password", e);
+ return false;
+ }
}
+ // Plazma end - hashed rcon password
// CraftBukkit start
public static DedicatedServerProperties fromFile(Path path, OptionSet optionset) {
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
index d7bd235ef2815890e038091dd625177049d253a5..afced52731868d5726b85a03011111adeffeb074 100644
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
@@ -243,6 +243,11 @@ public abstract class Settings<T extends Settings<T>> {
return v1;
}
+ // Plazma start - Settings helper
+ protected <V> void set(String key, V value) { this.properties.put(key, value); }
+ protected void remove(String key) { this.properties.remove(key); }
+ // Plazma end - Settings helper
+
protected <V> Settings<T>.MutableValue<V> getMutable(String key, Function<String, V> parser, Function<V, String> stringifier, V fallback) {
String s1 = this.getStringRaw(key);
V v1 = MoreObjects.firstNonNull(s1 != null ? parser.apply(s1) : null, fallback);
diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconClient.java b/src/main/java/net/minecraft/server/rcon/thread/RconClient.java
index 1c3775c6d29a85803c87948c64ec81cbeb87aef4..4f6f46398ac0814a95d8253cc5f575b8f09f7209 100644
--- a/src/main/java/net/minecraft/server/rcon/thread/RconClient.java
+++ b/src/main/java/net/minecraft/server/rcon/thread/RconClient.java
@@ -26,13 +26,12 @@ public class RconClient extends GenericThread {
private boolean authed;
private final Socket client;
private final byte[] buf = new byte[1460];
- private final String rconPassword;
// CraftBukkit start
private final DedicatedServer serverInterface;
private final RconConsoleSource rconConsoleSource;
// CraftBukkit end
- RconClient(ServerInterface server, String password, Socket socket) {
+ RconClient(ServerInterface server, Socket socket) {// Plazma - hashed rcon password
super("RCON Client " + String.valueOf(socket.getInetAddress()));
this.serverInterface = (DedicatedServer) server; // CraftBukkit
this.client = socket;
@@ -43,7 +42,6 @@ public class RconClient extends GenericThread {
this.running = false;
}
- this.rconPassword = password;
this.rconConsoleSource = new net.minecraft.server.rcon.RconConsoleSource(this.serverInterface, socket.getRemoteSocketAddress()); // CraftBukkit
}
@@ -93,7 +91,7 @@ public class RconClient extends GenericThread {
String s1 = PktUtils.stringFromByteArray(this.buf, j, i);
int j1 = j + s1.length();
- if (!s1.isEmpty() && s1.equals(this.rconPassword)) {
+ if (!s1.isEmpty() && serverInterface.getProperties().matchRconPassword(s1)) {
this.authed = true;
this.send(l, 2, "");
continue;
diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
index c12d7db2b048a327c0e8f398848cd3a9bce0ebce..150cecc44a7f49740fa400e02de09671ff8b392a 100644
--- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
+++ b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
@@ -16,15 +16,13 @@ import org.slf4j.Logger;
public class RconThread extends GenericThread {
private static final Logger LOGGER = LogUtils.getLogger();
private final ServerSocket socket;
- private final String rconPassword;
private final List<RconClient> clients = Lists.newArrayList();
private final ServerInterface serverInterface;
- private RconThread(ServerInterface server, ServerSocket listener, String password) {
+ private RconThread(ServerInterface server, ServerSocket listener) {// Plazma - hashed rcon password
super("RCON Listener");
this.serverInterface = server;
this.socket = listener;
- this.rconPassword = password;
}
private void clearClients() {
@@ -37,7 +35,7 @@ public class RconThread extends GenericThread {
while (this.running) {
try {
Socket socket = this.socket.accept();
- RconClient rconClient = new RconClient(this.serverInterface, this.rconPassword, socket);
+ RconClient rconClient = new RconClient(this.serverInterface, socket); // Plazma - hashed rcon password
rconClient.start();
this.clients.add(rconClient);
this.clearClients();
@@ -64,15 +62,14 @@ public class RconThread extends GenericThread {
int i = dedicatedServerProperties.rconPort;
if (0 < i && 65535 >= i) {
- String string2 = dedicatedServerProperties.rconPassword;
- if (string2.isEmpty()) {
+ if (!dedicatedServerProperties.shouldStartRCON()) { // Plazma - hashed rcon password
LOGGER.warn("No rcon password set in server.properties, rcon disabled!");
return null;
} else {
try {
ServerSocket serverSocket = new ServerSocket(i, 0, InetAddress.getByName(string));
serverSocket.setSoTimeout(500);
- RconThread rconThread = new RconThread(server, serverSocket, string2);
+ RconThread rconThread = new RconThread(server, serverSocket); // Plazma - hashed rcon password
if (!rconThread.start()) {
return null;
} else {

View File

@@ -0,0 +1,333 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 14 Dec 2024 00:39:05 +0900
Subject: [PATCH] Ticking Controller
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8964ccc27ea7db306140fd6b04c9f5cb33158aa0..bd8048bfe2a93c3a4b4bb84e7d992a8bb0c65778 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1654,6 +1654,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void tickServer(BooleanSupplier shouldKeepTicking) {
+ org.plazmamc.plazma.util.TickingController.tick(); // Plazma - TickControl System
org.spigotmc.WatchdogThread.tick(); // Spigot
long i = Util.getNanos();
int j = this.pauseWhileEmptySeconds() * 20;
diff --git a/src/main/java/net/minecraft/server/dedicated/ServerWatchdog.java b/src/main/java/net/minecraft/server/dedicated/ServerWatchdog.java
index 660a142036c4e608d3d6fed6ec700a3488400bec..d092bef5e6626f000a44a0f424f247a1a69d34af 100644
--- a/src/main/java/net/minecraft/server/dedicated/ServerWatchdog.java
+++ b/src/main/java/net/minecraft/server/dedicated/ServerWatchdog.java
@@ -34,6 +34,7 @@ public class ServerWatchdog implements Runnable {
@Override
public void run() {
while (this.server.isRunning()) {
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().tickControl.enabled) return; // Plazma - TickControl System
long l = this.server.getNextTickTime();
long m = Util.getNanos();
long n = m - l;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index a84faa2e82a8d33b7bfe71f174f2913b585d99e8..0d8800d05bd6a14b3d5702d6a51f8cb0c7ae2186 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -630,7 +630,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
// this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
//profiler.popPush("spawnAndTick"); // Plazma - Completely remove Mojang profiler
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
- int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
+ int k = org.plazmamc.plazma.util.TickingController.calc(this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING), it -> it.accelerate.randomTick, false); // Plazma - TickControl system
List list1;
if (flag && (this.spawnEnemies || this.spawnFriendlies)) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9a54883281352cc4fa08143f5126d61dbd89761d..982b172b188fb890fa7719662e67a007ab172668 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -909,7 +909,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.setDayTime(this.preciseTime);
} else
// Purpur end - Configurable daylight cycle
- this.setDayTime(this.levelData.getDayTime() + 1L);
+ // Plazma start - TickControl System
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().tickControl.accelerate.dayTime)
+ this.setDayTime(this.levelData.getDayTime() + org.plazmamc.plazma.util.TickingController.missedTicks() + 1L);
+ else
+ this.setDayTime(this.levelData.getDayTime() + 1L);
+ // Plazma end - TickControl System
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d6d43ad1677d035c26619b73e5a2dd6e72ab278b..ee6ad451ba8755cf296e9c0a01404a5ed025e749 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -562,6 +562,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.tickEffects();
+ if (plazma.Config.get().tickControl.delay.potionEffect) for (int i = 0; i < org.plazmamc.plazma.util.TickingController.missedTicks(); i++) this.tickEffects(); // Plazma - TickControl System
this.animStepO = this.animStep;
this.yBodyRotO = this.yBodyRot;
this.yHeadRotO = this.yHeadRot;
diff --git a/src/main/java/net/minecraft/world/entity/PortalProcessor.java b/src/main/java/net/minecraft/world/entity/PortalProcessor.java
index b4a8249964786d484aa0767d0e73d71d2156f0e8..49505d04c737c41e4229d80a7b96d4ed0b68d083 100644
--- a/src/main/java/net/minecraft/world/entity/PortalProcessor.java
+++ b/src/main/java/net/minecraft/world/entity/PortalProcessor.java
@@ -24,7 +24,7 @@ public class PortalProcessor {
return false;
} else {
this.insidePortalThisTick = false;
- return canUsePortals && this.portalTime++ >= this.portal.getPortalTransitionTime(world, entity);
+ return canUsePortals && this.increaseTick() >= this.portal.getPortalTransitionTime(world, entity); // Plazma - TickControl System
}
}
@@ -33,6 +33,14 @@ public class PortalProcessor {
return this.portal.getPortalDestination(world, entity, this.entryPosition);
}
+ // Plazma start - TickControl System
+ private int increaseTick() {
+ if (!plazma.Config.get().tickControl.delay.portalUse)
+ this.portalTime += org.plazmamc.plazma.util.TickingController.missedTicks();
+ return this.portalTime++;
+ }
+ // Plazma end - TickControl System
+
public Portal.Transition getPortalLocalTransition() {
return this.portal.getLocalTransition();
}
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 4aaaadce69e62fa371d5b441e5e69c1384e5d63e..97c63c335287e01b20687eeea4a5815520363e13 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -158,6 +158,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
if (this.getItem().isEmpty()) {
this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else {
+ if (this.pickupDelay > 0 && plazma.Config.get().tickControl.delay.itemPickup) this.pickupDelay = Math.max(this.pickupDelay - org.plazmamc.plazma.util.TickingController.missedTicks(), 0); // Plazma - TickControl System
super.tick();
// Paper start - remove anti tick skipping measures / wall time - revert to vanilla
if (this.pickupDelay > 0 && this.pickupDelay != 32767) {
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 5a9e85c44fbb716dc1e8616645732cb8db947ee9..4ea1a327c80f915aa45ccf3a5955ed6ff42692c1 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -305,6 +305,11 @@ public abstract class Player extends LivingEntity {
if (this.sleepCounter > 100) {
this.sleepCounter = 100;
}
+ // Plazma start - TickControl System
+ else if (this.sleepCounter < 100 && plazma.Config.get().tickControl.delay.sleep && org.plazmamc.plazma.util.TickingController.missedTicks() > 0) {
+ this.sleepCounter += org.plazmamc.plazma.util.TickingController.missedTicks();
+ }
+ // Plazma end - TickControl System
if (/*!this.level().isClientSide &&*/ this.level().isDay()) { // Plazma - Remove persist 'isClientSide' flag
this.stopSleepInBed(false, true);
diff --git a/src/main/java/net/minecraft/world/item/Item.java b/src/main/java/net/minecraft/world/item/Item.java
index 29afbe0aa72f12d8fa6c03af55d17abef89c8dd4..78742ef91ed332d229d007af9224555a79cd6be9 100644
--- a/src/main/java/net/minecraft/world/item/Item.java
+++ b/src/main/java/net/minecraft/world/item/Item.java
@@ -260,7 +260,7 @@ public class Item implements FeatureElement, ItemLike {
public int getUseDuration(ItemStack stack, LivingEntity user) {
Consumable consumable = stack.get(DataComponents.CONSUMABLE);
- return consumable != null ? consumable.consumeTicks() : 0;
+ return consumable != null ? org.plazmamc.plazma.util.TickingController.calc(consumable.consumeTicks(), it -> it.delay.itemUse, true) : 0; // Plazma - TickControl System
}
public boolean releaseUsing(ItemStack stack, Level world, LivingEntity user, int remainingUseTicks) {
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index c8ae6e4cd74549f753ec04def5d882de1ab72308..b01b80ff0318f95a737ce3f93a5c69426019cc9c 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -336,13 +336,14 @@ public abstract class BlockBehaviour implements FeatureElement {
protected float getDestroyProgress(BlockState state, Player player, BlockGetter world, BlockPos pos) {
float f = state.getDestroySpeed(world, pos);
- if (f == -1.0F) {
- return 0.0F;
- } else {
- int i = player.hasCorrectToolForDrops(state) ? 30 : 100;
-
- return player.getDestroySpeed(state) / f / (float) i;
- }
+ // Plazma start - TickControl system
+ if (f == -1.0F) return 0.0F;
+ return org.plazmamc.plazma.util.TickingController.calc(
+ player.getDestroySpeed(state) / f / (player.hasCorrectToolForDrops(state) ? 30 : 100),
+ it -> it.delay.blockBreak,
+ false
+ );
+ // Plazma end - TickControl system
}
protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index a1756429e8fc09cfd78109c4d5113857304b317d..158da3ebd4b09d8c682960ff658a2e861cbee6dc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1081,8 +1081,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
this.chunkCoordinateKey = chunkCoordinateKey;
}
+ // Plazma start - TickControl System
+ private void tickTicker(BlockState state) {
+ this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), state, this.blockEntity);
+
+ if (!org.plazmamc.plazma.util.TickingController.shouldTickAgain(state.getBlock())) return;
+ for (int i = 0; i < org.plazmamc.plazma.util.TickingController.missedTicks(); i++)
+ this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), state, this.blockEntity);
+ }
+ // Plazma end - TickControl System
+
@Override
- public void tick() {
+ public final void tick() { // Plazma - TickControl System (make final)
if (this.blockEntity.isRemoved() || !this.blockEntity.hasLevel()) return;
BlockPos pos = this.blockEntity.getBlockPos();
@@ -1092,7 +1102,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
BlockState state = LevelChunk.this.getBlockState(pos);
if (this.blockEntity.getType().isValid(state)) {
- this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), state, this.blockEntity);
+ this.tickTicker(state); // Plazma - TickControl System
this.loggedInvalidBlockState = false;
// Paper start - Remove the Block Entity if it's invalid
} else {
diff --git a/src/main/java/net/minecraft/world/level/material/LavaFluid.java b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
index 6e643c1a7f7e71cfd20603facaf224985ee81716..cbbbcf8a915a4146eb63e29ba5dd91354ac7228b 100644
--- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
@@ -181,7 +181,7 @@ public abstract class LavaFluid extends FlowingFluid {
@Override
public int getTickDelay(LevelReader world) {
- return world.dimensionType().ultraWarm() ? world.getWorldBorder().world.purpurConfig.lavaSpeedNether : world.getWorldBorder().world.purpurConfig.lavaSpeedNotNether; // Purpur
+ return org.plazmamc.plazma.util.TickingController.calc(world.dimensionType().ultraWarm() ? world.getWorldBorder().world.purpurConfig.lavaSpeedNether : world.getWorldBorder().world.purpurConfig.lavaSpeedNotNether, it -> it.delay.lavaFluid, true); // Purpur // Plazma - TickControl system
}
@Override
diff --git a/src/main/java/net/minecraft/world/level/material/WaterFluid.java b/src/main/java/net/minecraft/world/level/material/WaterFluid.java
index 028aea6640356ba80f5d682e3cc03b7f82f5b9c7..d788849dc5a568d455cd83ca5b6e1b4ba1a9161f 100644
--- a/src/main/java/net/minecraft/world/level/material/WaterFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/WaterFluid.java
@@ -123,7 +123,7 @@ public abstract class WaterFluid extends FlowingFluid {
@Override
public int getTickDelay(LevelReader world) {
- return world.getWorldBorder().world.plazmaConfig().block.waterFlowingTick; // Plazma - Configurable water flowing speed
+ return org.plazmamc.plazma.util.TickingController.calc(world.getWorldBorder().world.plazmaConfig().block.waterFlowingTick, it -> it.delay.waterFluid, true); // Plazma - Configurable water flowing speed // Plazma - TickControl System
}
@Override
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 768cb135081c233a820566015ed58351e417c45c..898f9e6ec6f306a15639ee0d03bcfe7bf55e2c6c 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -195,4 +195,39 @@ public class GlobalConfiguration extends ConfigurationPart {
}
+ public TickControl tickControl;
+ public class TickControl extends ConfigurationPart {
+
+ public boolean enabled = false;
+
+ public Delay delay;
+ public class Delay extends ConfigurationPart {
+
+ public boolean sleep = true;
+ public boolean itemUse = true;
+ public boolean portalUse = true;
+ public boolean lavaFluid = true;
+ public boolean waterFluid = true;
+ public boolean blockBreak = true;
+ public boolean itemPickup = true;
+ public boolean potionEffect = true;
+
+ }
+
+ public Accelerate accelerate;
+ public class Accelerate extends ConfigurationPart {
+
+ public boolean dayTime = true;
+ public boolean randomTick = true;
+ public boolean blockEntity = true;
+
+ }
+
+ @PostProcess
+ void post() {
+ org.plazmamc.plazma.util.TickingController.post(this);
+ }
+
+ }
+
}
diff --git a/src/main/java/org/plazmamc/plazma/util/TickingController.java b/src/main/java/org/plazmamc/plazma/util/TickingController.java
new file mode 100644
index 0000000000000000000000000000000000000000..0e71a47a639a1a3dd0918c5a403ed827aca67966
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/util/TickingController.java
@@ -0,0 +1,56 @@
+package org.plazmamc.plazma.util;
+
+import net.minecraft.world.level.block.Block;
+import org.jspecify.annotations.NonNull;
+import org.jspecify.annotations.Nullable;
+import org.plazmamc.plazma.configurations.GlobalConfiguration;
+import java.util.function.Function;
+
+import static net.minecraft.server.MinecraftServer.getServer;
+
+public final class TickingController {
+
+ private static @Nullable TickingController INSTANCE;
+ private final GlobalConfiguration.TickControl configuration;
+ private int missedTicks = 0;
+
+ private TickingController(GlobalConfiguration.TickControl configuration) {
+ this.configuration = configuration;
+ }
+
+ public static void tick() {
+ if (INSTANCE == null) return;
+ INSTANCE.missedTicks -= INSTANCE.missedTicks;
+ INSTANCE.missedTicks += (int) (getServer().tickTimes5s.getAverage() / 50 - 1);
+ }
+
+ public static void post(GlobalConfiguration.TickControl configuration) {
+ if (!configuration.enabled) {
+ INSTANCE = null;
+ return;
+ }
+
+ INSTANCE = new TickingController(configuration);
+ }
+
+ public static float calc(float original, @NonNull Function<GlobalConfiguration.TickControl, Boolean> isAffected, boolean swap) {
+ if (INSTANCE == null || !isAffected.apply(INSTANCE.configuration) || original == 0) return original;
+ if (swap) return (float) Math.max(original * getServer().tps5s.getAverage() / 20, 1);
+ return (float) (original * 20 / getServer().tps5s.getAverage());
+ }
+
+ public static int calc(int original, @NonNull Function<GlobalConfiguration.TickControl, Boolean> isAccelerated, boolean swap) {
+ return (int) Math.ceil(calc((float) original, isAccelerated, swap));
+ }
+
+ public static int missedTicks() {
+ if (INSTANCE == null) return 0;
+ return INSTANCE.missedTicks;
+ }
+
+ public static boolean shouldTickAgain(Block block) {
+ // TODO: Configurable block masking
+ return INSTANCE != null && !INSTANCE.configuration.accelerate.blockEntity;
+ }
+
+}

View File

@@ -0,0 +1,225 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 22 Jan 2025 11:50:19 +0900
Subject: [PATCH] Bundle as quivers
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ee6ad451ba8755cf296e9c0a01404a5ed025e749..53c62f51bcdaecba265eb2e0f5e69e890b1b0b03 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -4774,7 +4774,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
return !this.isSleeping() && super.isInWall();
}
- public ItemStack getProjectile(ItemStack stack) {
+ // Plazma start - Bundle as quivers!
+ public final ItemStack getProjectile(final ItemStack stack) {
+ return this.getProjectile(stack, false, false);
+ }
+
+ public ItemStack getProjectile(final ItemStack stack, final boolean bundle, final boolean shrink) {
+ // Plazma end - Bundle as quivers!
return ItemStack.EMPTY;
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Monster.java b/src/main/java/net/minecraft/world/entity/monster/Monster.java
index c2061f575c731ecc6071384b007517c08e0cf983..a9f7a1ef69fa6fb8ce45237dd812a4827eb5940d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Monster.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Monster.java
@@ -143,7 +143,7 @@ public abstract class Monster extends PathfinderMob implements Enemy {
}
@Override
- public ItemStack getProjectile(ItemStack stack) {
+ public final ItemStack getProjectile(final ItemStack stack, final boolean bundle, final boolean shrink) { // Plazma - Bundle as quivers!
if (stack.getItem() instanceof ProjectileWeaponItem) {
Predicate<ItemStack> predicate = ((ProjectileWeaponItem)stack.getItem()).getSupportedHeldProjectiles();
ItemStack itemStack = ProjectileWeaponItem.getHeldProjectile(this, predicate);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 4ea1a327c80f915aa45ccf3a5955ed6ff42692c1..121c2a78b0ae30785dcb3587cfd228d049e10993 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2321,30 +2321,49 @@ public abstract class Player extends LivingEntity {
// Paper end - PlayerReadyArrowEvent
@Override
- public ItemStack getProjectile(ItemStack stack) {
- if (!(stack.getItem() instanceof ProjectileWeaponItem)) {
- return ItemStack.EMPTY;
- } else {
- Predicate<ItemStack> predicate = ((ProjectileWeaponItem) stack.getItem()).getSupportedHeldProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper - PlayerReadyArrowEvent
- ItemStack itemstack1 = ProjectileWeaponItem.getHeldProjectile(this, predicate);
+ // Plazma start - Bundle as quivers!
+ public final ItemStack getProjectile(final ItemStack stack, final boolean bundle, final boolean shrink) {
+ if (!(stack.getItem() instanceof ProjectileWeaponItem weapon)) return ItemStack.EMPTY;
- if (!itemstack1.isEmpty()) {
- return itemstack1;
- } else {
- predicate = ((ProjectileWeaponItem) stack.getItem()).getAllSupportedProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper - PlayerReadyArrowEvent
+ Predicate<ItemStack> predicate = weapon.getSupportedHeldProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper - PlayerReadyArrowEvent
+ final ItemStack held = ProjectileWeaponItem.getHeldProjectile(this, predicate);
+ if (!held.isEmpty()) return held;
+
+ predicate = weapon.getAllSupportedProjectiles().and(item -> tryReadyArrow(stack, item)); // Paper - PlayerReadyArrowEvent
+ for (int i = 0; i < this.inventory.getContainerSize(); ++i) {
+ ItemStack item = this.inventory.getItem(i);
- for (int i = 0; i < this.inventory.getContainerSize(); ++i) {
- ItemStack itemstack2 = this.inventory.getItem(i);
+ if (bundle && item.getItem() instanceof net.minecraft.world.item.BundleItem) {
+ final net.minecraft.world.item.component.BundleContents contents = item.get(net.minecraft.core.component.DataComponents.BUNDLE_CONTENTS);
+ if (contents == null || contents.isEmpty()) continue;
- if (predicate.test(itemstack2)) {
- return itemstack2;
- }
+ final Optional<ItemStack> optional = contents.itemCopyStream().filter(predicate).findFirst();
+ if (optional.isEmpty()) continue;
+
+ final ItemStack first = optional.get();
+ if (shrink) {
+ final net.minecraft.world.item.component.BundleContents.Mutable mutable = new net.minecraft.world.item.component.BundleContents.Mutable(contents);
+ final ItemStack next = mutable.removeOne(first.copyAndClear());
+ if (next == null) continue;
+
+ next.shrink(1);
+ if (next.getCount() != 0) mutable.tryInsert(next);
+
+ item.set(net.minecraft.core.component.DataComponents.BUNDLE_CONTENTS, mutable.toImmutable());
}
- return this.abilities.instabuild ? new ItemStack(Items.ARROW) : ItemStack.EMPTY;
+ first.setCount(1);
+ return first;
+ }
+
+ if (predicate.test(item)) {
+ return item;
}
}
+
+ return this.abilities.instabuild ? new ItemStack(Items.ARROW) : ItemStack.EMPTY;
}
+ // Plazma end - Bundle as quivers!
@Override
public Vec3 getRopeHoldPosition(float delta) {
diff --git a/src/main/java/net/minecraft/world/item/BowItem.java b/src/main/java/net/minecraft/world/item/BowItem.java
index 58fa528e4b2589d362eb976afd6221cd94f2623c..6a2381e37709b05a9c5e49c34d549a6da1b8f388 100644
--- a/src/main/java/net/minecraft/world/item/BowItem.java
+++ b/src/main/java/net/minecraft/world/item/BowItem.java
@@ -27,7 +27,7 @@ public class BowItem extends ProjectileWeaponItem {
if (!(user instanceof Player player)) {
return false;
} else {
- ItemStack itemStack = player.getProjectile(stack);
+ ItemStack itemStack = player.getProjectile(stack, world.plazmaConfig().item.bundleAsQuivers.enableForBow, net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, stack) == 0); // Plazma - Bundle as quivers!
// Purpur start
if (world.purpurConfig.infinityWorksWithoutArrows && itemStack.isEmpty() && net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, stack) > 0) {
itemStack = new ItemStack(Items.ARROW);
@@ -93,7 +93,7 @@ public class BowItem extends ProjectileWeaponItem {
@Override
public InteractionResult use(Level world, Player user, InteractionHand hand) {
ItemStack itemStack = user.getItemInHand(hand);
- boolean bl = !user.getProjectile(itemStack).isEmpty();
+ boolean bl = !user.getProjectile(itemStack, world.plazmaConfig().item.bundleAsQuivers.enableForBow, false).isEmpty();
if (!user.hasInfiniteMaterials() && !bl && !(world.purpurConfig.infinityWorksWithoutArrows && net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, itemStack) > 0)) { // Purpur
return InteractionResult.FAIL;
} else {
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
index f8946704838d96ad522182d2b9f41ac8bfe92ac4..c46b5e6fb007280b1ff264414c9acaf8a5f49101 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
@@ -72,7 +72,7 @@ public class CrossbowItem extends ProjectileWeaponItem {
if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) {
this.performShooting(world, user, hand, itemStack, getShootingPower(chargedProjectiles), (float) world.purpurConfig.crossbowProjectileOffset, null); // Purpur
return InteractionResult.CONSUME;
- } else if (!user.getProjectile(itemStack).isEmpty()) {
+ } else if (!user.getProjectile(itemStack, world.plazmaConfig().item.bundleAsQuivers.enableForCrossbow, false).isEmpty() || net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, itemStack) > 0 && world.plazmaConfig().item.allowCrossbowInfinity) { // Plazma - Bundle as quivers!
this.startSoundPlayed = false;
this.midLoadSoundPlayed = false;
user.startUsingItem(hand);
@@ -124,7 +124,11 @@ public class CrossbowItem extends ProjectileWeaponItem {
return CrossbowItem.tryLoadProjectiles(shooter, crossbow, true);
}
private static boolean tryLoadProjectiles(LivingEntity shooter, ItemStack crossbow, boolean consume) {
- List<ItemStack> list = draw(crossbow, shooter.getProjectile(crossbow), shooter, consume);
+ // Plazma start - Bundle as quivers!
+ boolean infinity = net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY, crossbow) > 0 && shooter.level().plazmaConfig().item.allowCrossbowInfinity;
+ List<ItemStack> list = draw(crossbow, shooter.getProjectile(crossbow, shooter.level().plazmaConfig().item.bundleAsQuivers.enableForBow, !infinity), shooter, consume);
+ if (list.isEmpty() && infinity) list = List.of(new ItemStack(Items.ARROW));
+ // Plazma end - Bundle as quivers!
// Paper end - Add EntityLoadCrossbowEvent
if (!list.isEmpty()) {
crossbow.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.of(list));
diff --git a/src/main/java/net/minecraft/world/item/component/BundleContents.java b/src/main/java/net/minecraft/world/item/component/BundleContents.java
index d4e7e92875162b67226a20c5add8973e09fd882c..6e57ed3b395b0155bdf13129c11ee8ddf4a68199 100644
--- a/src/main/java/net/minecraft/world/item/component/BundleContents.java
+++ b/src/main/java/net/minecraft/world/item/component/BundleContents.java
@@ -157,7 +157,13 @@ public final class BundleContents implements TooltipComponent {
}
private int findStackIndex(ItemStack stack) {
- if (!stack.isStackable()) {
+ // Plazma start - Bundle as quivers!
+ return this.findStackIndex(stack, false);
+ }
+
+ private int findStackIndex(final ItemStack stack, final boolean skipStackableCheck) {
+ if (!skipStackableCheck && !stack.isStackable()) {
+ // Plazma end - Bundle as quivers!
return -1;
} else {
for (int i = 0; i < this.items.size(); i++) {
@@ -211,11 +217,20 @@ public final class BundleContents implements TooltipComponent {
@Nullable
public ItemStack removeOne() {
+ // Plazma start - Bundle as quivers!
+ return this.removeOne(null);
+ }
+
+ @Nullable
+ public ItemStack removeOne(final @Nullable ItemStack stack) {
+ // Plazma end - Bundle as quivers!
if (this.items.isEmpty()) {
return null;
} else {
- int i = this.selectedItem != -1 && this.selectedItem < this.items.size() ? this.selectedItem : 0;
- ItemStack itemStack = this.items.remove(i).copy();
+ // Plazma start - Bundle as quivers!
+ int i = stack != null ? this.findStackIndex(stack, true) : this.selectedItem != -1 && this.selectedItem < this.items.size() ? this.selectedItem : 0;
+ ItemStack itemStack = this.items.remove(i != -1 ? i : 0).copy();
+ // Plazma end - Bundle as quivers!
this.weight = this.weight.subtract(BundleContents.getWeight(itemStack).multiplyBy(Fraction.getFraction(itemStack.getCount(), 1)));
this.toggleSelectedItem(-1);
return itemStack;
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index e88b18ff76bf21d9fa340a1d58abedefbf30ec91..8daf361f82af8d41661d8c5afe717c8a90803dfe 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -104,6 +104,7 @@ public class WorldConfigurations extends ConfigurationPart {
public class Item extends ConfigurationPart {
public boolean skipMapUpdateIfCraftRenderIsNull = true;
+ public boolean allowCrossbowInfinity = false;
public ShootableFireCharge shootableFireCharge;
public class ShootableFireCharge extends ConfigurationPart {
@@ -125,6 +126,14 @@ public class WorldConfigurations extends ConfigurationPart {
}
+ public BundleAsQuivers bundleAsQuivers;
+ public class BundleAsQuivers extends ConfigurationPart {
+
+ public boolean enableForBow = false;
+ public boolean enableForCrossbow = false;
+
+ }
+
}
}

View File

@@ -0,0 +1,227 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 14 Dec 2024 00:29:15 +0900
Subject: [PATCH] Implement CarpetFixes
diff --git a/src/main/java/net/minecraft/world/entity/animal/Sheep.java b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
index 0503f936d0d7194f110069adabff984f51af0a3a..0ca88636cca9b8f93cddf8bc58038e626e171df8 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
@@ -379,19 +379,22 @@ public class Sheep extends Animal implements Shearable {
}
private DyeColor getOffspringColor(ServerLevel world, Sheep firstParent, Sheep secondParent) {
- DyeColor enumcolor = firstParent.getColor();
- DyeColor enumcolor1 = secondParent.getColor();
- CraftingInput craftinginput = Sheep.makeCraftInput(enumcolor, enumcolor1);
- Optional<Item> optional = world.recipeAccess().getRecipeFor(RecipeType.CRAFTING, craftinginput, world).map((recipeholder) -> { // CraftBukkit - decompile error
- return ((CraftingRecipe) recipeholder.value()).assemble(craftinginput, world.registryAccess());
- }).map(ItemStack::getItem);
-
- Objects.requireNonNull(DyeItem.class);
- optional = optional.filter(DyeItem.class::isInstance);
- Objects.requireNonNull(DyeItem.class);
- return (DyeColor) optional.map(DyeItem.class::cast).map(DyeItem::getDyeColor).orElseGet(() -> {
- return world.random.nextBoolean() ? enumcolor : enumcolor1;
- });
+ // Plazma start - Implement CarpetFixes
+ final DyeColor firstColor = firstParent.getColor();
+ final DyeColor secondColor = secondParent.getColor();
+// PLAZMA - REMOVE THIS
+ if (world.plazmaConfig().carpetFixes.preparedSheepChildColor) {
+ final DyeColor color = org.plazmamc.plazma.util.CarpetFixes.properDyeMixin(firstColor, secondColor);
+ if (color != null) return color;
+ return world.random.nextBoolean() ? firstColor : secondColor;
+ }
+// PLAZMA - REMOVE THIS
+ final CraftingInput input = Sheep.makeCraftInput(firstColor, secondColor);
+// PLAZMA - REMOVE THIS
+ Optional<Item> result = world.recipeAccess().getRecipeFor(RecipeType.CRAFTING, input, world).map((recipeholder) -> recipeholder.value().assemble(input, world.registryAccess())).map(ItemStack::getItem);
+ result = result.filter(DyeItem.class::isInstance);
+ return result.map(DyeItem.class::cast).map(DyeItem::getDyeColor).orElseGet(() -> world.random.nextBoolean() ? firstColor : secondColor);
+ // Plazma end - Implement CarpetFixes
}
private static CraftingInput makeCraftInput(DyeColor firstColor, DyeColor secondColor) {
diff --git a/src/main/java/net/minecraft/world/level/biome/BiomeManager.java b/src/main/java/net/minecraft/world/level/biome/BiomeManager.java
index 90f8360f547ce709fd13ee34f8e67d8bfa94b498..4e5fb377696c0a98a56f9ea11d0116b28399c8f6 100644
--- a/src/main/java/net/minecraft/world/level/biome/BiomeManager.java
+++ b/src/main/java/net/minecraft/world/level/biome/BiomeManager.java
@@ -9,6 +9,8 @@ import net.minecraft.util.Mth;
public class BiomeManager {
public static final int CHUNK_CENTER_QUART = QuartPos.fromBlock(8);
+ public static boolean PLAZMA_CARPET_FIXES = false; // Plazma - Implement CarpetFixes
+ private static final double MAX_OFFSET = 0.450_000_000_1; // Plazma - Implement CarpetFixes
private static final int ZOOM_BITS = 2;
private static final int ZOOM = 4;
private static final int ZOOM_MASK = 3;
@@ -29,6 +31,79 @@ public class BiomeManager {
}
public Holder<Biome> getBiome(BlockPos pos) {
+ // Plazma start - Implement CarpetFixes
+ if (PLAZMA_CARPET_FIXES) {
+ final int x2 = pos.getX() - 2;
+ final int y2 = pos.getY() - 2;
+ final int z2 = pos.getZ() - 2;
+
+ final int x = x2 >> 2;
+ final int y = y2 >> 2;
+ final int z = z2 >> 2;
+
+ final double qX = (x2 & 3) / 4.0D;
+ final double qY = (y2 & 3) / 4.0D;
+ final double qZ = (z2 & 3) / 4.0D;
+
+ int minX = 0;
+ double minD = Double.POSITIVE_INFINITY;
+ for (int bX = 0; bX < 8; ++bX) {
+ final boolean x0 = (bX & 4) == 0;
+ final boolean y0 = (bX & 2) == 0;
+ final boolean z0 = (bX & 1) == 0;
+
+ final double x1 = x0 ? qX : qX - 1.0D;
+ final double y1 = y0 ? qY : qY - 1.0D;
+ final double z1 = z0 ? qZ : qZ - 1.0D;
+
+ double maxQY = 0.0D;
+ double maxQZ = 0.0D;
+ if (bX != 0) {
+ final double maxQX = Mth.square(Math.max(x1 + MAX_OFFSET, Math.abs(x1 - MAX_OFFSET)));
+ maxQY = Mth.square(Math.max(y1 + MAX_OFFSET, Math.abs(y1 - MAX_OFFSET)));
+ maxQZ = Mth.square(Math.max(z1 + MAX_OFFSET, Math.abs(z1 - MAX_OFFSET)));
+
+ if (minD < maxQY + maxQZ + maxQX) continue;
+ }
+
+ int pX = x0 ? x : x + 1;
+ int pY = y0 ? y : y + 1;
+ int pZ = z0 ? z : z + 1;
+
+ long seed = this.biomeZoomSeed;
+ seed = LinearCongruentialGenerator.next(seed, pX);
+ seed = LinearCongruentialGenerator.next(seed, pY);
+ seed = LinearCongruentialGenerator.next(seed, pZ);
+ seed = LinearCongruentialGenerator.next(seed, pX);
+ seed = LinearCongruentialGenerator.next(seed, pY);
+ seed = LinearCongruentialGenerator.next(seed, pZ);
+
+ double dX = getFiddle(seed);
+ double sX = Mth.square(x1 + dX);
+ if (bX != 0 && minD < sX + maxQY + maxQZ) continue;
+
+ seed = LinearCongruentialGenerator.next(seed, this.biomeZoomSeed);
+ double dY = getFiddle(seed);
+ double sY = Mth.square(y1 + dY);
+ if (bX != 0 && minD < sX + sY + maxQZ) continue;
+
+ seed = LinearCongruentialGenerator.next(seed, this.biomeZoomSeed);
+ double dZ = getFiddle(seed);
+ double bD = sX + sY + Mth.square(z1 + dZ);
+
+ if (minD <= bD) continue;
+ minX = bX;
+ minD = bD;
+ }
+
+ return this.noiseBiomeSource.getNoiseBiome(
+ (minX & 4) == 0 ? x : x + 1,
+ (minX & 2) == 0 ? y : y + 1,
+ (minX & 1) == 0 ? z : z + 1
+ );
+ }
+ // Plazma end - Implement CarpetFixes
+
int i = pos.getX() - 2;
int j = pos.getY() - 2;
int k = pos.getZ() - 2;
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 538c572661bd92666f84e6f9ef3e9760f69f50a9..db31d0c066e92fe308e7e64075e832bec66a5c02 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -188,4 +188,16 @@ public class GlobalConfiguration extends ConfigurationPart {
}
+ public CarpetFixes carpetFixes;
+ public class CarpetFixes extends ConfigurationPart {
+
+ boolean optimizeBiomeAccess = OPTIMIZE;
+
+ @PostProcess
+ void post() {
+ net.minecraft.world.level.biome.BiomeManager.PLAZMA_CARPET_FIXES = this.optimizeBiomeAccess;
+ }
+
+ }
+
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index 36345efa302413ad4e7d6e611d182572622f76ff..d314be46a02d73e669088d3a37937c8751f7735d 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -126,4 +126,11 @@ public class WorldConfigurations extends ConfigurationPart {
}
+ public CarpetFixes carpetFixes;
+ public class CarpetFixes extends ConfigurationPart {
+
+ public boolean preparedSheepChildColor = OPTIMIZE;
+
+ }
+
}
diff --git a/src/main/java/org/plazmamc/plazma/util/CarpetFixes.java b/src/main/java/org/plazmamc/plazma/util/CarpetFixes.java
new file mode 100644
index 0000000000000000000000000000000000000000..a5b0ce75a0ffa65e357cde2d55b7a0f116a2afad
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/util/CarpetFixes.java
@@ -0,0 +1,45 @@
+package org.plazmamc.plazma.util;
+
+import net.minecraft.world.item.DyeColor;
+
+public interface CarpetFixes {
+
+ static DyeColor properDyeMixin(DyeColor firstColor, DyeColor secondColor) {
+ if (firstColor.equals(secondColor)) return firstColor;
+
+ return switch (firstColor) {
+ case WHITE -> switch (secondColor) {
+ case BLUE -> DyeColor.LIGHT_BLUE;
+ case GRAY -> DyeColor.LIGHT_GRAY;
+ case BLACK -> DyeColor.GRAY;
+ case GREEN -> DyeColor.LIME;
+ case RED -> DyeColor.PINK;
+ default -> null;
+ };
+ case BLUE -> switch (secondColor) {
+ case WHITE -> DyeColor.LIGHT_BLUE;
+ case GREEN -> DyeColor.CYAN;
+ case RED -> DyeColor.PURPLE;
+ default -> null;
+ };
+ case RED -> switch (secondColor) {
+ case YELLOW -> DyeColor.ORANGE;
+ case WHITE -> DyeColor.PINK;
+ case BLUE -> DyeColor.PURPLE;
+ default -> null;
+ };
+ case GREEN -> switch (secondColor) {
+ case BLUE -> DyeColor.CYAN;
+ case WHITE -> DyeColor.LIME;
+ default -> null;
+ };
+ case YELLOW -> secondColor.equals(DyeColor.RED) ? DyeColor.ORANGE : null;
+ case PURPLE -> secondColor.equals(DyeColor.PINK) ? DyeColor.MAGENTA : null;
+ case PINK -> secondColor.equals(DyeColor.PURPLE) ? DyeColor.MAGENTA : null;
+ case GRAY -> secondColor.equals(DyeColor.WHITE) ? DyeColor.LIGHT_GRAY : null;
+ case BLACK -> secondColor.equals(DyeColor.WHITE) ? DyeColor.GRAY : null;
+ default -> null;
+ };
+ }
+
+}

View File

@@ -0,0 +1,152 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 11 Jan 2024 13:40:41 +0900
Subject: [PATCH] Save Json list asynchronously
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
index 22c4f8dea99f92a1eb3da2baf0a15bf9d2ca0462..20c531f11b310dab0a867e589c769393ed835df5 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
@@ -58,21 +58,23 @@ public class DedicatedPlayerList extends PlayerList {
this.loadWhiteList();
}
+ // Plazma start - Save JSON list asynchronously
private void saveIpBanList() {
- try {
- this.getIpBans().save();
- } catch (IOException var2) {
- LOGGER.warn("Failed to save ip banlist: ", (Throwable)var2);
- }
+ this.getIpBans().save();
}
private void saveUserBanList() {
- try {
- this.getBans().save();
- } catch (IOException var2) {
- LOGGER.warn("Failed to save user banlist: ", (Throwable)var2);
- }
+ this.getBans().save();
+ }
+
+ private void saveOps() {
+ this.getOps().save();
+ }
+
+ private void saveWhiteList() {
+ this.getWhiteList().save();
}
+ // Plazma end - Save JSON list asynchronously
private void loadIpBanList() {
try {
@@ -98,14 +100,6 @@ public class DedicatedPlayerList extends PlayerList {
}
}
- private void saveOps() {
- try {
- this.getOps().save();
- } catch (Exception var2) {
- LOGGER.warn("Failed to save operators list: ", (Throwable)var2);
- }
- }
-
private void loadWhiteList() {
try {
this.getWhiteList().load();
@@ -114,14 +108,6 @@ public class DedicatedPlayerList extends PlayerList {
}
}
- private void saveWhiteList() {
- try {
- this.getWhiteList().save();
- } catch (Exception var2) {
- LOGGER.warn("Failed to save white-list: ", (Throwable)var2);
- }
- }
-
@Override
public boolean isWhiteListed(GameProfile profile) {
return !this.isUsingWhitelist() || this.isOp(profile) || this.getWhiteList().isWhiteListed(profile);
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
index c038da20b76c0b7b1c18471b20be01e849d29f3a..0735a0bd182635e1969d19336b46bc72b14e555f 100644
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
@@ -42,13 +42,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
public void add(V entry) {
this.map.put(this.getKeyForUser(entry.getUser()), entry);
-
- try {
- this.save();
- } catch (IOException ioexception) {
- StoredUserList.LOGGER.warn("Could not save the list after adding a user.", ioexception);
- }
-
+ this.save(); // Plazma - Save Json list asynchronously
}
@Nullable
@@ -62,13 +56,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
public void remove(K key) {
this.map.remove(this.getKeyForUser(key));
-
- try {
- this.save();
- } catch (IOException ioexception) {
- StoredUserList.LOGGER.warn("Could not save the list after removing a user.", ioexception);
- }
-
+ this.save(); // Plazma - Save Json list asynchronously
}
public void remove(StoredUserEntry<K> entry) {
@@ -102,7 +90,9 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
return this.map.values();
}
- public void save() throws IOException {
+ // Plazma start - Save Json list asynchronously
+ public void save()/* throws IOException*/ {
+ io.papermc.paper.util.MCUtil.scheduleAsyncTask(() -> {
this.removeExpired(); // Paper - remove expired values before saving
JsonArray jsonarray = new JsonArray();
Stream<JsonObject> stream = this.map.values().stream().map((jsonlistentry) -> { // CraftBukkit - decompile error
@@ -114,27 +104,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
Objects.requireNonNull(jsonarray);
stream.forEach(jsonarray::add);
- BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8);
- try {
+ try (BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8)) {
StoredUserList.GSON.toJson(jsonarray, StoredUserList.GSON.newJsonWriter(bufferedwriter));
- } catch (Throwable throwable) {
- if (bufferedwriter != null) {
- try {
- bufferedwriter.close();
- } catch (Throwable throwable1) {
- throwable.addSuppressed(throwable1);
- }
- }
-
- throw throwable;
- }
-
- if (bufferedwriter != null) {
- bufferedwriter.close();
+ } catch (IOException e) {
+ StoredUserList.LOGGER.warn("Failed to asynchronously save file " + this.file, e);
}
+ });
}
+ // Plazma end - Save Json list asynchronously
public void load() throws IOException {
if (this.file.exists()) {

View File

@@ -0,0 +1,69 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sat, 26 Oct 2024 18:09:08 +0900
Subject: [PATCH] Load player data asynchronously
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 16069b9cbf6c7679c28a2e9a54e77d23cd10e541..bb10892f33ba0d7fc3959debef1045073868f8b8 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -76,7 +76,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
// CraftBukkit end
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
static final Logger LOGGER = LogUtils.getLogger();
- private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
+ public static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads // Plazma - private -> public
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
private final byte[] challenge;
final MinecraftServer server;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index aead28160c7a5067340ec80a833eafcab1817d67..c18868796957c0756aca3b5a15fd0d0c8a5221f4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -183,6 +183,16 @@ public abstract class PlayerList {
abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
+ // Plazma start - load player information asynchronously
+ if (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.loadAsynchronously)
+ this.placeNewPlayer(connection, player, clientData, this.load(player));
+ else java.util.concurrent.CompletableFuture
+ .supplyAsync(() -> this.load(player), net.minecraft.server.network.ServerLoginPacketListenerImpl.authenticatorPool)
+ .thenAcceptAsync(nbt -> this.placeNewPlayer(connection, player, clientData, nbt), this.server);
+ }
+
+ private void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData, Optional<CompoundTag> optional) {
+ // Plazma end - load player information asynchronously
player.isRealPlayer = true; // Paper
player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed
GameProfile gameprofile = player.getGameProfile();
@@ -191,14 +201,13 @@ public abstract class PlayerList {
String s;
if (usercache != null) {
- Optional<GameProfile> optional = usercache.get(gameprofile.getId()); // CraftBukkit - decompile error
- s = (String) optional.map(GameProfile::getName).orElse(gameprofile.getName());
+ s = usercache.get(gameprofile.getId()).map(GameProfile::getName).orElse(gameprofile.getName()); // CraftBukkit - decompile error // Plazma - varname conflict
usercache.add(gameprofile);
} else {
s = gameprofile.getName();
}
- Optional<CompoundTag> optional = this.load(player); // CraftBukkit - decompile error
+ // Optional<CompoundTag> optional = this.load(player); // CraftBukkit - decompile error // Plazma - extract
ResourceKey<Level> resourcekey = null; // Paper
// CraftBukkit start - Better rename detection
if (optional.isPresent()) {
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 14ba63f5ef6ad5d96972b18e1174a8a94491fa57..c2f3facf65aa2682306c64c3466357461a76f267 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -44,6 +44,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Player extends ConfigurationPart {
public boolean checkSpectatorMovedToQuickly = !OPTIMIZE;
+ public boolean loadAsynchronously = OPTIMIZE;
public FreedomChat freedomChat;
public class FreedomChat extends ConfigurationPart {

View File

@@ -0,0 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 25 Oct 2024 19:11:40 +0900
Subject: [PATCH] Reset dirty flag when loading maps from the disk
Based on SparklyPaper, Copyright (C) 2024 SparklyPower
commit: c023b928439b9c71277f27cc9b5bd36ca32624ea
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
index 26da9e7c25ef6a89482838010d8ed6bcf8c87511..71aa3b9c5604f832e764e0d7a93da467ffe7dee1 100644
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
@@ -209,6 +209,7 @@ public class MapItemSavedData extends SavedData {
}
}
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.resetDirtyWhenLoadingMapsFromDisk) worldmap.setDirty(false); // Plazma - Reset dirty flag when loading maps from the disk
return worldmap;
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index a0b1239e302f0366743949a895a0539348817077..14ba63f5ef6ad5d96972b18e1174a8a94491fa57 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -130,6 +130,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public Miscellaneous misc;
public class Miscellaneous extends ConfigurationPart {
+ public boolean resetDirtyWhenLoadingMapsFromDisk = false;
}

View File

@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 25 Oct 2024 19:13:21 +0900
Subject: [PATCH] Allow throttling hopper checks if the target container is
full
Based on SparklyPaper, Copyright (C) 2024 SparklyPower.
commit: c023b928439b9c71277f27cc9b5bd36ca32624ea
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 5ebbdb94d9b91c442ff60eb6872f740ebd790fa0..aeeb8af68ea43ae6c93952610918d77b1593ed54 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -441,6 +441,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
Direction enumdirection = blockEntity.facing.getOpposite();
if (HopperBlockEntity.isFullContainer(iinventory, enumdirection)) {
+ if (world.plazmaConfig().block.hopper.fullCooldown != 0) blockEntity.setCooldown(world.plazmaConfig().block.hopper.fullCooldown); // Plazma - Allow throttling hopper checks if the target container is full
return false;
} else {
// Paper start - Perf: Optimize Hoppers
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index d366e8755ba91c329164c16659f6b07245577fba..f21ed3431fd8472c78c15578bbd12214c499ceea 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -64,6 +64,12 @@ public class WorldConfigurations extends ConfigurationPart {
public Block block;
public class Block extends ConfigurationPart {
+ public Hopper hopper;
+ public class Hopper extends ConfigurationPart {
+
+ public int fullCooldown = 0;
+
+ }
}

View File

@@ -0,0 +1,117 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 21:10:27 +0900
Subject: [PATCH] Port minor SparklyPaper patches
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 2bec5ed591e658765602379f9065b8089f5df6ea..ddcf301f098bbe55dbef7751180110a22bccc68d 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -58,6 +58,7 @@ import org.bukkit.event.player.PlayerVelocityEvent;
public class ServerEntity {
+ public static boolean PLAZMA_DISTANCE_SQR = false; // Plazma - Port Minor SparklyPaper patches; Skip distanceToSqr if the delta is the same
private static final Logger LOGGER = LogUtils.getLogger();
private static final int TOLERANCE_LEVEL_ROTATION = 1;
private static final double TOLERANCE_LEVEL_POSITION = 7.62939453125E-6D;
@@ -232,6 +233,7 @@ public class ServerEntity {
if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity) this.entity).isFallFlying()) {
Vec3 vec3d1 = this.entity.getDeltaMovement();
+ if (PLAZMA_DISTANCE_SQR || vec3d1 != this.lastSentMovement) { // Plazma - Port Minor SparklyPaper patches; Skip distanceToSqr if the delta is the same
double d0 = vec3d1.distanceToSqr(this.lastSentMovement);
if (d0 > 1.0E-7D || d0 > 0.0D && vec3d1.lengthSqr() == 0.0D) {
@@ -246,6 +248,7 @@ public class ServerEntity {
this.broadcast.accept(new ClientboundSetEntityMotionPacket(this.entity.getId(), this.lastSentMovement));
}
}
+ } // Plazma - Port Minor SparklyPaper patches; Skip distanceToSqr if the delta is the same
}
if (packet1 != null) {
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
index da7e1a69ecb4e6b3be2d8544ac406aa519bd196e..ce56fdd0bbe1c95146c88594c68a6a399f01218e 100644
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
@@ -90,12 +90,14 @@ public class ServerStatsCounter extends StatsCounter {
this.dirty.add(stat);
}
+ /* // Plazma - Port Minor SparklyPaper patches; Skip dirty stats copy when requesting player stats
private Set<Stat<?>> getDirty() {
Set<Stat<?>> set = Sets.newHashSet(this.dirty);
this.dirty.clear();
return set;
}
+ */ // Plazma - Port Minor SparklyPaper patches; Skip dirty stats copy when requesting player stats
public void parseLocal(DataFixer dataFixer, String json) {
try {
@@ -242,14 +244,12 @@ public class ServerStatsCounter extends StatsCounter {
}
public void sendStats(ServerPlayer player) {
- Object2IntMap<Stat<?>> object2intmap = new Object2IntOpenHashMap();
- Iterator iterator = this.getDirty().iterator();
+ // Plazma start - Port Minor SparklyPaper patches; Skip dirty stats copy when requesting player stats
+ Object2IntMap<Stat<?>> object2intmap = new Object2IntOpenHashMap<>();
+ for (final Stat<?> stat : this.dirty) object2intmap.put(stat, this.getValue(stat));
- while (iterator.hasNext()) {
- Stat<?> statistic = (Stat) iterator.next();
-
- object2intmap.put(statistic, this.getValue(statistic));
- }
+ this.dirty.clear();
+ // Plazma end - Port Minor SparklyPaper patches; Skip dirty stats copy when requesting player stats
player.connection.send(new ClientboundAwardStatsPacket(object2intmap));
}
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
index 68a0aa6545c8aba3ecc31086a8d2bc3e1aada64e..4b9fbb4b1ad434ea06a44e30e66c394b07be7b7f 100644
--- a/src/main/java/net/minecraft/world/item/MapItem.java
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
@@ -276,7 +276,12 @@ public class MapItem extends Item {
mapItemSavedData.tickCarriedBy(player, stack);
}
- if (!mapItemSavedData.locked && (selected || entity instanceof Player && ((Player)entity).getOffhandItem() == stack)) {
+ // Plazma start - Port Minor SparklyPaper patches; Skip map update if the craft renderer is null
+ if (!mapItemSavedData.locked
+ && (!world.plazmaConfig().item.skipMapUpdateIfCraftRenderIsNull || mapItemSavedData.mapView.getRenderers().stream().anyMatch(renderer -> renderer instanceof org.bukkit.craftbukkit.map.CraftMapRenderer))
+ && (selected || entity instanceof Player player && player.getOffhandItem() == stack)
+ ) {
+ // Plazma end - Port Minor SparklyPaper patches; Skip map update if the craft renderer is null
this.update(world, entity, mapItemSavedData);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
index 8149b9c51b78eb5c689b7218a2ca3aab60e73bcf..125a4f13dbe98976c4cf94bb523463a51bd4f8dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
@@ -145,7 +145,7 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
}
@Override
- public boolean isCached() {
+ public synchronized boolean isCached() { // Plazma - Port Minor SparklyPaper patches; Fix concurrency issues when using "imageToBytes" in multiple threads
return this.cached || (!this.running.get() && this.initCache().isDone());
}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index bbb51ccf2016987202811ee893f855da2612dd17..f6f372644bca9111aa3f45bf7ae8e66e53d11505 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -86,6 +86,8 @@ public class WorldConfigurations extends ConfigurationPart {
public Item item;
public class Item extends ConfigurationPart {
+ public boolean skipMapUpdateIfCraftRenderIsNull = true;
+
public ShootableFireCharge shootableFireCharge;
public class ShootableFireCharge extends ConfigurationPart {

View File

@@ -0,0 +1,317 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 21:00:07 +0900
Subject: [PATCH] SparklyPaper - Optimize framed map tracker ticking
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index ddcf301f098bbe55dbef7751180110a22bccc68d..92422a9251be5c6334b55f47079f8c8e72439aef 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -129,33 +129,31 @@ public class ServerEntity {
Entity entity = this.entity;
- if (!this.trackedPlayers.isEmpty() && entity instanceof ItemFrame entityitemframe) { // Paper - Perf: Only tick item frames if players can see it
- if (true || this.tickCount % 10 == 0) { // CraftBukkit - Moved below, should always enter this block
- ItemStack itemstack = entityitemframe.getItem();
-
- if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
- MapId mapid = entityitemframe.cachedMapId; // Paper - Perf: Cache map ids on item frames
- MapItemSavedData worldmap = MapItem.getSavedData(mapid, this.level);
-
- if (worldmap != null) {
- Iterator<ServerPlayerConnection> iterator = this.trackedPlayers.iterator(); // CraftBukkit
-
- while (iterator.hasNext()) {
- ServerPlayer entityplayer = iterator.next().getPlayer(); // CraftBukkit
-
- worldmap.tickCarriedBy(entityplayer, itemstack);
- Packet<?> packet = worldmap.getUpdatePacket(mapid, entityplayer);
+ // Plazma start - Optimize framed map tracker ticking
+ if (!this.trackedPlayers.isEmpty() && entity instanceof ItemFrame frame && frame.cachedMapId != null) { // Paper - Perf: Only tick item frames if players can see it
+ if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
+ MapId id = frame.cachedMapId; // Paper - Perf: Cache map ids on item frames
+ MapItemSavedData data = MapItem.getSavedData(id, this.level);
+
+ if (data != null) for (final ServerPlayerConnection trackedPlayer : this.trackedPlayers) {
+ if (!data.hasContextualRenderer) {
+ // Pass in a "random" player when a non-contextual plugin renderer is added to make sure it is called
+ final Packet<?> updatePacket = data.framedUpdatePacket(id, data.hasPluginRenderer ? com.google.common.collect.Iterables.getFirst(this.trackedPlayers, null).getPlayer() : null);
+
+ if (updatePacket != null)
+ for (ServerPlayerConnection connection : this.trackedPlayers) connection.send(updatePacket);
+ } else {
+ ServerPlayer player = trackedPlayer.getPlayer(); // CraftBukkit
+ Packet<?> packet = data.getUpdatePacket(id, player);
- if (packet != null) {
- entityplayer.connection.send(packet);
- }
- }
+ if (packet != null) player.connection.send(packet);
}
}
-
- this.sendDirtyEntityData();
}
+
+ this.sendDirtyEntityData();
}
+ // Plazma end - Optimize framed map tracker ticking
if (this.forceStateResync || this.tickCount % this.updateInterval == 0 || this.entity.hasImpulse || this.entity.getEntityData().isDirty()) { // Paper - fix desync when a player is added to the tracker
byte b0 = Mth.packDegrees(this.entity.getYRot());
@@ -426,6 +424,16 @@ public class ServerEntity {
}
}
+ // Plazma start - Optimize framed map tracker adding
+ if (this.entity instanceof ItemFrame frame && frame.cachedMapId != null) {
+ MapItemSavedData mapData = MapItem.getSavedData(frame.cachedMapId, this.level);
+ if (mapData == null) return;
+
+ mapData.addFrameDecoration(frame);
+ final Packet<?> mapPacket = mapData.fullUpdatePacket(frame.cachedMapId, mapData.hasPluginRenderer ? player : null);
+ if (mapPacket != null) sender.accept((Packet<ClientGamePacketListener>) mapPacket);
+ }
+ // Plazma end - Optimize framed map tracker adding
}
public Vec3 getPositionBase() {
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
index ad3f17ee59e2508886551204b87d95482ce9b100..360289fea15e1097068bc4898c5b1b3e3aaf58ad 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -175,6 +175,16 @@ public class ItemFrame extends HangingEntity {
this.setItem(ItemStack.fromBukkitCopy(event.getItemStack()), false);
}
// Paper end - Add PlayerItemFrameChangeEvent
+ // Plazma start - Optimize framed map tracker ticking
+ final ItemStack item = this.getItem();
+ if (item.is(Items.FILLED_MAP)) {
+ final MapItemSavedData data = MapItem.getSavedData(item, this.level());
+ if (data != null) {
+ data.addFrameDecoration(this);
+ data.markAllDirty();
+ }
+ }
+ // Plazma end - Optimize framed map tracker ticking
this.dropItem(world, source.getEntity(), false);
this.gameEvent(GameEvent.BLOCK_CHANGE, source.getEntity());
this.playSound(this.getRemoveItemSound(), 1.0F, 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
index 71aa3b9c5604f832e764e0d7a93da467ffe7dee1..e1440d1fc32229867e1f1543961fdfcec99a36fd 100644
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
@@ -80,12 +80,22 @@ public class MapItemSavedData extends SavedData {
public final Map<String, MapDecoration> decorations = Maps.newLinkedHashMap();
private final Map<String, MapFrame> frameMarkers = Maps.newHashMap();
private int trackedDecorationCount;
- private org.bukkit.craftbukkit.map.RenderData vanillaRender = new org.bukkit.craftbukkit.map.RenderData(); // Paper
+ private final org.bukkit.craftbukkit.map.RenderData vanillaRender = new org.bukkit.craftbukkit.map.RenderData(); // Paper // Plazma - Improve code styling
public boolean isExplorerMap; // Purpur
+ // Plazma start - Optimize framed map tracker ticking; Shared between all players tracking this map inside an item frame
+ public boolean dirtyColorData;
+ public int minDirtyX;
+ public int minDirtyY;
+ public int maxDirtyX;
+ public int maxDirtyY;
+ public boolean dirtyFrameDecorations;
+ public boolean hasPluginRenderer;
+ public boolean hasContextualRenderer;
+ // Plazma end - Optimize framed map tracker ticking; Shared between all players tracking this map inside an item frame
// CraftBukkit start
public final CraftMapView mapView;
- private CraftServer server;
+ private final CraftServer server; // Plazma - Improve code styling
public UUID uniqueId = null;
public MapId id;
// CraftBukkit end
@@ -372,7 +382,7 @@ public class MapItemSavedData extends SavedData {
--this.trackedDecorationCount;
}
- if (mapicon != null) this.setDecorationsDirty(); // Paper - only mark dirty if a change occurs
+ if (mapicon != null && mapicon.renderOnFrame()) this.dirtyFrameDecorations = true; // Plazma - Optimize framed map tracker ticking
}
public static void addTargetDecoration(ItemStack stack, BlockPos pos, String id, Holder<MapDecorationType> decorationType) {
@@ -409,6 +419,7 @@ public class MapItemSavedData extends SavedData {
}
this.setDecorationsDirty();
+ if (mapicon.renderOnFrame()) this.dirtyFrameDecorations = true; // Plazma - Optimize framed map tracker ticking
}
}
@@ -480,14 +491,23 @@ public class MapItemSavedData extends SavedData {
public void setColorsDirty(int x, int z) {
this.setDirty();
- Iterator iterator = this.carriedBy.iterator();
-
- while (iterator.hasNext()) {
- MapItemSavedData.HoldingPlayer worldmap_worldmaphumantracker = (MapItemSavedData.HoldingPlayer) iterator.next();
-
- worldmap_worldmaphumantracker.markColorsDirty(x, z);
- }
-
+ // Plazma start - Optimize framed map tracker ticking
+ if (this.dirtyColorData) {
+ this.minDirtyX = Math.min(this.minDirtyX, x);
+ this.minDirtyY = Math.min(this.minDirtyY, z);
+ this.maxDirtyX = Math.max(this.maxDirtyX, x);
+ this.maxDirtyY = Math.max(this.maxDirtyY, z);
+ } else {
+ this.dirtyColorData = true;
+ this.minDirtyX = x;
+ this.minDirtyY = z;
+ this.maxDirtyX = x;
+ this.maxDirtyY = z;
+ } // diff on change
+ for (final HoldingPlayer tracker : this.carriedBy) {
+ tracker.markColorsDirty(x, z);
+ } // diff on change
+ // Plazma end - Optimize framed map tracker ticking
}
public void setDecorationsDirty() {
@@ -563,6 +583,7 @@ public class MapItemSavedData extends SavedData {
this.removeDecoration(MapItemSavedData.getFrameKey(id));
this.frameMarkers.remove(MapFrame.frameId(pos));
this.setDirty();
+ this.dirtyFrameDecorations = true; // Plazma - Optimize framed map tracker ticking
}
public boolean updateColor(int x, int z, byte color) {
@@ -776,4 +797,86 @@ public class MapItemSavedData extends SavedData {
}
}
+
+ // Plazma start - Optimize framed map tracker ticking
+ public final @Nullable Packet<?> framedUpdatePacket(MapId id, @Nullable Player player) {
+ return createUpdatePacket(id, player, false);
+ }
+
+ public final @Nullable Packet<?> fullUpdatePacket(MapId id, @Nullable Player player) {
+ return createUpdatePacket(id, player, true);
+ }
+
+ public final @Nullable Packet<?> createUpdatePacket(MapId id, @Nullable Player player, boolean full) {
+ if (!dirtyColorData && !dirtyFrameDecorations && (player == null || server.getCurrentTick() % 5 != 0) && !full)
+ // Periodically send update packets if a renderer is added
+ return null;
+
+ final org.bukkit.craftbukkit.map.RenderData render = player != null
+ ? this.mapView.render((org.bukkit.craftbukkit.entity.CraftPlayer) player.getBukkitEntity())
+ : this.vanillaRender;
+
+ final MapPatch patch;
+ if (full) {
+ patch = createPatch(render.buffer, 0, 0, 127, 127);
+ } else if (dirtyColorData) {
+ dirtyColorData = false;
+ patch = createPatch(render.buffer, this.minDirtyX, this.minDirtyY, this.maxDirtyX, this.maxDirtyY);
+ } else {
+ patch = null;
+ }
+
+ Collection<MapDecoration> decorations = null;
+ if (dirtyFrameDecorations || full || hasPluginRenderer) { // Always add decorations when a plugin renderer is added
+ dirtyFrameDecorations = false;
+ decorations = new java.util.ArrayList<>();
+
+ if (player == null) {
+ // Using the vanilla renderer, add in vanilla decorations
+ for (MapDecoration decoration : this.decorations.values()) {
+ // Skip sending decorations that are not rendered, i.e., player decorations.
+ // Skipping player decorations also allows sending the same update packet to all tracking players, the only issue
+ // being that it causes a slight flicker of the player decoration for anyone holding and looking at the map.
+ if (decoration.renderOnFrame()) decorations.add(decoration);
+ }
+ }
+
+ for (final org.bukkit.map.MapCursor cursor : render.cursors) {
+ if (cursor.isVisible()) continue;
+ decorations.add(new MapDecoration(CraftMapCursor.CraftType.bukkitToMinecraftHolder(cursor.getType()), cursor.getX(), cursor.getY(), cursor.getDirection(), Optional.ofNullable(PaperAdventure.asVanilla(cursor.caption()))));
+ }
+ }
+
+ return new ClientboundMapItemDataPacket(id, this.scale, this.locked, decorations, patch);
+ }
+
+ private MapPatch createPatch(byte[] buffer, int minDirtyX, int minDirtyY, int maxDirtyX, int maxDirtyY) {
+ int xL = maxDirtyX + 1 - minDirtyX;
+ int yL = maxDirtyY + 1 - minDirtyY;
+ byte[] bytes = new byte[xL * yL];
+
+ for (int i = 0; i < xL; ++i) for (int j = 0; j < yL; ++j)
+ bytes[i + j * xL] = buffer[minDirtyX + i + (minDirtyY + j) * 128];
+
+ return new MapItemSavedData.MapPatch(minDirtyX, minDirtyY, xL, yL, bytes);
+ }
+
+ public void addFrameDecoration(net.minecraft.world.entity.decoration.ItemFrame frame) {
+ if (this.trackedDecorationCount >= frame.level().paperConfig().maps.itemFrameCursorLimit || this.frameMarkers.containsKey(MapFrame.frameId(frame.getPos())))
+ return;
+
+ MapFrame mapFrame = new MapFrame(frame.getPos(), frame.getDirection().get2DDataValue() * 90, frame.getId());
+ this.addDecoration(MapDecorationTypes.FRAME, frame.level(), "frame-" + frame.getId(), frame.getPos().getX(), frame.getPos().getZ(), mapFrame.getRotation(), null);
+ this.frameMarkers.put(mapFrame.getId(), mapFrame);
+ }
+
+ public void markAllDirty() {
+ this.dirtyColorData = true;
+ this.minDirtyX = 0;
+ this.minDirtyY = 0;
+ this.maxDirtyX = 127;
+ this.maxDirtyY = 127;
+ this.dirtyFrameDecorations = true;
+ }
+ // Plazma end - Optimize framed map tracker ticking
}
diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
index a15cdf64575841edfe30f2b2c522f8fdfe2caae3..d8e8faf38a2fc6ae9846a6a0d2868d0a1418afef 100644
--- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
+++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
@@ -97,11 +97,15 @@ public final class CraftMapView implements MapView {
@Override
public void addRenderer(MapRenderer renderer) {
- if (!this.renderers.contains(renderer)) {
- this.renderers.add(renderer);
- this.canvases.put(renderer, new HashMap<CraftPlayer, CraftMapCanvas>());
- renderer.initialize(this);
- }
+ // Plazma start - Optimize framed map tracker ticking
+ if (this.renderers.contains(renderer)) return;
+
+ this.renderers.add(renderer);
+ this.canvases.put(renderer, new HashMap<>());
+ this.worldMap.hasPluginRenderer |= !(renderer instanceof CraftMapRenderer);
+ this.worldMap.hasContextualRenderer |= renderer.isContextual();
+ renderer.initialize(this);
+ // Plazma end - Optimize framed map tracker ticking
}
@Override
@@ -116,6 +120,16 @@ public final class CraftMapView implements MapView {
}
}
this.canvases.remove(renderer);
+ // Plazma start - Optimize framed map tracker ticking
+ this.worldMap.hasPluginRenderer = !(this.renderers.size() == 1 && this.renderers.getFirst() instanceof CraftMapRenderer);
+ if (!renderer.isContextual()) return true;
+
+ // Re-check all renderers
+ boolean contextualFound = false;
+ for (final MapRenderer mapRenderer : this.renderers) contextualFound |= mapRenderer.isContextual();
+
+ this.worldMap.hasContextualRenderer = contextualFound;
+ // Plazma end - Optimize framed map tracker ticking
return true;
} else {
return false;

View File

@@ -0,0 +1,137 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 21:18:55 +0900
Subject: [PATCH] SparklyPaper - Skip executeTick check if there's no task to
be run
diff --git a/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java b/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
index c03608fec96b51e1867f43d8f42e5aefb1520e46..9bb01accce426fafbddc1965a61257a73af8f152 100644
--- a/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
+++ b/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
@@ -36,8 +36,9 @@ public final class EntityScheduler {
* The Entity. Note that it is the CraftEntity, since only that class properly tracks world transfers.
*/
public final CraftEntity entity;
+ public final net.minecraft.server.MinecraftServer server; // Plazma - Skip executeTick check if there is no any task to be run
- private static final record ScheduledTask(Consumer<? extends Entity> run, Consumer<? extends Entity> retired) {}
+ private record ScheduledTask(Consumer<? extends Entity> run, Consumer<? extends Entity> retired) {} // Plazma - minor code improvement
private long tickCount = 0L;
private static final long RETIRED_TICK_COUNT = -1L;
@@ -46,7 +47,8 @@ public final class EntityScheduler {
private final ArrayDeque<ScheduledTask> currentlyExecuting = new ArrayDeque<>();
- public EntityScheduler(final CraftEntity entity) {
+ public EntityScheduler(final net.minecraft.server.MinecraftServer server, final CraftEntity entity) { // Plazma - Skip executeTick check if there is no any task to be run
+ this.server = Validate.notNull(server); // Plazma - Skip executeTick check if there is no any task to be run
this.entity = Validate.notNull(entity);
}
@@ -61,15 +63,15 @@ public final class EntityScheduler {
* @throws IllegalStateException If the scheduler is already retired.
*/
public void retire() {
+ final Entity thisEntity = this.entity.getHandleRaw(); // Plazma - Skip executeTick check if there is no any task to be run
synchronized (this.stateLock) {
if (this.tickCount == RETIRED_TICK_COUNT) {
throw new IllegalStateException("Already retired");
}
this.tickCount = RETIRED_TICK_COUNT;
+ this.server.entitiesWithScheduledTasks.remove(thisEntity); // Plazma - Skip executeTick check if there is no any task to be run
}
- final Entity thisEntity = this.entity.getHandleRaw();
-
// correctly handle and order retiring while running executeTick
for (int i = 0, len = this.currentlyExecuting.size(); i < len; ++i) {
final ScheduledTask task = this.currentlyExecuting.pollFirst();
@@ -124,9 +126,8 @@ public final class EntityScheduler {
if (this.tickCount == RETIRED_TICK_COUNT) {
return false;
}
- this.oneTimeDelayed.computeIfAbsent(this.tickCount + Math.max(1L, delay), (final long keyInMap) -> {
- return new ArrayList<>();
- }).add(task);
+ this.server.entitiesWithScheduledTasks.add(this.entity.getHandleRaw()); // Plazma - Skip executeTick check if there is no any task to be run
+ this.oneTimeDelayed.computeIfAbsent(this.tickCount + Math.max(1L, delay), ignored -> new ArrayList<>()).add(task); // Plazma - Skip executeTick check if there is no any task to be run
}
return true;
@@ -143,6 +144,13 @@ public final class EntityScheduler {
TickThread.ensureTickThread(thisEntity, "May not tick entity scheduler asynchronously");
final List<ScheduledTask> toRun;
synchronized (this.stateLock) {
+ // Plazma start - Skip executeTick check if there is no any task to be run
+ if (this.currentlyExecuting.isEmpty() && this.oneTimeDelayed.isEmpty()) {
+ this.server.entitiesWithScheduledTasks.remove(thisEntity);
+ return;
+ }
+ // Plazma end - Skip executeTick check if there is no any task to be run
+
if (this.tickCount == RETIRED_TICK_COUNT) {
throw new IllegalStateException("Ticking retired scheduler");
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f8377d6165f77bc19b904ca81a0c4aa139e728b0..fd74856160fa048941e10f52d2061e4ccdc86f31 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -337,6 +337,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
+ public final Set<Entity> entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // Plazma - Skip executeTick check if there is no any task to be run
public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
@@ -1834,17 +1835,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
// Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
- getAllLevels().forEach(level -> {
- for (final Entity entity : level.getEntities().getAll()) {
- if (entity.isRemoved()) {
- continue;
- }
- final org.bukkit.craftbukkit.entity.CraftEntity bukkit = entity.getBukkitEntityRaw();
- if (bukkit != null) {
- bukkit.taskScheduler.executeTick();
- }
- }
- });
+ // Plazma start - Skip executeTick check if there is no any task to be run
+ for (final Entity entity : entitiesWithScheduledTasks) {
+ if (entity.isRemoved()) continue;
+
+ final org.bukkit.craftbukkit.entity.CraftEntity craftEntity = entity.getBukkitEntityRaw();
+ if (craftEntity == null) return;
+
+ craftEntity.taskScheduler.executeTick();
+ }
+ // Plazma end - Skip executeTick check if there is no any task to be run
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
//gameprofilerfiller.push("commandFunctions"); // Plazma - Completely remove Mojang profiler
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 0e1b3f64d1a828b9c69efe45c511582880bdcb92..9afcc3cc8ef61864da8194d412ddce159db4029e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -72,7 +72,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
// Paper start - Folia shedulers
- public final io.papermc.paper.threadedregions.EntityScheduler taskScheduler = new io.papermc.paper.threadedregions.EntityScheduler(this);
+ public final io.papermc.paper.threadedregions.EntityScheduler taskScheduler; // Plazma - Skip executeTick check if there is no any task to be run
private final io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler apiScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler(this);
@Override
@@ -85,6 +85,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.server = server;
this.entity = entity;
this.entityType = CraftEntityType.minecraftToBukkit(entity.getType());
+ this.taskScheduler = new io.papermc.paper.threadedregions.EntityScheduler(this.entity.getServer(), this); // Plazma - Skip executeTick check if there is no any task to be run
}
// Purpur start - API for any mob to burn daylight

View File

@@ -0,0 +1,177 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 23:36:03 +0900
Subject: [PATCH] SparklyPaper - MSPT by World
diff --git a/src/main/java/io/papermc/paper/command/MSPTCommand.java b/src/main/java/io/papermc/paper/command/MSPTCommand.java
index 8b5293b0c696ef21d0101493ffa41b60bf0bc86b..bf3a6e8e35fe9869dfa56a97dd5d820296de9721 100644
--- a/src/main/java/io/papermc/paper/command/MSPTCommand.java
+++ b/src/main/java/io/papermc/paper/command/MSPTCommand.java
@@ -25,6 +25,29 @@ import static net.kyori.adventure.text.format.NamedTextColor.YELLOW;
public final class MSPTCommand extends Command {
private static final DecimalFormat DF = new DecimalFormat("########0.0");
private static final Component SLASH = text("/");
+ // Plazma start - MSPT by world
+ private static final Component COMMA = text(", ", YELLOW);
+ private static final Component HEADER = text().color(YELLOW).append(
+ text("("),
+ text("avg", GRAY),
+ text("/"),
+ text("min", GRAY),
+ text("/"),
+ text("max", GRAY),
+ text(")")
+ ).append(
+ text(" from last 1s"),
+ text(",", GRAY),
+ text(" 5s"),
+ text(",", GRAY),
+ text(" 10s"),
+ text(",", GRAY),
+ text(" 30s"),
+ text(",", GRAY),
+ text(" 1m"),
+ text(":", YELLOW)
+ ).build();
+ // Plazma end - MSPT by world
public MSPTCommand(final String name) {
super(name);
@@ -45,39 +68,44 @@ public final class MSPTCommand extends Command {
MinecraftServer server = MinecraftServer.getServer();
List<Component> times = new ArrayList<>();
+ // Plazma start - MSPT by world
+ times.addAll(eval(server.tickTimes1s.getTimes()));
times.addAll(eval(server.tickTimes5s.getTimes()));
times.addAll(eval(server.tickTimes10s.getTimes()));
+ times.addAll(eval(server.tickTimes30s.getTimes()));
times.addAll(eval(server.tickTimes60s.getTimes()));
- sender.sendMessage(text().content("Server tick times ").color(GOLD)
- .append(text().color(YELLOW)
- .append(
- text("("),
- text("avg", GRAY),
- text("/"),
- text("min", GRAY),
- text("/"),
- text("max", GRAY),
- text(")")
- )
- ).append(
- text(" from last 5s"),
- text(",", GRAY),
- text(" 10s"),
- text(",", GRAY),
- text(" 1m"),
- text(":", YELLOW)
- )
- );
- sender.sendMessage(text().content("◴ ").color(GOLD)
- .append(text().color(GRAY)
- .append(
- times.get(0), SLASH, times.get(1), SLASH, times.get(2), text(", ", YELLOW),
- times.get(3), SLASH, times.get(4), SLASH, times.get(5), text(", ", YELLOW),
- times.get(6), SLASH, times.get(7), SLASH, times.get(8)
- )
- )
- );
+ sender.sendMessage(text().content("Server tick times ").color(GOLD).append(HEADER));
+ sender.sendMessage(text().content("◴ ").color(GOLD).append(text().color(GRAY).append(
+ times.get(0), SLASH, times.get(1), SLASH, times.get(2), COMMA,
+ times.get(3), SLASH, times.get(4), SLASH, times.get(5), COMMA,
+ times.get(6), SLASH, times.get(7), SLASH, times.get(8), COMMA,
+ times.get(9), SLASH, times.get(10), SLASH, times.get(11), COMMA,
+ times.get(12), SLASH, times.get(13), SLASH, times.get(14)
+ )));
+
+ sender.sendMessage(text());
+ sender.sendMessage(text().content("World tick times ").color(GOLD).append(HEADER));
+ for (net.minecraft.server.level.ServerLevel serverLevel : server.getAllLevels()) {
+ List<Component> worldTimes = new ArrayList<>();
+ worldTimes.addAll(eval(serverLevel.tickTimes1s.getTimes()));
+ worldTimes.addAll(eval(serverLevel.tickTimes5s.getTimes()));
+ worldTimes.addAll(eval(serverLevel.tickTimes10s.getTimes()));
+ worldTimes.addAll(eval(serverLevel.tickTimes30s.getTimes()));
+ worldTimes.addAll(eval(serverLevel.tickTimes60s.getTimes()));
+
+ sender.sendMessage(text().content("◴ " + serverLevel.getWorld().getName() + ": ").color(GOLD).append(
+ text().color(GRAY).append(
+ worldTimes.get(0), SLASH, worldTimes.get(1), SLASH, worldTimes.get(2), COMMA,
+ worldTimes.get(3), SLASH, worldTimes.get(4), SLASH, worldTimes.get(5), COMMA,
+ worldTimes.get(6), SLASH, worldTimes.get(7), SLASH, worldTimes.get(8), COMMA,
+ worldTimes.get(9), SLASH, worldTimes.get(10), SLASH, worldTimes.get(11), COMMA,
+ worldTimes.get(12), SLASH, worldTimes.get(13), SLASH, worldTimes.get(14)
+ ))
+ );
+ }
+ // Plazma end - MSPT by world
+
return true;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fd74856160fa048941e10f52d2061e4ccdc86f31..8964ccc27ea7db306140fd6b04c9f5cb33158aa0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -264,8 +264,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private final long[] tickTimesNanos;
private long aggregatedTickTimesNanos;
// Paper start - Add tick times API and /mspt command
+ public final TickTimes tickTimes1s = new TickTimes(20); // Plazma - Add more MSPT
public final TickTimes tickTimes5s = new TickTimes(100);
public final TickTimes tickTimes10s = new TickTimes(200);
+ public final TickTimes tickTimes30s = new TickTimes(600); // Plazma - Add more MSPT
public final TickTimes tickTimes60s = new TickTimes(1200);
// Paper end - Add tick times API and /mspt command
@Nullable
@@ -1743,8 +1745,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.tickTimesNanos[l] = k;
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) k / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
// Paper start - Add tick times API and /mspt command
+ this.tickTimes1s.add(this.tickCount, k); // Plazma - Add more MSPT
this.tickTimes5s.add(this.tickCount, k);
this.tickTimes10s.add(this.tickCount, k);
+ this.tickTimes30s.add(this.tickCount, k); // Plazma - Add more MSPT
this.tickTimes60s.add(this.tickCount, k);
// Paper end - Add tick times API and /mspt command
this.logTickMethodTime(i);
@@ -1906,7 +1910,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
//gameprofilerfiller.push("tick"); // Plazma - Completely remove Mojang profiler
try {
+ // Plazma start - MSPT by world
+ long i = Util.getNanos();
worldserver.tick(shouldKeepTicking);
+ long d = Util.getNanos() - i;
+
+ worldserver.tickTimes1s.add(this.tickCount, d);
+ worldserver.tickTimes5s.add(this.tickCount, d);
+ worldserver.tickTimes10s.add(this.tickCount, d);
+ worldserver.tickTimes30s.add(this.tickCount, d);
+ worldserver.tickTimes60s.add(this.tickCount, d);
+ // Plazma end - MSPT by world
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 518b9feb5e2494e52fe9719ddc22dce7da4db0fb..9a54883281352cc4fa08143f5126d61dbd89761d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -599,6 +599,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
// Paper end - lag compensation
+ // Plazma start - MSPT by world
+ public final MinecraftServer.TickTimes tickTimes1s = new MinecraftServer.TickTimes(20);
+ public final MinecraftServer.TickTimes tickTimes5s = new MinecraftServer.TickTimes(100);
+ public final MinecraftServer.TickTimes tickTimes10s = new MinecraftServer.TickTimes(200);
+ public final MinecraftServer.TickTimes tickTimes30s = new MinecraftServer.TickTimes(600);
+ public final MinecraftServer.TickTimes tickTimes60s = new MinecraftServer.TickTimes(1200);
+ // Plazma end - MSPT by world
+
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// Plazma start - Configurable Plazma

View File

@@ -0,0 +1,272 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 23:36:36 +0900
Subject: [PATCH] SparklyPaper - Optimize farm check
diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java
index 34f338a246824dbabc7bc386b74cb62c78a8f1b6..911f68e7bd93941f4d5c0a306c8eccb2f82fe1d4 100644
--- a/src/main/java/net/minecraft/world/level/block/CropBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java
@@ -77,35 +77,53 @@ public class CropBlock extends BushBlock implements BonemealableBlock {
@Override
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
- if (world.getRawBrightness(pos, 0) >= 9) {
- int i = this.getAge(state);
-
- if (i < this.getMaxAge()) {
- float f = CropBlock.getGrowthSpeed(this, world, pos);
-
- // Spigot start
- int modifier;
- if (this == Blocks.BEETROOTS) {
- modifier = world.spigotConfig.beetrootModifier;
- } else if (this == Blocks.CARROTS) {
- modifier = world.spigotConfig.carrotModifier;
- } else if (this == Blocks.POTATOES) {
- modifier = world.spigotConfig.potatoModifier;
- // Paper start - Fix Spigot growth modifiers
- } else if (this == Blocks.TORCHFLOWER_CROP) {
- modifier = world.spigotConfig.torchFlowerModifier;
- // Paper end - Fix Spigot growth modifiers
- } else {
- modifier = world.spigotConfig.wheatModifier;
- }
-
- if (random.nextFloat() < (modifier / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
- // Spigot end
- CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(i + 1), 2); // CraftBukkit
- }
+ // Plazma start - Optimize farm check
+ if (world.getRawBrightness(pos, 0) < 9) return;
+// PLAZMA - REMOVE THIS
+ int age = this.getAge(state);
+ if (age >= this.getMaxAge()) return;
+// PLAZMA - REMOVE THIS
+ // Spigot start
+ int modifier = switch (this) {
+ case BeetrootBlock ignored -> world.spigotConfig.beetrootModifier;
+ case CarrotBlock ignored -> world.spigotConfig.carrotModifier;
+ case PotatoBlock ignored -> world.spigotConfig.potatoModifier;
+ case TorchflowerCropBlock ignored -> world.spigotConfig.torchFlowerModifier;
+ default -> world.spigotConfig.wheatModifier;
+ };
+
+ if (world.plazmaConfig().block.optimizedFarmCheck.enabled) {
+ final BlockPos below = pos.below();
+ final BlockState belowState = world.getBlockState(below);
+
+ boolean isMoist = false;
+ float growthSpeed = world.plazmaConfig().block.optimizedFarmCheck.growthSpeed.base;
+ if (belowState.is(Blocks.FARMLAND) && belowState.getValue(FarmBlock.MOISTURE) > 0) {
+ growthSpeed = world.plazmaConfig().block.optimizedFarmCheck.growthSpeed.moist;
+ isMoist = true;
+ }
+// PLAZMA - REMOVE THIS
+ if (world.plazmaConfig().block.optimizedFarmCheck.skipMiddleAges) {
+ growthSpeed /= getMaxAge();
+ age = getMaxAge() - 1;
}
+// PLAZMA - REMOVE THIS
+ if (random.nextFloat() < (modifier / (100.0f * (Math.floor((25.0F / growthSpeed) + 1))))) {
+ if (!CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(age + 1), 2)) return;
+ if ((age + 1) != getMaxAge() || !isMoist || FarmBlock.isNearWater(world, below)) return;
+// PLAZMA - REMOVE THIS
+ CraftEventFactory.handleMoistureChangeEvent(world, below, state.setValue(FarmBlock.MOISTURE, 0), 2);
+ }
+ return;
}
-
+// PLAZMA - REMOVE THIS
+ float growthSpeed = CropBlock.getGrowthSpeed(this, world, pos); // Plazma - moved down
+// PLAZMA - REMOVE THIS
+ if (random.nextFloat() < (modifier / (100.0f * (Math.floor((25.0F / growthSpeed) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
+ // Spigot end
+ CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(age + 1), 2); // CraftBukkit
+ }
+ // Plazma end - Optimize farm check
}
public void growCrops(Level world, BlockPos pos, BlockState state) {
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
index f1ef2eda3282b3bcd99e388dc56d5542cd93bedb..0843c87af0d090872dee21e637b8e37aeb8d1563 100644
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
@@ -92,20 +92,29 @@ public class FarmBlock extends Block {
@Override
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
- int i = (Integer) state.getValue(FarmBlock.MOISTURE);
- if (i > 0 && world.paperConfig().tickRates.wetFarmland != 1 && (world.paperConfig().tickRates.wetFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.wetFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
- if (i == 0 && world.paperConfig().tickRates.dryFarmland != 1 && (world.paperConfig().tickRates.dryFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.dryFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
-
- if (!FarmBlock.isNearWater(world, pos) && !world.isRainingAt(pos.above())) {
- if (i > 0) {
- org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, pos, (BlockState) state.setValue(FarmBlock.MOISTURE, i - 1), 2); // CraftBukkit
- } else if (!FarmBlock.shouldMaintainFarmland(world, pos)) {
- FarmBlock.turnToDirt((Entity) null, state, world, pos);
- }
- } else if (i < 7) {
- org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, pos, (BlockState) state.setValue(FarmBlock.MOISTURE, 7), 2); // CraftBukkit
- }
-
+ // Plazma start - Optimize farm check
+ int moistLevel = state.getValue(MOISTURE);
+ if (world.plazmaConfig().block.optimizedFarmCheck.enabled) {
+ if (moistLevel != 0) return;
+// PLAZMA - REMOVE THIS
+ if (isNearWater(world, pos))
+ CraftEventFactory.handleMoistureChangeEvent(world, pos, state.setValue(MOISTURE, 7), 2);
+ else
+ turnToDirt(null, state, world, pos);
+ return;
+ } // diff on change
+// PLAZMA - REMOVE THIS
+ if (moistLevel > 0 && world.paperConfig().tickRates.wetFarmland != 1 && (world.paperConfig().tickRates.wetFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.wetFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
+ if (moistLevel == 0 && world.paperConfig().tickRates.dryFarmland != 1 && (world.paperConfig().tickRates.dryFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.dryFarmland != 0)) { return; } // Paper - Configurable random tick rates for blocks
+// PLAZMA - REMOVE THIS
+ if (!isNearWater(world, pos) && !world.isRainingAt(pos.above())) {
+ if (moistLevel > 0)
+ CraftEventFactory.handleMoistureChangeEvent(world, pos, state.setValue(MOISTURE, moistLevel - 1), 2); // CraftBukkit
+ else if (!shouldMaintainFarmland(world, pos))
+ turnToDirt(null, state, world, pos);
+ } else if (moistLevel < 7)
+ CraftEventFactory.handleMoistureChangeEvent(world, pos, state.setValue(MOISTURE, 7), 2); // CraftBukkit
+ // Plazma end - Optimize farm check
}
@Override
@@ -169,7 +178,7 @@ public class FarmBlock extends Block {
return world.getBlockState(pos.above()).is(BlockTags.MAINTAINS_FARMLAND);
}
- private static boolean isNearWater(LevelReader world, BlockPos pos) {
+ static boolean isNearWater(LevelReader world, BlockPos pos) { // Plazma - AT (private -> package-private)
// Paper start - Perf: remove abstract block iteration
int xOff = pos.getX();
int yOff = pos.getY();
diff --git a/src/main/java/net/minecraft/world/level/block/StemBlock.java b/src/main/java/net/minecraft/world/level/block/StemBlock.java
index 23802becefaa0a4536364884bb0d39e59b8664e1..2575af5649d91d28272ee5b956e6a52f2e52fc52 100644
--- a/src/main/java/net/minecraft/world/level/block/StemBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/StemBlock.java
@@ -72,38 +72,63 @@ public class StemBlock extends BushBlock implements BonemealableBlock {
@Override
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
- if (world.getRawBrightness(pos, 0) >= 9) {
- float f = CropBlock.getGrowthSpeed(this, world, pos);
-
- if (random.nextFloat() < ((this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / f) + 1))))) { // Spigot - SPIGOT-7159: Better modifier resolution
- int i = (Integer) state.getValue(StemBlock.AGE);
-
- if (i < 7) {
- state = (BlockState) state.setValue(StemBlock.AGE, i + 1);
- CraftEventFactory.handleBlockGrowEvent(world, pos, state, 2); // CraftBukkit
- } else {
- Direction enumdirection = Direction.Plane.HORIZONTAL.getRandomDirection(random);
- BlockPos blockposition1 = pos.relative(enumdirection);
- BlockState iblockdata1 = world.getBlockState(blockposition1.below());
-
- if (world.getBlockState(blockposition1).isAir() && (iblockdata1.is(Blocks.FARMLAND) || iblockdata1.is(BlockTags.DIRT))) {
- Registry<Block> iregistry = world.registryAccess().lookupOrThrow(Registries.BLOCK);
- Optional<Block> optional = iregistry.getOptional(this.fruit);
- Optional<Block> optional1 = iregistry.getOptional(this.attachedStem);
-
- if (optional.isPresent() && optional1.isPresent()) {
- // CraftBukkit start
- if (!CraftEventFactory.handleBlockGrowEvent(world, blockposition1, ((Block) optional.get()).defaultBlockState())) {
- return;
- }
- // CraftBukkit end
- world.setBlockAndUpdate(pos, (BlockState) ((Block) optional1.get()).defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, enumdirection));
- }
- }
- }
+ if (world.getRawBrightness(pos, 0) < 9) return;
+
+ if (world.plazmaConfig().block.optimizedFarmCheck.enabled) {
+ final BlockPos below = pos.below();
+ final BlockState belowState = world.getBlockState(below);
+
+ boolean isMoist = false;
+ float growthSpeed = world.plazmaConfig().block.optimizedFarmCheck.growthSpeed.base;
+ if (belowState.is(Blocks.FARMLAND) && belowState.getValue(BlockStateProperties.MOISTURE) > 0) {
+ growthSpeed = world.plazmaConfig().block.optimizedFarmCheck.growthSpeed.moist;
+ isMoist = true;
}
+ if (random.nextFloat() >= ((this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / growthSpeed) + 1))))) return;
+
+ int age = state.getValue(StemBlock.AGE);
+ if (age < 7) {
+ CraftEventFactory.handleBlockGrowEvent(world, pos, state.setValue(StemBlock.AGE, age + 1), 2);
+ return;
+ }
+
+ final Direction direction = Direction.Plane.HORIZONTAL.getRandomDirection(random);
+ final BlockPos blockPos = pos.relative(direction);
+ final BlockState belowState1 = world.getBlockState(blockPos.below());
+ if (!world.getBlockState(blockPos).isAir() || (!belowState1.is(Blocks.FARMLAND) && !belowState1.is(BlockTags.DIRT))) return;
+
+ final Registry<Block> registry = world.registryAccess().lookupOrThrow(Registries.BLOCK);
+ final Optional<Block> fruit = registry.getOptional(this.fruit);
+ final Optional<Block> stem = registry.getOptional(this.attachedStem);
+ if (fruit.isEmpty() || stem.isEmpty()) return;
+
+ if (!CraftEventFactory.handleBlockGrowEvent(world, blockPos, fruit.get().defaultBlockState())) return; // CraftBukkit
+ world.setBlockAndUpdate(pos, stem.get().defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, direction));
+ return;
}
+
+ if (random.nextFloat() >= ((this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) / (100.0f * (Math.floor((25.0F / CropBlock.getGrowthSpeed(this, world, pos)) + 1))))) return; // Spigot - SPIGOT-7159: Better modifier resolution
+
+ final int age = state.getValue(StemBlock.AGE);
+ if (age < 7) {
+ state = state.setValue(StemBlock.AGE, age + 1);
+ CraftEventFactory.handleBlockGrowEvent(world, pos, state, 2); // CraftBukkit
+ return;
+ }
+
+ final Direction direction = Direction.Plane.HORIZONTAL.getRandomDirection(random);
+ final BlockPos blockPos = pos.relative(direction);
+ final BlockState belowState = world.getBlockState(blockPos.below());
+ if (!world.getBlockState(blockPos).isAir() || (!belowState.is(Blocks.FARMLAND) && !belowState.is(BlockTags.DIRT))) return;
+
+ final Registry<Block> registry = world.registryAccess().lookupOrThrow(Registries.BLOCK);
+ final Optional<Block> fruit = registry.getOptional(this.fruit);
+ final Optional<Block> stem = registry.getOptional(this.attachedStem);
+ if (fruit.isEmpty() || stem.isEmpty()) return;
+
+ if (!CraftEventFactory.handleBlockGrowEvent(world, blockPos, fruit.get().defaultBlockState())) return; // CraftBukkit
+ world.setBlockAndUpdate(pos, stem.get().defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, direction));
}
@Override
diff --git a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
index f6f372644bca9111aa3f45bf7ae8e66e53d11505..36345efa302413ad4e7d6e611d182572622f76ff 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/WorldConfigurations.java
@@ -81,6 +81,22 @@ public class WorldConfigurations extends ConfigurationPart {
}
+ public OptimizedFarmCheck optimizedFarmCheck;
+ public class OptimizedFarmCheck extends ConfigurationPart {
+
+ public boolean enabled = OPTIMIZE;
+ public boolean skipMiddleAges = false;
+
+ public GrowthSpeed growthSpeed;
+ public class GrowthSpeed extends ConfigurationPart {
+
+ public float base = 1.0f;
+ public float moist = 5.0f;
+
+ }
+
+ }
+
}
public Item item;

View File

@@ -0,0 +1,146 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 23:37:17 +0900
Subject: [PATCH] SparklyPaper - Optimize season check
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index 737e9d8b75df05ca0e032916564599d5abad45ff..c5bb327fbf4efea250b74346521fe565df71bb94 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -327,15 +327,19 @@ public class Bat extends AmbientCreature {
private static boolean isSpookySeason = false;
private static final int ONE_HOUR = 20 * 60 * 60;
private static int lastSpookyCheck = -ONE_HOUR;
- public static boolean isHalloweenSeason(Level level) { return level.purpurConfig.forceHalloweenSeason || isHalloween(); } // Purpur
+
+ public static boolean isHalloweenSeason(Level level) {
+ return level.purpurConfig.forceHalloweenSeason || net.sparklypower.sparklypaper.HalloweenManager.isInSeason() || isHalloween();
+ }
+
private static boolean isHalloween() {
if (net.minecraft.server.MinecraftServer.currentTick - lastSpookyCheck > ONE_HOUR) {
- LocalDate localdate = LocalDate.now();
- int i = localdate.get(ChronoField.DAY_OF_MONTH);
- int j = localdate.get(ChronoField.MONTH_OF_YEAR);
+ LocalDate now = LocalDate.now();
+ int day = now.getDayOfMonth();
+ int month = now.getMonth().getValue();
- isSpookySeason = j == 10 && i >= 20 || j == 11 && i <= 3;
- lastSpookyCheck = net.minecraft.server.MinecraftServer.currentTick;
+ isSpookySeason = month == 10 && day >= 20 || month == 11 && day <= 3;
+ lastSpookyCheck = net.minecraft.server.MinecraftServer.currentTick;
}
return isSpookySeason;
}
diff --git a/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..530bac5a415c8597ae76ec603c1d8158535c66d0
--- /dev/null
+++ b/src/main/java/net/sparklypower/sparklypaper/HalloweenManager.java
@@ -0,0 +1,82 @@
+package net.sparklypower.sparklypaper;
+
+import com.mojang.logging.LogUtils;
+import org.jetbrains.annotations.Nullable;
+import org.slf4j.Logger;
+import java.time.LocalDateTime;
+import java.time.Month;
+import java.time.ZoneOffset;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+public final class HalloweenManager {
+
+ private static final Logger LOGGER = LogUtils.getLogger();
+ public static @Nullable net.sparklypower.sparklypaper.HalloweenManager INSTANCE;
+
+ private long seasonStartEpoch = 0L;
+ private long seasonEndEpoch = 0L;
+
+ private final ScheduledExecutorService EXECUTOR = Executors.newSingleThreadScheduledExecutor(runnable -> {
+ final Thread thread = new Thread(runnable);
+ thread.setName("halloween-timer-updater");
+ thread.setPriority(1);
+ return thread;
+ });
+
+ public HalloweenManager() {
+ final AtomicBoolean first = new AtomicBoolean(true);
+ final CountDownLatch LATCH = new CountDownLatch(1);
+
+ try {
+ EXECUTOR.scheduleAtFixedRate(() -> {
+ updateEpoch();
+ if (first.get()) LATCH.countDown();
+ first.set(false);
+ }, 0L, 90L, TimeUnit.DAYS);
+
+ LATCH.await();
+ } catch (InterruptedException e) {
+ LOGGER.error("Interrupted while waiting for HalloweenManager to start", e);
+ }
+ }
+
+ public @Nullable HalloweenManager close() {
+ EXECUTOR.shutdownNow();
+ return null;
+ }
+
+ public static boolean isInSeason() {
+ return INSTANCE != null && INSTANCE.isSeason();
+ }
+
+ private boolean isSeason() {
+ return this.seasonStartEpoch <= System.currentTimeMillis() && System.currentTimeMillis() < this.seasonEndEpoch;
+ }
+
+ private void updateEpoch() {
+ LOGGER.info("Updating Spooky Season and Halloween Time");
+ this.seasonStartEpoch = millisFromDate(20, 10, false);
+ this.seasonEndEpoch = millisFromDate(3, 11, true);
+ LOGGER.info("Updated Spooky Season and Halloween Time!");
+ }
+
+ private static long millisFromDate(int day, int month, boolean endOfMonth) {
+ LocalDateTime target = LocalDateTime.of(
+ LocalDateTime.now().getYear(),
+ Month.of(month),
+ day,
+ endOfMonth ? 23 : 0,
+ endOfMonth ? 59 : 0,
+ endOfMonth ? 59 : 0,
+ endOfMonth ? 999_999_999 : 0
+ );
+
+ return (LocalDateTime.now().isAfter(target) ? target.plusYears(1) : target)
+ .atZone(ZoneOffset.systemDefault()).toInstant().toEpochMilli();
+ }
+
+}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index fbcbbba15e8f7f8ea812a75d807908925305cb29..768cb135081c233a820566015ed58351e417c45c 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -159,6 +159,17 @@ public class GlobalConfiguration extends ConfigurationPart {
public class Miscellaneous extends ConfigurationPart {
public boolean resetDirtyWhenLoadingMapsFromDisk = false;
+ public boolean optimizeHalloweenCheck = OPTIMIZE;
+
+ @PostProcess
+ void post() {
+ net.sparklypower.sparklypaper.HalloweenManager manager = net.sparklypower.sparklypaper.HalloweenManager.INSTANCE;
+
+ if (manager == null && this.optimizeHalloweenCheck)
+ net.sparklypower.sparklypaper.HalloweenManager.INSTANCE = new net.sparklypower.sparklypaper.HalloweenManager();
+ else if (manager != null && !this.optimizeHalloweenCheck)
+ net.sparklypower.sparklypaper.HalloweenManager.INSTANCE = manager.close();
+ }
}

View File

@@ -0,0 +1,218 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Fri, 13 Dec 2024 23:52:46 +0900
Subject: [PATCH] SparklyPaper - Optimize tickingBlockEntity
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 805db223ad83b50546c32747fc127d9fe42b34f9..69d089a822598d02c17f1f0c7f1f627052fc01f2 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1528,28 +1528,42 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
int tickedEntities = 0; // Paper - rewrite chunk system
- int tilesThisCycle = 0;
- var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity>(); // Paper - Fix MC-117075; use removeAll
+ // Plazma start - Optimize tickingBlockEntity
+ int shouldTickBlocksAtLastResult = -1;
+ long shouldTickBlocksAtChunkPos = 0L;
+ final it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity> toRemove =
+ new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<>(); // Paper - Fix MC-117075; use removeAll
+
toRemove.add(null); // Paper - Fix MC-117075
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
- this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
- TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
- // Spigot end
-
- if (tickingblockentity.isRemoved()) {
- // Spigot start
- tilesThisCycle--;
- toRemove.add(tickingblockentity); // Paper - Fix MC-117075; use removeAll
- // Spigot end
- } else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
- tickingblockentity.tick();
- // Paper start - rewrite chunk system
- if ((++tickedEntities & 7) == 0) {
- ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)(Level)(Object)this).moonrise$midTickTasks();
+ TickingBlockEntity tickingEntity = this.blockEntityTickers.get(this.tileTickPosition);
+
+ if (tickingEntity.isRemoved()) {
+ toRemove.add(tickingEntity); // Paper - Fix MC-117075; use removeAll
+ continue;
+ }
+
+ if (flag) {
+ long pos = tickingEntity.getChunkCoordinateKey();
+
+ boolean shouldTick;
+ if (shouldTickBlocksAtChunkPos == pos && shouldTickBlocksAtLastResult != -1) {
+ shouldTick = shouldTickBlocksAtLastResult == 1;
+ } else {
+ shouldTick = this.shouldTickBlocksAt(pos);
+ shouldTickBlocksAtLastResult = shouldTick ? 1 : 0;
+ shouldTickBlocksAtChunkPos = pos;
}
- // Paper end - rewrite chunk system
+
+ if (!shouldTick) continue;
+
+ tickingEntity.tick();
+ if ((++tickedEntities & 7) != 0) continue;
+
+ this.moonrise$midTickTasks();
}
}
+ // Plazma end - Optimize tickingBlockEntity
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
this.tickingBlockEntities = false;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java
index 28e3b73507b988f7234cbf29c4024c88180d0aef..de15cbda0c180e0d071ce7ac41d2fd1aeca60985 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TickingBlockEntity.java
@@ -10,4 +10,6 @@ public interface TickingBlockEntity {
BlockPos getPos();
String getType();
+
+ long getChunkCoordinateKey(); // Plazma - Optimize tickingBlockEntity
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index ee836953b1d6a362a3a785dc1fd0ea0416bdd984..a1756429e8fc09cfd78109c4d5113857304b317d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -76,6 +76,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
public String getType() {
return "<null>";
}
+
+ @Override public long getChunkCoordinateKey() { return 0; } // Plazma - Optimize tickingBlockEntity;
};
private final Map<BlockPos, LevelChunk.RebindableTickingBlockEntityWrapper> tickersInLevel;
public boolean loaded;
@@ -1000,7 +1002,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
}
private <T extends BlockEntity> TickingBlockEntity createTicker(T blockEntity, BlockEntityTicker<T> blockEntityTicker) {
- return new LevelChunk.BoundTickingBlockEntity<>(blockEntity, blockEntityTicker);
+ return new LevelChunk.BoundTickingBlockEntity<>(blockEntity, blockEntityTicker, this.coordinateKey); // Plazma - Optimize tickingBlockEntity
}
@FunctionalInterface
@@ -1054,8 +1056,15 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
return this.ticker.getType();
}
+ @Override // Plazma - minor code improvement
public String toString() {
- return String.valueOf(this.ticker) + " <wrapped>";
+ return this.ticker + " <wrapped>"; // Plazma - minor code improvement
+ }
+
+ // Plazma start - Optimize tickingBlockEntity
+ @Override
+ public long getChunkCoordinateKey() {
+ return this.ticker.getChunkCoordinateKey();
}
}
@@ -1064,51 +1073,45 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
private final T blockEntity;
private final BlockEntityTicker<T> ticker;
private boolean loggedInvalidBlockState;
+ private final long chunkCoordinateKey;
- BoundTickingBlockEntity(final BlockEntity tileentity, final BlockEntityTicker blockentityticker) {
- this.blockEntity = (T) tileentity; // CraftBukkit - decompile error
- this.ticker = blockentityticker;
+ BoundTickingBlockEntity(final T blockEntity, final BlockEntityTicker<T> ticker, final long chunkCoordinateKey) {
+ this.blockEntity = blockEntity;
+ this.ticker = ticker;
+ this.chunkCoordinateKey = chunkCoordinateKey;
}
@Override
public void tick() {
- if (!this.blockEntity.isRemoved() && this.blockEntity.hasLevel()) {
- BlockPos blockposition = this.blockEntity.getBlockPos();
+ if (this.blockEntity.isRemoved() || !this.blockEntity.hasLevel()) return;
- if (LevelChunk.this.isTicking(blockposition)) {
- try {
- //ProfilerFiller gameprofilerfiller = Profiler.get(); // Plazma - Completely remove Mojang profiler
-
- //gameprofilerfiller.push(this::getType); // Plazma - Completely remove Mojang profiler
- BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
+ BlockPos pos = this.blockEntity.getBlockPos();
+ if (!LevelChunk.this.isTicking(pos)) return;
- if (this.blockEntity.getType().isValid(iblockdata)) {
- this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), iblockdata, this.blockEntity);
- this.loggedInvalidBlockState = false;
- // Paper start - Remove the Block Entity if it's invalid
- } else {
- LevelChunk.this.removeBlockEntity(this.getPos());
- if (!this.loggedInvalidBlockState) {
- this.loggedInvalidBlockState = true;
- LevelChunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", new Object[]{LogUtils.defer(this::getType), LogUtils.defer(this::getPos), iblockdata});
- }
- // Paper end - Remove the Block Entity if it's invalid
- }
+ try {
+ BlockState state = LevelChunk.this.getBlockState(pos);
- //gameprofilerfiller.pop(); // Plazma - Completely remove Mojang profiler
- } catch (Throwable throwable) {
- if (throwable instanceof ThreadDeath) throw throwable; // Paper
- // Paper start - Prevent block entity and entity crashes
- final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
- net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
- net.minecraft.world.level.chunk.LevelChunk.this.level.getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
- LevelChunk.this.removeBlockEntity(this.getPos());
- // Paper end - Prevent block entity and entity crashes
- // Spigot start
+ if (this.blockEntity.getType().isValid(state)) {
+ this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), state, this.blockEntity);
+ this.loggedInvalidBlockState = false;
+ // Paper start - Remove the Block Entity if it's invalid
+ } else {
+ LevelChunk.this.removeBlockEntity(this.getPos());
+ if (!this.loggedInvalidBlockState) {
+ this.loggedInvalidBlockState = true;
+ LevelChunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", LogUtils.defer(this::getType), LogUtils.defer(this::getPos), state);
}
+ // Paper end - Remove the Block Entity if it's invalid
}
+ } catch (Throwable throwable) {
+ if (throwable instanceof ThreadDeath) throw throwable; // Paper
+ // Paper start - Prevent block entity and entity crashes
+ final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
+ net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
+ LevelChunk.this.level.getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
+ LevelChunk.this.removeBlockEntity(this.getPos());
+ // Paper end - Prevent block entity and entity crashes
}
-
}
@Override
@@ -1126,10 +1129,15 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
return BlockEntityType.getKey(this.blockEntity.getType()).toString();
}
+ @Override
public String toString() {
- String s = this.getType();
+ return "Level ticker for " + this.getType() + "@" + this.getPos();
+ }
- return "Level ticker for " + s + "@" + String.valueOf(this.getPos());
+ @Override
+ public long getChunkCoordinateKey() {
+ return this.chunkCoordinateKey;
}
+ // Plazma end - Optimize tickingBlockEntity
}
}

View File

@@ -0,0 +1,37 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Sun, 18 Feb 2024 14:22:37 -0300
Subject: [PATCH] Revert "Fix MC-117075: Block entity unload lag spike"
This reverts commit f3453b204569ea865cc1d1302edb6d125e7f0cb3.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 8433caa61a973d81a5eedc44428926e999c21a03..db9eb10c33848ca5b342bf00e4a05738210d26b0 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1458,8 +1458,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
int tickedEntities = 0; // Paper - rewrite chunk system
int tilesThisCycle = 0;
- var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity>(); // Paper - Fix MC-117075; use removeAll
- toRemove.add(null); // Paper - Fix MC-117075
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -1468,7 +1466,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
if (tickingblockentity.isRemoved()) {
// Spigot start
tilesThisCycle--;
- toRemove.add(tickingblockentity); // Paper - Fix MC-117075; use removeAll
+ this.blockEntityTickers.remove(this.tileTickPosition--);
// Spigot end
} else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
tickingblockentity.tick();
@@ -1479,7 +1477,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
// Paper end - rewrite chunk system
}
}
- this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
this.tickingBlockEntities = false;
gameprofilerfiller.pop();

View File

@@ -0,0 +1,123 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Sun, 26 Nov 2023 13:11:10 -0300
Subject: [PATCH] Optimize tickBlockEntities
We cache the last `shouldTickBlocksAt` result, because the `shouldTickBlocksAt` is expensive because it requires pulling chunk holder info from an map for each block entity (even if the block entities are on the same chunk!) every single time. So, if the last chunk position is the same as our cached value, we use the last cached `shouldTickBlocksAt` result!
We could use a map for caching, but here's why this is way better than using a map: The block entity ticking list is sorted by chunks! Well, sort of... It is sorted by chunk when the chunk has been loaded, newly placed blocks will be appended to the end of the list until the chunk unloads and loads again. Most block entities are things that players placed to be there for a long time anyway (like hoppers, etc)
But here's the thing: We don't care if we have a small performance penalty if the players have placed new block entities, the small performance hit of when a player placed new block entities is so small ('tis just a long comparsion after all), that the performance boost from already placed block entities is bigger, this helps a lot if your server has a lot of chunks with multiple block entities, and the block entities will be automatically sorted after the chunk is unloaded and loaded again, so it ain't that bad.
And finally, we also cache the chunk's coordinate key when creating the block entity, which is actually "free" because we just reuse the already cached chunk coordinate key from the chunk!
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 1e20c525cd0c75079fe971ae830120c69fee362e..97b31dffbaf965e86ad706a1bba7586cd3514ead 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1458,6 +1458,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
int tickedEntities = 0; // Paper - rewrite chunk system
int tilesThisCycle = 0;
+ // SparklyPaper start - optimize tickBlockEntities
+ int shouldTickBlocksAtLastResult = -1; // -1 = undefined
+ long shouldTickBlocksAtChunkPos = 0L;
+ // SparklyPaper end
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -1468,13 +1472,25 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
tilesThisCycle--;
this.blockEntityTickers.markAsRemoved(this.tileTickPosition); // this.blockEntityTickers.remove(this.tileTickPosition--); // SparklyPaper - optimize block entity removals
// Spigot end
- } else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
+ // } else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) { // SparklyPaper start - optimize tickBlockEntities
+ } else if (flag) {
+ long chunkPos = tickingblockentity.getChunkCoordinateKey();
+ boolean shouldTick;
+ if (shouldTickBlocksAtChunkPos == chunkPos && shouldTickBlocksAtLastResult != -1) {
+ shouldTick = shouldTickBlocksAtLastResult == 1;
+ } else {
+ shouldTick = this.shouldTickBlocksAt(chunkPos);
+ shouldTickBlocksAtLastResult = shouldTick ? 1 : 0;
+ shouldTickBlocksAtChunkPos = chunkPos;
+ }
+ if (shouldTick) {
tickingblockentity.tick();
// Paper start - rewrite chunk system
if ((++tickedEntities & 7) == 0) {
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemLevel)(Level)(Object)this).moonrise$midTickTasks();
}
// Paper end - rewrite chunk system
+ } // SparklyPaper end
}
}
this.blockEntityTickers.removeMarkedEntries(); // SparklyPaper - optimize block entity removals
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 4640baec5bed6c2d53cc0f8ca1d273cc115abe9b..b4c16fe7c9215b5610b7e7488c29b497b5357ecc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -75,6 +75,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
public String getType() {
return "<null>";
}
+
+ // SparklyPaper start - optimize tickBlockEntities
+ @Override
+ public long getChunkCoordinateKey() {
+ return 0;
+ }
+ // SparklyPaper end
};
private final Map<BlockPos, LevelChunk.RebindableTickingBlockEntityWrapper> tickersInLevel;
public boolean loaded;
@@ -981,7 +988,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
}
private <T extends BlockEntity> TickingBlockEntity createTicker(T blockEntity, BlockEntityTicker<T> blockEntityTicker) {
- return new LevelChunk.BoundTickingBlockEntity<>(blockEntity, blockEntityTicker);
+ return new LevelChunk.BoundTickingBlockEntity<>(blockEntity, blockEntityTicker, this.coordinateKey); // SparklyPaper - optimize tickBlockEntities
}
@FunctionalInterface
@@ -1038,6 +1045,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
public String toString() {
return String.valueOf(this.ticker) + " <wrapped>";
}
+
+ // SparklyPaper start - optimize tickBlockEntities
+ @Override
+ public long getChunkCoordinateKey() {
+ return this.ticker.getChunkCoordinateKey();
+ }
+ // SparklyPaper end
}
private class BoundTickingBlockEntity<T extends BlockEntity> implements TickingBlockEntity {
@@ -1045,10 +1059,12 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
private final T blockEntity;
private final BlockEntityTicker<T> ticker;
private boolean loggedInvalidBlockState;
+ private final long chunkCoordinateKey; // SparklyPaper - optimize tickBlockEntities
- BoundTickingBlockEntity(final BlockEntity tileentity, final BlockEntityTicker blockentityticker) {
+ BoundTickingBlockEntity(final BlockEntity tileentity, final BlockEntityTicker blockentityticker, long chunkCoordinateKey) { // SparklyPaper - optimize tickBlockEntities
this.blockEntity = (T) tileentity; // CraftBukkit - decompile error
this.ticker = blockentityticker;
+ this.chunkCoordinateKey = chunkCoordinateKey; // SparklyPaper - optimize tickBlockEntities
}
@Override
@@ -1112,5 +1128,12 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
return "Level ticker for " + s + "@" + String.valueOf(this.getPos());
}
+
+ // SparklyPaper start - optimize tickBlockEntities
+ @Override
+ public long getChunkCoordinateKey() {
+ return this.chunkCoordinateKey;
+ }
+ // SparklyPaper end
}
}

View File

@@ -0,0 +1,144 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Mon, 10 Jun 2024 13:06:30 -0300
Subject: [PATCH] Helpful NMS packet changes
Some nice changes to the packet internals to make packet sending and manipulation easier for us to avoid Reflection and JVM internals (ooo theUnsafe spooky) usage
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java
index f66e40326c510aa3267542b1a24ed75d1ed6d3f1..797640c4f26abb32a480a611820bbcd72e43d1ac 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java
@@ -22,7 +22,7 @@ public class ClientboundAddEntityPacket implements Packet<ClientGamePacketListen
private static final double LIMIT = 3.9;
private final int id;
private final UUID uuid;
- private final EntityType<?> type;
+ public EntityType<?> type; // SparklyPaper - Helpful NMS packet changes: remove final and make public
private final double x;
private final double y;
private final double z;
@@ -180,6 +180,32 @@ public class ClientboundAddEntityPacket implements Packet<ClientGamePacketListen
return Mth.unpackDegrees(this.yHeadRot);
}
+ // SparklyPaper - Helpful NMS packet changes: expose raw rotational fields
+ public int getXaRaw() {
+ return this.xa;
+ }
+
+ public int getYaRaw() {
+ return this.ya;
+ }
+
+ public int getZaRaw() {
+ return this.za;
+ }
+
+ public byte getXRotRaw() {
+ return this.xRot;
+ }
+
+ public byte getYRotRaw() {
+ return this.yRot;
+ }
+
+ public byte getYHeadRotRaw() {
+ return this.yHeadRot;
+ }
+ // SparklyPaper end
+
public int getData() {
return this.data;
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java
index 1e8fad30c5f5be48501c7d8584caedcdc232f6c8..772848cf83a92a8ef8d734949b21f2f1d13e3fcb 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java
@@ -19,7 +19,7 @@ public class ClientboundBlockUpdatePacket implements Packet<ClientGamePacketList
ClientboundBlockUpdatePacket::new
);
private final BlockPos pos;
- public final BlockState blockState;
+ public BlockState blockState; // SparklyPaper - Helpful NMS packet changes: remove final
public ClientboundBlockUpdatePacket(BlockPos pos, BlockState state) {
this.pos = pos;
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index 0a8d07bf68b0ceabd13c70196d357fce79dcc2c3..0b5abaf11508fa6c6809b73f53d6854aa3b3247c 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -25,7 +25,7 @@ import net.minecraft.world.level.levelgen.Heightmap;
public class ClientboundLevelChunkPacketData {
private static final int TWO_MEGABYTES = 2097152;
private final CompoundTag heightmaps;
- private final byte[] buffer;
+ public byte[] buffer; // SparklyPaper - Helpful NMS packet changes: remove final and make public
private final List<ClientboundLevelChunkPacketData.BlockEntityInfo> blockEntitiesData;
// Paper start - Handle oversized block entities in chunks
private final java.util.List<net.minecraft.network.protocol.Packet<?>> extraPackets = new java.util.ArrayList<>();
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java
index ab44c24ce5f4570dee9d84b4216299bedfa800d8..99fbb958b82a3398564febb1e87e3ef4efca5b1a 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java
@@ -20,6 +20,13 @@ public class ClientboundRotateHeadPacket implements Packet<ClientGamePacketListe
this.yHeadRot = headYaw;
}
+ // SparklyPaper start - Helpful NMS packet changes: add entity ID constructor
+ public ClientboundRotateHeadPacket(int entityId, byte headYaw) {
+ this.entityId = entityId;
+ this.yHeadRot = headYaw;
+ }
+ // SparklyPaper end
+
private ClientboundRotateHeadPacket(FriendlyByteBuf buf) {
this.entityId = buf.readVarInt();
this.yHeadRot = buf.readByte();
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
index 1a37654aff9a9c86c9f7af10a1cf721371f0c5ec..e69ff4e6bb3919340a93ed4c68bdd6c4778669a9 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
@@ -17,9 +17,9 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet<ClientGamePa
public static final StreamCodec<FriendlyByteBuf, ClientboundSectionBlocksUpdatePacket> STREAM_CODEC = Packet.codec(ClientboundSectionBlocksUpdatePacket::write, ClientboundSectionBlocksUpdatePacket::new);
private static final int POS_IN_SECTION_BITS = 12;
- private final SectionPos sectionPos;
- private final short[] positions;
- private final BlockState[] states;
+ public SectionPos sectionPos; // SparklyPaper - Helpful NMS packet changes: remove final and make public
+ public short[] positions; // SparklyPaper - Helpful NMS packet changes: remove final and make public
+ public BlockState[] states; // SparklyPaper - Helpful NMS packet changes: remove final and make public
public ClientboundSectionBlocksUpdatePacket(SectionPos sectionPos, ShortSet positions, LevelChunkSection section) {
this.sectionPos = sectionPos;
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java
index 799f5a8c69f295216997d52fb4bc6c56d3a18115..633f10f17eebd43e8dc7c878b9101decf31190a9 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java
@@ -18,6 +18,12 @@ public class ClientboundSetCameraPacket implements Packet<ClientGamePacketListen
this.cameraId = entity.getId();
}
+ // SparklyPaper - Helpful NMS packet changes: add direct entityId constructor
+ public ClientboundSetCameraPacket(int entityId) {
+ this.cameraId = entityId;
+ }
+ // SparklyPaper end
+
private ClientboundSetCameraPacket(FriendlyByteBuf buf) {
this.cameraId = buf.readVarInt();
}
diff --git a/src/main/java/net/minecraft/world/entity/Display.java b/src/main/java/net/minecraft/world/entity/Display.java
index e6cbf4506c75046a89fad778e138b448fb4a29a9..3b705c75b840dbb0e741f46aaa3b98180a27ecf5 100644
--- a/src/main/java/net/minecraft/world/entity/Display.java
+++ b/src/main/java/net/minecraft/world/entity/Display.java
@@ -802,7 +802,7 @@ public abstract class Display extends Entity {
public static final byte FLAG_ALIGN_RIGHT = 16;
private static final byte INITIAL_TEXT_OPACITY = -1;
public static final int INITIAL_BACKGROUND = 1073741824;
- private static final EntityDataAccessor<Component> DATA_TEXT_ID = SynchedEntityData.defineId(Display.TextDisplay.class, EntityDataSerializers.COMPONENT);
+ public static final EntityDataAccessor<Component> DATA_TEXT_ID = SynchedEntityData.defineId(Display.TextDisplay.class, EntityDataSerializers.COMPONENT); // SparklyPaper - Helpful NMS packet changes: make public
public static final EntityDataAccessor<Integer> DATA_LINE_WIDTH_ID = SynchedEntityData.defineId(Display.TextDisplay.class, EntityDataSerializers.INT);
public static final EntityDataAccessor<Integer> DATA_BACKGROUND_COLOR_ID = SynchedEntityData.defineId(
Display.TextDisplay.class, EntityDataSerializers.INT

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kevin Raneri <kevin.raneri@gmail.com>
Date: Tue, 9 Nov 2021 14:33:16 -0500
Subject: [PATCH] Optimize entity coordinate key
When executing getCoordinateKey for entities (a hotpath), the JVM is
required to repeatedly cast doubles to longs. The performance impact of
this depends on the CPU architecture, but generally switching between
FPU and ALU incurs a significant performance hit. The casted/rounded
data is already available in the blockPosition struct, so we use that
instead of re-doing the casting.
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
index 1d6b3fe2ce240af4ede61588795456b046eee6c9..cdcb1bff7913bfe86fed008271016a3175b6df90 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -215,7 +215,7 @@ public final class MCUtil {
}
public static long getCoordinateKey(final Entity entity) {
- return ((long)(MCUtil.fastFloor(entity.getZ()) >> 4) << 32) | ((MCUtil.fastFloor(entity.getX()) >> 4) & 0xFFFFFFFFL);
+ return ((long)(entity.blockPosition.getZ() >> 4) << 32) | ((entity.blockPosition.getX() >> 4) & 0xFFFFFFFFL); // Pufferfish - eliminate double->long cast in hotpath
}
public static long getCoordinateKey(final ChunkPos pair) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4ee843dfd826772c9157ca421d8fe1f36f814b51..41ce41e92f3722e7ffb3423c90663d7a677bf277 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -311,7 +311,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public double yo;
public double zo;
private Vec3 position;
- private BlockPos blockPosition;
+ public BlockPos blockPosition; // Pufferfish - private->public
private ChunkPos chunkPosition;
private Vec3 deltaMovement;
private float yRot;

View File

@@ -0,0 +1,55 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Sat, 18 Nov 2023 21:04:53 -0300
Subject: [PATCH] Avoid unnecessary ItemFrame#getItem() calls
When ticking a item frame, on each tick, it checks if the item on the item frame is a map and, if it is, it adds the map to be carried by the entity player
However, the "getItem()" call is a bit expensive, especially because this is only really used if the item in the item frame is a map
We can avoid this call by checking if the "cachedMapId" is not null
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index aedf24ba0d64de855a59869052cbc2704e7dc134..f49585cfd485eed504e91887599ff25c3238c8fd 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -115,13 +115,14 @@ public class ServerEntity {
ItemFrame entityitemframe = (ItemFrame) entity;
if (true || this.tickCount % 10 == 0) { // CraftBukkit - Moved below, should always enter this block
- ItemStack itemstack = entityitemframe.getItem();
-
- if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
+ if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && entityitemframe.cachedMapId != null) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable // SparklyPaper - avoid unnecessary ItemFrame#getItem() calls
Integer integer = entityitemframe.cachedMapId; // Paper
MapItemSavedData worldmap = MapItem.getSavedData(integer, this.level);
if (worldmap != null) {
+ // SparklyPaper start - avoid unnecessary ItemFrame#getItem() calls
+ ItemStack itemstack = entityitemframe.getItem();
+ if (itemstack.getItem() instanceof MapItem) { // fail-safe, what if the cached map ID is present but the item isn't a MapItem? (this should NEVER happen but, who knows)
Iterator<ServerPlayerConnection> iterator = this.trackedPlayers.iterator(); // CraftBukkit
while (iterator.hasNext()) {
@@ -134,6 +135,7 @@ public class ServerEntity {
entityplayer.connection.send(packet);
}
}
+ } // SparklyPaper end
}
}
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
index 759ecd79534a7706f7d4a63eb9dacbefcfe54674..07739c3d74074b2668466250f944dfbe22d4dc86 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -50,7 +50,8 @@ public class ItemFrame extends HangingEntity {
public static final int NUM_ROTATIONS = 8;
public float dropChance;
public boolean fixed;
- public Integer cachedMapId; // Paper
+ @Nullable // SparklyPaper - avoid unnecessary ItemFrame#getItem() calls
+ public Integer cachedMapId = null; // Paper // SparklyPaper - avoid unnecessary ItemFrame#getItem() calls
public ItemFrame(EntityType<? extends ItemFrame> type, Level world) {
super(type, world);

View File

@@ -0,0 +1,44 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Sun, 22 Oct 2023 12:27:26 -0300
Subject: [PATCH] Only check thundering once per world instead for every chunk
For some reason the isThundering check is consuming ~3% of CPU time when profiled so, instead of checking the thunder every chunk, we can cache the result and reuse on the same chunk tick
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index c02ffd419236980cd063741612e99d739d97ec94..daa5948cc7b86a719a313ea595f135cd00b6a3cc 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -599,6 +599,7 @@ public class ServerChunkCache extends ChunkSource {
}
// Paper end - optimise chunk tick iteration
+ this.level.isCurrentlyThundering = this.level.isThundering_old(); // SparklyPaper - Only check thundering once per world instead for every chunk
int chunksTicked = 0; // Paper
// Paper start - optimise chunk tick iteration
io.papermc.paper.util.player.NearbyPlayers nearbyPlayers = this.chunkMap.getNearbyPlayers(); // Paper - optimise chunk tick iteration
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9388dd9b34bb8148ce8b5f7e24122fa4bd1bafa8..0210226d2185803a18c0020d7985c1fccb798953 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -184,6 +184,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private int tileTickPosition;
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
public java.util.ArrayDeque<net.minecraft.world.level.block.RedstoneTorchBlock.Toggle> redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here
+ public boolean isCurrentlyThundering; // SparklyPaper - Only check if the world is currently thundering once instead for every chunk
// Paper start - fix and optimise world upgrading
// copied from below
@@ -1614,7 +1615,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.rainLevel = f1;
}
+ // SparklyPaper start - Only check thundering once per world instead for every chunk
public boolean isThundering() {
+ return isCurrentlyThundering;
+ }
+ public boolean isThundering_old() {
+ // SparklyPaper end
return this.dimensionType().hasSkyLight() && !this.dimensionType().hasCeiling() ? (double) this.getThunderLevel(1.0F) > 0.9D : false;
}

Some files were not shown because too many files have changed in this diff Show More