Compare commits

...

47 Commits

Author SHA1 Message Date
IPECTER 이팩터
0332eb54f2 Update README.md
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2024-02-04 12:34:02 +09:00
jihwan0511
8b759a2020 fix exploit (#75)
Validate ResourceLocation in NBT reading

Signed-off-by: jihwan0511 <98388174+jihwan0511@users.noreply.github.com>
2024-01-05 14:15:49 +09:00
IPECTER 이팩터
264f7cf9ee Fix build.gradle.kts (#71)
* Fix Exploits

* Fix build.gradle.kts

* Fix build.gradle.kts

* Fix build.gradle.kts

* Fix build.gradle.kts

---------

Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-12-31 00:20:50 +09:00
IPECTER 이팩터
379a2ac446 Fix build.gradle.kts (#69)
* Fix Exploits

* Fix build.gradle.kts

* Fix build.gradle.kts

---------

Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-12-31 00:02:31 +09:00
IPECTER 이팩터
6343f6141e Fix build.gradle.kts (#67)
* Fix Exploits

* Fix build.gradle.kts
2023-12-30 23:52:32 +09:00
IPECTER 이팩터
68b9b265a8 Fix Exploits (#65) 2023-12-30 23:28:21 +09:00
Alpha
e654ff4802 Update build.yml (#62)
Signed-off-by: Alpha <dev@alpha93.kr>
2023-12-30 19:00:48 +09:00
Alpha
749a06d195 [CI-Skip] Update README.md
Signed-off-by: Alpha <dev@alpha93.kr>
2023-10-26 11:22:17 +09:00
IPECTER 이팩터
04963e20da Update 0006-Bump-Dependencies.patch
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-10-19 22:04:22 +09:00
IPECTER
34844e7343 [CI-SKIP] typo 2023-10-19 16:55:00 +09:00
IPECTER
7e101dff34 HotFix - CustomRecipe 2023-10-19 16:53:54 +09:00
IPECTER
5c9452f565 Revert "HotFix - CustomRecipe"
This reverts commit c71fbc8092.
2023-10-19 16:43:57 +09:00
IPECTER 이팩터
c71fbc8092 HotFix - CustomRecipe
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-10-19 16:38:26 +09:00
IPECTER 이팩터
6fd3e675e9 [CI-SKIP] Improve BiomeTemperatureCache
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-28 16:18:04 +09:00
IPECTER 이팩터
e15fb5b803 [CI-SKIP] ImproveBiomeTemperatureCache
Signed-off-by: IPECTER 이팩터 <80433772+IPECTER@users.noreply.github.com>
2023-09-28 16:16:37 +09:00
AlphaKR93
d1eaa1d8bb [CI-Skip] Update README.md 2023-09-14 19:05:35 +09:00
AlphaKR93
70bebc57f5 [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:58:55 +09:00
AlphaKR93
964880bb78 Fix #52, cleanup README.md 2023-09-09 22:40:58 +09:00
AlphaKR93
cd36bdb168 change startup warning message 2023-09-09 22:10:12 +09:00
IPECTER
7b99e1fb1f Async PathProcessing (Default Disabled) 2023-09-08 00:57:38 +09:00
IPECTER
cb4e4ad8aa Fix 2023-09-07 15:47:23 +09:00
IPECTER
03abe3290a Fix Incompat with CoreProtect 2023-09-07 02:49:01 +09:00
IPECTER
b0b38d4795 Fix Incompat with CoreProtect 2023-09-07 02:20:13 +09:00
IPECTER 이팩터
9c175e796c Fix Incompat with WorldGuard really! 2023-09-07 01:50:21 +09:00
IPECTER
224476289e Fix Incompat with WorldGuard 2023-09-07 01:08:32 +09:00
IPECTER
b8bd312430 Fix Optimize VarInts
Thank you, Martijn!
2023-09-07 00:54:10 +09:00
IPECTER
8441c27926 [CI-SKIP] typo~ 2023-09-06 16:53:57 +09:00
IPECTER
ab0fc1acd0 Implement CarpetFixes-Optimizations 2023-09-06 16:48:27 +09:00
IPECTER
25f409e4e7 Bump Dependencies Patch 2023-09-06 14:14:58 +09:00
IPECTER
073a7f2411 Fix! 2023-09-05 16:08:57 +09:00
github-actions[bot]
37d1596da8 [CI-Skip] Updated Dependencies ()
Dependency has released updates that appear to apply and compile correctly
2023-06-23 14:31:24 +00: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
67 changed files with 3998 additions and 396 deletions

View File

@@ -16,21 +16,22 @@ jobs:
strategy:
matrix:
base_jdk: [17]
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 repository
uses: actions/checkout@v4
- name: Checkout pages
uses: actions/checkout@v3
- name: Checkout javadocs
uses: actions/checkout@v4
if: github.ref_name == env.MAIN_BRANCH
with:
repository: PlazmaMC/Javadocs
path: javadoc
ref: gh-pages
token: ${{ secrets.GH_PAT }}
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
@@ -38,9 +39,9 @@ jobs:
- name: Set up GraalVM ${{ matrix.base_jdk }}
uses: graalvm/setup-graalvm@v1
with:
github-token: ${{ secrets.GH_PAT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
java-version: ${{ matrix.base_jdk }}
version: ${{ matrix.graal }}
version: latest
cache: 'gradle'
- name: Configure Git
@@ -71,11 +72,11 @@ jobs:
if: github.ref_name == env.MAIN_BRANCH
run: |
export GITHUB_USERNAME=${{ env.ORG_NAME }}
export GITHUB_TOKEN=${{ secrets.GH_PAT }}
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
./gradlew publish --stacktrace
- name: Upload Artifacts
if: env.DEBUG == 'true' || !startsWith(github.ref_name, 'ver/')
if: "!startsWith(github.ref_name, 'ver/')"
uses: actions/upload-artifact@v3
with:
name: Artifacts
@@ -84,24 +85,38 @@ jobs:
Plazma-API/build/docs/javadoc
- name: Get Release Number
run: echo "RELEASE=$(git ls-remote --tags origin | grep "release" | wc -l)" >> $GITHUB_ENV
if: startsWith(github.ref_name, 'ver/')
run: echo "RELEASE=$(git ls-remote --tags origin | grep "build/${{ env.MC_VERSION }}" | wc -l)" >> $GITHUB_ENV
- name: Release Artifacts
if: startsWith(github.ref_name, 'ver/')
uses: marvinpinto/action-automatic-releases@latest
uses: softprops/action-gh-release@v0.1.15
with:
title: "Release #${{ env.RELEASE }}"
automatic_release_tag: release-${{ env.RELEASE }}
repo_token: "${{ secrets.GH_PAT }}"
name: "Build #${{ env.RELEASE }} for ${{ env.MC_VERSION }}"
tag_name: build/${{ env.MC_VERSION }}/${{ env.RELEASE }}
target_commitish: ${{ github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: build/libs/*.jar
prerelease: false
- name: Release Artifacts (Latest)
- name: Release Artifacts (Latest/Stable)
if: startsWith(github.ref_name, 'ver/')
uses: marvinpinto/action-automatic-releases@latest
uses: softprops/action-gh-release@v0.1.15
with:
title: "Release #${{ env.RELEASE }}"
automatic_release_tag: latest-${{ env.MC_VERSION }}
repo_token: "${{ secrets.GH_PAT }}"
name: "Build #${{ env.RELEASE }} for ${{ env.MC_VERSION }}"
tag_name: build/${{ env.MC_VERSION }}/latest
target_commitish: ${{ github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: build/libs/*.jar
- name: Release Artifacts (Latest/Development)
if: startsWith(github.ref_name, 'dev/')
uses: softprops/action-gh-release@v0.1.15
with:
name: "Development Build for ${{ env.MC_VERSION }}"
tag_name: build/${{ env.MC_VERSION }}/latest
target_commitish: ${{ github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: build/libs/*.jar
prerelease: false

View File

@@ -1,2 +1,2 @@
purpurCommit = 68117a4e35802c17c89eb0b8ff993d08a8e2bd66
pufferfishCommit = 19a70d2ca38093d36f233cb3b590f4d28b85c078
purpurCommit = 68862729138c74fed22a97b582f399a9c6eb9d79
pufferfishCommit = cadfa71a2eaef4581e1163ff63d07fc596145fa1

View File

@@ -1,48 +1,33 @@
<div align="center">
![image](res/title-400.png)
![image](https://raw.githubusercontent.com/PlazmaMC/Plazma/main/src/resources/title-900.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)
[![Discord](https://img.shields.io/discord/1083716853928558652?style=for-the-badge&logo=discord&logoColor=ffffff&label=DISCORD&color=5865F2&link=https%3A%2F%2Fdiscord.gg%2FMmfC52K8A8)](https://discord.gg/MmfC52K8A8)
[![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)
[![Upstream Status](https://img.shields.io/badge/upstream-dropped-red?style=for-the-badge&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)](https://github.com/PlazmaMC/AlwaysUpToDate/actions/workflows/plazma.yml)
[![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/build/1.19.4/latest)
[![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,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAbvSURBVHhe7Z3vixVlFMf3jj9KLC0tqAgJlIoQSjOIIqggwohsCylxrYzU1BfZf7D1IvoLsiIqCwxXqQzCF722N0a+sEKo0BXXosLW1QpX3dvnzHOuuD9m5pm7M/Pc2Xs+cHhmnjnPr/Ode3Zm7o/tqRvNZjMaGxvbgH2L/at2EOuTY+pmlAEBnkug91EmMYDNVnejaAj+my7OqfSru1EkBH8Bdk6DnMYwfvO0WcdTp5y5qtFozNftNBZi97vNzqdOAizS0ofFWnY8tRGAs7+hm5nk8Q2NXbYFxgQIjAkQGBMgMCZAYEyAwJgAgTEBAmMCBMYECIwJEBgTIDAmQGBMgMCYAIExAQJjAgTGBAiMCRAYEyAwJkBgTIDAmACBMQECYwIExgQIjAkQGBMgMCZAYEyAwJgAgTEBAmMCBMYECIwJEJjSBWg2m7PHxsZWYs9gj2AL9FDHIXPDHsV6sRUydz1UT1jEauyX+Nu7CvtnKfqxOermBf5rpb0na7WZF/jPYV5vYP+45g6ZO/aEutULJr4Ou6RrmQTHvqDwFgHfUgTAV37+4EvXbDIcu4g9p+71gHnfxKTlTE8Fn88p5mqzVPArXADGvwpLDP4VDGM3aLNCKeVvAJNd12g0rtHdRPDpxXdAAqFVlcG4Ivwe5rDG1aSyEP8+3S6Usv4I36NlJhqAPSww19+E6SDBx/Z6Br/FCi0LpSMuQyUQBERE8EpH00FebYwzwJhPaVVQyhLgsJbeEJDS05EK7Jt2JvK9loVSlgC7Wew53fZGA1NKOtIzP2/aiaHdMMWnbq9YShEgiqI/KDYx8Uuuxh8JEO0KTUf6qpIzP3faYR4XKV5lTaddTY1g4RuxiywiN7Tbr4GLoaqty1C25Tpf7jlyI3PHXtau6oksAEu8IUuDdnKNHqcjytwCUKbeZKVBOwn+Rumn9rCQV2RBurZc0C6+WcNyCUA7uclq98y/gNX7zJ8IC5puOpKfpfQC3/VY96adJGRhWLvp6JRuZoLvkG7mgnYzJ+0kwQLbTkdlwpxmXtpJQs6yThJB5tI1wW8hC8baSkdFosGf2WknCRYeNB0xdveknSTk7AshgozZ9cFvIYHAKktHGvzOTDvMT94fnUdZ6aNqxqwkHTFG5WmHYeUn9yWmyQ8ZcZBPLuzD/sbkN/mPY2/R6Hp1KR3GKzUdSd8yhg5XOoy1iGHfphzEJKansb3YSnVxUPEiNuXCqZfGS9W1dBirlHSk63tJhykdiRk26EYfD/Wj2IaWo5z5F/TYlHD8MEVln5FhvELTkawPqyztMKQ8BDziRp8ajp/H7hZn+a8TmeD8rPZfCYxXSDqSPqQv7bYSGNb3weGALPQv3UkFv53af2Uw5rTSEW0rTTstJFZuBung96dc6fj+Ln+e3+8vhCiKPqTYwlxzv7NGG3kna3Oj0fjY1VSKb6wWR0zQ67f2ff2KBhE+oMj19qb6blEBKydPTCu91m8XAvkRxWZ51bqaZDT4m0IFPy+1EEDwSUcci9OOClYLaiOAQGAlHa3HzsQV45G6vrqc+S28BeDs6oj/y0KA5SMrS7HXsU+o2kW5g3KZHIudApMrVlwKjdIgE/y+1iZGBsTqgIYtFfzOyytAPvXlw21aGikQVzn7b3d7mQyLACfddibLUKxjv17UKSCAfI9gidvLZEgEOOq20+GSVT4qmOurP13KGmLl+9zsqAjwndv2YgcKz9JtYwIam9fcnheH5A+GfBvQG/y3a2NjAhIbDZMX+C8X1eRrpCdcVTb4yn80vVfHNBTich/2n4tSNvjKt0cb8ixI7h53uW6ywX8+DQ/QwSqt6nok+BQHiM3VrsaL3fg34y0CuoROUt+UmYiojW1j0/tmbqbB2mcRg+0SizgonmjsbtZuHFS8r8dzQbsjmDy3v5HdjrhbLhNZo6wVk3ftUt/1SoJ272l3PZcDRqUocpSXRVvX+vQrqWwQ+5k+4u8IxwdmCKypwZKuZVNuspaw29ZbtPQxQts7sN9lf9wZiwhbOfCO7holgABboyh6V3fHC8DBCNuPCE9qlVEgGtte7HJ2mJSzcboOO4jTXVplFAAx/YHiQc7+EVfjmHQFQ+Dl4dzjNDjmaozpQiyPU6yeGHxhyktIHE8ixMM0/EmrjDbRM/8hiamrGU/iNTwCnMAeoIOvtMrICbHbTyFpJ/GJc+pNFAKcwZ6mI7nhOqvVRgbEakRiRux6p0o7V+J946T3Cf3YC3Sc55a7ayDo5ynksU4/gf8trszAW4AWCHELxTbseYSo7EO7nQyB/5XiM2wngT8VV3qSW4AWDCp3hsvZfAyTB3N3YrdiCxGm9J+dCQHrHaWQq8QhTN7IOoR9w3p/xNq48+/p+R+4L+/7RtGOvAAAAABJRU5ErkJggg==&style=flat-square&color=green)](https://github.com/PlazmaMC/Plazma/releases/tag/latest-1.19.4)
[![License](https://img.shields.io/github/license/PlazmaMC/Plazma?logo=github&style=flat-square&logoColor=ffffff)](LICENSE)
[![Downloads](https://img.shields.io/github/downloads/PlazmaMC/Plazma/total?label=Downloads&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAbvSURBVHhe7Z3vixVlFMf3jj9KLC0tqAgJlIoQSjOIIqggwohsCylxrYzU1BfZf7D1IvoLsiIqCwxXqQzCF722N0a+sEKo0BXXosLW1QpX3dvnzHOuuD9m5pm7M/Pc2Xs+cHhmnjnPr/Ode3Zm7o/tqRvNZjMaGxvbgH2L/at2EOuTY+pmlAEBnkug91EmMYDNVnejaAj+my7OqfSru1EkBH8Bdk6DnMYwfvO0WcdTp5y5qtFozNftNBZi97vNzqdOAizS0ofFWnY8tRGAs7+hm5nk8Q2NXbYFxgQIjAkQGBMgMCZAYEyAwJgAgTEBAmMCBMYECIwJEBgTIDAmQGBMgMCYAIExAQJjAgTGBAiMCRAYEyAwJkBgTIDAmACBMQECYwIExgQIjAkQGBMgMCZAYEyAwJgAgTEBAmMCBMYECIwJEJjSBWg2m7PHxsZWYs9gj2AL9FDHIXPDHsV6sRUydz1UT1jEauyX+Nu7CvtnKfqxOermBf5rpb0na7WZF/jPYV5vYP+45g6ZO/aEutULJr4Ou6RrmQTHvqDwFgHfUgTAV37+4EvXbDIcu4g9p+71gHnfxKTlTE8Fn88p5mqzVPArXADGvwpLDP4VDGM3aLNCKeVvAJNd12g0rtHdRPDpxXdAAqFVlcG4Ivwe5rDG1aSyEP8+3S6Usv4I36NlJhqAPSww19+E6SDBx/Z6Br/FCi0LpSMuQyUQBERE8EpH00FebYwzwJhPaVVQyhLgsJbeEJDS05EK7Jt2JvK9loVSlgC7Wew53fZGA1NKOtIzP2/aiaHdMMWnbq9YShEgiqI/KDYx8Uuuxh8JEO0KTUf6qpIzP3faYR4XKV5lTaddTY1g4RuxiywiN7Tbr4GLoaqty1C25Tpf7jlyI3PHXtau6oksAEu8IUuDdnKNHqcjytwCUKbeZKVBOwn+Rumn9rCQV2RBurZc0C6+WcNyCUA7uclq98y/gNX7zJ8IC5puOpKfpfQC3/VY96adJGRhWLvp6JRuZoLvkG7mgnYzJ+0kwQLbTkdlwpxmXtpJQs6yThJB5tI1wW8hC8baSkdFosGf2WknCRYeNB0xdveknSTk7AshgozZ9cFvIYHAKktHGvzOTDvMT94fnUdZ6aNqxqwkHTFG5WmHYeUn9yWmyQ8ZcZBPLuzD/sbkN/mPY2/R6Hp1KR3GKzUdSd8yhg5XOoy1iGHfphzEJKansb3YSnVxUPEiNuXCqZfGS9W1dBirlHSk63tJhykdiRk26EYfD/Wj2IaWo5z5F/TYlHD8MEVln5FhvELTkawPqyztMKQ8BDziRp8ajp/H7hZn+a8TmeD8rPZfCYxXSDqSPqQv7bYSGNb3weGALPQv3UkFv53af2Uw5rTSEW0rTTstJFZuBung96dc6fj+Ln+e3+8vhCiKPqTYwlxzv7NGG3kna3Oj0fjY1VSKb6wWR0zQ67f2ff2KBhE+oMj19qb6blEBKydPTCu91m8XAvkRxWZ51bqaZDT4m0IFPy+1EEDwSUcci9OOClYLaiOAQGAlHa3HzsQV45G6vrqc+S28BeDs6oj/y0KA5SMrS7HXsU+o2kW5g3KZHIudApMrVlwKjdIgE/y+1iZGBsTqgIYtFfzOyytAPvXlw21aGikQVzn7b3d7mQyLACfddibLUKxjv17UKSCAfI9gidvLZEgEOOq20+GSVT4qmOurP13KGmLl+9zsqAjwndv2YgcKz9JtYwIam9fcnheH5A+GfBvQG/y3a2NjAhIbDZMX+C8X1eRrpCdcVTb4yn80vVfHNBTich/2n4tSNvjKt0cb8ixI7h53uW6ywX8+DQ/QwSqt6nok+BQHiM3VrsaL3fg34y0CuoROUt+UmYiojW1j0/tmbqbB2mcRg+0SizgonmjsbtZuHFS8r8dzQbsjmDy3v5HdjrhbLhNZo6wVk3ftUt/1SoJ272l3PZcDRqUocpSXRVvX+vQrqWwQ+5k+4u8IxwdmCKypwZKuZVNuspaw29ZbtPQxQts7sN9lf9wZiwhbOfCO7holgABboyh6V3fHC8DBCNuPCE9qlVEgGtte7HJ2mJSzcboOO4jTXVplFAAx/YHiQc7+EVfjmHQFQ+Dl4dzjNDjmaozpQiyPU6yeGHxhyktIHE8ixMM0/EmrjDbRM/8hiamrGU/iNTwCnMAeoIOvtMrICbHbTyFpJ/GJc+pNFAKcwZ6mI7nhOqvVRgbEakRiRux6p0o7V+J946T3Cf3YC3Sc55a7ayDo5ynksU4/gf8trszAW4AWCHELxTbseYSo7EO7nQyB/5XiM2wngT8VV3qSW4AWDCp3hsvZfAyTB3N3YrdiCxGm9J+dCQHrHaWQq8QhTN7IOoR9w3p/xNq48+/p+R+4L+/7RtGOvAAAAABJRU5ErkJggg==&style=flat-square&color=green)](https://github.com/PlazmaMC/Plazma/releases/tag/build/1.19.4/latest)
[![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!
[main]: https://github.com/PlazmaMC/Plazma
## 💬 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
> [!IMPORTANT]
This is the branch for Plazma 1.19.4. If you want to know more about Plazma, please check the **[main branch][main]**.<br>
이곳은 플라즈마의 1.19.4용 브랜치 입니다. 플라즈마에 대해 자세히 알고 싶다면 **[main 브랜치][main]** 를 확인해주세요.
## ⬇️ 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`
> [!NOTE]
If you don't know about Mojmap or Bundler, download **Reobf Paperclip**<br>
Mojmap 또는 Bundler에 대해 잘 알지 못한다면, **Reobf Paperclip**을 사용하세요
## ⚖️ 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)
| **Reobf Paperclip (Default)** | Mojmap Paperclip | Reobf Bundler | Mojmap Bundler |
| :---: | :---: | :---: | :---: |
| [Download](https://github.com/PlazmaMC/Plazma/releases/download/build/1.19.4/latest/plazma-paperclip-1.19.4-R0.1-SNAPSHOT-reobf.jar) | [Download](https://github.com/PlazmaMC/Plazma/releases/download/build/1.19.4/latest/plazma-paperclip-1.19.4-R0.1-SNAPSHOT-mojmap.jar) | [Download](https://github.com/PlazmaMC/Plazma/releases/download/build/1.19.4/latest/plazma-bundler-1.19.4-R0.1-SNAPSHOT-reobf.jar) | [Download](https://github.com/PlazmaMC/Plazma/releases/download/build/1.19.4/latest/plazma-bundler-1.19.4-R0.1-SNAPSHOT-mojmap.jar) |

View File

@@ -5,7 +5,7 @@ plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.patcher") version "1.5.5"
id("io.papermc.paperweight.patcher") version "1.5.10"
}
repositories {
@@ -18,38 +18,58 @@ repositories {
}
dependencies {
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
remapper("net.fabricmc:tiny-remapper:0.8.11:fat")
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
paperclip("io.papermc:paperclip:3.0.3")
}
subprojects {
allprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17))
publishing {
repositories {
maven {
name = "githubPackage"
url = uri("https://maven.pkg.github.com/PlazmaMC/PlazmaBukkit")
credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
}
publications.register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
}
subprojects {
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.release.set(17)
}
apply(plugin = "java")
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks {
withType<JavaCompile>().configureEach {
options.compilerArgs.add("--add-modules=jdk.incubator.vector")
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
tasks.withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<Test> {
minHeapSize = "2g"
maxHeapSize = "2g"
withType<ProcessResources> {
filteringCharset = Charsets.UTF_8.name()
}
withType<Test> {
minHeapSize = "2g"
maxHeapSize = "2g"
}
}
repositories {
@@ -83,28 +103,39 @@ paperweight {
}
}
val upstreamTask = tasks.register("updateUpstream") {
val tempDir = layout.cacheDir("updateUpstream");
val file = "gradle.properties";
tasks {
generateDevelopmentBundle {
apiCoordinates.set("org.plazmamc.plazma:plazma-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
"https://papermc.io/repo/repository/maven-public/"
)
}
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;
register("updateUpstream") {
val tempDir = layout.cacheDir("updateUpstream");
val file = "gradle.properties";
copy {
from(file)
into(tempDir)
filter { line: String ->
line.replace("paperCommit = .*".toRegex(), "paperCommit = $latestCommit")
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")
}
}
}
doLast {
copy {
from(tempDir.file("gradle.properties"))
into(project.file(file).parent)
}
}
}
doLast {
copy {
from(tempDir.file("gradle.properties"))
into(project.file(file).parent)
}
}
}
}

View File

@@ -1,7 +1,7 @@
group = org.plazmamc.plazma
version = 1.19.4-R0.1-SNAPSHOT
paperCommit = bcd8dc2c1189293c4fc0b57048f0f0668c1b7e60
paperCommit = 483368e480eb2ec060d8e68b30e14ec96aba6c4e
org.gradle.caching = true
org.gradle.parallel = true

View File

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

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 17 May 2023 05:33:40 +0000
Date: Sun, 4 Jun 2023 07:49:45 +0000
Subject: [PATCH] Pufferfish API Changes
Original: Kevin Raneri <kevin.raneri@gmail.com>

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 17 May 2023 05:41:48 +0000
From: BillyGalbreath <Blake.Galbreath@Gmail.com>
Date: Tue, 4 Jan 2022 23:05:41 -0600
Subject: [PATCH] Purpur API Changes
Original: PurpurMC
@@ -169,10 +169,10 @@ index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9
new ArrayList<String>(TIMINGS_SUBCOMMANDS.size()));
}
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 998f629852e1103767e005405d1f39c2251ecd28..3c05b03bb5ff3bfec6c69a5cc4b23f0633ab473f 100644
index b7a2cecb334ce39fa09d8ab949a29eedbdc44c36..b1f35c68373edfe666ca05b50f0ec022a1859ce9 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -200,6 +200,18 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
@@ -201,6 +201,18 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Mob> CLIMB_ON_TOP_OF_POWDER_SNOW = GoalKey.of(Mob.class, NamespacedKey.minecraft("climb_on_top_of_powder_snow"));
GoalKey<Wolf> WOLF_PANIC = GoalKey.of(Wolf.class, NamespacedKey.minecraft("wolf_panic"));
@@ -209,10 +209,10 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c
@Override
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 15a9993c2705e2dcc0366394ded57acffab589c0..74731f0d64d3bfc61baf816516b2bcef6515213e 100644
index b0bc2df41506770e2854a287813f1c53f003eda1..a2f617537292e3bac52d665a6e51b7d4ce4a227e 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -2460,4 +2460,127 @@ public final class Bukkit {
@@ -2483,4 +2483,127 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
@@ -431,12 +431,12 @@ index ea4ceb643239c26851bacbf45fc3f2efef3bb4be..3b8395dcb73e3fb251adf7438cbc7e95
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index adb2416887cc3b544ec36c552bdf7105328c24a5..d334c963e16590c68ecd9d1d27434c7af6f7e21c 100644
index 9b290969b0e60f20450cd15e3fc6f37276f12ae6..77a885fd17f280649b95df758f1096fa38fe8d69 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -11156,4 +11156,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public String getItemTranslationKey() {
return Bukkit.getUnsafe().getItemTranslationKey(this);
@@ -11166,4 +11166,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public boolean isEnabledByFeature(@NotNull World world) {
return Bukkit.getDataPackManager().isEnabledByFeature(this, world);
}
+
+ // Purpur start
@@ -595,10 +595,10 @@ index 72175dcae49f75b494ab70958053ed994a8828f4..df642a55003517040be795b44a8bf107
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9f7029d327b55c8b1b9cfef8ea2678b87dad8ddb..d87e4d177b60957eee198c3f1791dbf26dbdddd6 100644
index 1d1a1d087dabc9794e0062a064da2cced4062309..96160bced90bb4cd84e48c85c645cad0eb672b85 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1967,6 +1967,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -1994,6 +1994,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
}
// Paper end
@@ -617,7 +617,7 @@ index 9f7029d327b55c8b1b9cfef8ea2678b87dad8ddb..d87e4d177b60957eee198c3f1791dbf2
/**
* Sends the component to the player
*
@@ -2135,4 +2147,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2162,4 +2174,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@NotNull org.bukkit.potion.PotionBrewer getPotionBrewer();
// Paper end
@@ -724,10 +724,10 @@ index 9f7029d327b55c8b1b9cfef8ea2678b87dad8ddb..d87e4d177b60957eee198c3f1791dbf2
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 2b45aa9b438d7856ec448c56832b2b2100961565..4561ca02052d774bc1424f7044c34f7affd415fc 100644
index 72f1576b8ce5b55b50f053f346ce42c52db4b568..adf8169d5baefa7a33c33ef066180a8116617756 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3973,6 +3973,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3974,6 +3974,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public DragonBattle getEnderDragonBattle();
@@ -812,8 +812,8 @@ index 2b45aa9b438d7856ec448c56832b2b2100961565..4561ca02052d774bc1424f7044c34f7a
+ // Purpur end
+
/**
* Represents various map environment types that a world may be
*/
* Get all {@link FeatureFlag} enabled in this world.
*
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index ac9a28922f8a556944a4c3649d74c32c622f0cb0..5349f16136d9348c374a7dfe5b89a71dfcb0e66d 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -1171,10 +1171,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9cd49bf6db451af67cd15c8857d7bf51a4e1a67a..838f32eb3397d847071f54648dbac02c35d621cf 100644
index 88c4885569d2b8b22fce55601d50608ac8e9388c..dc437885404ae147a06cac653e519a4674a9a951 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3057,4 +3057,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3068,4 +3068,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Override
Spigot spigot();
// Spigot end

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Plazma Configurations
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index d87e4d177b60957eee198c3f1791dbf26dbdddd6..3fbc6de9d49697baebd22f9e5977812eadff00d3 100644
index 96160bced90bb4cd84e48c85c645cad0eb672b85..cd7080c49b769dec6d5d80774bde02e9dd8ecc01 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1967,6 +1967,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -1994,6 +1994,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
}
// Paper end

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

@@ -0,0 +1,91 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 12:40:40 +0900
Subject: [PATCH] Bump-Dependencies
diff --git a/build.gradle.kts b/build.gradle.kts
index 417c4324af22c870de669e338a1eee5d540184a4..6cb60894c2363d5c6a71b12008421d49d2c128a0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ java {
withJavadocJar()
}
-val adventureVersion = "4.13.1"
+val adventureVersion = "4.14.0" // Plazma - Bump Dependencies
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
@@ -23,16 +23,16 @@ configurations.api {
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("org.yaml:snakeyaml:1.33")
+ api("com.google.guava:guava:32.1.2-jre") // Plazma - Bump Dependencies
+ api("com.google.code.gson:gson:2.10.1") // Plazma - Bump Dependencies
+ api("net.md-5:bungeecord-chat:1.19-R0.1-SNAPSHOT") // Paper // Plazma - Bump Dependencies
+ api("org.yaml:snakeyaml:1.33") // Plazma - Bump Dependencies
api("org.joml:joml:1.10.5")
// Paper start
api("com.googlecode.json-simple:json-simple:1.1.1") {
isTransitive = false // includes junit
}
- api("it.unimi.dsi:fastutil:8.5.6")
+ api("it.unimi.dsi:fastutil:8.5.12") // Plazma - Bump Dependencies
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
apiAndDocs("net.kyori:adventure-api")
apiAndDocs("net.kyori:adventure-text-minimessage")
@@ -40,34 +40,34 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
apiAndDocs("net.kyori:adventure-text-serializer-plain")
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
+ api("org.apache.logging.log4j:log4j-api:2.20.0") // Plazma - Bump Dependencies
+ api("org.slf4j:slf4j-api:2.0.9") // Plazma - Bump Dependencies
+ api("io.sentry:sentry:6.28.0") // Pufferfish // Plazma - Bump Dependencies
- implementation("org.ow2.asm:asm:9.4")
- implementation("org.ow2.asm:asm-commons:9.4")
+ implementation("org.ow2.asm:asm:9.5") // Plazma - Bump Dependencies
+ implementation("org.ow2.asm:asm-commons:9.5") // Plazma - Bump Dependencies
// Paper end
- api("org.apache.maven:maven-resolver-provider:3.8.5") // Paper, expose
- compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
- compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
- compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
+ api("org.apache.maven:maven-resolver-provider:3.9.4") // Paper, expose // Plazma - Bump Dependencies
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.15") // Plazma - Bump Dependencies
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.15") // Plazma - Bump Dependencies
+ compileOnly("com.google.code.findbugs:jsr305:3.0.2") // Paper // Plazma - Bump Dependencies
- val annotations = "org.jetbrains:annotations:23.0.0" // Paper - we don't want Java 5 annotations...
+ val annotations = "org.jetbrains:annotations:24.0.1" // Paper - we don't want Java 5 annotations... // Plazma - Bump Dependencies
compileOnly(annotations)
testCompileOnly(annotations)
// Paper start - add checker
- val checkerQual = "org.checkerframework:checker-qual:3.21.0"
+ val checkerQual = "org.checkerframework:checker-qual:3.38.0" // Plazma - Bump Dependencies
compileOnlyApi(checkerQual)
testCompileOnly(checkerQual)
// Paper end
- testImplementation("org.mockito:mockito-core:4.9.0") // Paper - add mockito
+ testImplementation("org.mockito:mockito-core:5.5.0") // Paper - add mockito // Plazma - Bump Dependencies
- testImplementation("org.apache.commons:commons-lang3:3.12.0")
+ testImplementation("org.apache.commons:commons-lang3:3.13.0") // Plazma - Bump Dependencies
testImplementation("junit:junit:4.13.2")
- testImplementation("org.hamcrest:hamcrest-library:1.3")
- testImplementation("org.ow2.asm:asm-tree:9.4")
+ testImplementation("org.hamcrest:hamcrest-library:2.2") // Plazma - Bump Dependencies
+ testImplementation("org.ow2.asm:asm-tree:9.5") // Plazma - Bump Dependencies
}
configure<PublishingExtension> {

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..45b8ee1945202cc673905aab5c90985c01cb205e 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
+
// 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

@@ -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 7b38042c32295ef7c5ea3c212170cc8fcdf0d7a0..1e300e51fa3413f9846c686545f2b7deb0ac5160 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -156,3 +156,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,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Thu, 18 May 2023 16:21:37 +0900
Subject: [PATCH] Let Me Despawn Configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index a1b55bb5431d1712fc06da0cf06857a986efeea0..116384c1fe27a868bcbe1d21f0b2723c73b9170c 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -131,4 +131,11 @@ public class LevelConfigurations extends ConfigurationPart {
}
}
+
+ public LetMeDespawn letMeDespawn;
+ public class LetMeDespawn extends ConfigurationPart {
+
+ public boolean enabled = false;
+
+ }
}

View File

@@ -0,0 +1,74 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Thu, 18 May 2023 16:42:40 +0900
Subject: [PATCH] Implement Let Me Despawn
Original: frikinjay/let-me-despawn
Copyright (C) 2023 frikinjay
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 3a365d7efd439cb8ddb99381bd714fb48896f4d2..b6d27332eb151bdf408909b241c493da54841c8e 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -885,7 +885,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
public void checkDespawn() {
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard();
- } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
+ } else if ((this.level.plazmaLevelConfiguration().letMeDespawn.enabled || !this.isPersistenceRequired()) && !this.requiresCustomPersistence()) {
// Paper start - optimise checkDespawn
Player entityhuman = this.level.findNearbyPlayer(this, level.paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).hard() + 1, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper
if (entityhuman == null) {
@@ -899,14 +899,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
int j = i * i;
if (d0 > (double) j && this.removeWhenFarAway(d0)) {
- this.discard();
+ this.dropEquipmentOnDespawn(); this.discard(); // Plazma - Let Me Despawn
}
int k = this.level.paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).soft(); // Paper - custom despawn distances
int l = k * k;
if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l && this.removeWhenFarAway(d0)) {
- this.discard();
+ this.dropEquipmentOnDespawn(); this.discard(); // Plazma - Let Me Despawn
} else if (d0 < (double) l) {
this.noActionTime = 0;
}
@@ -917,6 +917,19 @@ public abstract class Mob extends LivingEntity implements Targeting {
}
}
+ // Plazma start - Let Me Despawn
+ private void dropEquipmentOnDespawn() {
+ if (!this.level.plazmaLevelConfiguration().letMeDespawn.dropPickedUpItem()) return;
+ for (EquipmentSlot equipmentSlot : EquipmentSlot.values()) {
+ ItemStack itemStack = this.getItemBySlot(equipmentSlot);
+ if (!itemStack.isEmpty() && !EnchantmentHelper.hasVanishingCurse(itemStack)) {
+ this.spawnAtLocation(itemStack);
+ this.setItemSlot(equipmentSlot, ItemStack.EMPTY);
+ }
+ }
+ }
+ // Plazma end
+
@Override
protected final void serverAiStep() {
++this.noActionTime;
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index 116384c1fe27a868bcbe1d21f0b2723c73b9170c..97ffcd1c0e50ab21756404a483fa8d1f4b6579b1 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -136,6 +136,11 @@ public class LevelConfigurations extends ConfigurationPart {
public class LetMeDespawn extends ConfigurationPart {
public boolean enabled = false;
+ boolean dropPickedUpItem = true;
+
+ public boolean dropPickedUpItem() {
+ return enabled && dropPickedUpItem;
+ }
}
}

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 17 May 2023 05:33:40 +0000
Date: Sun, 4 Jun 2023 07:49:45 +0000
Subject: [PATCH] Pufferfish Server Changes
Original: Kevin Raneri <kevin.raneri@gmail.com>
@@ -16,11 +16,8 @@ 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 9cf389defdaeb887e9cad4f0fed3f3b95667b238..b41b186397d013c19436c345be98b785d4bd0295 100644
index 4f2fa65ade89c5703451dad4f80eeef162b277d1..3ee1160c796cc86db9bc9438055b307239e9a8f7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,8 +7,12 @@ plugins {
@@ -616,10 +613,10 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
+}
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..6e441a1a28ba72a8b1cc09fe5fca71b3c70627d4
index 0000000000000000000000000000000000000000..0dd3374468e05f7a312ba5856b9cf8a4787dfa59
--- /dev/null
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -0,0 +1,285 @@
@@ -0,0 +1,293 @@
+package gg.pufferfish.pufferfish;
+
+import gg.pufferfish.pufferfish.simd.SIMDDetection;
@@ -890,11 +887,19 @@ index 0000000000000000000000000000000000000000..6e441a1a28ba72a8b1cc09fe5fca71b3
+
+ public static boolean throttleInactiveGoalSelectorTick;
+ private static void inactiveGoalSelectorThrottle() {
+ getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true,
+ throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true,
+ "Throttles the AI goal selector in entity inactive ticks.",
+ "This can improve performance by a few percent, but has minor gameplay implications.");
+ }
+
+ public static boolean allowEndCrystalRespawn;
+ private static void allowEndCrystalRespawn() {
+ allowEndCrystalRespawn = getBoolean("allow-end-crystal-respawn", true,
+ "Allows end crystals to respawn the ender dragon.",
+ "On servers that expect end crystal fights in the end dimension, disabling this",
+ "will prevent the server from performing an expensive search to attempt respawning",
+ "the ender dragon whenever a player places an end crystal.");
+ }
+
+ public static boolean disableMethodProfiler;
+ public static boolean disableOutOfOrderChat;
@@ -1875,7 +1880,7 @@ index 04b1531572e8fff1e46fe1c94e7fc863841e0f66..47ddc42f2b63d9d3fae5ae6ea93d4183
int LARGE_MAX_STACK_SIZE = 64;
int DEFAULT_DISTANCE_LIMIT = 8;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb0c8d521b 100644
index 280ee1838106201f5e3ba7753caced6d030f7e55..b4ab2cfb7a5fa0d2efd1a759d754d5203aaac077 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -292,7 +292,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1887,7 +1892,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
private ChunkPos chunkPosition;
private Vec3 deltaMovement;
private float yRot;
@@ -416,6 +416,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -417,6 +417,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return this.originWorld;
}
// Paper end
@@ -1900,7 +1905,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
public float getBukkitYaw() {
return this.yRot;
}
@@ -490,17 +496,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -491,17 +497,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
}
@@ -1938,7 +1943,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
for (Entity passenger : passengers) {
org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
@@ -509,6 +534,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -510,6 +535,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
range = passengerRange;
}
}
@@ -1948,7 +1953,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
}
@@ -790,6 +818,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -791,6 +819,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// CraftBukkit end
public void baseTick() {
@@ -1961,7 +1966,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
this.level.getProfiler().push("entityBaseTick");
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
this.feetBlockState = null;
@@ -4163,16 +4197,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4164,16 +4198,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
@@ -1987,7 +1992,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
double d1 = 0.0D;
boolean flag = this.isPushedByFluid();
boolean flag1 = false;
@@ -4180,14 +4216,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4181,14 +4217,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
int k1 = 0;
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
@@ -2055,7 +2060,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
if (d2 >= axisalignedbb.minY) {
flag1 = true;
@@ -4209,9 +4292,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4210,9 +4293,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// CraftBukkit end
}
}
@@ -2578,7 +2583,7 @@ index 27c028ab6b1edb6e413af3bbaa27bf30f2d85540..302ca7391109c10e81a7745504b3c530
return false;
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 8b2a3a8482018b7db7de81bc295862f783e17ce5..e6f87e1e3c99195ed11c81162cb54e7f5750c4ba 100644
index a211ca048dddc75afce1f83ee1700bad66e457fc..85260fd93ca8d5ffd0ba7a98f1d47093d58f0f87 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -44,6 +44,36 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@@ -2665,6 +2670,19 @@ index 08f027cdcaeeca7b545483cb8c5eb8d13e4933b9..992ff554643b149d9c6101562a9754a8
this.readChestVehicleSaveData(nbt);
}
diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
index 171ce56ec3b8761f75144b1fca2f100fcbba6800..4202d8df909a6315cce0def93ad5241a519de43e 100644
--- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java
+++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
@@ -55,7 +55,7 @@ public class EndCrystalItem extends Item {
world.gameEvent((Entity) context.getPlayer(), GameEvent.ENTITY_PLACE, blockposition1);
EndDragonFight enderdragonbattle = ((ServerLevel) world).dragonFight();
- if (enderdragonbattle != null) {
+ if (enderdragonbattle != null && gg.pufferfish.pufferfish.PufferfishConfig.allowEndCrystalRespawn) { // Pufferfish
enderdragonbattle.tryRespawn();
}
}
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
index f4f3f3a19d3cadaef1ae1a47daa68251a983dcf2..8da06f8bea0239c5206d5d4f4ff48bdeb0a89f9d 100644
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
@@ -3190,7 +3208,7 @@ index d190bad5d287766ed4165ed827d9901a9d878687..13594b96cc8f451723c3598ef302ccee
// CraftBukkit start
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 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..b5e118456af6421ae3f85cb8232dc97a8b2d46b7 100644
index 854865f28bcae0fb0c17717c914687f78e951e21..c6297917e94f5a8b4b1447b2c29c44b806ccaff6 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
@@ -27,6 +27,7 @@ public class LevelChunkSection {
@@ -3217,7 +3235,7 @@ index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..b5e118456af6421ae3f85cb8232dc97a
}
this.updateKnownBlockInfo(x | (z << 4) | (y << 8), iblockdata1, state); // Paper
@@ -260,6 +263,7 @@ public class LevelChunkSection {
@@ -261,6 +264,7 @@ public class LevelChunkSection {
if (fluid.isRandomlyTicking()) {
this.tickingFluidCount = (short) (this.tickingFluidCount + 1);
}
@@ -3431,10 +3449,10 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e769f7b0904814ee63e2a73dca57e5dc33382fba..e38391da44a1b5e3b845eba2d80453021a1e0c25 100644
index 9f2536d9a73bdb15b5b3004d4da79ca32cee205b..6ff93df3e870ebc6e52f8b8a719908bfa16a839b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
@@ -262,7 +262,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
@@ -3443,7 +3461,7 @@ index e769f7b0904814ee63e2a73dca57e5dc33382fba..e38391da44a1b5e3b845eba2d8045302
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
@@ -1040,6 +1040,11 @@ public final class CraftServer implements Server {
@@ -1062,6 +1062,11 @@ public final class CraftServer implements Server {
plugin.getPluginMeta().getDisplayName(),
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
));
@@ -3468,10 +3486,10 @@ index f7ea77dd82d978ad307f99c743efacfb34478b3d..009ab06182359862b8f543030ec4fe4e
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 64c50c52c11214740de7903e5592b8b6b2c170b3..d4f62940504e3ef7a70e13b1f4a7726f23b4c637 100644
index 1179e9fbff93ec8ff82aa3aae477f6bf4ce9b885..1ecf065c5323f65401412cb98d4a0b622f356759 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -464,7 +464,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -472,7 +472,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {

View File

@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Wed, 17 May 2023 05:41:47 +0000
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Sun, 12 Jun 2022 09:18:57 -0500
Subject: [PATCH] Purpur Server Changes
Original: PurpurMC
@@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
diff --git a/build.gradle.kts b/build.gradle.kts
index b41b186397d013c19436c345be98b785d4bd0295..22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e 100644
index 3ee1160c796cc86db9bc9438055b307239e9a8f7..9c01005751c0088f560f96401cdfdebbbda4e7ec 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,12 +7,8 @@ plugins {
@@ -249,7 +249,7 @@ index fa56cd09102a89692b42f1d14257990508c5c720..f9251183df72ddc56662fd3f02acf216
setListData(vector);
}
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
index 6e441a1a28ba72a8b1cc09fe5fca71b3c70627d4..47e77541e558e18758ae0fcc2aa4e47261e928b6 100644
index 0dd3374468e05f7a312ba5856b9cf8a4787dfa59..b4e5fbace85c67e7bd347e6a90514bbc2c132d5e 100644
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -28,6 +28,7 @@ public class PufferfishConfig {
@@ -282,8 +282,8 @@ index 6e441a1a28ba72a8b1cc09fe5fca71b3c70627d4..47e77541e558e18758ae0fcc2aa4e472
public static boolean throttleInactiveGoalSelectorTick;
private static void inactiveGoalSelectorThrottle() {
- getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true,
+ getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", false, // Purpur
- throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true,
+ throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", false, // Purpur
"Throttles the AI goal selector in entity inactive ticks.",
"This can improve performance by a few percent, but has minor gameplay implications.");
}
@@ -2759,7 +2759,7 @@ index 3ee5c3c17d450dce54e051dc53c9df44d9b3dc1b..86b8485c0fb1dc5cd79c9e24546dc744
}
// Paper end
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..82402be7bbbf04388339c6a471946a72f09dfe3b 100644
index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..852266234cf3d63e3b23a71639e40defca91c1b8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -277,6 +277,11 @@ public class ServerPlayer extends Player {
@@ -2955,13 +2955,13 @@ index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..82402be7bbbf04388339c6a471946a72
this.connection.send(new ClientboundResourcePackPacket(url, hash, required, resourcePackPrompt));
}
@@ -2041,8 +2103,63 @@ public class ServerPlayer extends Player {
@@ -2041,8 +2103,68 @@ public class ServerPlayer extends Player {
public void resetLastActionTime() {
this.lastActionTime = Util.getMillis();
+ this.setAfk(false); // Purpur
}
+ }
+
+ // Purpur Start
+ private boolean isAfk = false;
+
@@ -2986,7 +2986,12 @@ index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..82402be7bbbf04388339c6a471946a72
+
+ msg = event.getBroadcastMsg();
+ if (msg != null && !msg.isEmpty()) {
+ server.getPlayerList().broadcastMiniMessage(String.format(msg, this.getGameProfile().getName()), false);
+ String playerName = this.getGameProfile().getName();
+ if (org.purpurmc.purpur.PurpurConfig.afkBroadcastUseDisplayName) {
+ net.kyori.adventure.text.Component playerDisplayNameComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(this.getBukkitEntity().getDisplayName());
+ playerName = net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer.plainText().serialize(playerDisplayNameComponent);
+ }
+ server.getPlayerList().broadcastMiniMessage(String.format(msg, playerName), false);
+ }
+
+ if (this.level.purpurConfig.idleTimeoutUpdateTabList) {
@@ -3008,8 +3013,8 @@ index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..82402be7bbbf04388339c6a471946a72
+ @Override
+ public boolean isAfk() {
+ return this.isAfk;
+ }
+
}
+ @Override
+ public boolean canBeCollidedWith() {
+ return !this.isAfk() && super.canBeCollidedWith();
@@ -3019,7 +3024,7 @@ index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..82402be7bbbf04388339c6a471946a72
public ServerStatsCounter getStats() {
return this.stats;
}
@@ -2514,8 +2631,16 @@ public class ServerPlayer extends Player {
@@ -2514,8 +2636,16 @@ public class ServerPlayer extends Player {
@Override
public boolean isImmobile() {
@@ -3037,7 +3042,7 @@ index 98df2463bf41fc736aa6a2b6ddf89e5abde6eb39..82402be7bbbf04388339c6a471946a72
@Override
public Scoreboard getScoreboard() {
@@ -2564,4 +2689,50 @@ public class ServerPlayer extends Player {
@@ -2564,4 +2694,50 @@ public class ServerPlayer extends Player {
return (CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end
@@ -3620,7 +3625,7 @@ index 9ddbfcf80d9a381dace78a62880f85a4d767e0eb..7383c7d3820dce06108eaafd236a7c6c
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 5c21de0d48fba88c3164b72e0eb624706b683fab..c27e455321951e76e4818fec0e64301f5620dbf6 100644
index 92e758a286a5db079c32d53cc52c8a422457daef..ff56981a03b55f9ee1ec8ad36adaf9849b2c914b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -469,6 +469,7 @@ public abstract class PlayerList {
@@ -4181,7 +4186,7 @@ index 14fab63346d56c72cd7534a04760efd10eef4295..745e792482f61c571e2efbd4200dd1bd
@Override
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d454a4ce2a3 100644
index b4ab2cfb7a5fa0d2efd1a759d754d5203aaac077..e71eca3ddbbeb3168dd73433b6d6ffe9f6755f77 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -156,7 +156,7 @@ import org.bukkit.plugin.PluginManager;
@@ -4211,7 +4216,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
private float eyeHeight;
public boolean isInPowderSnow;
public boolean wasInPowderSnow;
@@ -400,6 +400,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -401,6 +401,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
public boolean collidingWithWorldBorder; // Paper
@@ -4219,7 +4224,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
@@ -579,7 +580,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -580,7 +581,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.bb = Entity.INITIAL_AABB;
this.stuckSpeedMultiplier = Vec3.ZERO;
this.nextStep = 1.0F;
@@ -4228,7 +4233,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
this.remainingFireTicks = -this.getFireImmuneTicks();
this.fluidHeight = new Object2DoubleArrayMap(2);
this.fluidOnEyes = new HashSet();
@@ -824,7 +825,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -825,7 +826,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return;
}
// Pufferfish end - entity TTL
@@ -4237,7 +4242,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
this.feetBlockState = null;
if (this.isPassenger() && this.getVehicle().isRemoved()) {
@@ -885,7 +886,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -886,7 +887,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.firstTick = false;
@@ -4246,7 +4251,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
public void setSharedFlagOnFire(boolean onFire) {
@@ -894,10 +895,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -895,10 +896,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void checkOutOfWorld() {
// Paper start - Configurable nether ceiling damage
@@ -4259,7 +4264,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
this.outOfWorld();
}
@@ -1059,7 +1061,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1060,7 +1062,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}
@@ -4268,7 +4273,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1068,7 +1070,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1069,7 +1071,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// Paper start - ignore movement changes while inactive.
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
setDeltaMovement(Vec3.ZERO);
@@ -4277,7 +4282,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
return;
}
// Paper end
@@ -1089,8 +1091,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1090,8 +1092,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
}
@@ -4288,7 +4293,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
boolean flag = !Mth.equal(movement.x, vec3d1.x);
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
@@ -1109,7 +1111,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1110,7 +1112,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.checkFallDamage(vec3d1.y, this.onGround, iblockdata, blockposition);
if (this.isRemoved()) {
@@ -4297,7 +4302,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
} else {
if (this.horizontalCollision) {
Vec3 vec3d2 = this.getDeltaMovement();
@@ -1250,7 +1252,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1251,7 +1253,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.setRemainingFireTicks(-this.getFireImmuneTicks());
}
@@ -4306,7 +4311,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
}
// Paper start - detailed watchdog information
@@ -1677,7 +1679,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1678,7 +1680,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public boolean fireImmune() {
@@ -4315,7 +4320,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -1746,7 +1748,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1747,7 +1749,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return this.isInWater() || flag;
}
@@ -4324,7 +4329,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
Entity entity = this.getVehicle();
if (entity instanceof Boat) {
@@ -2339,6 +2341,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2340,6 +2342,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
nbt.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -4336,7 +4341,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
return nbt;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2507,6 +2514,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2508,6 +2515,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
}
// Paper end
@@ -4348,7 +4353,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
@@ -2823,6 +2835,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2824,6 +2836,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.passengers = ImmutableList.copyOf(list);
}
@@ -4362,7 +4367,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
this.gameEvent(GameEvent.ENTITY_MOUNT, entity);
}
return true; // CraftBukkit
@@ -2864,6 +2883,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2865,6 +2884,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return false;
}
// Spigot end
@@ -4377,7 +4382,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
this.passengers = ImmutableList.of();
} else {
@@ -2923,12 +2950,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2924,12 +2951,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -4394,7 +4399,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
this.isInsidePortal = true;
@@ -2946,7 +2976,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2947,7 +2977,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
@@ -4403,7 +4408,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
this.portalTime = i;
// Paper start
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
@@ -2964,7 +2994,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2965,7 +2995,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
} // Paper
// CraftBukkit end
@@ -4412,7 +4417,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
this.isInsidePortal = false;
@@ -2979,7 +3009,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2980,7 +3010,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.processPortalCooldown();
@@ -4421,7 +4426,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
}
@@ -3161,7 +3191,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3162,7 +3192,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public int getMaxAirSupply() {
@@ -4430,7 +4435,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
public int getAirSupply() {
@@ -3431,14 +3461,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3432,14 +3462,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// Paper end
if (this.level instanceof ServerLevel && !this.isRemoved()) {
@@ -4447,7 +4452,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
if (shapedetectorshape == null) {
@@ -3472,7 +3502,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3473,7 +3503,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.unRide();
// CraftBukkit end
@@ -4456,7 +4461,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
// Paper start - Change lead drop timing to prevent dupe
if (this instanceof Mob) {
((Mob) this).dropLeash(true, true); // Paper drop lead
@@ -3495,10 +3525,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3496,10 +3526,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.removeAfterChangingDimensions();
@@ -4469,7 +4474,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
return entity;
}
} else {
@@ -3618,7 +3648,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3619,7 +3649,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public boolean canChangeDimensions() {
@@ -4478,7 +4483,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
}
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
@@ -3915,6 +3945,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3916,6 +3946,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return SlotAccess.NULL;
}
@@ -4499,7 +4504,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
@Override
public void sendSystemMessage(Component message) {}
@@ -4196,6 +4240,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4197,6 +4241,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.yRotO = this.getYRot();
}
@@ -4512,7 +4517,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
if (false && this.touchingUnloadedChunk()) { // Pufferfish - cost of a lookup here is the same cost as below, so skip
return false;
@@ -4724,4 +4774,64 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4725,4 +4775,64 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
}
// Paper end
@@ -4650,7 +4655,7 @@ index 8af0918d3a62de58a4b2af55022c812bb0e46092..3fc26a8976f4bfa28c2c6a862aac997d
}
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8..0c0f422ef0c20477295cea0b6b3c4b2d0a7db265 100644
index 89699aaccd45a5a928a97d1b3ad06f5de5b9fad1..b3b371ee4850c90a3142c3c96761b032e6de6af0 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -306,7 +306,7 @@ public class ExperienceOrb extends Entity {
@@ -4671,6 +4676,24 @@ index a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8..0c0f422ef0c20477295cea0b6b3c4b2d
if (entry != null) {
ItemStack itemstack = (ItemStack) entry.getValue();
@@ -352,13 +352,15 @@ public class ExperienceOrb extends Entity {
}
}
+ // Purpur start
public int durabilityToXp(int repairAmount) {
- return repairAmount / 2;
+ return (int) (repairAmount / (2 * level.purpurConfig.mendingMultiplier));
}
public int xpToDurability(int experienceAmount) {
- return experienceAmount * 2;
+ return (int) ((experienceAmount * 2) * level.purpurConfig.mendingMultiplier);
}
+ // Purpur end
public int getValue() {
return this.value;
diff --git a/src/main/java/net/minecraft/world/entity/GlowSquid.java b/src/main/java/net/minecraft/world/entity/GlowSquid.java
index c1e9b40a4a0f9cdc650caa88b5ea132e06ee2496..6f723171fa71d74b351b5cf0cd167bb6f7ca1691 100644
--- a/src/main/java/net/minecraft/world/entity/GlowSquid.java
@@ -15552,10 +15575,10 @@ index c4f4a26e016eea744f587461af80461074d48303..10b109de5abc015b61a896d363ad37a0
public void tick() {
super.tick();
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index e6f87e1e3c99195ed11c81162cb54e7f5750c4ba..220690cbd6552b06626f4edf5c71bed5cf1f12c4 100644
index 85260fd93ca8d5ffd0ba7a98f1d47093d58f0f87..505a60605ff2282f2c460c81464d60a433f41eda 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -307,6 +307,6 @@ public abstract class Projectile extends Entity implements TraceableEntity {
@@ -318,6 +318,6 @@ public abstract class Projectile extends Entity implements TraceableEntity {
public boolean mayInteract(Level world, BlockPos pos) {
Entity entity = this.getOwner();
@@ -18061,37 +18084,31 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..52aae8bd4023b2bb48f12983f54b20fa
world.scheduleTick(pos, this, 1);
return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f13809744 100644
index 6fab2b69a0af298bd00b309efcd6aa8399e23d1f..4f7b21caa123ea7896788fd25133d8de3ab1ccaf 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
@@ -228,26 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@@ -228,20 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
ItemStack itemstack = player.getItemInHand(hand);
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
- if (i < 7 && !world.isClientSide) {
- // Paper start - EntityChangeBlockEvent
- double rand = world.getRandom().nextDouble();
- BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
- if (dummyBlockState == null) {
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
- // Paper start - handle cancelled events
- if (iblockdata1 == null) {
- return InteractionResult.PASS;
- }
- if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
- return InteractionResult.sidedSuccess(world.isClientSide);
- }
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
- // Paper end
-
+ // Purpur start
+ BlockState newState = process(i, state, world, itemstack, pos, player);
+ if (newState == null) {
+ return InteractionResult.PASS;
+ }
- world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
- player.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
- if (!player.getAbilities().instabuild) {
- itemstack.shrink(1);
- }
+ // Purpur start
+ BlockState newState = process(i, state, world, itemstack, pos, player);
+ if (newState == null) {
+ return InteractionResult.PASS;
}
+ if (world.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) {
+ BlockState oldState;
+ int oldCount, newCount, oldLevel, newLevel;
@@ -18106,28 +18123,22 @@ index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f
+ newCount = itemstack.getCount();
+ newLevel = newState.getValue(ComposterBlock.LEVEL);
+ } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState));
+ }
}
+ // Purpur end
return InteractionResult.sidedSuccess(world.isClientSide);
} else if (i == 8) {
ComposterBlock.extractProduce(player, state, world, pos);
@@ -257,6 +259,32 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
@@ -252,6 +260,26 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
}
}
+ // Purpur start
+ private static BlockState process(int level, BlockState state, Level world, ItemStack itemstack, BlockPos pos, Player player) {
+ if (level < 7 && !world.isClientSide) {
+ // Paper start - EntityChangeBlockEvent
+ double rand = world.getRandom().nextDouble();
+ BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
+ if (dummyBlockState == null) {
+ return dummyBlockState;
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
+ // Paper start - handle cancelled events
+ if (iblockdata1 == null) {
+ return iblockdata1;
+ }
+ if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
+ return state;
+ }
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
+ // Paper end
+
+ world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
@@ -18135,7 +18146,7 @@ index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f
+ if (!player.getAbilities().instabuild) {
+ itemstack.shrink(1);
+ }
+ return dummyBlockState;
+ return iblockdata1;
+ }
+ return state;
+ }
@@ -20240,10 +20251,10 @@ index 714afc98b5150907b45a00060be4e41582333204..312a6d90c0a09570aef24c205dc2ff27
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147fb14dbad 100644
index 6ff93df3e870ebc6e52f8b8a719908bfa16a839b..3310828edcabd2c24e3200dcb89d4e8ebd82cf16 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
@@ -262,7 +262,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
@@ -20252,8 +20263,8 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
@@ -317,6 +317,20 @@ public final class CraftServer implements Server {
this.structureManager = new CraftStructureManager(console.getStructureManager());
@@ -324,6 +324,20 @@ public final class CraftServer implements Server {
this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository());
Bukkit.setServer(this);
+ // Purpur start
@@ -20273,7 +20284,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
// Register all the Enchantments and PotionTypes now so we can stop new registration immediately after
Enchantments.SHARPNESS.getClass();
@@ -957,6 +971,7 @@ public final class CraftServer implements Server {
@@ -979,6 +993,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -20281,7 +20292,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -972,6 +987,7 @@ public final class CraftServer implements Server {
@@ -994,6 +1009,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
@@ -20289,7 +20300,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -987,6 +1003,7 @@ public final class CraftServer implements Server {
@@ -1009,6 +1025,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
@@ -20297,7 +20308,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -1429,6 +1446,55 @@ public final class CraftServer implements Server {
@@ -1451,6 +1468,55 @@ public final class CraftServer implements Server {
return true;
}
@@ -20353,7 +20364,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
@Override
public List<Recipe> getRecipesFor(ItemStack result) {
Validate.notNull(result, "Result cannot be null");
@@ -2700,6 +2766,7 @@ public final class CraftServer implements Server {
@@ -2722,6 +2788,7 @@ public final class CraftServer implements Server {
@Override
public double[] getTPS() {
return new double[] {
@@ -20361,7 +20372,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
@@ -2746,6 +2813,18 @@ public final class CraftServer implements Server {
@@ -2768,6 +2835,18 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}
@@ -20380,7 +20391,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
@Override
public void restart() {
org.spigotmc.RestartCommand.restart();
@@ -2921,4 +3000,16 @@ public final class CraftServer implements Server {
@@ -2981,4 +3060,16 @@ public final class CraftServer implements Server {
}
// Paper end
@@ -20398,10 +20409,10 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8d3a32a0538a6065fd0725721ab8a1a011c4d64a..3013aeb442799aba5b2ae45edcb3c2c72a18a740 100644
index 8f0234296397ca2d4a607dcea6093c6c606dc7d2..68df53648c9b76cf1b6abcaa90c5e8938e9e0d05 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2249,6 +2249,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2284,6 +2284,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
}
@@ -20451,7 +20462,7 @@ index 8d3a32a0538a6065fd0725721ab8a1a011c4d64a..3013aeb442799aba5b2ae45edcb3c2c7
public PersistentDataContainer getPersistentDataContainer() {
return this.persistentDataContainer;
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index c103f10dbb6c06e14bb7b5df73a797f456803301..2a8db3527f3680789125fca41097657063efb32d 100644
index bfa091f72d6f477bcaf63d364639a1b4df9b1987..288cf98287c6d3c073b9ab6696c3957c999cad32 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -173,6 +173,20 @@ public class Main {
@@ -20475,7 +20486,7 @@ index c103f10dbb6c06e14bb7b5df73a797f456803301..2a8db3527f3680789125fca410976570
// Paper start
acceptsAll(asList("server-name"), "Name of the server")
.withRequiredArg()
@@ -277,7 +291,7 @@ public class Main {
@@ -284,7 +298,7 @@ public class Main {
System.setProperty(net.minecrell.terminalconsole.TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
}
@@ -20801,10 +20812,10 @@ index 4d7a2c4c1001aefe9fcd4be8dbcb414f721bfff9..2c7716a9d65ebda209a144b82c2126b6
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0c8945c9e 100644
index be64633c8bcee96f2ad5247525cac965b7b031b1..e363891e8ab872ed24c557e3f94110f36c6fb277 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -533,10 +533,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -534,10 +534,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setPlayerListName(String name) {
@@ -20821,7 +20832,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
for (ServerPlayer player : (List<ServerPlayer>) server.getHandle().players) {
if (player.getBukkitEntity().canSee(this)) {
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
@@ -1357,6 +1362,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1358,6 +1363,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API
@@ -20832,7 +20843,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
return false;
}
@@ -2404,6 +2413,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2405,6 +2414,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().getAbilities().walkingSpeed * 2f;
}
@@ -20861,7 +20872,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
private void validateSpeed(float value) {
if (value < 0) {
if (value < -1f) {
@@ -3196,4 +3227,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3180,4 +3211,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.spigot;
}
// Spigot end
@@ -21041,7 +21052,7 @@ index e43fd3e59fd8c74828ae65965fade27f56beef65..b2f133c8baabba1cffa6e92ea0f85453
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 221f5088953b3452966d07eabd4ea8b38c465fd9..bfb8039a65fbfdb6d2fa6fc4fdeb146fbc4e147f 100644
index a153c134cf26e86d49ef419eca35994539af0db3..e9599e0f3d2122c3843ebde81743bc8d558bfd30 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -563,6 +563,15 @@ public class CraftEventFactory {
@@ -21351,10 +21362,10 @@ index 138407c2d4b0bc55ddb9aac5d2aa3edadda090fb..a6e9e503a496c18e2501b03ec84f4600
// Paper end - add timings for scoreboard search
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index d4f62940504e3ef7a70e13b1f4a7726f23b4c637..1dd7f923dd6adb41eafc3ea0c063e3aae6670124 100644
index 1ecf065c5323f65401412cb98d4a0b622f356759..1bf9a11abf7884a421374cbca5ccc18480717b79 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -464,7 +464,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -472,7 +472,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
@@ -21399,10 +21410,10 @@ index ec771c480156db393c326fa2fbdc2d432fb76f53..71940bf3a4162d12a422a5b3100ad8de
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..62ad4c6ad417e11e9152f74636b2ff0d187d0799
index 0000000000000000000000000000000000000000..be8b44daa0141151c973917a774aa07721647ed1
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -0,0 +1,636 @@
@@ -0,0 +1,638 @@
+package org.purpurmc.purpur;
+
+import com.google.common.base.Throwables;
@@ -21581,6 +21592,7 @@ index 0000000000000000000000000000000000000000..62ad4c6ad417e11e9152f74636b2ff0d
+ public static String cannotRideMob = "<red>You cannot mount that mob";
+ public static String afkBroadcastAway = "<yellow><italic>%s is now AFK";
+ public static String afkBroadcastBack = "<yellow><italic>%s is no longer AFK";
+ public static boolean afkBroadcastUseDisplayName = false;
+ public static String afkTabListPrefix = "[AFK] ";
+ public static String afkTabListSuffix = "";
+ public static String creditsCommandOutput = "<green>%s has been shown the end credits";
@@ -21598,6 +21610,7 @@ index 0000000000000000000000000000000000000000..62ad4c6ad417e11e9152f74636b2ff0d
+ cannotRideMob = getString("settings.messages.cannot-ride-mob", cannotRideMob);
+ afkBroadcastAway = getString("settings.messages.afk-broadcast-away", afkBroadcastAway);
+ afkBroadcastBack = getString("settings.messages.afk-broadcast-back", afkBroadcastBack);
+ afkBroadcastUseDisplayName = getBoolean("settings.messages.afk-broadcast-use-display-name", afkBroadcastUseDisplayName);
+ afkTabListPrefix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-prefix", afkTabListPrefix)));
+ afkTabListSuffix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-suffix", afkTabListSuffix)));
+ creditsCommandOutput = getString("settings.messages.credits-command-output", creditsCommandOutput);
@@ -22041,10 +22054,10 @@ index 0000000000000000000000000000000000000000..62ad4c6ad417e11e9152f74636b2ff0d
+}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..0db8a1a51c857a3930d0b20028964fb355d8e5b4
index 0000000000000000000000000000000000000000..397c4afa8da85845f49974832674a6e45ee6edb7
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -0,0 +1,3201 @@
@@ -0,0 +1,3203 @@
+package org.purpurmc.purpur;
+
+import net.minecraft.core.registries.BuiltInRegistries;
@@ -22168,6 +22181,7 @@ index 0000000000000000000000000000000000000000..0db8a1a51c857a3930d0b20028964fb3
+ }
+
+ public boolean useBetterMending = false;
+ public double mendingMultiplier = 1.0;
+ public boolean alwaysTameInCreative = false;
+ public boolean boatEjectPlayersOnLand = false;
+ public boolean boatsDoFallDamage = false;
@@ -22195,6 +22209,7 @@ index 0000000000000000000000000000000000000000..0db8a1a51c857a3930d0b20028964fb3
+ public int mobLastHurtByPlayerTime = 100;
+ private void miscGameplayMechanicsSettings() {
+ useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
+ mendingMultiplier = getDouble("gameplay-mechanics.mending-multiplier", mendingMultiplier);
+ alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative);
+ boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
+ boatsDoFallDamage = getBoolean("gameplay-mechanics.boat.do-fall-damage", boatsDoFallDamage);

View File

@@ -0,0 +1,60 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Tue, 30 May 2023 12:12:29 +0900
Subject: [PATCH] MC-Dev-fixes
diff --git a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
index 75f1d1f06978d836aab5ebbfe8f7d1e0ca5a95b6..89d70a992e0bcc8e7292c4f736470eafd8747b24 100644
--- a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
+++ b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
@@ -71,14 +71,14 @@ public class LeavesFix extends DataFix {
return this.fixTypeEverywhereTyped("Leaves fix", type, (typed) -> {
return typed.updateTyped(opticFinder, (typedx) -> {
int[] is = new int[]{0};
- Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed) -> {
- Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed.getAllTyped(opticFinder3).stream().map((typedx) -> {
- return new LeavesFix.LeavesSection(typedx, this.getInputSchema());
+ Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed2x) -> {
+ Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed2x.getAllTyped(opticFinder3).stream().map((typedx2) -> {
+ return new LeavesFix.LeavesSection(typedx2, this.getInputSchema());
}).collect(Collectors.toMap(LeavesFix.Section::getIndex, (leavesSection) -> {
return leavesSection;
})));
if (int2ObjectMap.values().stream().allMatch(LeavesFix.Section::isSkippable)) {
- return typed;
+ return typed2x;
} else {
List<IntSet> list = Lists.newArrayList();
@@ -134,8 +134,8 @@ public class LeavesFix extends DataFix {
}
}
- return typed.updateTyped(opticFinder3, (typedx) -> {
- return int2ObjectMap.get(typedx.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx);
+ return typed.updateTyped(opticFinder3, (typedx2) -> {
+ return int2ObjectMap.get(typedx2.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx2);
});
}
});
@@ -298,8 +298,8 @@ public class LeavesFix extends DataFix {
throw new IllegalStateException("Block state type is not what was expected.");
} else {
Optional<List<Pair<String, Dynamic<?>>>> optional = typed.getOptional(this.paletteFinder);
- this.palette = optional.map((list) -> {
- return list.stream().map(Pair::getSecond).collect(Collectors.toList());
+ this.palette = (java.util.List)optional.map((list) -> {
+ return (java.util.List)list.stream().map(Pair::getSecond).collect(Collectors.toList());
}).orElse(ImmutableList.of());
Dynamic<?> dynamic = typed.get(DSL.remainderFinder());
this.index = dynamic.get("Y").asInt(0);
@@ -321,7 +321,7 @@ public class LeavesFix extends DataFix {
public Typed<?> write(Typed<?> typed) {
return this.isSkippable() ? typed : typed.update(DSL.remainderFinder(), (dynamic) -> {
return dynamic.set("BlockStates", dynamic.createLongList(Arrays.stream(this.storage.getRaw())));
- }).set(this.paletteFinder, this.palette.stream().map((dynamic) -> {
+ }).set(this.paletteFinder, (java.util.List)this.palette.stream().map((dynamic) -> {
return Pair.of(References.BLOCK_STATE.typeName(), dynamic);
}).collect(Collectors.toList()));
}

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
diff --git a/build.gradle.kts b/build.gradle.kts
index 22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e..dc89b3a8956af69fa71a2bfa17c22aee6c5e9edf 100644
index 9c01005751c0088f560f96401cdfdebbbda4e7ec..46fda579a95f9ab92a1ba61cad8218024a722208 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,7 +7,7 @@ plugins {
@@ -153,7 +153,7 @@ index b5b6657e52e4f7a630229bd3ba433438af293e22..c468733f44ccb3ff4ba3c20921a4ec52
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 cdbf10339a8e8846a8c364de483a0ccd95cd225a..5ed7acb332b8982a724e5002e12f18fe32dd4dd4 100644
index cdbf10339a8e8846a8c364de483a0ccd95cd225a..1a125a0a2bbcc1e3e54746ec97abe24c53f69819 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 {
@@ -169,7 +169,7 @@ index cdbf10339a8e8846a8c364de483a0ccd95cd225a..5ed7acb332b8982a724e5002e12f18fe
+ \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!");
+ LOGGER.warn("Warning! Plazma may cause unexpected problems, so be sure to test it thoroughly before using it on a public server.");
+ // Plazma end
SharedConstants.tryDetectVersion();
/* CraftBukkit start - Replace everything
@@ -245,10 +245,10 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d2
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 e5bac6bc792196226f975e7f3dd8f147fb14dbad..4ca714c797e42102e2cd65ba5176ff20e6e5d0ca 100644
index 3310828edcabd2c24e3200dcb89d4e8ebd82cf16..5e6952a9d4c1137dc3d720ee2c944d95d4628065 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
@@ -262,7 +262,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
@@ -321,10 +321,10 @@ index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616
+ // Plazma end
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 62ad4c6ad417e11e9152f74636b2ff0d187d0799..562baddc030c6a7861f58438a630cfbe47847d38 100644
index be8b44daa0141151c973917a774aa07721647ed1..c93f6d275d0541e0751eefca45d17c4ccd39a62a 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 {
@@ -229,7 +229,7 @@ public class PurpurConfig {
deathMessageOnlyBroadcastToAffectedPlayer = getBoolean("settings.broadcasts.death.only-broadcast-to-affected-player", deathMessageOnlyBroadcastToAffectedPlayer);
}

View File

@@ -0,0 +1,84 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 11:41:06 +0900
Subject: [PATCH] Bump-Dependencies
diff --git a/build.gradle.kts b/build.gradle.kts
index 46fda579a95f9ab92a1ba61cad8218024a722208..5f38d64b1bcd9468ebdd6de6ef30580c6cfecadc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -10,7 +10,7 @@ dependencies {
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")
+ implementation("org.jline:jline-terminal-jansi:3.23.0") // Plazma - Bump Dependencies
implementation("net.minecrell:terminalconsoleappender:1.3.0")
/*
Required to add the missing Log4j2Plugins.dat file from log4j-core
@@ -18,22 +18,22 @@ dependencies {
all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start.
*/
- implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
- annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins
- implementation("io.netty:netty-codec-haproxy:4.1.87.Final") // Paper - Add support for proxy protocol
+ implementation("org.apache.logging.log4j:log4j-core:2.20.0") // Paper - implementation // Plazma - Bump Dependencies
+ annotationProcessor("org.apache.logging.log4j:log4j-core:2.20.0") // Paper - Needed to generate meta for our Log4j plugins // Plazma - Bump Dependencies
+ implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol // Plazma - Bump Dependencies
// Paper end
- implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
- implementation("org.ow2.asm:asm:9.4")
- implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
- testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.20.0") // Paper - remove exclusion // Plazma - Bump Dependencies
+ implementation("org.ow2.asm:asm:9.5") // Plazma - Bump Dependencies
+ implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation // Plazma - Bump Dependencies
+ testImplementation("org.mockito:mockito-core:5.5.0") // Paper - switch to mockito // Plazma - Bump Dependencies
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
implementation("commons-lang:commons-lang:2.6")
- implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
- runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2")
- runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
+ implementation("net.fabricmc:mapping-io:0.4.2") // Paper - needed to read mappings for stacktrace deobfuscation // Plazma - Bump Dependencies
+ runtimeOnly("org.xerial:sqlite-jdbc:3.41.2.2") // Plazma - Bump Dependencies
+ runtimeOnly("com.mysql:mysql-connector-j:8.0.33") // Plazma - Bump Dependencies
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
// Paper start - Use Velocity cipher
- implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") {
+ implementation("com.velocitypowered:velocity-native:3.2.0-SNAPSHOT") { // Plazma - Bump Dependencies
isTransitive = false
}
// Paper end
@@ -42,22 +42,22 @@ dependencies {
implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
implementation("dev.omega24:upnp4j:1.0") // Purpur
- runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
- runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
- runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.4") // Plazma - Bump Dependencies
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.15") // Plazma - Bump Dependencies
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.15") // Plazma - Bump Dependencies
// Pufferfish start
- implementation("org.yaml:snakeyaml:1.32")
- implementation ("me.carleslc.Simple-YAML:Simple-Yaml:1.8.2") {
+ implementation("org.yaml:snakeyaml:1.33") // Plazma - Bump Dependencies
+ implementation ("me.carleslc.Simple-YAML:Simple-Yaml:1.8.4") { // Plazma - Bump Dependencies
exclude(group="org.yaml", module="snakeyaml")
}
// Pufferfish end
- testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
+ testImplementation("io.github.classgraph:classgraph:4.8.162") // Paper - mob goal test // Plazma - Bump Dependencies
testImplementation("junit:junit:4.13.2")
- testImplementation("org.hamcrest:hamcrest-library:1.3")
+ testImplementation("org.hamcrest:hamcrest-library:2.2") // Plazma - Bump Dependencies
- implementation("io.netty:netty-all:4.1.87.Final"); // Paper - Bump netty
+ implementation("io.netty:netty-all:4.1.97.Final"); // Paper - Bump netty // Plazma - Bump Dependencies
}
val craftbukkitPackageVersion = "1_19_R3" // Paper

View File

@@ -300,10 +300,10 @@ index 92b440b24c6b083f81837611d08fbd6773a2a6e6..058449f24eb3260dc230dad2a0b4c552
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
this.generator = gen;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17 100644
index 5e6952a9d4c1137dc3d720ee2c944d95d4628065..1367072684078c0e93c275c2159ece799f96428b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -971,6 +971,7 @@ public final class CraftServer implements Server {
@@ -993,6 +993,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -311,7 +311,7 @@ index 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f63
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
@@ -2813,6 +2814,13 @@ public final class CraftServer implements Server {
@@ -2835,6 +2836,13 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}
@@ -326,7 +326,7 @@ index 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f63
@Override
public YamlConfiguration getPurpurConfig() {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2a8db3527f3680789125fca41097657063efb32d..b9f28e1c50e7d507ab151ff95f82dacc2da1ed3a 100644
index 288cf98287c6d3c073b9ab6696c3957c999cad32..4970b246356bbd04eb1f9715da3fc7c9494573e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -173,6 +173,14 @@ public class Main {
@@ -649,7 +649,7 @@ index 0000000000000000000000000000000000000000..857ddc62dd9affbbebcd7cde8a6d675d
+}
diff --git a/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
new file mode 100644
index 0000000000000000000000000000000000000000..b1104778995a3734f3b6df71d59172e546e152a2
index 0000000000000000000000000000000000000000..481392f3ed3b746172dbf319a583ca5751bc0b35
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/configurations/PlazmaConfigurations.java
@@ -0,0 +1,304 @@
@@ -706,7 +706,7 @@ index 0000000000000000000000000000000000000000..b1104778995a3734f3b6df71d59172e5
+
+ private static final Logger LOGGER = LogUtils.getLogger();
+ static final String GLOBAL_CONFIGURATION_FILE_NAME= "plazma-global.yml";
+ static final String LEVEL_DEFAULT_CONFIGURATION_FILE_NAME = "plazma-level-dafaults.yml";
+ static final String LEVEL_DEFAULT_CONFIGURATION_FILE_NAME = "plazma-level-defaults.yml";
+ static final String LEVEL_CONFIGURATION_FILE_NAME = "plazma-configuration.yml";
+
+ private static final String HEADER_START = """

View File

@@ -3,11 +3,11 @@ 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
Original: YouHaveTrouble/minecraft-optimization, YouHaveTrouble/minecraft-exploits-and-how-to-fix-them, 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 47e77541e558e18758ae0fcc2aa4e47261e928b6..dd3a29c49392910a38be14a638c6c9b6e825d772 100644
index b4e5fbace85c67e7bd347e6a90514bbc2c132d5e..7a74aa64458a4f3be4f284b4cfcdd57d687f620b 100644
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -211,8 +211,8 @@ public class PufferfishConfig {
@@ -42,17 +42,29 @@ index 47e77541e558e18758ae0fcc2aa4e47261e928b6..dd3a29c49392910a38be14a638c6c9b6
"tick frequency. freq = (distanceToPlayer^2) / (2^value)",
"If you want further away entities to tick less often, use 7.",
"If you want further away entities to tick more often, try 9.");
@@ -269,7 +269,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
"Throttles the AI goal selector in entity inactive ticks.",
"This can improve performance by a few percent, but has minor gameplay implications.");
}
@@ -253,8 +253,18 @@ public class PufferfishConfig {
public static Map<String, Integer> projectileTimeouts;
private static void projectileTimeouts() {
// Set some defaults
- getInt("entity_timeouts.SNOWBALL", -1);
- getInt("entity_timeouts.LLAMA_SPIT", -1);
+ // Plazma start - Optimize Default Configurations
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
+ getInt("entity_timeouts.ARROW", 200);
+ getInt("entity_timeouts.EGG", 200);
+ getInt("entity_timeouts.ENDER_PEARL", 200);
+ getInt("entity_timeouts.SNOWBALL", 200);
+ getInt("entity_timeouts.LLAMA_SPIT", 200);
+ } else {
+ // Plazma end
+ getInt("entity_timeouts.SNOWBALL", -1);
+ getInt("entity_timeouts.LLAMA_SPIT", -1);
+ } // Plazma
setComment("entity_timeouts",
"These values define a entity's maximum lifespan. If an",
"entity is in this list and it has survived for longer than",
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
index 8d442c5a498ecf288a0cc0c54889c6e2fda849ce..205ce3456a3f6d28cc2c7cbc131ec0f63a461527 100644
index 8d442c5a498ecf288a0cc0c54889c6e2fda849ce..2d6f1811358f1d99ef9e543672e7d1861671f1f1 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
@@ -103,7 +103,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@@ -64,8 +76,43 @@ index 8d442c5a498ecf288a0cc0c54889c6e2fda849ce..205ce3456a3f6d28cc2c7cbc131ec0f6
}
public SpamLimiter spamLimiter;
@@ -198,7 +198,7 @@ public class GlobalConfiguration extends ConfigurationPart {
public BookSize bookSize;
public class BookSize extends ConfigurationPart {
- public int pageMax = 2560; // TODO this appears to be a duplicate setting with one above
+ public int pageMax = !Boolean.getBoolean("Plazma.disableConfigOptimization") ? 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;
@@ -209,7 +209,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 (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
+ 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) {
@@ -276,7 +284,7 @@ public class GlobalConfiguration extends ConfigurationPart {
executor.setMaximumPoolSize(_chatExecutorMaxSize);
}
}
- public int maxJoinsPerTick = 5;
+ public int maxJoinsPerTick = !Boolean.getBoolean("Plazma.disableConfigOptimization") ? 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 a33de97340f14219291c4175e9194914cdf441db..f63b4ab2057176d4f1549200eef16e71c6018dc2 100644
index a33de97340f14219291c4175e9194914cdf441db..84dd20cc9026ebb039d01c6edc263805b969d673 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 {
@@ -89,6 +136,17 @@ index a33de97340f14219291c4175e9194914cdf441db..f63b4ab2057176d4f1549200eef16e71
}
}
@@ -116,8 +116,8 @@ public class WorldConfiguration extends ConfigurationPart {
public ArmorStands armorStands;
public class ArmorStands extends ConfigurationPart {
- public boolean doCollisionEntityLookups = true;
- public boolean tick = true;
+ public boolean doCollisionEntityLookups = Boolean.getBoolean("Plazma.disableConfigOptimization"); // Plazma - Optimize Default Configurations
+ public boolean tick = Boolean.getBoolean("Plazma.disableConfigOptimization");; // Plazma - Optimize Default Configurations
}
public Markers markers;
@@ -139,7 +139,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)));
@@ -206,7 +264,7 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..18bc271a34ffba8c83743fef7eaf4a2c
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 5ed7acb332b8982a724e5002e12f18fe32dd4dd4..8a10f9b7b837c4d20eaf4a83827e36f14a180ea7 100644
index 1a125a0a2bbcc1e3e54746ec97abe24c53f69819..4736f85292ff6f0ae2d433f59c37a77eb4436982 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 {
@@ -219,7 +277,7 @@ index 5ed7acb332b8982a724e5002e12f18fe32dd4dd4..8a10f9b7b837c4d20eaf4a83827e36f1
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
index 1ea3012995c738c67b31e997c138f824f9e69ba1..aa37c7a7bfe75064db9cf78e967a6644f61b0e09 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
@@ -242,7 +300,8 @@ index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d7
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", 1000000);
+ this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", !Boolean.getBoolean("Plazma.disableConfigOptimization") ? 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);
@@ -261,10 +320,10 @@ index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d7
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 7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17..75290e5f555f1401b1b6904e8a44c97332bbd01f 100644
index 1367072684078c0e93c275c2159ece799f96428b..84fb7f6cdad5e7a5389e2469bfd6fb961cd1b299 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -347,7 +347,7 @@ public final class CraftServer implements Server {
@@ -354,7 +354,7 @@ public final class CraftServer implements Server {
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.configuration.options().copyDefaults(true);
@@ -274,7 +333,7 @@ index 7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17..75290e5f555f1401b1b6904e8a44c973
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 562baddc030c6a7861f58438a630cfbe47847d38..529247dad9300b0abc024464fb0ca35c4bc0f410 100644
index c93f6d275d0541e0751eefca45d17c4ccd39a62a..38a8f79b0075279389f0b3dc7de4b16d9af05295 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 {
@@ -289,7 +348,7 @@ index 562baddc030c6a7861f58438a630cfbe47847d38..529247dad9300b0abc024464fb0ca35c
private static File CONFIG_FILE;
public static YamlConfiguration config;
@@ -237,7 +240,7 @@ public class PurpurConfig {
@@ -239,7 +242,7 @@ public class PurpurConfig {
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
}
@@ -299,10 +358,10 @@ index 562baddc030c6a7861f58438a630cfbe47847d38..529247dad9300b0abc024464fb0ca35c
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 0db8a1a51c857a3930d0b20028964fb355d8e5b4..aca570efe2360d7d5f71e62433f6b1cd08f5214b 100644
index 397c4afa8da85845f49974832674a6e45ee6edb7..ce702e6b5fff3a54f9f254a61becd12eb5c11dd7 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 {
@@ -427,7 +427,7 @@ public class PurpurWorldConfig {
public boolean playerInvulnerableWhileAcceptingResourcePack = false;
public String playerDeathExpDropEquation = "expLevel * 7";
public int playerDeathExpDropMax = 100;
@@ -311,7 +370,7 @@ index 0db8a1a51c857a3930d0b20028964fb355d8e5b4..aca570efe2360d7d5f71e62433f6b1cd
public boolean teleportOnNetherCeilingDamage = false;
public boolean totemOfUndyingWorksInInventory = false;
public boolean playerFixStuckPortal = false;
@@ -3038,7 +3038,7 @@ public class PurpurWorldConfig {
@@ -3040,7 +3040,7 @@ public class PurpurWorldConfig {
public boolean zombieJockeyOnlyBaby = true;
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;

View File

@@ -16,7 +16,7 @@ index 857ddc62dd9affbbebcd7cde8a6d675dbb5f68ae..8ba1c5b6731d43c02b415e4d79a20c1d
+ public ChunkSending chunkSending;
+ public class ChunkSending extends ConfigurationPart {
+
+ public boolean enabled = true;
+ public boolean enabled = DO_OPTIMIZE;
+ public int maxChunksPerTick = 5;
+
+ }

View File

@@ -7,7 +7,7 @@ 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
index 904fcdeb7937d36208cc9a8d5eca9ef3a5b2cd9e..005491785e5e776d8721362ecde5f85bad6ae4de 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 {
@@ -17,23 +17,23 @@ index 904fcdeb7937d36208cc9a8d5eca9ef3a5b2cd9e..7f749579fe056a8436e6625204ae31f1
- for (int i = 0, len = backingSet.length; i < len; ++i) {
- if (!(backingSet[i] instanceof ServerPlayer player)) {
- 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)) {
+ if (this.chunkMap.level.plazmaLevelConfiguration().chunkSending.enabled && player.attachToPending(pos, packet)) continue;
+ player.connection.send(packet);
}
- 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);
- 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 82402be7bbbf04388339c6a471946a72f09dfe3b..40eda117db2e3f578ad9d25522b6aadfe319b5cc 100644
index 852266234cf3d63e3b23a71639e40defca91c1b8..4668eebc0776a470a42de94de1752986f76250d3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -730,8 +730,36 @@ public class ServerPlayer extends Player {
@@ -73,7 +73,7 @@ index 82402be7bbbf04388339c6a471946a72f09dfe3b..40eda117db2e3f578ad9d25522b6aadf
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)
@@ -2369,7 +2397,14 @@ public class ServerPlayer extends Player {
@@ -2374,7 +2402,14 @@ public class ServerPlayer extends Player {
return true; // Paper
}

View File

@@ -5,7 +5,7 @@ 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 c27e455321951e76e4818fec0e64301f5620dbf6..7bfba4d638cd42cdd98a22d87effe9a3be005315 100644
index ff56981a03b55f9ee1ec8ad36adaf9849b2c914b..b22b86d7f226e0e24d6be27ea33ec9d690f8f238 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -275,7 +275,7 @@ public abstract class PlayerList {

View File

@@ -190,10 +190,10 @@ index 3a720375c3daa961a34363f78c2c51d301c3fa06..90bd114feb0924669e61f92f301cdcf7
@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 529247dad9300b0abc024464fb0ca35c4bc0f410..b1cc96c751ae8f8befb0287d675d19c5a2768ba2 100644
index 38a8f79b0075279389f0b3dc7de4b16d9af05295..072cc011abded538ae643b36cfb1f861d564bcec 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 {
@@ -329,6 +329,7 @@ public class PurpurConfig {
}
public static int barrelRows = 3;
@@ -201,7 +201,7 @@ index 529247dad9300b0abc024464fb0ca35c4bc0f410..b1cc96c751ae8f8befb0287d675d19c5
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
public static boolean cryingObsidianValidForPortalFrame = false;
@@ -367,6 +368,7 @@ public class PurpurConfig {
@@ -369,6 +370,7 @@ public class PurpurConfig {
case 1 -> 9;
default -> 27;
});
@@ -210,10 +210,10 @@ index 529247dad9300b0abc024464fb0ca35c4bc0f410..b1cc96c751ae8f8befb0287d675d19c5
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 aca570efe2360d7d5f71e62433f6b1cd08f5214b..b4cb7d12aa02b885ca48ba5b27cbb7c20c2f5d7c 100644
index ce702e6b5fff3a54f9f254a61becd12eb5c11dd7..7d553b0bb9ae478d54931682501afa9f532db5dd 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1096,7 +1096,15 @@ public class PurpurWorldConfig {
@@ -1098,7 +1098,15 @@ public class PurpurWorldConfig {
public boolean allayRidableInWater = true;
public boolean allayControllable = true;
public List<String> allayRespectNBT = new ArrayList<>();
@@ -229,7 +229,7 @@ index aca570efe2360d7d5f71e62433f6b1cd08f5214b..b4cb7d12aa02b885ca48ba5b27cbb7c2
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
@@ -1207,7 +1215,15 @@ public class PurpurWorldConfig {
@@ -1209,7 +1217,15 @@ public class PurpurWorldConfig {
public double camelJumpStrengthMax = 0.42D;
public double camelMovementSpeedMin = 0.09D;
public double camelMovementSpeedMax = 0.09D;
@@ -245,7 +245,7 @@ index aca570efe2360d7d5f71e62433f6b1cd08f5214b..b4cb7d12aa02b885ca48ba5b27cbb7c2
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);
@@ -1634,7 +1650,15 @@ public class PurpurWorldConfig {
@@ -1636,7 +1652,15 @@ public class PurpurWorldConfig {
public boolean frogControllable = true;
public float frogRidableJumpHeight = 0.65F;
public int frogBreedingTicks = 6000;
@@ -261,7 +261,7 @@ index aca570efe2360d7d5f71e62433f6b1cd08f5214b..b4cb7d12aa02b885ca48ba5b27cbb7c2
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
@@ -2585,7 +2609,13 @@ public class PurpurWorldConfig {
@@ -2587,7 +2611,13 @@ public class PurpurWorldConfig {
public boolean snifferControllable = true;
public double snifferMaxHealth = 14.0D;
public int snifferBreedingTicks = 6000;
@@ -275,7 +275,7 @@ index aca570efe2360d7d5f71e62433f6b1cd08f5214b..b4cb7d12aa02b885ca48ba5b27cbb7c2
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
@@ -2684,7 +2714,15 @@ public class PurpurWorldConfig {
@@ -2686,7 +2716,15 @@ public class PurpurWorldConfig {
public boolean tadpoleRidable = false;
public boolean tadpoleRidableInWater = true;
public boolean tadpoleControllable = true;
@@ -291,7 +291,7 @@ index aca570efe2360d7d5f71e62433f6b1cd08f5214b..b4cb7d12aa02b885ca48ba5b27cbb7c2
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
@@ -2894,7 +2932,15 @@ public class PurpurWorldConfig {
@@ -2896,7 +2934,15 @@ public class PurpurWorldConfig {
public boolean wardenRidable = false;
public boolean wardenRidableInWater = true;
public boolean wardenControllable = true;

View File

@@ -18,7 +18,7 @@ index 591163d8f8300b084ac734800efee902c4def958..d74401ca3182145d136ad668704f5c04
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 40eda117db2e3f578ad9d25522b6aadfe319b5cc..ef624a99c971aa5c4ce3869d10e2435c0bc8e0a4 100644
index 4668eebc0776a470a42de94de1752986f76250d3..2cf146a1d749fc965e5469988bbb95172383ae1c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -405,7 +405,7 @@ public class ServerPlayer extends Player {

View File

@@ -10,10 +10,10 @@ Subject: [PATCH] Various Optimizations
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 f31f4ecf8fb07f6cf01eea0aa14f5d454a4ce2a3..599d0bcb737c14671387dd5e6b0e733c8d9fbf20 100644
index e71eca3ddbbeb3168dd73433b6d6ffe9f6755f77..f8be2d9d454965257de55d2aa572016115d1b346 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1992,8 +1992,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1993,8 +1993,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void playerTouch(Player player) {}
public void push(Entity entity) {
@@ -24,7 +24,7 @@ index f31f4ecf8fb07f6cf01eea0aa14f5d454a4ce2a3..599d0bcb737c14671387dd5e6b0e733c
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();
@@ -2022,7 +2023,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2023,7 +2024,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}

View File

@@ -31,10 +31,10 @@ index cc6968a064b30f7250d18c20efb2bb8602bb0cdd..3c80e14392ee7a6bf5040d7cb81b7d89
if (spawn != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3013aeb442799aba5b2ae45edcb3c2c72a18a740..e9f6104e0f665f29b3fca9ff0d8d48613aee2295 100644
index 68df53648c9b76cf1b6abcaa90c5e8938e9e0d05..90cfe6f05f11f18a818857b1da8da75d8831c40c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -228,7 +228,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -230,7 +230,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
// Paper end

View File

@@ -103,7 +103,7 @@ index 8f911f589bf04902e38e2c625d84ba0c47cbd9ee..b15de37a06c3efb1c4bc790ccb23ebff
if (packet == null || this.processedDisconnect) { // Spigot
return;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 7bfba4d638cd42cdd98a22d87effe9a3be005315..f89d66d65b39324011718068840295bb77d2a3e2 100644
index b22b86d7f226e0e24d6be27ea33ec9d690f8f238..022da50912d357581b2132cf57e1a767e436022c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1464,7 +1464,7 @@ public abstract class PlayerList {

View File

@@ -1,10 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Tue, 28 Mar 2023 12:42:17 +0900
Subject: [PATCH] Implement MemoryLeakFix
Original: fxmorin/MemoryLeakFix
Copyright (C) 2023 fxmorin
Subject: [PATCH] Improve BiomeTemperatureCache
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
index ed439b7e94646141c93a7dd3704d1cdeb5c27e16..2bddcaf8762ee7834c32622402a976bfad12d127 100644
@@ -15,7 +12,7 @@ index ed439b7e94646141c93a7dd3704d1cdeb5c27e16..2bddcaf8762ee7834c32622402a976bf
private final BiomeSpecialEffects specialEffects;
// Pufferfish start - use our cache
- private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> {
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> { // Plazma - MemoryLeakFix
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> { // Plazma - Improve BiomeTemperatureCache
return Util.make(() -> {
/*
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
@@ -24,7 +21,7 @@ index ed439b7e94646141c93a7dd3704d1cdeb5c27e16..2bddcaf8762ee7834c32622402a976bf
long l = blockPos.asLong();
// Pufferfish start
- gg.airplane.structs.Long2FloatAgingCache cache = this.temperatureCache.get();
+ gg.airplane.structs.Long2FloatAgingCache cache = temperatureCache.get(); // Plazma - MemoryLeakFix
+ gg.airplane.structs.Long2FloatAgingCache cache = temperatureCache.get(); // Plazma - Improve BiomeTemperatureCache
float f = cache.getValue(l);
if (!Float.isNaN(f)) {
return f;

View File

@@ -6,10 +6,16 @@ Subject: [PATCH] Optimize VarInts
https://github.com/PaperMC/Paper/pull/8418
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
index c0bd2997fe3ebbfe926de832a36d209cc875f3e2..6108f3aa438b96e817c3a2e582c2c817f096e2eb 100644
index c0bd2997fe3ebbfe926de832a36d209cc875f3e2..8bb552410207b39a3b4160a5df51410455107fcf 100644
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
@@ -104,7 +104,20 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -99,12 +99,26 @@ public class FriendlyByteBuf extends ByteBuf {
private static final Gson GSON = new Gson();
public static boolean hasItemSerializeEvent = false; // Purpur
+ public static boolean optimizeVarInts = false; // Plazma
public FriendlyByteBuf(ByteBuf parent) {
this.source = parent;
}
@@ -24,18 +30,18 @@ index c0bd2997fe3ebbfe926de832a36d209cc875f3e2..6108f3aa438b96e817c3a2e582c2c817
+ // Plazma end
public static int getVarIntSize(int value) {
+ // Plazma start - Optimize VarInts
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.optimizeVarInts)
+ if (optimizeVarInts)
+ return VARINT_EXACT_BYTE_LENGTHS[Integer.numberOfLeadingZeros(value)];
+ // Plazma end
for (int j = 1; j < 5; ++j) {
if ((value & -1 << j * 7) == 0) {
return j;
@@ -620,6 +633,25 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -620,6 +634,25 @@ public class FriendlyByteBuf extends ByteBuf {
}
public FriendlyByteBuf writeVarInt(int value) {
+ // Plazma start - Optimize VarInts
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.optimizeVarInts) {
+ if (optimizeVarInts) {
+ // Peel the one and two byte count cases explicitly as they are the most common VarInt sizes
+ // that the proxy will write, to improve inlining.
+ if ((value & (0xFFFFFFFF << 7)) == 0) {
@@ -57,14 +63,25 @@ index c0bd2997fe3ebbfe926de832a36d209cc875f3e2..6108f3aa438b96e817c3a2e582c2c817
this.writeByte(value & 127 | 128);
value >>>= 7;
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 39eca4acefa8f9cf143398cfc6cf157e8489947e..754ed13a04631c69e3fb2421a12b17d0a6f732c6 100644
index 39eca4acefa8f9cf143398cfc6cf157e8489947e..f473bd844210eb4372a617f499dcb3ce2f6ab6e9 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 {
@@ -37,11 +37,17 @@ public class GlobalConfiguration extends ConfigurationPart {
}
public Misc misc;
- public class Misc extends ConfigurationPart {
+ public class Misc extends ConfigurationPart.Post {
public boolean reduceCreateRandomInstance = DO_OPTIMIZE;
public boolean doNotTriggerLootTableRefreshForNonPlayerInteraction = DO_OPTIMIZE;
public boolean doNotSendUselessEntityPackets = DO_OPTIMIZE;
+ public boolean optimizeVarInts = DO_OPTIMIZE;
+
+ @Override
+ public void postProcess() {
+ net.minecraft.network.FriendlyByteBuf.optimizeVarInts = optimizeVarInts;
+ }
}

View File

@@ -3,32 +3,38 @@ From: IPECTER <ipectert@gmail.com>
Date: Wed, 10 May 2023 13:32:42 +0900
Subject: [PATCH] Implement FerriteCore
Original: malte0811/FerriteCore
Copyright (C) 2023 malte0811
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 bee42ce7c1cb0f5ebd4890c02bc9c5dd727f7fd6..478802cedeef5166bf5662187038d1439be6c242 100644
index bee42ce7c1cb0f5ebd4890c02bc9c5dd727f7fd6..22f194956640b88c1d060b732e517f85d9091cf6 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
@@ -737,9 +737,16 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -737,6 +737,12 @@ public abstract class BlockBehaviour implements FeatureElement {
protected BlockBehaviour.BlockStateBase.Cache cache;
private FluidState fluidState;
private boolean isRandomlyTicking;
+ // Plazma start - FerriteCore
+ public final java.util.Map<net.minecraft.world.phys.shapes.VoxelShape, net.minecraft.world.phys.shapes.VoxelShape> CACHE_COLLIDE = new java.util.HashMap<>();
+ public final java.util.Map<VoxelShape, org.apache.commons.lang3.tuple.Pair<VoxelShape, VoxelShape[]>> CACHE_PROJECT = new java.util.HashMap<>();
+ public final java.util.Map<boolean[], boolean[]> CACHE_FACE_STURDY = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap<>(it.unimi.dsi.fastutil.booleans.BooleanArrays.HASH_STRATEGY);
+ private final ThreadLocal<BlockBehaviour.BlockStateBase.Cache> LAST_CACHE = new ThreadLocal<>();
+ public static final java.util.Map<net.minecraft.world.phys.shapes.VoxelShape, net.minecraft.world.phys.shapes.VoxelShape> CACHE_COLLIDE = new java.util.HashMap<>();
+ public static final java.util.Map<VoxelShape, org.apache.commons.lang3.tuple.Pair<VoxelShape, VoxelShape[]>> CACHE_PROJECT = new java.util.HashMap<>();
+ public static final java.util.Map<boolean[], boolean[]> CACHE_FACE_STURDY = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap<>(it.unimi.dsi.fastutil.booleans.BooleanArrays.HASH_STRATEGY);
+ private static final ThreadLocal<BlockBehaviour.BlockStateBase.Cache> LAST_CACHE = new ThreadLocal<>();
+ // Plazma end
protected BlockStateBase(Block block, ImmutableMap<Property<?>, Comparable<?>> propertyMap, MapCodec<BlockState> codec) {
super(block, propertyMap, codec);
+ LAST_CACHE.set(asState().cache); // Plazma - FerriteCore
this.fluidState = Fluids.EMPTY.defaultFluidState();
BlockBehaviour.Properties blockbase_info = block.properties;
@@ -795,6 +801,7 @@ public abstract class BlockBehaviour implements FeatureElement {
// Paper end
@@ -759,7 +766,60 @@ public abstract class BlockBehaviour implements FeatureElement {
this.offsetFunction = blockbase_info.offsetFunction;
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak;
this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
public void initCache() {
+ LAST_CACHE.set(asState().cache); // Plazma - FerriteCore
this.fluidState = ((Block) this.owner).getFluidState(this.asState());
this.isRandomlyTicking = ((Block) this.owner).isRandomlyTicking(this.asState());
if (!this.getBlock().hasDynamicShape()) {
@@ -832,7 +839,61 @@ public abstract class BlockBehaviour implements FeatureElement {
}
}
// Paper end
+ // Plazma start - FerriteCore
+ if (asState().cache != null) {
+ Cache newCache = asState().cache;
@@ -65,6 +71,7 @@ index bee42ce7c1cb0f5ebd4890c02bc9c5dd727f7fd6..478802cedeef5166bf5662187038d143
+ }
+ // Plazma end
+ }
+
+ // Plazma start - FerriteCore
+ private void replaceInternals(net.minecraft.world.phys.shapes.ArrayVoxelShape toKeep, net.minecraft.world.phys.shapes.ArrayVoxelShape toReplace) {
+ if (toKeep == toReplace) return;
@@ -83,10 +90,10 @@ index bee42ce7c1cb0f5ebd4890c02bc9c5dd727f7fd6..478802cedeef5166bf5662187038d143
+ return null;
}
+ // Plazma end
// Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData;
@@ -1205,10 +1265,10 @@ public abstract class BlockBehaviour implements FeatureElement {
public Block getBlock() {
return (Block) this.owner;
@@ -1205,10 +1266,10 @@ public abstract class BlockBehaviour implements FeatureElement {
final boolean propagatesSkylightDown;
final int lightBlock;
@Nullable

View File

@@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Thu, 29 Jun 2023 05:49:26 +0000
Subject: [PATCH] Skip event if no listeners
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
index 7ce9ebba8ce304d1f3f21d4f15ee5f3560d7700b..32305a34bcebd53aa523102a6da59bc2eb765055 100644
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
@@ -36,15 +36,17 @@ class PaperEventManager {
// SimplePluginManager
public void callEvent(@NotNull Event event) {
+ // Plazma start
+ HandlerList handlers = event.getHandlers();
+ RegisteredListener[] listeners = handlers.getRegisteredListeners();
+ if (listeners.length == 0) return;
+ // Plazma end
if (event.isAsynchronous() && this.server.isPrimaryThread()) {
throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously.");
} else if (!event.isAsynchronous() && !this.server.isPrimaryThread() && !this.server.isStopping()) {
throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
}
- HandlerList handlers = event.getHandlers();
- RegisteredListener[] listeners = handlers.getRegisteredListeners();
-
for (RegisteredListener registration : listeners) {
if (!registration.getPlugin().isEnabled()) {
continue;

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 14:55:37 +0900
Subject: [PATCH] Optimize-spigot-event-bus
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
index 32305a34bcebd53aa523102a6da59bc2eb765055..6feb88b90831ec7106c9d777bdfa68fa185f1b89 100644
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
@@ -41,12 +41,17 @@ class PaperEventManager {
RegisteredListener[] listeners = handlers.getRegisteredListeners();
if (listeners.length == 0) return;
// Plazma end
- if (event.isAsynchronous() && this.server.isPrimaryThread()) {
- throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously.");
- } else if (!event.isAsynchronous() && !this.server.isPrimaryThread() && !this.server.isStopping()) {
- throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
+ // Plazma start - Optimize spigot event bus
+ if (event.asynchronous() != net.kyori.adventure.util.TriState.NOT_SET) {
+ final boolean isAsync = event.isAsynchronous();
+ final boolean onPrimaryThread = this.server.isPrimaryThread();
+ if (isAsync && onPrimaryThread) {
+ throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously.");
+ } else if (!isAsync && !onPrimaryThread && !this.server.isStopping()) {
+ throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
+ }
}
-
+ // Plazma end
for (RegisteredListener registration : listeners) {
if (!registration.getPlugin().isEnabled()) {
continue;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 15:40:34 +0900
Subject: [PATCH] CarpetFixes-Configuration
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index f473bd844210eb4372a617f499dcb3ce2f6ab6e9..7040b1c97292bd58ce531065078fb2df2533e562 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -75,4 +75,12 @@ public class GlobalConfiguration extends ConfigurationPart {
public int timerTimeOut = 0;
}
+
+ public CarpetFixes carpetFixes;
+
+ public class CarpetFixes extends ConfigurationPart {
+
+ public boolean enabled = 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 7d5bfd3a5aa5135596f3f1ae7c504a51b02798ef..b0deec445b5ea3cd3e4802eca04e99818b539bd8 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -131,4 +131,12 @@ public class LevelConfigurations extends ConfigurationPart {
}
}
+
+ public CarpetFixes carpetFixes;
+
+ public class CarpetFixes extends ConfigurationPart {
+
+ public boolean enabled = DO_OPTIMIZE;
+
+ }
}

View File

@@ -0,0 +1,179 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 15:53:37 +0900
Subject: [PATCH] CarpetFixes-Optimizations-BiomeManager
Original: fxmorin/carpet-fixes
Copyright (C) 2023 fxmorin
Optimized getBiome call: Reduce the number of calls to the mess of
LinearCongruentialGenerator#next(long, long) which is pretty heavy on performance.
We are able to do this by skipping around 370 of 512 possible calls to getBiome() by predicting the outcome
before doing the seed mixing. This seems to be around 25% - 75% faster depending on the use case.
We can predict much faster than the seed mixing.
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 5695c5116c8a338b2e41aafcb2dc9f2146856970..b2291854b9803fe01d40e8a1d76d6ff358cea114 100644
--- a/src/main/java/net/minecraft/world/level/biome/BiomeManager.java
+++ b/src/main/java/net/minecraft/world/level/biome/BiomeManager.java
@@ -12,6 +12,7 @@ public class BiomeManager {
private static final int ZOOM_BITS = 2;
private static final int ZOOM = 4;
private static final int ZOOM_MASK = 3;
+ private static final double maxOffset = 0.4500000001D; // Plazma - CarpetFixes
private final BiomeManager.NoiseBiomeSource noiseBiomeSource;
private final long biomeZoomSeed;
@@ -29,39 +30,104 @@ public class BiomeManager {
}
public Holder<Biome> getBiome(BlockPos pos) {
- int i = pos.getX() - 2;
- int j = pos.getY() - 2;
- int k = pos.getZ() - 2;
- int l = i >> 2;
- int m = j >> 2;
- int n = k >> 2;
- double d = (double)(i & 3) / 4.0D;
- double e = (double)(j & 3) / 4.0D;
- double f = (double)(k & 3) / 4.0D;
- int o = 0;
- double g = Double.POSITIVE_INFINITY;
-
- for(int p = 0; p < 8; ++p) {
- boolean bl = (p & 4) == 0;
- boolean bl2 = (p & 2) == 0;
- boolean bl3 = (p & 1) == 0;
- int q = bl ? l : l + 1;
- int r = bl2 ? m : m + 1;
- int s = bl3 ? n : n + 1;
- double h = bl ? d : d - 1.0D;
- double t = bl2 ? e : e - 1.0D;
- double u = bl3 ? f : f - 1.0D;
- double v = getFiddledDistance(this.biomeZoomSeed, q, r, s, h, t, u);
- if (g > v) {
- o = p;
- g = v;
+ // Plazma start - CarpetFixes - Optimized getBiome call
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().carpetFixes.optimizedBiomeAccess()) {
+ int xMinus2 = pos.getX() - 2;
+ int yMinus2 = pos.getY() - 2;
+ int zMinus2 = pos.getZ() - 2;
+ int x = xMinus2 >> 2; // BlockPos to BiomePos
+ int y = yMinus2 >> 2;
+ int z = zMinus2 >> 2;
+ double quartX = (double) (xMinus2 & 3) / 4.0D; // quartLocal divided by 4
+ double quartY = (double) (yMinus2 & 3) / 4.0D; // 0/4, 1/4, 2/4, 3/4
+ double quartZ = (double) (zMinus2 & 3) / 4.0D; // [0, 0.25, 0.5, 0.75]
+ int smallestX = 0;
+ double smallestDist = Double.POSITIVE_INFINITY;
+ for (int biomeX = 0; biomeX < 8; ++biomeX) {
+ boolean everyOtherQuad = (biomeX & 4) == 0; // 1 1 1 1 0 0 0 0
+ boolean everyOtherPair = (biomeX & 2) == 0; // 1 1 0 0 1 1 0 0
+ boolean everyOther = (biomeX & 1) == 0; // 1 0 1 0 1 0 1 0
+ double quartXX = everyOtherQuad ? quartX : quartX - 1.0D; //[-1.0,-0.75,-0.5,-0.25,0.0,0.25,0.5,0.75]
+ double quartYY = everyOtherPair ? quartY : quartY - 1.0D;
+ double quartZZ = everyOther ? quartZ : quartZ - 1.0D;
+
+ //This code block is new
+ double maxQuartYY = 0.0D, maxQuartZZ = 0.0D;
+ if (biomeX != 0) {
+ maxQuartYY = Mth.square(Math.max(quartYY + maxOffset, Math.abs(quartYY - maxOffset)));
+ maxQuartZZ = Mth.square(Math.max(quartZZ + maxOffset, Math.abs(quartZZ - maxOffset)));
+ double maxQuartXX = Mth.square(Math.max(quartXX + maxOffset, Math.abs(quartXX - maxOffset)));
+ if (smallestDist < maxQuartXX + maxQuartYY + maxQuartZZ) continue;
+ }
+
+ int xx = everyOtherQuad ? x : x + 1;
+ int yy = everyOtherPair ? y : y + 1;
+ int zz = everyOther ? z : z + 1;
+
+ //I transferred the code from method_38106 to here, so I could call continue halfway through
+ long seed = LinearCongruentialGenerator.next(this.biomeZoomSeed, xx);
+ seed = LinearCongruentialGenerator.next(seed, yy);
+ seed = LinearCongruentialGenerator.next(seed, zz);
+ seed = LinearCongruentialGenerator.next(seed, xx);
+ seed = LinearCongruentialGenerator.next(seed, yy);
+ seed = LinearCongruentialGenerator.next(seed, zz);
+ double offsetX = getFiddle(seed);
+ double sqrX = Mth.square(quartXX + offsetX);
+ if (biomeX != 0 && smallestDist < sqrX + maxQuartYY + maxQuartZZ) continue; //skip the rest of the loop
+ seed = LinearCongruentialGenerator.next(seed, this.biomeZoomSeed);
+ double offsetY = getFiddle(seed);
+ double sqrY = Mth.square(quartYY + offsetY);
+ if (biomeX != 0 && smallestDist < sqrX + sqrY + maxQuartZZ) continue; // skip the rest of the loop
+ seed = LinearCongruentialGenerator.next(seed, this.biomeZoomSeed);
+ double offsetZ = getFiddle(seed);
+ double biomeDist = sqrX + sqrY + Mth.square(quartZZ + offsetZ);
+
+ if (smallestDist > biomeDist) {
+ smallestX = biomeX;
+ smallestDist = biomeDist;
+ }
}
- }
+ return this.noiseBiomeSource.getNoiseBiome(
+ (smallestX & 4) == 0 ? x : x + 1,
+ (smallestX & 2) == 0 ? y : y + 1,
+ (smallestX & 1) == 0 ? z : z + 1
+ );
+ } else {
+ int i = pos.getX() - 2;
+ int j = pos.getY() - 2;
+ int k = pos.getZ() - 2;
+ int l = i >> 2;
+ int m = j >> 2;
+ int n = k >> 2;
+ double d = (double) (i & 3) / 4.0D;
+ double e = (double) (j & 3) / 4.0D;
+ double f = (double) (k & 3) / 4.0D;
+ int o = 0;
+ double g = Double.POSITIVE_INFINITY;
+
+ for (int p = 0; p < 8; ++p) {
+ boolean bl = (p & 4) == 0;
+ boolean bl2 = (p & 2) == 0;
+ boolean bl3 = (p & 1) == 0;
+ int q = bl ? l : l + 1;
+ int r = bl2 ? m : m + 1;
+ int s = bl3 ? n : n + 1;
+ double h = bl ? d : d - 1.0D;
+ double t = bl2 ? e : e - 1.0D;
+ double u = bl3 ? f : f - 1.0D;
+ double v = getFiddledDistance(this.biomeZoomSeed, q, r, s, h, t, u);
+ if (g > v) {
+ o = p;
+ g = v;
+ }
+ }
- int w = (o & 4) == 0 ? l : l + 1;
- int x = (o & 2) == 0 ? m : m + 1;
- int y = (o & 1) == 0 ? n : n + 1;
- return this.noiseBiomeSource.getNoiseBiome(w, x, y);
+ int w = (o & 4) == 0 ? l : l + 1;
+ int x = (o & 2) == 0 ? m : m + 1;
+ int y = (o & 1) == 0 ? n : n + 1;
+ return this.noiseBiomeSource.getNoiseBiome(w, x, y);
+ }
+ // Plazma end
}
public Holder<Biome> getNoiseBiomeAtPosition(double x, double y, double z) {
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
index 7040b1c97292bd58ce531065078fb2df2533e562..bf323df50bc07e19ec6e3a4a11f3b7db466064c9 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
@@ -81,6 +81,11 @@ public class GlobalConfiguration extends ConfigurationPart {
public class CarpetFixes extends ConfigurationPart {
public boolean enabled = DO_OPTIMIZE;
+ boolean optimizedBiomeAccess = true;
+
+ public boolean optimizedBiomeAccess() {
+ return enabled && optimizedBiomeAccess;
+ }
}
}

View File

@@ -0,0 +1,127 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Wed, 6 Sep 2023 16:35:34 +0900
Subject: [PATCH] CarpetFixes-Optimizations-Sheep
Original: fxmorin/carpet-fixes
Copyright (C) 2023 fxmorin
The game determines the child sheep's color by getting a wool block from the parents, putting them in a crafting
recipe, getting the output wool and getting the color from that.
I don't know in what world we would consider a data-driven method with that much overhead as a smart idea. Instead,
we used a prebaked list of all the possible colors and combinations, however this means that you can't use a
datapack to change it.
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 9399361c8d26a140fa6042988a30a1d3d552e418..5bfb246bfabf82feb805665b0be1a36ce62996ca 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java
@@ -431,19 +431,27 @@ public class Sheep extends Animal implements Shearable {
}
private DyeColor getOffspringColor(Animal firstParent, Animal secondParent) {
+ // Plazma start - CarpetFixes - Optimized sheep chile color
DyeColor enumcolor = ((Sheep) firstParent).getColor();
DyeColor enumcolor1 = ((Sheep) secondParent).getColor();
- CraftingContainer inventorycrafting = Sheep.makeContainer(enumcolor, enumcolor1);
- Optional<Item> optional = this.level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, inventorycrafting, this.level).map((recipecrafting) -> { // CraftBukkit - decompile error
- return recipecrafting.assemble(inventorycrafting, this.level.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 this.level.random.nextBoolean() ? enumcolor : enumcolor1;
- });
+ if (this.level.plazmaLevelConfiguration().carpetFixes.optimizedSheepChildColor()) {
+ DyeColor col = org.plazmamc.plazma.util.CarpetFixesUtils.properDyeMixin(enumcolor, enumcolor1);
+ if (col == null) col = this.level.random.nextBoolean() ? enumcolor : enumcolor1;
+ return col;
+ } else {
+ CraftingContainer inventorycrafting = Sheep.makeContainer(enumcolor, enumcolor1);
+ Optional<Item> optional = this.level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, inventorycrafting, this.level).map((recipecrafting) -> { // CraftBukkit - decompile error
+ return recipecrafting.assemble(inventorycrafting, this.level.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 this.level.random.nextBoolean() ? enumcolor : enumcolor1;
+ });
+ }
+ // Plazma end
}
private static CraftingContainer makeContainer(DyeColor firstColor, DyeColor secondColor) {
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
index b0deec445b5ea3cd3e4802eca04e99818b539bd8..de1fa9ccb088597d059e8dc7fbb0c8788e3815fc 100644
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
@@ -137,6 +137,11 @@ public class LevelConfigurations extends ConfigurationPart {
public class CarpetFixes extends ConfigurationPart {
public boolean enabled = DO_OPTIMIZE;
+ boolean optimizedSheepChildColor = false;
+
+ public boolean optimizedSheepChildColor() {
+ return enabled && optimizedSheepChildColor;
+ }
}
}
diff --git a/src/main/java/org/plazmamc/plazma/util/CarpetFixesUtils.java b/src/main/java/org/plazmamc/plazma/util/CarpetFixesUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..aae3cf170bca4b3e6cdd0a964967dfafe2759f65
--- /dev/null
+++ b/src/main/java/org/plazmamc/plazma/util/CarpetFixesUtils.java
@@ -0,0 +1,48 @@
+package org.plazmamc.plazma.util;
+
+import net.minecraft.world.item.DyeColor;
+
+public class CarpetFixesUtils {
+
+ //If I was actually implementing this, the color values would have been binary in order for fast calculations.
+ //Never do this in a production build, although this is better than using the RecipeManager xD
+ public static DyeColor properDyeMixin(DyeColor col1, DyeColor col2) {
+ if (col1.equals(col2)) return col1;
+ switch(col1) {
+ case WHITE -> {
+ switch(col2) {
+ case BLUE -> {return DyeColor.LIGHT_BLUE;}
+ case GRAY -> {return DyeColor.LIGHT_GRAY;}
+ case BLACK -> {return DyeColor.GRAY;}
+ case GREEN -> {return DyeColor.LIME;}
+ case RED -> {return DyeColor.PINK;}
+ }
+ }
+ case BLUE -> {
+ switch(col2) {
+ case WHITE -> {return DyeColor.LIGHT_BLUE;}
+ case GREEN -> {return DyeColor.CYAN;}
+ case RED -> {return DyeColor.PURPLE;}
+ }
+ }
+ case RED -> {
+ switch(col2) {
+ case YELLOW -> {return DyeColor.ORANGE;}
+ case WHITE -> {return DyeColor.PINK;}
+ case BLUE -> {return DyeColor.PURPLE;}
+ }
+ }case GREEN -> {
+ switch(col2) {
+ case BLUE -> {return DyeColor.CYAN;}
+ case WHITE -> {return DyeColor.LIME;}
+ }
+ }
+ case YELLOW -> {if (col2.equals(DyeColor.RED)) return DyeColor.ORANGE;}
+ case PURPLE -> {if (col2.equals(DyeColor.PINK)) return DyeColor.MAGENTA;}
+ case PINK -> {if (col2.equals(DyeColor.PURPLE)) return DyeColor.MAGENTA;}
+ case GRAY -> {if (col2.equals(DyeColor.WHITE)) return DyeColor.LIGHT_GRAY;}
+ case BLACK -> {if (col2.equals(DyeColor.WHITE)) return DyeColor.GRAY;}
+ }
+ return null;
+ }
+}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: IPECTER <ipectert@gmail.com>
Date: Sat, 30 Dec 2023 21:56:47 +0900
Subject: [PATCH] Paper-Add-another-slot-sanity-check
Backport of Paper ver/1.20.2 8493340
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 20b328704981c088597359fe18c1d67c339c1c0f..af4951fdfa08dfff22df03950c26fdfc28c5a3cd 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -424,6 +424,7 @@ public abstract class AbstractContainerMenu {
this.resetQuickCraft();
}
} else if (this.quickcraftStatus == 1) {
+ if (slotIndex < 0) return; // Paper
slot = (Slot) this.slots.get(slotIndex);
itemstack = this.getCarried();
if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) {
@@ -600,6 +601,7 @@ public abstract class AbstractContainerMenu {
int i2;
if (actionType == ClickType.SWAP) {
+ if (slotIndex < 0 || button < 0) return; // Paper
slot2 = (Slot) this.slots.get(slotIndex);
itemstack1 = playerinventory.getItem(button);
itemstack = slot2.getItem();

View File

@@ -0,0 +1,62 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: jihwan0511 <cgjjj320@gmail.com>
Date: Thu, 5 Jan 2024 06:04:37 +0100
Subject: [PATCH] Validate ResourceLocation in NBT reading
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
index 18fad4f083862ace2bc56579883f548f6d697091..80083fed4b44b9d433925f09db83e559582109a1 100644
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
@@ -230,8 +230,10 @@ public final class NbtUtils {
if (!nbt.contains("Name", 8)) {
return Blocks.AIR.defaultBlockState();
} else {
- ResourceLocation resourceLocation = new ResourceLocation(nbt.getString("Name"));
- Optional<? extends Holder<Block>> optional = blockLookup.get(ResourceKey.create(Registries.BLOCK, resourceLocation));
+ // Paper start - Validate resource location
+ ResourceLocation resourceLocation = ResourceLocation.tryParse(nbt.getString("Name"));
+ Optional<? extends Holder<Block>> optional = resourceLocation != null ? blockLookup.get(ResourceKey.create(Registries.BLOCK, resourceLocation)) : Optional.empty();
+ // Paper end
if (optional.isEmpty()) {
return Blocks.AIR.defaultBlockState();
} else {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index e0cf7771488ab0065708d68b4e8550b865af0ed4..a7fbd329ea6d36a46c00b4476c74e426dbbfe238 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -620,7 +620,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
this.setLeftHanded(nbt.getBoolean("LeftHanded"));
if (nbt.contains("DeathLootTable", 8)) {
- this.lootTable = new ResourceLocation(nbt.getString("DeathLootTable"));
+ this.lootTable = ResourceLocation.tryParse(nbt.getString("DeathLootTable")); // Paper - Validate ResourceLocation
this.lootTableSeed = nbt.getLong("DeathLootTableSeed");
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index 42ebd91196ae420eee57f4380abc558555457163..b61a367048c3d6dfef187fef35a5dc7471f891d0 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -560,7 +560,7 @@ public abstract class AbstractArrow extends Projectile {
this.setCritArrow(nbt.getBoolean("crit"));
this.setPierceLevel(nbt.getByte("PierceLevel"));
if (nbt.contains("SoundEvent", 8)) {
- this.soundEvent = (SoundEvent) BuiltInRegistries.SOUND_EVENT.getOptional(new ResourceLocation(nbt.getString("SoundEvent"))).orElse(this.getDefaultHitGroundSoundEvent());
+ this.soundEvent = (SoundEvent) BuiltInRegistries.SOUND_EVENT.getOptional(ResourceLocation.tryParse(nbt.getString("SoundEvent"))).orElse(this.getDefaultHitGroundSoundEvent()); // Paper - Validate resource location
}
this.setShotFromCrossbow(nbt.getBoolean("ShotFromCrossbow"));
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
index 7529751afa2932fd16bc4591189b0358268a7b14..e2e1c7a017e82dc7299e5cd1783818e4f0319c0b 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
@@ -67,7 +67,7 @@ public interface ContainerEntity extends Container, MenuProvider {
default void readChestVehicleSaveData(CompoundTag nbt) {
this.clearItemStacks();
if (nbt.contains("LootTable", 8)) {
- this.setLootTable(new ResourceLocation(nbt.getString("LootTable")));
+ this.setLootTable(ResourceLocation.tryParse(nbt.getString("LootTable"))); // Paper - Validate ResourceLocation
this.setLootTableSeed(nbt.getLong("LootTableSeed"));
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 KiB