mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-21 18:16:05 +01:00
upstream (#421)
* Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft/Origami) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: d23f8b62e fix? #5222 0f2575de2 fix? #5222 7c3499702 fix? #5218 c8eec830b fix #5217 a235c77ce Adventure 4.5.0 511cd52f0 fix #5214 33d4f608b fix stupid legacy chat garbage a1eebfea9 fix #5212 and #5213 466820160 Upstream Update (#5211) 2a0ee4b65 Add support for hex color codes in console 4e958e229 We're going on an Adventure! (#4842) 1a9735611 Stop loop when flags set to false (#5101) a5928db4a [Auto] Updated Upstream (CraftBukkit) 5fd19303f Call PreCreatureSpawnEvent for more spawn reasons (#5201) Tuinity Changes: 2f298d3 Fix getEntities for ender dragon parts Purpur Changes: 55af107 Updated Upstream (Paper) 8369588 Updated Upstream (Paper & Tuinity) 14906a1 Allow for removing italics from items renamed in the anvil by starting the text with '&r' f599c59 Update silk touch spawners patch to use adventure e17ee14 Update anvil colors patch to use adventure b538cd9 Updated Upstream (Paper) c08f028 Updated Upstream (Tuinity) 90f67f8 Updated Upstream (Paper) c98cc6b Configs for if Wither/Ender Dragon can ride vehicles 2d2e1d4 Fix Wither and Ender Dragon being able to ride boats when they cannot in Paper/Vanilla Airplane Changes: 3fc432c [skip ci] Add Patrons section 4b9dd63 Skip POI finding if stuck in vehicle 1ba97ae Updated Upstream (Tuinity) Empirecraft Changes: 58dee2db Updated Paper 48c1161a Updated Paper Origami Changes: 654b344 Only try to update below hopper if non-ticking is enabled * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: d5cb9308f fix #5224 * it works, finally * I think everything is fixed now.... * Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 2dd5dccf0 Add config option for displayname in quit message (#5260) 63fe5e4b7 Fix further issues with rgb text pattern matching 89be8185d Don't grab the threads stacktrace when dumping same thread ca4c781d8 [Auto] Updated Upstream (Bukkit/CraftBukkit) 6ae212125 Display name should never be null bf2f8aeaf Add @NotNull to Key in org.bukkit.sound (#5241) 01f9b65f9 Sound can implement Adventure's Sound.Type aa282a1a0 Don't try to deserialize a null string in legacy method 9bcd08cb3 [CI-SKIP] [Auto] Rebuild Patches ea6fd6076 [Auto] Updated Upstream (Bukkit) d9b02e94d Misc thread dumps (#5200) a0093e142 Adventure 4.5.1 afea0e8ab Add links to the Adventure javadocs 846783c8a Fix a couple of typos in the javadoc for Player (#5235) a2574d8f5 Replace usages of LegacyComponentSerializer.legacySection() in Paper-Server with PaperAdventure.LEGACY_SECTION_UXRC (#5233) cae142b85 Enable Hex colors on PaperAdventure.LEGACY_SECTION_UXRC, and use it for sending messages to console command sender (#5230) c1635eabb PlayerDeathEvent#getDeathMessage should provide translation for legacy reasons #5227 3f74af202 Fix Log4J converter not parsing hex without named colors (#5228) Tuinity Changes: 7734ef0 Detail player ticking in watchdog dumps Purpur Changes: 529c260 [ci-skip] Update Gradle to 6.8.3 831b8d7 Updated Upstream (Paper) d3c8fb2 Updated Upstream (Paper) 4602b9b Updated Upstream (Paper) 18f97a9 Make fox breeding cooldown work, add villager breeding cooldown config 868c9ca Updated Upstream (Paper) 274c7b2 Updated Upstream (Paper) Airplane Changes: 9f3cad3 Updated Upstream (Tuinity) Empirecraft Changes: 3e3e8e5e Updated Paper * Updated Upstream and Sidestream(s) (Paper/Purpur/Empirecraft) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: df4c68b66 fix #5279 - clickable links again ff5ff3af4 Print command usage for /paper entity list at more places (#5282) 5d779a621 Implements PlayerHandshakeEvent#getOriginalSocketAddressHostname and deprecates PlayerHandshakeEvent(String, boolean) in favour of PlayerHandshakeEvent(String, String, boolean) 6fab1ee3a Expose Tracked Players b53a650a5 Clear SyncLoadInfo c02c22fde fix: legacy component serialisation was wiped out Purpur Changes: a5fa038 Updated Upstream (Paper) Empirecraft Changes: 95ac7f87 Updated Paper * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 06900aef5 Fix username connecting with no texture being overwritten by usercache (#4970) * Updated Upstream and Sidestream(s) (Paper/Purpur) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 9907cedec New chat events for better Adventure support (#5289) Purpur Changes: 34f0e57 Updated Upstream (Paper) * Updated Upstream and Sidestream(s) (Paper/Purpur/Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 9907cedec New chat events for better Adventure support (#5289) Purpur Changes: 34f0e57 Updated Upstream (Paper) Paper Changes: 60e92c061 fix #5292 with help from @JRoy * that doesn't need to be there * Updated Upstream and Sidestream(s) (Paper/Purpur/Airplane) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 7d56f38ed Do not use the bukkit singleton for the GUI (Fixes #5301) 4c9bdf53a Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5299) 8647bd130 Improve ServerGUI fcc6d3359 Throw proper exception on empty JsonList file 17d2e1291 Fix interact event in adventure mode 964e0bf42 MC-29274: Fix Wither hostility towards players 9e24a5213 Fixed furnace cook-speed multiplier losing precision when calculating cook time c7e42faa3 Do not create unnecessary copies of the passenger list 40881ad67 added tnt minecarts to the tnt height nerf 26be708f4 Remove streams from SensorNearest 5b5989b21 fix nullability of playerlist header/footer, closes #5290 45bc531dd Fix Material#getTranslationKey for Block Materials (#5294) Purpur Changes: 68ff99e Updated Upstream (Paper) Airplane Changes: 80d65be Add more licenses 4d27e5b Use our own bstats, move mcdev fixes * whoops * Updated Upstream and Sidestream(s) (Airplane) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: d50d4e1 Rewrite disabling of POI searching when stuck * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: be1687914 stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962) * Updated Upstream and Sidestream(s) (Paper/Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: be1687914 stop firing pressure plate EntityInteractEvent for ignored entities (fixes #4962) Paper Changes: aaef1d5cc fix file conversion 674d8f7f7 Make discovered maps config work in treasure maps from loot tables too * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 616b1f3cd consider enchants for destroy speed * Updated Upstream and Sidestream(s) (Paper/Purpur/Airplane) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 5b20df6bf added PlayerNameEntityEvent ff9c82444 Add worldborder events Purpur Changes: d93887a Updated Upstream (Paper) Airplane Changes: 02743da Complete /airplane command a2be422 Add /airplane command 3b90baf [SKIP-CI] Use patreon for sponsor button * Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: be7cde2c7 [CI-SKIP] Always check PATH for JDK (#5315) Tuinity Changes: 09e1a10 Fix NPE in light exception handler 0ae7c2c Dump even more info for ticking entities 2e4a930 Store changed positions inside field on light engine Purpur Changes: c54e65f Add config for snow on blue ice 2fdd7d4 One Punch Man! (#185) c2bd3de Dont run with scissors (#184) * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 54ec85949 Prevent grindstones from overstacking items d7795080c Fix NPE for AIR in meta operations in ItemStack 2e70796c7 [CI-SKIP] Improve documentation of PreCreatureSpawnEvent (#5244) 7bb92e750 [CI-SKIP] Add JavaDoc links to Tag class pointing to custom Paper tags (#5285) 28cd686bf fix per-world difficulty command (#5306) * Updated Upstream and Sidestream(s) (Tuinity/Airplane/Akarin/Empirecraft) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 71b089f Do not run raytrace logic for AIR Airplane Changes: 815b461 Flare Akarin Changes: 62342de Update README.md dfcbbf5 Update SUPPORT.md 4225fcf Updated Tuinity's Paper 3950fd5 Updated build badge f2d367c Merge branch 'ver/1.15.2' into ver/1.16.4 Empirecraft Changes: 3718e178 Updated Paper * whoops * Updated Upstream and Sidestream(s) (Tuinity) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: f87cb79 Make entity tracker use highest range of passengers * Updated Upstream and Sidestream(s) (Airplane) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: dd6a75c Updated Upstream (Tuinity) 48ff3e0 Some tweaks to increase Flare's compatibility * Updated Upstream and Sidestream(s) (Airplane/Airplane) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: dd6a75c Updated Upstream (Tuinity) 48ff3e0 Some tweaks to increase Flare's compatibility Airplane Changes: e7fc41a Update to latest version of Flare * Updated Upstream and Sidestream(s) (Airplane) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: 86781ec Multithreaded Tracker! * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: 7f72c4675 Use implementation-provided legacy serializer for events 27a8d99ec Adventure 4.7.0 e65bd35a1 Respect teams in legacy chat name if configured (#5321) b31089a92 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5325) a52b30814 Fix title swapping fadeIn and stay * Updated Upstream and Sidestream(s) (Paper) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: e4d8a6279 Implement Keyed on World bcb63dab7 [CI-SKIP] [Auto] Rebuild Patches 48342b06c Allow signs that are inside of the spawn protection to be right clicked to use their run_command tag c229f90c1 Add Block#isValidTool 20e709c1d Add recipe to cook events 2dcf8bff4 legacy formatting will be the death of me f597fea0d legacy formatting is worse than walking around in wet socks * Updated Upstream and Sidestream(s) (Paper/Purpur) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Paper Changes: e4d8a6279 Implement Keyed on World bcb63dab7 [CI-SKIP] [Auto] Rebuild Patches 48342b06c Allow signs that are inside of the spawn protection to be right clicked to use their run_command tag c229f90c1 Add Block#isValidTool 20e709c1d Add recipe to cook events 2dcf8bff4 legacy formatting will be the death of me f597fea0d legacy formatting is worse than walking around in wet socks Purpur Changes: 63c370c One Punch Man 2: Electric Boogaloo (#187)
This commit is contained in:
parent
b10b5baccd
commit
99a93cf526
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -20,7 +20,7 @@
|
||||
[submodule "upstream/Akarin"]
|
||||
path = upstream/Akarin
|
||||
url = https://github.com/Akarin-project/Akarin.git
|
||||
branch = ver/1.16.4
|
||||
branch = ver/1.16.5
|
||||
|
||||
[submodule "upstream/Empirecraft"]
|
||||
path = upstream/Empirecraft
|
||||
|
19
PATCHES.md
19
PATCHES.md
@ -29,8 +29,8 @@ # Patches
|
||||
| server | Add allow water in end world option | William Blake Galbreath | |
|
||||
| server | Add boat fall damage config | BillyGalbreath | |
|
||||
| server | Add canSaveToDisk to Entity | William Blake Galbreath | |
|
||||
| server | Add component util | William Blake Galbreath | |
|
||||
| server | Add config for allowing Endermen to despawn even while | jmp | |
|
||||
| server | Add config for snow on blue ice | BillyGalbreath | |
|
||||
| server | Add configurable snowball damage | BillyGalbreath | |
|
||||
| server | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | |
|
||||
| api | Add critical hit check to EntityDamagedByEntityEvent | BillyGalbreath | |
|
||||
@ -71,6 +71,7 @@ # Patches
|
||||
| api | Advancement API | William Blake Galbreath | |
|
||||
| server | Airplane Configuration | Paul Sauve | |
|
||||
| server | Airplane MC Dev Fixes | Paul Sauve | |
|
||||
| server | Airplane Profiler | Paul Sauve | |
|
||||
| server | Allow Entities to be removed from a world while ticking | Spottedleaf | |
|
||||
| server | Allow anvil colors | William Blake Galbreath | |
|
||||
| server | Allow color codes in books | William Blake Galbreath | |
|
||||
@ -107,6 +108,7 @@ # Patches
|
||||
| server | Config to allow Note Block sounds when blocked | Encode42 | |
|
||||
| server | Config to always tame in Creative | Encode42 | |
|
||||
| server | Config to use infinity bows without arrows | Encode42 | |
|
||||
| server | Configs for if Wither/Ender Dragon can ride vehicles | jmp | |
|
||||
| server | Configurable BlockPhysicsEvent | Mykyta Komarnytskyy | |
|
||||
| server | Configurable TPS Catchup | William Blake Galbreath | |
|
||||
| server | Configurable chance for wolves to spawn rabid | Encode42 | |
|
||||
@ -146,14 +148,15 @@ # Patches
|
||||
| server | Do not allow ticket level changes while unloading | Spottedleaf | |
|
||||
| server | Do not load chunks during a crash report | Spottedleaf | |
|
||||
| server | Do not retain playerchunkmap instance in light thread factory | Spottedleaf | |
|
||||
| server | Do not run raytrace logic for AIR | Spottedleaf | |
|
||||
| server | Don't allow StructureLocateEvent to change worlds | Spottedleaf | |
|
||||
| server | Don't get entity equipment if not needed | Paul Sauve | |
|
||||
| server | Don't load chunk with seed based feature search | Phoenix616 | |
|
||||
| server | Don't lookup fluid state when raytracing | Spottedleaf | |
|
||||
| server | Don't trigger Lootable Refresh for non player interaction | Aikar | |
|
||||
| server | Don't wake up entities when damage event is cancelled | Phoenix616 | |
|
||||
| server | Dont run with scissors! | JustDoom | |
|
||||
| server | Dont send useless entity packets | William Blake Galbreath | |
|
||||
| server | Duplicate paper's vanilla scoreboard colors patch to sync | William Blake Galbreath | |
|
||||
| server | Dynamic activation range | Paul Sauve | |
|
||||
| server | EMC - Configurable disable give dropping | Aikar | |
|
||||
| server | EMC - MonsterEggSpawnEvent | Aikar | |
|
||||
@ -167,6 +170,7 @@ # Patches
|
||||
| server | Entity lifespan | William Blake Galbreath | |
|
||||
| server | Execute chunk tasks mid-tick | Spottedleaf | |
|
||||
| api | ExecuteCommandEvent | William Blake Galbreath | |
|
||||
| api | Expose findClass for profiler | Paul Sauve | |
|
||||
| server | Farmland trampling changes | Mariell Hoversholm | |
|
||||
| server | Fix 'outdated server' showing in ping before server fully | William Blake Galbreath | |
|
||||
| server | Fix Bukkit.createInventory() with type LECTERN | willies952002 | |
|
||||
@ -175,7 +179,6 @@ # Patches
|
||||
| server | Fix PlayerEditBookEvent not saving new book | BillyGalbreath | |
|
||||
| server | Fix chunks refusing to unload at low TPS | Spottedleaf | |
|
||||
| server | Fix cow rotation when shearing mooshroom | William Blake Galbreath | |
|
||||
| server | Fix death message colors | William Blake Galbreath | |
|
||||
| server | Fix exp drop of zombie pigmen (MC-56653) | Phoenix616 | |
|
||||
| server | Fix incorrect isRealPlayer init | Spottedleaf | |
|
||||
| api | Fix javadoc warnings (missing @param and @return) | BillyGalbreath | |
|
||||
@ -233,7 +236,8 @@ # Patches
|
||||
| server | MC-Dev fixes | Spottedleaf | |
|
||||
| server | Make CallbackExecutor strict again | Spottedleaf | |
|
||||
| server | Make Iron Golems Swim | William Blake Galbreath | |
|
||||
| server | Make animal breeding times configurable | jmp | |
|
||||
| server | Make entity breeding times configurable | jmp | |
|
||||
| server | Make entity tracker use highest range of passengers | Spottedleaf | |
|
||||
| server | Make lava flow speed configurable | William Blake Galbreath | |
|
||||
| server | Make sure inlined getChunkAt has inlined logic for loaded | Spottedleaf | |
|
||||
| server | Manually inline methods in BlockPosition | Spottedleaf | |
|
||||
@ -244,10 +248,12 @@ # Patches
|
||||
| server | Movement options for armour stands | Mariell Hoversholm | |
|
||||
| server | Multi-Threaded Server Ticking Vanilla | Spottedleaf | |
|
||||
| server | Multi-Threaded ticking CraftBukkit | Spottedleaf | |
|
||||
| server | Multithreaded entity tracking | Paul Sauve | |
|
||||
| server | Name craft scheduler threads according to the plugin using | Spottedleaf | |
|
||||
| server | New nbt cache | Hugo Planque | ishland |
|
||||
| server | Nuke streams off BlockPosition | Ivan Pekov | |
|
||||
| server | Nuke streams off SectionPosition | Ivan Pekov | |
|
||||
| server | One Punch Man! | Fourmisain | |
|
||||
| server | Optimise WorldServer#notify | Spottedleaf | |
|
||||
| server | Optimise chunk tick iteration | Spottedleaf | |
|
||||
| server | Optimise closest entity lookup | Spottedleaf | |
|
||||
@ -272,9 +278,7 @@ # Patches
|
||||
| server | Option to toggle milk curing bad omen | William Blake Galbreath | |
|
||||
| server | Origami - Fix ProtocolLib issues on Java 15 | Phoenix616 | |
|
||||
| server | Origami Server Config | Phoenix616 | |
|
||||
| server | PaperPR - Add hex color code support for console logging | Esophose | |
|
||||
| server | PaperPR - Config option for Piglins guarding chests | jmp | |
|
||||
| server | PaperPR - Fix username connecting with no texture being | Camotoy | |
|
||||
| server | Per World Spawn Limits | Chase Whipple | |
|
||||
| server | Per entity (type) collision settings | MrIvanPlays | tr7zw |
|
||||
| server | Persistent TileEntity Lore and DisplayName | jmp | |
|
||||
@ -294,7 +298,6 @@ # Patches
|
||||
| server | Players should not cram to death | William Blake Galbreath | |
|
||||
| server | Populator seed controls | Spottedleaf | |
|
||||
| server | Preload ProtocolLib EnumWrappers | ishland | |
|
||||
| server | Prevent grindstones from overstacking items | chickeneer | |
|
||||
| server | Prevent light queue overfill when no players are online | Spottedleaf | |
|
||||
| server | Prevent long map entry creation in light engine | Spottedleaf | |
|
||||
| server | Prevent unload() calls removing tickets for sync loads | Spottedleaf | |
|
||||
@ -318,7 +321,6 @@ # Patches
|
||||
| server | Remove some streams and object allocations | Phoenix616 | |
|
||||
| server | Remove streams | Paul Sauve | |
|
||||
| server | Remove streams for villager AI | Spottedleaf | |
|
||||
| server | Respect PlayerKickEvent leaveMessage | Ivan Pekov | |
|
||||
| server | Revert MC-4 fix | Spottedleaf | |
|
||||
| server | Revert getChunkAt(Async) retaining chunks for long periods of | Spottedleaf | |
|
||||
| server | Rework PlayerChunk main thread checks | Spottedleaf | |
|
||||
@ -334,6 +336,7 @@ # Patches
|
||||
| server | Signs editable on right click | William Blake Galbreath | |
|
||||
| server | Silk touch spawners | William Blake Galbreath | |
|
||||
| server | Simpler ShapelessRecipes comparison for Vanilla | Paul Sauve | |
|
||||
| server | Skip POI finding if stuck in vehicle | Paul Sauve | |
|
||||
| server | Skip events if there's no listeners | William Blake Galbreath | |
|
||||
| server | Smarter statistics ticking | Mykyta Komarnytskyy | |
|
||||
| server | Smol entity optimisations | Ivan Pekov | |
|
||||
|
2
Paper
2
Paper
@ -1 +1 @@
|
||||
Subproject commit 0ea3083817707d792ebac246895455a0aa0d3425
|
||||
Subproject commit e4d8a6279cbcbd748a769a104e592e7189477944
|
@ -1,6 +1,7 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
||||
// import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
||||
import xyz.jpenilla.toothpick.transformer.ModifiedLog4j2PluginsCacheFileTransformer
|
||||
import kotlinx.dom.elements
|
||||
import kotlinx.dom.parseXml
|
||||
import kotlinx.dom.search
|
||||
@ -156,7 +157,8 @@ private fun Project.configureServerProject() {
|
||||
val shadowJar by tasks.getting(ShadowJar::class) {
|
||||
archiveClassifier.set("") // ShadowJar is the main server artifact
|
||||
dependsOn(generatePomFileForMavenJavaPublication)
|
||||
transform(Log4j2PluginsCacheFileTransformer::class.java)
|
||||
transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java)
|
||||
//transform(Log4j2PluginsCacheFileTransformer::class.java)
|
||||
mergeServiceFiles()
|
||||
manifest {
|
||||
attributes(
|
||||
|
@ -6,59 +6,75 @@ import org.gradle.api.artifacts.dsl.RepositoryHandler
|
||||
import org.gradle.kotlin.dsl.DependencyHandlerScope
|
||||
import org.gradle.kotlin.dsl.maven
|
||||
import org.gradle.kotlin.dsl.project
|
||||
import org.w3c.dom.Element
|
||||
|
||||
fun RepositoryHandler.loadRepositories(project: Project) {
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return
|
||||
val dom = parseXml(pomFile)
|
||||
val repositoriesBlock = dom.search("repositories").firstOrNull() ?: return
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return
|
||||
val dom = parseXml(pomFile)
|
||||
val repositoriesBlock = dom.search("repositories").firstOrNull() ?: return
|
||||
|
||||
// Load repositories
|
||||
repositoriesBlock.elements("repository").forEach { repositoryElem ->
|
||||
val url = repositoryElem.search("url").firstOrNull()?.textContent ?: return@forEach
|
||||
maven(url)
|
||||
}
|
||||
// Load repositories
|
||||
repositoriesBlock.elements("repository").forEach { repositoryElem ->
|
||||
val url = repositoryElem.search("url").firstOrNull()?.textContent ?: return@forEach
|
||||
maven(url)
|
||||
}
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.loadDependencies(project: Project) {
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return
|
||||
val dom = parseXml(pomFile)
|
||||
val pomFile = project.projectDir.resolve("pom.xml")
|
||||
if (!pomFile.exists()) return
|
||||
val dom = parseXml(pomFile)
|
||||
|
||||
val dependenciesBlock = dom.search("dependencies").firstOrNull() ?: return
|
||||
|
||||
// Load dependencies
|
||||
dependenciesBlock.elements("dependency").forEach { dependencyElem ->
|
||||
val groupId = dependencyElem.search("groupId").first().textContent
|
||||
val artifactId = dependencyElem.search("artifactId").first().textContent
|
||||
val version = dependencyElem.search("version").first().textContent.applyReplacements(
|
||||
"project.version" to "${project.rootProject.toothpick.minecraftVersion}-${project.rootProject.toothpick.nmsRevision}",
|
||||
"minecraft.version" to project.toothpick.minecraftVersion
|
||||
)
|
||||
val scope = dependencyElem.search("scope").firstOrNull()?.textContent
|
||||
val classifier = dependencyElem.search("classifier").firstOrNull()?.textContent
|
||||
|
||||
val dependencyString = "${groupId}:${artifactId}:${version}${classifier?.run { ":$this" } ?: ""}"
|
||||
project.logger.debug("Read dependency '{}' from '{}'", dependencyString, pomFile.absolutePath)
|
||||
|
||||
// Special case API
|
||||
if (artifactId == "${project.toothpick.forkNameLowercase}-api"
|
||||
|| artifactId == "${project.toothpick.upstreamLowercase}-api"
|
||||
) {
|
||||
if (project.name.endsWith("-server")) {
|
||||
add("api", project(":${project.toothpick.forkNameLowercase}-api"))
|
||||
}
|
||||
return@forEach
|
||||
}
|
||||
|
||||
when (scope) {
|
||||
"compile", null -> add("api", dependencyString)
|
||||
"provided" -> {
|
||||
add("compileOnly", dependencyString)
|
||||
add("testImplementation", dependencyString)
|
||||
}
|
||||
"runtime" -> add("runtimeOnly", dependencyString)
|
||||
"test" -> add("testImplementation", dependencyString)
|
||||
}
|
||||
}
|
||||
// Load dependencies
|
||||
dom.search("dependencies").forEach {
|
||||
loadDependencies(project, it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun DependencyHandlerScope.loadDependencies(project: Project, dependenciesBlock: Element) {
|
||||
dependenciesBlock.elements("dependency").forEach { dependencyElem ->
|
||||
val groupId = dependencyElem.search("groupId").first().textContent
|
||||
val artifactId = dependencyElem.search("artifactId").first().textContent
|
||||
val version = dependencyElem.search("version").firstOrNull()?.textContent?.applyReplacements(
|
||||
"project.version" to "${project.rootProject.toothpick.minecraftVersion}-${project.rootProject.toothpick.nmsRevision}",
|
||||
"minecraft.version" to project.toothpick.minecraftVersion
|
||||
)
|
||||
val scope = dependencyElem.search("scope").firstOrNull()?.textContent
|
||||
val classifier = dependencyElem.search("classifier").firstOrNull()?.textContent
|
||||
|
||||
val dependencyString =
|
||||
"$groupId:$artifactId${processOptionalDependencyElement(version)}${processOptionalDependencyElement(classifier)}"
|
||||
project.logger.debug("Read $scope scope dependency '$dependencyString' from '${project.name}' pom.xml")
|
||||
|
||||
// Special case API
|
||||
if (artifactId == project.toothpick.apiProject.project.name
|
||||
|| artifactId == "${project.toothpick.upstreamLowercase}-api"
|
||||
) {
|
||||
if (project == project.toothpick.serverProject.project) {
|
||||
add("api", project(":${project.toothpick.forkNameLowercase}-api"))
|
||||
}
|
||||
return@forEach
|
||||
}
|
||||
|
||||
when (scope) {
|
||||
"import" -> add("api", platform(dependencyString))
|
||||
"compile", null -> {
|
||||
add("api", dependencyString)
|
||||
if (version != null) {
|
||||
add("annotationProcessor", dependencyString)
|
||||
}
|
||||
}
|
||||
"provided" -> {
|
||||
add("compileOnly", dependencyString)
|
||||
add("testImplementation", dependencyString)
|
||||
add("annotationProcessor", dependencyString)
|
||||
}
|
||||
"runtime" -> add("runtimeOnly", dependencyString)
|
||||
"test" -> add("testImplementation", dependencyString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun processOptionalDependencyElement(element: String?): String =
|
||||
element?.run { ":$this" } ?: ""
|
@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License") you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package xyz.jpenilla.toothpick.transformer
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.ShadowStats
|
||||
import com.github.jengelman.gradle.plugins.shadow.relocation.RelocateClassContext
|
||||
import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator
|
||||
import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
||||
import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext
|
||||
import org.gradle.api.file.FileTreeElement
|
||||
import shadow.org.apache.commons.io.IOUtils
|
||||
import shadow.org.apache.commons.io.output.CloseShieldOutputStream
|
||||
import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginCache
|
||||
import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.PLUGIN_CACHE_FILE
|
||||
import shadow.org.apache.tools.zip.ZipEntry
|
||||
import shadow.org.apache.tools.zip.ZipOutputStream
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.net.URL
|
||||
import java.util.Collections
|
||||
import java.util.Enumeration
|
||||
|
||||
/**
|
||||
* This class is a modified version of [com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer],
|
||||
* used in order to fix the issues when 'element.name' for our Log4jPlugins.dat is just 'Log4jPlugins.dat' instead of [PLUGIN_CACHE_FILE].
|
||||
*
|
||||
* Besides converting to Kotlin, the only modified part of the class is [canTransformResource].
|
||||
*/
|
||||
internal class ModifiedLog4j2PluginsCacheFileTransformer : Transformer {
|
||||
private val temporaryFiles: ArrayList<File> = ArrayList()
|
||||
private val relocators: ArrayList<Relocator> = ArrayList()
|
||||
private lateinit var stats: ShadowStats
|
||||
|
||||
override fun canTransformResource(element: FileTreeElement): Boolean {
|
||||
return PLUGIN_CACHE_FILE == element.name || element.name == "Log4j2Plugins.dat"
|
||||
}
|
||||
|
||||
override fun transform(context: TransformerContext) {
|
||||
val inputStream = context.`is`
|
||||
val temporaryFile = File.createTempFile("Log4j2Plugins", ".dat")
|
||||
temporaryFile.deleteOnExit()
|
||||
this.temporaryFiles.add(temporaryFile)
|
||||
FileOutputStream(temporaryFile).use { IOUtils.copy(inputStream, it) }
|
||||
val relocators = context.relocators
|
||||
if (relocators != null) {
|
||||
this.relocators.addAll(relocators)
|
||||
}
|
||||
this.stats = context.stats
|
||||
}
|
||||
|
||||
override fun hasTransformedResource(): Boolean {
|
||||
val hasTransformedMultipleFiles = temporaryFiles.size > 1
|
||||
val hasAtLeastOneFileAndRelocator = temporaryFiles.isNotEmpty() && relocators.isNotEmpty()
|
||||
return hasTransformedMultipleFiles || hasAtLeastOneFileAndRelocator
|
||||
}
|
||||
|
||||
override fun modifyOutputStream(zipOutputStream: ZipOutputStream, preserveFileTimestamps: Boolean) {
|
||||
val pluginCache = PluginCache()
|
||||
pluginCache.loadCacheFiles(urlEnumeration())
|
||||
relocatePlugins(pluginCache)
|
||||
val entry = ZipEntry(PLUGIN_CACHE_FILE)
|
||||
entry.time = TransformerContext.getEntryTimestamp(preserveFileTimestamps, entry.time)
|
||||
zipOutputStream.putNextEntry(entry)
|
||||
pluginCache.writeCache(CloseShieldOutputStream(zipOutputStream))
|
||||
this.temporaryFiles.clear()
|
||||
}
|
||||
|
||||
private fun urlEnumeration(): Enumeration<URL> {
|
||||
return Collections.enumeration(
|
||||
this.temporaryFiles.map { it.toURI().toURL() }.toList()
|
||||
)
|
||||
}
|
||||
|
||||
private fun relocatePlugins(pluginCache: PluginCache) {
|
||||
for (currentMap in pluginCache.allCategories.values) {
|
||||
currentMap.values.forEach { currentPluginEntry ->
|
||||
val className = currentPluginEntry.className
|
||||
val relocateClassContext = RelocateClassContext(className, stats)
|
||||
for (currentRelocator in relocators) {
|
||||
// If we have a relocator that can relocate our current entry...
|
||||
if (currentRelocator.canRelocateClass(className)) {
|
||||
// Then we perform that relocation and update the plugin entry to reflect the new value.
|
||||
val relocatedClassName = currentRelocator.relocateClass(relocateClassContext)
|
||||
currentPluginEntry.className = relocatedClassName
|
||||
return@forEach
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Sat, 19 Dec 2020 19:06:37 -0600
|
||||
Subject: [PATCH] Expose findClass for profiler
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 7760be3e34fa20825faf145d9fb5b2855c1a4602..79d839034d38c941745c6b91f973f908d6cdb8ee 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -111,6 +111,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
return findClass(name, true);
|
||||
}
|
||||
|
||||
+ public Class<?> _airplane_findClass(@NotNull String name) throws ClassNotFoundException { return this.classes.get(name); } // Airplane
|
||||
Class<?> findClass(@NotNull String name, boolean checkGlobal) throws ClassNotFoundException {
|
||||
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
|
||||
throw new ClassNotFoundException(name);
|
@ -3,6 +3,8 @@ From: Paul Sauve <paul@technove.co>
|
||||
Date: Wed, 20 Jan 2021 13:08:53 -0600
|
||||
Subject: [PATCH] Airplane Configuration
|
||||
|
||||
Co-developed-by: Ben Kerllenevich <me@notom3ga.me>
|
||||
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
@ -19,6 +21,68 @@ GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneCommand.java b/src/main/java/gg/airplane/AirplaneCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1fa9b40e2f89272fa8bc9d927a9a852b5eb0db22
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/AirplaneCommand.java
|
||||
@@ -0,0 +1,56 @@
|
||||
+package gg.airplane;
|
||||
+
|
||||
+import net.md_5.bungee.api.ChatColor;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.command.Command;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+
|
||||
+import java.util.Collections;
|
||||
+import java.util.List;
|
||||
+import java.util.stream.Collectors;
|
||||
+import java.util.stream.Stream;
|
||||
+
|
||||
+public class AirplaneCommand extends Command {
|
||||
+
|
||||
+ public AirplaneCommand() {
|
||||
+ super("airplane");
|
||||
+ this.description = "Airplane related commands";
|
||||
+ this.usageMessage = "/airplane [reload | version]";
|
||||
+ this.setPermission("bukkit.command.airplane");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public List<String> tabComplete(CommandSender sender, String alias, String[] args, Location location) throws IllegalArgumentException {
|
||||
+ if (args.length == 1) {
|
||||
+ return Stream.of("reload", "version")
|
||||
+ .filter(arg -> arg.startsWith(args[0].toLowerCase()))
|
||||
+ .collect(Collectors.toList());
|
||||
+ }
|
||||
+ return Collections.emptyList();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||
+ if (!testPermission(sender)) return true;
|
||||
+ String prefix = ChatColor.of("#6a7eda") + "" + ChatColor.BOLD + "Airplane ✈ " + ChatColor.of("#e8ebf9");
|
||||
+
|
||||
+ if (args.length != 1) {
|
||||
+ sender.sendMessage(prefix + "Usage: " + usageMessage);
|
||||
+ args = new String[]{"version"};
|
||||
+ }
|
||||
+
|
||||
+ if (args[0].equalsIgnoreCase("reload")) {
|
||||
+ MinecraftServer console = MinecraftServer.getServer();
|
||||
+ AirplaneConfig.load();
|
||||
+ console.server.reloadCount++;
|
||||
+
|
||||
+ Command.broadcastCommandMessage(sender, prefix + "Airplane configuration has been reloaded.");
|
||||
+ } else if (args[0].equalsIgnoreCase("version")) {
|
||||
+ Command.broadcastCommandMessage(sender, prefix + "This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4feb9686f45ce4ae9f474447496b8e0f6fcb7e31
|
||||
@ -71,6 +135,22 @@ index 0000000000000000000000000000000000000000..4feb9686f45ce4ae9f474447496b8e0f
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/commands/AirplaneCommands.java b/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..807cf274619b8f7be839e249cb62b9817876ca04
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
@@ -0,0 +1,10 @@
|
||||
+package gg.airplane.commands;
|
||||
+
|
||||
+import gg.airplane.AirplaneCommand;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+
|
||||
+public class AirplaneCommands {
|
||||
+ public static void init() {
|
||||
+ MinecraftServer.getServer().server.getCommandMap().register("airplane", "Airplane", new AirplaneCommand());
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/manual/ManualParser.java b/src/main/java/gg/airplane/manual/ManualParser.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ace29adb0f140d99a8d85ac824654beded4bf5b8
|
||||
@ -288,14 +368,15 @@ index 0000000000000000000000000000000000000000..ace29adb0f140d99a8d85ac824654bed
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index 3ee8d31c453105eca7b96bede39a9ebbf40e1c2c..ca3d9dbcbeeb5059a942cae1a5020f0bcc59ac9c 100644
|
||||
index e3721b53db68171665ba05201155d088ae3cb89f..b8a45c80b6691214e513286262f31b7b5b1dd5eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -179,6 +179,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -185,6 +185,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
// Paper end
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
+ gg.airplane.AirplaneConfig.load(); // Airplane - config
|
||||
+ gg.airplane.commands.AirplaneCommands.init(); // Airplane - command
|
||||
|
||||
this.setPVP(dedicatedserverproperties.pvp);
|
||||
this.setAllowFlight(dedicatedserverproperties.allowFlight);
|
||||
|
@ -27,10 +27,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 5f9d8999ae7a1d742918e58c0f1bb36fc74d45fe..15d74cb75725b4c53747848ca9b034c95a372a2f 100644
|
||||
index c8f23b21cbe8625f7344c118eb62bab7e55e42e2..18dc5712a16f5610184e10a73f4be81fd6e2a366 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -3054,7 +3054,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -3071,7 +3071,7 @@ public abstract class EntityLiving extends Entity {
|
||||
Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ());
|
||||
Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ());
|
||||
|
||||
@ -40,7 +40,7 @@ index 5f9d8999ae7a1d742918e58c0f1bb36fc74d45fe..15d74cb75725b4c53747848ca9b034c9
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
index 5c3eb4fc7e5aec2ad8d0050673fc8f4d2bff6a71..15f20132d5777c5e0162aa91e6e968e1e8b1cc2d 100644
|
||||
index 5ccf6b483fe15d4ad12ce2d3d11e9440ee9e8ab7..ec82d91804eeed49a6ef67a92fd24a06ae7ee3fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
@@ -44,6 +44,15 @@ public interface IBlockAccess {
|
||||
|
@ -24,10 +24,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
index 61d88dbaa1f5c543be610ce0914b2c89d8ad40ee..11fbbe86978055ece0cb47eee531093e59f61dcf 100644
|
||||
index ecd63281912ae0ed93c5eb5ccb4249833cb23ab1..97825ec914709ca037159c46ecee218a6013ff58 100644
|
||||
--- a/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
@@ -17,8 +17,16 @@ public class ShapelessRecipes implements RecipeCrafting {
|
||||
@@ -18,8 +18,16 @@ public class ShapelessRecipes implements RecipeCrafting {
|
||||
private final String group;
|
||||
private final ItemStack result;
|
||||
private final NonNullList<RecipeItemStack> ingredients;
|
||||
@ -44,7 +44,7 @@ index 61d88dbaa1f5c543be610ce0914b2c89d8ad40ee..11fbbe86978055ece0cb47eee531093e
|
||||
this.key = minecraftkey;
|
||||
this.group = s;
|
||||
this.result = itemstack;
|
||||
@@ -60,6 +68,28 @@ public class ShapelessRecipes implements RecipeCrafting {
|
||||
@@ -61,6 +69,28 @@ public class ShapelessRecipes implements RecipeCrafting {
|
||||
}
|
||||
|
||||
public boolean a(InventoryCrafting inventorycrafting, World world) {
|
||||
|
@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 15d74cb75725b4c53747848ca9b034c95a372a2f..95ccaab19b46785dd515b9d444557ae56de8ab89 100644
|
||||
index 18dc5712a16f5610184e10a73f4be81fd6e2a366..88d5fb46b3fa8c148293ac6c2c8206fc480b5521 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -820,11 +820,13 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -61,7 +61,7 @@ index 4feb9686f45ce4ae9f474447496b8e0f6fcb7e31..c39c9929a251b41ab60e1509b4e6c90d
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index a2ba87dac005572d2617b6fe2c92f6984665588c..0fe4c8f9c669f343fef3e2869f22b46d8ef7136b 100644
|
||||
index 94af972e115491d0f4394dd290ec2d9d426b8d32..426bebc5cd67ffcc72ee56d437cc13f6846e109c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -197,6 +197,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -150,10 +150,10 @@ index 4849829df1041568a9fcac6d16501fc0606d95da..2ac74751ac8cea0b829b3d0ed03f0521
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index eef51f8e5734b897164ca9514e7b49b2678416e6..5fc57e2e2afe383ddc9b6d4db714a678c881fa77 100644
|
||||
index 850dae5f20649854f013c0e530a3325455b5db4a..9b30273d59eb7f0d40cd54eb9e1d2ebe24b48fca 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -212,6 +212,8 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -210,6 +210,8 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
@ -162,7 +162,7 @@ index eef51f8e5734b897164ca9514e7b49b2678416e6..5fc57e2e2afe383ddc9b6d4db714a678
|
||||
@Override
|
||||
protected void mobTick() { mobTick(false); }
|
||||
protected void mobTick(boolean inactive) {
|
||||
@@ -221,7 +223,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -219,7 +221,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
boolean tick = (world.getTime() + brainTickOffset) % world.purpurConfig.villagerBrainTicks == 0;
|
||||
if (((WorldServer) world).getMinecraftServer().lagging ? tick : world.purpurConfig.villagerUseBrainTicksOnlyWhenLagging || tick)
|
||||
// Purpur end
|
||||
@ -198,10 +198,10 @@ index 9cad895c7d008487ce885cbcc2c3966645df4c19..2ce5e07f4dcd0c76073840c35be66b7c
|
||||
public boolean hasTasks() {
|
||||
for (PathfinderGoalWrapped task : getTasks()) {
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 66b7c75929cd98737628b9d4f22829b5b65b8373..ea3d813759d90a6d229ca065abe044743be4780f 100644
|
||||
index 05b165f4f2de1f09164c33c0b222dc660c86ebb9..7cc27df3c9429ccd840b394fcc3b96215a8449ac 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -48,6 +48,9 @@ import net.minecraft.server.EntityInsentient;
|
||||
@@ -49,6 +49,9 @@ import net.minecraft.server.EntityInsentient;
|
||||
import net.minecraft.server.EntityLlama;
|
||||
import net.minecraft.server.EntityWaterAnimal;
|
||||
// Paper end
|
||||
@ -211,7 +211,7 @@ index 66b7c75929cd98737628b9d4f22829b5b65b8373..ea3d813759d90a6d229ca065abe04474
|
||||
|
||||
public class ActivationRange
|
||||
{
|
||||
@@ -229,7 +232,7 @@ public class ActivationRange
|
||||
@@ -230,7 +233,7 @@ public class ActivationRange
|
||||
Chunk chunk = chunkProvider.getChunkAtIfLoadedMainThreadNoCache( i1, j1 ); // Paper
|
||||
if ( chunk != null )
|
||||
{
|
||||
@ -220,7 +220,7 @@ index 66b7c75929cd98737628b9d4f22829b5b65b8373..ea3d813759d90a6d229ca065abe04474
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +245,7 @@ public class ActivationRange
|
||||
@@ -243,7 +246,7 @@ public class ActivationRange
|
||||
*
|
||||
* @param chunk
|
||||
*/
|
||||
@ -229,7 +229,7 @@ index 66b7c75929cd98737628b9d4f22829b5b65b8373..ea3d813759d90a6d229ca065abe04474
|
||||
{
|
||||
// Paper start
|
||||
Entity[] rawData = chunk.entities.getRawData();
|
||||
@@ -251,11 +254,19 @@ public class ActivationRange
|
||||
@@ -252,11 +255,19 @@ public class ActivationRange
|
||||
//for ( Entity entity : (Collection<Entity>) slice )
|
||||
// Paper end
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ index bc61aaff65a7dc1e7534452b285953b83adb7000..f38382cc681f03d9a6a0efa85f045e37
|
||||
@Override
|
||||
public BlockPosition shift(EnumDirection enumdirection, int i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 631eb682e81e30d2a937fd1eafccd8a9ab82d21e..dc07376845f84ea949a2153cb75d2cd9d46a419e 100644
|
||||
index 730b91680b226df624180d64019c2984d0e29422..60ddae95c287aea071a8f277e570c2b0f25f9feb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -140,6 +140,8 @@ public class EntityTypes<T extends Entity> {
|
||||
@ -56,10 +56,10 @@ index 631eb682e81e30d2a937fd1eafccd8a9ab82d21e..dc07376845f84ea949a2153cb75d2cd9
|
||||
return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 61570ab947b5a153a4c2bcb5a09344f060e6052d..121deda90227cb0416d6642607b24093df2baa80 100644
|
||||
index f9482f19549074e04fc4c1e4d05612a2ea23354c..e7c373e28054c49459a44faee77301e448baea44 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -641,7 +641,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -642,7 +642,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
return d2 * d2 + d3 * d3;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ index 61570ab947b5a153a4c2bcb5a09344f060e6052d..121deda90227cb0416d6642607b24093
|
||||
int i;
|
||||
int j;
|
||||
|
||||
@@ -655,12 +657,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -656,12 +658,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
j = MathHelper.floor(entityplayer.locZ() / 16.0D);
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ index 61570ab947b5a153a4c2bcb5a09344f060e6052d..121deda90227cb0416d6642607b24093
|
||||
|
||||
return Math.max(Math.abs(k), Math.abs(l));
|
||||
}
|
||||
@@ -2499,11 +2505,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2500,11 +2506,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
boolean flag1 = this.tracker.attachedToPlayer;
|
||||
|
||||
if (!flag1) {
|
||||
@ -111,7 +111,7 @@ index 61570ab947b5a153a4c2bcb5a09344f060e6052d..121deda90227cb0416d6642607b24093
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2533,8 +2545,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2534,8 +2546,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
}
|
||||
|
||||
private int b() {
|
||||
@ -123,7 +123,7 @@ index 61570ab947b5a153a4c2bcb5a09344f060e6052d..121deda90227cb0416d6642607b24093
|
||||
Iterator iterator = collection.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2546,6 +2560,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2547,6 +2561,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Thu, 18 Feb 2021 13:13:27 -0600
|
||||
Subject: [PATCH] Skip POI finding if stuck in vehicle
|
||||
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BehaviorFindPosition.java b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||
index 8d445e9c0875db6cf45e4d8bcfce7cd3d5094d94..0594b0bb12c553edbb6284b48328a3dcf5a64ba4 100644
|
||||
--- a/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BehaviorFindPosition.java
|
||||
@@ -278,6 +278,7 @@ public class BehaviorFindPosition extends Behavior<EntityCreature> {
|
||||
|
||||
protected void a(WorldServer worldserver, EntityCreature entitycreature, long i) {
|
||||
this.f = i + 20L + (long) worldserver.getRandom().nextInt(20);
|
||||
+ if (entitycreature.getNavigation().isStuck()) this.f += 200L; // Airplane - wait an additional 10s to check again if they're stuck
|
||||
VillagePlace villageplace = worldserver.y();
|
||||
|
||||
this.g.long2ObjectEntrySet().removeIf((entry) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index 1208464fba96daf276c9cc0c1c9b18db75b03abc..b5ea7997040b5bfd98925a146e446aa3c56574da 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -412,6 +412,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean isStuck() { return this.t(); } // Airplane - OBFHELPER
|
||||
public boolean t() {
|
||||
return this.t;
|
||||
}
|
638
patches/Airplane/patches/server/0017-Airplane-Profiler.patch
Normal file
638
patches/Airplane/patches/server/0017-Airplane-Profiler.patch
Normal file
@ -0,0 +1,638 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Sun, 20 Dec 2020 14:08:24 -0600
|
||||
Subject: [PATCH] Airplane Profiler
|
||||
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 752d62eb3b87ab24260ec2c029bae0d2b0e3b908..02bbe784d0a062dd643e37f3ad04b77a78144828 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -161,6 +161,13 @@
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
+ <!-- Airplane - Flare -->
|
||||
+ <dependency>
|
||||
+ <groupId>com.github.technove</groupId>
|
||||
+ <artifactId>Flare</artifactId>
|
||||
+ <version>master-SNAPSHOT</version>
|
||||
+ <scope>compile</scope>
|
||||
+ </dependency>
|
||||
</dependencies>
|
||||
|
||||
<repositories>
|
||||
@@ -174,6 +181,11 @@
|
||||
<id>spigotmc-public</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
+ <!-- Airplane - Flare -->
|
||||
+ <repository>
|
||||
+ <id>jitpack.io</id>
|
||||
+ <url>https://jitpack.io</url>
|
||||
+ </repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
index c39c9929a251b41ab60e1509b4e6c90d0825dc0c..3a5a65a2f282b00602643470520fd05fba5907fb 100644
|
||||
--- a/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
@@ -68,4 +68,23 @@ public class AirplaneConfig {
|
||||
dynamicHoglinBehavior = manual.get("behavior-activation.hoglin", dynamicHoglinBehavior);
|
||||
}
|
||||
|
||||
+
|
||||
+ public static String profileWebUrl = "https://flare.airplane.gg";
|
||||
+
|
||||
+ private static void profilerOptions() {
|
||||
+ manual.setComment("flare", "Configures Flare, the built-in profiler");
|
||||
+
|
||||
+ profileWebUrl = manual.get("flare.url", profileWebUrl, "Sets the server to use for profiles.");
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static String accessToken = "";
|
||||
+
|
||||
+ private static void airplaneWebServices() {
|
||||
+ manual.setComment("web-services", "Options for connecting to Airplane's online utilities");
|
||||
+
|
||||
+ accessToken = manual.get("web-services.token", "");
|
||||
+ // todo lookup token (off-thread) and let users know if their token is valid
|
||||
+ }
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneLogger.java b/src/main/java/gg/airplane/AirplaneLogger.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1a9d71739019d12772bec6076b195552ff6299f9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/AirplaneLogger.java
|
||||
@@ -0,0 +1,17 @@
|
||||
+package gg.airplane;
|
||||
+
|
||||
+import org.bukkit.Bukkit;
|
||||
+
|
||||
+import java.util.logging.Level;
|
||||
+import java.util.logging.Logger;
|
||||
+
|
||||
+public class AirplaneLogger extends Logger {
|
||||
+ public static final AirplaneLogger LOGGER = new AirplaneLogger();
|
||||
+
|
||||
+ private AirplaneLogger() {
|
||||
+ super("Airplane", null);
|
||||
+
|
||||
+ setParent(Bukkit.getLogger());
|
||||
+ setLevel(Level.ALL);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/commands/AirplaneCommands.java b/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
index 807cf274619b8f7be839e249cb62b9817876ca04..66b20250a26d005427601b1cdee43bdd9eba70cc 100644
|
||||
--- a/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
+++ b/src/main/java/gg/airplane/commands/AirplaneCommands.java
|
||||
@@ -1,10 +1,12 @@
|
||||
package gg.airplane.commands;
|
||||
|
||||
import gg.airplane.AirplaneCommand;
|
||||
+import gg.airplane.flare.FlareCommand;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
public class AirplaneCommands {
|
||||
public static void init() {
|
||||
MinecraftServer.getServer().server.getCommandMap().register("airplane", "Airplane", new AirplaneCommand());
|
||||
+ MinecraftServer.getServer().server.getCommandMap().register("flare", "Airplane", new FlareCommand());
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/gg/airplane/compat/ServerConfigurations.java b/src/main/java/gg/airplane/compat/ServerConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f4976428bc721319d2926e97cbe0f64c6e9e503c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/compat/ServerConfigurations.java
|
||||
@@ -0,0 +1,77 @@
|
||||
+package gg.airplane.compat;
|
||||
+
|
||||
+import co.aikar.timings.TimingsManager;
|
||||
+import com.google.common.io.Files;
|
||||
+import org.bukkit.configuration.InvalidConfigurationException;
|
||||
+import org.bukkit.configuration.file.YamlConfiguration;
|
||||
+
|
||||
+import java.io.ByteArrayOutputStream;
|
||||
+import java.io.File;
|
||||
+import java.io.FileInputStream;
|
||||
+import java.io.IOException;
|
||||
+import java.nio.charset.StandardCharsets;
|
||||
+import java.util.Arrays;
|
||||
+import java.util.List;
|
||||
+import java.util.Properties;
|
||||
+import java.util.stream.Collectors;
|
||||
+
|
||||
+public class ServerConfigurations {
|
||||
+
|
||||
+ public static final String[] configurationFiles = new String[]{
|
||||
+ "server.properties",
|
||||
+ "bukkit.yml",
|
||||
+ "spigot.yml",
|
||||
+ "paper.yml",
|
||||
+ "tuinity.yml",
|
||||
+ "airplane.air"
|
||||
+ };
|
||||
+
|
||||
+ public static String getCleanCopy(String configName) throws IOException {
|
||||
+ File file = new File(configName);
|
||||
+ List<String> hiddenConfigs = TimingsManager.hiddenConfigs;
|
||||
+
|
||||
+ if (configName.equals("airplane.air")) {
|
||||
+ return Files.readLines(file, StandardCharsets.UTF_8)
|
||||
+ .stream()
|
||||
+ .filter(line -> !line.trim().startsWith("#"))
|
||||
+ .map(line -> line.contains("token") ? " token = **" : line)
|
||||
+ .collect(Collectors.joining("\n"));
|
||||
+ }
|
||||
+
|
||||
+ switch (Files.getFileExtension(configName)) {
|
||||
+ case "properties": {
|
||||
+ Properties properties = new Properties();
|
||||
+ try (FileInputStream inputStream = new FileInputStream(file)) {
|
||||
+ properties.load(inputStream);
|
||||
+ }
|
||||
+ for (String hiddenConfig : hiddenConfigs) {
|
||||
+ properties.remove(hiddenConfig);
|
||||
+ }
|
||||
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
+ properties.store(outputStream, "");
|
||||
+ return Arrays.stream(outputStream.toString()
|
||||
+ .split("\n"))
|
||||
+ .filter(line -> !line.startsWith("#"))
|
||||
+ .collect(Collectors.joining("\n"));
|
||||
+ }
|
||||
+ case "yml": {
|
||||
+ YamlConfiguration configuration = new YamlConfiguration();
|
||||
+ try {
|
||||
+ configuration.load(file);
|
||||
+ } catch (InvalidConfigurationException e) {
|
||||
+ throw new IOException(e);
|
||||
+ }
|
||||
+ configuration.options().header(null);
|
||||
+ for (String key : configuration.getKeys(true)) {
|
||||
+ if (hiddenConfigs.contains(key)) {
|
||||
+ configuration.set(key, null);
|
||||
+ }
|
||||
+ }
|
||||
+ return configuration.saveToString();
|
||||
+ }
|
||||
+ default:
|
||||
+ throw new IllegalArgumentException("Bad file type " + configName);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/flare/FlareCommand.java b/src/main/java/gg/airplane/flare/FlareCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..81f5267d287138f6b47aa0a1f1d59d2d91a7e34a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/flare/FlareCommand.java
|
||||
@@ -0,0 +1,158 @@
|
||||
+package gg.airplane.flare;
|
||||
+
|
||||
+import com.google.common.collect.ImmutableList;
|
||||
+import gg.airplane.AirplaneConfig;
|
||||
+import gg.airplane.flare.exceptions.UserReportableException;
|
||||
+import gg.airplane.flare.profiling.AsyncProfilerIntegration;
|
||||
+import net.md_5.bungee.api.ChatColor;
|
||||
+import net.md_5.bungee.api.chat.BaseComponent;
|
||||
+import net.md_5.bungee.api.chat.ClickEvent;
|
||||
+import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||
+import net.md_5.bungee.api.chat.TextComponent;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.command.Command;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.command.ConsoleCommandSender;
|
||||
+import org.bukkit.craftbukkit.scheduler.MinecraftInternalPlugin;
|
||||
+import org.bukkit.util.StringUtil;
|
||||
+
|
||||
+import java.util.ArrayList;
|
||||
+import java.util.Collections;
|
||||
+import java.util.List;
|
||||
+
|
||||
+public class FlareCommand extends Command {
|
||||
+
|
||||
+ private static final ChatColor HEX = ChatColor.of("#6a7eda");
|
||||
+ private static final BaseComponent[] PREFIX = new ComponentBuilder("Flare ✈ ")
|
||||
+ .color(HEX)
|
||||
+ .bold(true)
|
||||
+ .create();
|
||||
+
|
||||
+ private static ComponentBuilder create(ComponentBuilder newBuilder) {
|
||||
+ newBuilder.color(HEX);
|
||||
+ newBuilder.bold(false);
|
||||
+
|
||||
+ ComponentBuilder builder = new ComponentBuilder();
|
||||
+ builder.append(PREFIX);
|
||||
+ builder.append(newBuilder.create());
|
||||
+ return builder;
|
||||
+ }
|
||||
+
|
||||
+ public FlareCommand() {
|
||||
+ super("flare", "Profile your server with Flare", "/flare", Collections.singletonList("profile"));
|
||||
+ this.setPermission("airplane.flare");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||
+ if (!testPermission(sender)) return true;
|
||||
+ if (AirplaneConfig.accessToken.length() == 0) {
|
||||
+ BaseComponent clickable = new TextComponent("https://blog.airplane.gg/flare");
|
||||
+ clickable.setUnderlined(true);
|
||||
+ clickable.setColor(HEX);
|
||||
+ clickable.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://blog.airplane.gg/flare"));
|
||||
+
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Flare currently requires an access token to use. To learn more, visit ")
|
||||
+ .color(HEX)
|
||||
+ .append(clickable)
|
||||
+ )
|
||||
+ .create());
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (AsyncProfilerIntegration.doesNotSupportProfiling()) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Profiling is not supported in this environment, reason: " + AsyncProfilerIntegration.getDisabledReason())
|
||||
+ .color(ChatColor.RED)
|
||||
+ ).create());
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (ProfilingManager.isProfiling()) {
|
||||
+ if (args.length == 1 && args[0].equalsIgnoreCase("status")) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Status: " + AsyncProfilerIntegration.status())).create());
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (ProfilingManager.stop()) {
|
||||
+ if (!(sender instanceof ConsoleCommandSender)) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Profiling has been stopped.")).create());
|
||||
+ }
|
||||
+ } else {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Profiling has already been stopped.")).create());
|
||||
+ }
|
||||
+ } else {
|
||||
+ ProfileType profileType = null;
|
||||
+ if (args.length > 0) {
|
||||
+ try {
|
||||
+ profileType = ProfileType.valueOf(args[0].toUpperCase());
|
||||
+ } catch (Exception e) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Invalid profile type ")
|
||||
+ .append(args[0]).color(ChatColor.BOLD)
|
||||
+ .append("!").color(HEX)).create());
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ int interval = 5;
|
||||
+ if (args.length > 1) {
|
||||
+ try {
|
||||
+ interval = Integer.parseInt(args[1]);
|
||||
+ } catch (Exception e) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Invalid time in milliseconds ")
|
||||
+ .append(args[1]).color(HEX).bold(true)
|
||||
+ .append("!").color(HEX)).create());
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ int finalInterval = interval;
|
||||
+ ProfileType finalProfileType = profileType;
|
||||
+ Bukkit.getScheduler().runTaskAsynchronously(new MinecraftInternalPlugin(), () -> {
|
||||
+ try {
|
||||
+ if (ProfilingManager.start(finalProfileType, finalInterval)) {
|
||||
+ if (!(sender instanceof ConsoleCommandSender)) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Profiling has been started: " + ProfilingManager.getProfilingUrl().get())
|
||||
+ .event(new ClickEvent(ClickEvent.Action.OPEN_URL, ProfilingManager.getProfilingUrl().get())))
|
||||
+ .create());
|
||||
+ sender.sendMessage(create(new ComponentBuilder(" Run /" + commandLabel + " to stop profiling.")).create());
|
||||
+ }
|
||||
+ } else {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Profiling has already been started: " + ProfilingManager.getProfilingUrl().get())
|
||||
+ .event(new ClickEvent(ClickEvent.Action.OPEN_URL, ProfilingManager.getProfilingUrl().get())))
|
||||
+ .create());
|
||||
+ }
|
||||
+ } catch (UserReportableException e) {
|
||||
+ sender.sendMessage(create(new ComponentBuilder("Profiling failed to start: " + e.getUserError())).create());
|
||||
+ e.printStackTrace();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
|
||||
+ if (AsyncProfilerIntegration.doesNotSupportProfiling()) {
|
||||
+ return ImmutableList.of();
|
||||
+ }
|
||||
+
|
||||
+ List<String> list = new ArrayList<>();
|
||||
+ if (AsyncProfilerIntegration.isProfiling()) {
|
||||
+ if (args.length == 1) {
|
||||
+ String lastWord = args[0];
|
||||
+ if (StringUtil.startsWithIgnoreCase("status", lastWord)) {
|
||||
+ list.add("status");
|
||||
+ }
|
||||
+ if (StringUtil.startsWithIgnoreCase("stop", lastWord)) {
|
||||
+ list.add("stop");
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (args.length <= 1) {
|
||||
+ String lastWord = args.length == 0 ? "" : args[0];
|
||||
+ for (ProfileType value : ProfileType.values()) {
|
||||
+ if (StringUtil.startsWithIgnoreCase(value.getInternalName(), lastWord)) {
|
||||
+ list.add(value.name().toLowerCase());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return list;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/flare/FlareSetup.java b/src/main/java/gg/airplane/flare/FlareSetup.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..27ac32779e700494aeca8b425edb2871d3ec29cc
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/flare/FlareSetup.java
|
||||
@@ -0,0 +1,146 @@
|
||||
+package gg.airplane.flare;
|
||||
+
|
||||
+import com.google.common.cache.Cache;
|
||||
+import com.google.common.cache.CacheBuilder;
|
||||
+import gg.airplane.AirplaneConfig;
|
||||
+import gg.airplane.AirplaneLogger;
|
||||
+import gg.airplane.compat.ServerConfigurations;
|
||||
+import gg.airplane.flare.profiling.AsyncProfilerIntegration;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.craftbukkit.scheduler.MinecraftInternalPlugin;
|
||||
+import org.bukkit.plugin.Plugin;
|
||||
+import org.bukkit.plugin.java.PluginClassLoader;
|
||||
+import org.bukkit.scheduler.BukkitTask;
|
||||
+
|
||||
+import java.io.IOException;
|
||||
+import java.util.HashMap;
|
||||
+import java.util.LinkedHashMap;
|
||||
+import java.util.Map;
|
||||
+import java.util.concurrent.TimeUnit;
|
||||
+import java.util.logging.Level;
|
||||
+
|
||||
+public class FlareSetup {
|
||||
+
|
||||
+ public static void init() {
|
||||
+ ServerConnector.connector = new ServerConnector() {
|
||||
+
|
||||
+ private final Cache<String, String> pluginNameCache = CacheBuilder.newBuilder()
|
||||
+ .expireAfterAccess(1, TimeUnit.MINUTES)
|
||||
+ .maximumSize(1024)
|
||||
+ .build();
|
||||
+
|
||||
+ @Override
|
||||
+ public String getPluginForClass(String name) {
|
||||
+ if (name.contains(".") && name.charAt(0) != '/') {
|
||||
+ if (name.startsWith("net.minecraft") || name.startsWith("java.") || name.startsWith("com.mojang") || name.startsWith("com.google") || name.startsWith("it.unimi") || name.startsWith("sun")) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ String className = name.substring(0, name.lastIndexOf("."));
|
||||
+ String existing = pluginNameCache.getIfPresent(name);
|
||||
+ if (existing != null) {
|
||||
+ return existing.isEmpty() ? null : existing;
|
||||
+ }
|
||||
+
|
||||
+ String newValue = "";
|
||||
+
|
||||
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
+ ClassLoader classLoader = plugin.getClass().getClassLoader();
|
||||
+ if (classLoader instanceof PluginClassLoader) {
|
||||
+ try {
|
||||
+ Class<?> aClass = ((PluginClassLoader) classLoader)._airplane_findClass(className);
|
||||
+ if (aClass != null) {
|
||||
+ newValue = plugin.getName();
|
||||
+ }
|
||||
+ } catch (ClassNotFoundException | IllegalAccessError e) {
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pluginNameCache.put(name, newValue);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Thread getMainThread() {
|
||||
+ return MinecraftServer.getServer().serverThread;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Map<String, String> getConfigurations() {
|
||||
+ Map<String, String> map = new LinkedHashMap<>();
|
||||
+ for (String configurationFile : ServerConfigurations.configurationFiles) {
|
||||
+ try {
|
||||
+ map.put(configurationFile, ServerConfigurations.getCleanCopy(configurationFile));
|
||||
+ } catch (IOException e) {
|
||||
+ this.log(Level.WARNING, "Failed to load config file " + configurationFile, e);
|
||||
+ }
|
||||
+ }
|
||||
+ return map;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void log(Level level, String s) {
|
||||
+ AirplaneLogger.LOGGER.log(level, s);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void log(Level level, String s, Throwable throwable) {
|
||||
+ AirplaneLogger.LOGGER.log(level, s, throwable);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getPrimaryVersion() {
|
||||
+ return Bukkit.getVersion();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getApiVersion() {
|
||||
+ return "bukkit:" + Bukkit.getBukkitVersion();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getMcVersion() {
|
||||
+ return Bukkit.getMinecraftVersion();
|
||||
+ }
|
||||
+
|
||||
+ private final Map<Runnable, BukkitTask> scheduledRunnables = new HashMap<>();
|
||||
+
|
||||
+ @Override
|
||||
+ public void schedule(Runnable runnable, long l, long l1) {
|
||||
+ BukkitTask task = Bukkit.getScheduler().runTaskTimer(new MinecraftInternalPlugin(), runnable, l, l1);
|
||||
+ this.scheduledRunnables.put(runnable, task);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void scheduleAsync(Runnable runnable, long l, long l1) {
|
||||
+ BukkitTask task = Bukkit.getScheduler().runTaskTimerAsynchronously(new MinecraftInternalPlugin(), runnable, l, l1);
|
||||
+ this.scheduledRunnables.put(runnable, task);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void cancel(Runnable runnable) {
|
||||
+ this.scheduledRunnables.get(runnable).cancel();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void runAsync(Runnable runnable) {
|
||||
+ Bukkit.getScheduler().runTaskAsynchronously(new MinecraftInternalPlugin(), runnable);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getWebUrl() {
|
||||
+ return AirplaneConfig.profileWebUrl;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getToken() {
|
||||
+ return AirplaneConfig.accessToken;
|
||||
+ }
|
||||
+ };
|
||||
+ AsyncProfilerIntegration.init();
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/airplane/flare/ProfilingManager.java b/src/main/java/gg/airplane/flare/ProfilingManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..86d6650d174a7794a7ebe793cad033b42215c321
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/flare/ProfilingManager.java
|
||||
@@ -0,0 +1,65 @@
|
||||
+package gg.airplane.flare;
|
||||
+
|
||||
+import gg.airplane.AirplaneConfig;
|
||||
+import gg.airplane.AirplaneLogger;
|
||||
+import gg.airplane.flare.exceptions.UserReportableException;
|
||||
+import gg.airplane.flare.profiling.ProfileController;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.craftbukkit.scheduler.MinecraftInternalPlugin;
|
||||
+import org.bukkit.scheduler.BukkitTask;
|
||||
+
|
||||
+import javax.annotation.Nullable;
|
||||
+import java.util.Optional;
|
||||
+import java.util.logging.Level;
|
||||
+
|
||||
+public class ProfilingManager {
|
||||
+
|
||||
+ private static ProfileController currentController;
|
||||
+ private static BukkitTask currentTask = null;
|
||||
+
|
||||
+ public static synchronized boolean isProfiling() {
|
||||
+ return currentController != null;
|
||||
+ }
|
||||
+
|
||||
+ public static synchronized Optional<String> getProfilingUrl() {
|
||||
+ if (!isProfiling()) {
|
||||
+ return Optional.empty();
|
||||
+ }
|
||||
+ return Optional.of(AirplaneConfig.profileWebUrl + "/" + currentController.getId());
|
||||
+ }
|
||||
+
|
||||
+ public static synchronized boolean start(@Nullable ProfileType type, int interval) throws UserReportableException {
|
||||
+ if (isProfiling()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (Bukkit.isPrimaryThread()) {
|
||||
+ throw new UserReportableException("Profiles should be started off-thread");
|
||||
+ }
|
||||
+ currentController = new ProfileController(type, Math.max(interval, 1)); // don't allow lower than 20ms: https://bugzilla.redhat.com/show_bug.cgi?id=645528
|
||||
+ currentTask = Bukkit.getScheduler().runTaskLater(new MinecraftInternalPlugin(), ProfilingManager::stop, 20 * 60 * 15);
|
||||
+ AirplaneLogger.LOGGER.log(Level.INFO, "Flare has been started: " + getProfilingUrl().orElse("An error occurred retrieving the Flare URL."));
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public static synchronized boolean stop() {
|
||||
+ if (!isProfiling()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ AirplaneLogger.LOGGER.log(Level.INFO, "Flare has been stopped: " + getProfilingUrl().orElse("An error occurred retrieving the Flare URL."));
|
||||
+ try {
|
||||
+ currentController.cancel();
|
||||
+ } catch (Throwable t) {
|
||||
+ AirplaneLogger.LOGGER.log(Level.WARNING, "Error occurred stopping Flare", t);
|
||||
+ }
|
||||
+ currentController = null;
|
||||
+
|
||||
+ try {
|
||||
+ currentTask.cancel();
|
||||
+ } catch (Throwable t) {
|
||||
+ AirplaneLogger.LOGGER.log(Level.WARNING, "Error occurred stopping Flare", t);
|
||||
+ }
|
||||
+ currentTask = null;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index b8a45c80b6691214e513286262f31b7b5b1dd5eb..a85a844a4766cde16eea9e814abfec29d8935c0f 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -187,6 +187,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
gg.airplane.AirplaneConfig.load(); // Airplane - config
|
||||
gg.airplane.commands.AirplaneCommands.init(); // Airplane - command
|
||||
+ gg.airplane.flare.FlareSetup.init(); // Airplane
|
||||
|
||||
this.setPVP(dedicatedserverproperties.pvp);
|
||||
this.setAllowFlight(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
|
||||
index 49dc0c441b9dd7e7745cf15ced67f383ebee1f99..b343d8ee7435312929558efdaf127334d8e2fff6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
|
||||
@@ -19,7 +19,8 @@ public class MinecraftInternalPlugin extends PluginBase {
|
||||
private boolean enabled = true;
|
||||
|
||||
private final String pluginName;
|
||||
- private PluginDescriptionFile pdf;
|
||||
+ private org.bukkit.plugin.PluginLogger logger;
|
||||
+ private PluginDescriptionFile pdf; // Airplane
|
||||
|
||||
public MinecraftInternalPlugin() {
|
||||
this.pluginName = "Minecraft";
|
||||
@@ -72,7 +73,12 @@ public class MinecraftInternalPlugin extends PluginBase {
|
||||
|
||||
@Override
|
||||
public PluginLogger getLogger() {
|
||||
- throw new UnsupportedOperationException("Not supported.");
|
||||
+ // Airplane start
|
||||
+ if (this.logger == null) {
|
||||
+ this.logger = new org.bukkit.plugin.PluginLogger(this); // Airplane
|
||||
+ }
|
||||
+ return this.logger;
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,7 +88,7 @@ public class MinecraftInternalPlugin extends PluginBase {
|
||||
|
||||
@Override
|
||||
public Server getServer() {
|
||||
- throw new UnsupportedOperationException("Not supported.");
|
||||
+ return org.bukkit.Bukkit.getServer(); // Airplane - impl
|
||||
}
|
||||
|
||||
@Override
|
@ -0,0 +1,403 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Fri, 12 Feb 2021 16:29:41 -0600
|
||||
Subject: [PATCH] Multithreaded entity tracking
|
||||
|
||||
Adds a configuration option to run the tracker on multiple threads.
|
||||
This will generally be faster than the single threaded approach,
|
||||
unless you don't have a lot of entities/players.
|
||||
|
||||
Airplane
|
||||
Copyright (C) 2020 Technove LLC
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java b/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java
|
||||
index be408aebbccbda46e8aa82ef337574137cfa0096..b9bdce7c7ca8b7b107b0dca165d722321c16229d 100644
|
||||
--- a/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java
|
||||
+++ b/src/main/java/com/tuinity/tuinity/util/maplist/IteratorSafeOrderedReferenceSet.java
|
||||
@@ -16,7 +16,7 @@ public final class IteratorSafeOrderedReferenceSet<E> {
|
||||
|
||||
/* list impl */
|
||||
protected E[] listElements;
|
||||
- protected int listSize;
|
||||
+ protected int listSize; public int getListSize() { return this.listSize; } // Airplane - getter
|
||||
|
||||
protected final double maxFragFactor;
|
||||
|
||||
diff --git a/src/main/java/gg/airplane/AirplaneConfig.java b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
index 3a5a65a2f282b00602643470520fd05fba5907fb..e183b6cae23935823fa9e0f767e499a8102b0ad1 100644
|
||||
--- a/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
+++ b/src/main/java/gg/airplane/AirplaneConfig.java
|
||||
@@ -87,4 +87,18 @@ public class AirplaneConfig {
|
||||
// todo lookup token (off-thread) and let users know if their token is valid
|
||||
}
|
||||
|
||||
+
|
||||
+ public static boolean multithreadedEntityTracker = true;
|
||||
+ public static boolean entityTrackerAsyncPackets = false;
|
||||
+
|
||||
+ private static void entityTracker() {
|
||||
+ manual.setComment("tracker", "Options to improve the performance of the entity tracker");
|
||||
+
|
||||
+ multithreadedEntityTracker = manual.get("tracker.multithreaded", multithreadedEntityTracker,
|
||||
+ "This enables the multithreading of the tracker.");
|
||||
+ entityTrackerAsyncPackets = manual.get("tracker.unsafe-async-packets", entityTrackerAsyncPackets,
|
||||
+ "This option can break plugins that assume packets from the",
|
||||
+ "entity tracker will be sent sync.");
|
||||
+ }
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/gg/airplane/structs/TrackQueue.java b/src/main/java/gg/airplane/structs/TrackQueue.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..601694aa6d36ce230d84cc6b55231d2fc3af30e9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/structs/TrackQueue.java
|
||||
@@ -0,0 +1,84 @@
|
||||
+package gg.airplane.structs;
|
||||
+
|
||||
+import com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet;
|
||||
+import net.minecraft.server.Chunk;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.apache.logging.log4j.Level;
|
||||
+
|
||||
+import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
+import java.util.concurrent.ForkJoinPool;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+
|
||||
+/**
|
||||
+ * Helper class to handle processing a track queue.
|
||||
+ */
|
||||
+public class TrackQueue {
|
||||
+
|
||||
+ private final IteratorSafeOrderedReferenceSet<Chunk> chunks;
|
||||
+ private final ForkJoinPool pool = ForkJoinPool.commonPool();
|
||||
+ private final AtomicInteger taskIndex = new AtomicInteger();
|
||||
+
|
||||
+ private final ConcurrentLinkedQueue<Runnable> mainThreadTasks;
|
||||
+
|
||||
+ public TrackQueue(IteratorSafeOrderedReferenceSet<Chunk> chunks, ConcurrentLinkedQueue<Runnable> mainThreadTasks) {
|
||||
+ this.chunks = chunks;
|
||||
+ this.mainThreadTasks = mainThreadTasks;
|
||||
+ }
|
||||
+
|
||||
+ public void start() {
|
||||
+ int iterator = this.chunks.createRawIterator();
|
||||
+ if (iterator == -1) {
|
||||
+ return;
|
||||
+ }
|
||||
+ try {
|
||||
+ this.taskIndex.set(iterator);
|
||||
+
|
||||
+ for (int i = 0; i < this.pool.getParallelism(); i++) {
|
||||
+ this.pool.execute(this::run);
|
||||
+ }
|
||||
+
|
||||
+ while (this.taskIndex.get() < this.chunks.getListSize()) {
|
||||
+ this.runMainThreadTasks();
|
||||
+ this.handleTask(); // assist
|
||||
+ }
|
||||
+ this.runMainThreadTasks(); // finish tasks
|
||||
+ } finally {
|
||||
+ this.chunks.finishRawIterator();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void runMainThreadTasks() {
|
||||
+ Runnable task;
|
||||
+ while ((task = this.mainThreadTasks.poll()) != null) {
|
||||
+ try {
|
||||
+ task.run();
|
||||
+ } catch (Throwable t) {
|
||||
+ MinecraftServer.LOGGER.log(Level.WARN, "Tasks failed while ticking track queue", t);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ private void run() {
|
||||
+ while (handleTask());
|
||||
+ }
|
||||
+
|
||||
+ private boolean handleTask() {
|
||||
+ int index;
|
||||
+ while ((index = this.taskIndex.getAndIncrement()) < this.chunks.getListSize()) {
|
||||
+ Chunk chunk = this.chunks.rawGet(index);
|
||||
+ if (chunk != null) {
|
||||
+ try {
|
||||
+ chunk.entityTracker.run();
|
||||
+ } catch (Throwable t) {
|
||||
+ MinecraftServer.LOGGER.log(Level.WARN, "Ticking tracker failed", t);
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 0924f6b484468f3cf3c2d405101c0158c12d69e6..1d65d884d1f31a73333e4cf6a9ce30d7863dab9f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -65,6 +65,26 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
// Airplane end
|
||||
|
||||
+ // Airplane start - entity tracker runnable
|
||||
+ // prevents needing to allocate new lambda in processTrackQueue
|
||||
+ public final Runnable entityTracker = new Runnable() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ Entity[] entities = Chunk.this.entities.getRawData();
|
||||
+ for (int i = 0, len = Chunk.this.entities.size(); i < len; ++i) {
|
||||
+ Entity entity = entities[i];
|
||||
+ if (entity != null) {
|
||||
+ PlayerChunkMap.EntityTracker tracker = ((WorldServer) Chunk.this.getWorld()).getChunkProvider().playerChunkMap.trackedEntities.get(entity.getId());
|
||||
+ if (tracker != null) {
|
||||
+ tracker.updatePlayers(tracker.tracker.getPlayersInTrackRange());
|
||||
+ tracker.tickEntry();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ };
|
||||
+ // Airplane end
|
||||
+
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) {
|
||||
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 912952ff7c50b416bddd63469a592cf563e8a2cd..5118e0c0dd908d7cafe1f53e2ff28d44a6138442 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -52,7 +52,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public NetworkManager networkManager; // Paper
|
||||
public final MinecraftServer server;
|
||||
public final PlayerInteractManager playerInteractManager;
|
||||
- public final Deque<Integer> removeQueue = new ArrayDeque<>(); // Paper
|
||||
+ public final Deque<Integer> removeQueue = new java.util.concurrent.ConcurrentLinkedDeque<>(); // Paper // Airplane concurrent deque
|
||||
private final AdvancementDataPlayer advancementDataPlayer;
|
||||
private final ServerStatisticManager serverStatisticManager;
|
||||
private float lastHealthScored = Float.MIN_VALUE;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e201034087772 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -46,6 +46,10 @@ public class EntityTrackerEntry {
|
||||
* Requested in https://github.com/PaperMC/Paper/issues/1537 to allow intercepting packets
|
||||
*/
|
||||
public void sendPlayerPacket(EntityPlayer player, Packet packet) {
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> sendPlayerPacket(player, packet));
|
||||
+ return;
|
||||
+ }
|
||||
player.playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@@ -74,7 +78,7 @@ public class EntityTrackerEntry {
|
||||
|
||||
public final void tick() { this.a(); } // Paper - OBFHELPER
|
||||
public void a() {
|
||||
- com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Tracker update"); // Tuinity
|
||||
+ //com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Tracker update"); // Tuinity // Airplane - allow multithreaded
|
||||
List<Entity> list = this.tracker.passengers; // Paper - do not copy list
|
||||
|
||||
if (!list.equals(this.p)) {
|
||||
@@ -88,6 +92,8 @@ public class EntityTrackerEntry {
|
||||
ItemStack itemstack = entityitemframe.getItem();
|
||||
|
||||
if (this.tickCounter % 10 == 0 && itemstack.getItem() instanceof ItemWorldMap) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
|
||||
+ // Airplane start - process maps on main
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> {
|
||||
WorldMap worldmap = ItemWorldMap.getSavedMap(itemstack, this.b);
|
||||
Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit
|
||||
|
||||
@@ -101,6 +107,8 @@ public class EntityTrackerEntry {
|
||||
entityplayer.playerConnection.sendPacket(packet);
|
||||
}
|
||||
}
|
||||
+ });
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
this.c();
|
||||
@@ -245,18 +253,25 @@ public class EntityTrackerEntry {
|
||||
// CraftBukkit start - Create PlayerVelocity event
|
||||
boolean cancelled = false;
|
||||
|
||||
- if (this.tracker instanceof EntityPlayer) {
|
||||
+ if (this.tracker instanceof EntityPlayer && PlayerVelocityEvent.getHandlerList().getRegisteredListeners().length > 0) { // Airplane - ensure there's listeners
|
||||
+ // Airplane start - run on main thread
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> {
|
||||
Player player = (Player) this.tracker.getBukkitEntity();
|
||||
org.bukkit.util.Vector velocity = player.getVelocity();
|
||||
|
||||
PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
|
||||
this.tracker.world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
- if (event.isCancelled()) {
|
||||
- cancelled = true;
|
||||
- } else if (!velocity.equals(event.getVelocity())) {
|
||||
+ if (!event.isCancelled() && !velocity.equals(event.getVelocity())) {
|
||||
player.setVelocity(event.getVelocity());
|
||||
}
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.broadcastIncludingSelf(new PacketPlayOutEntityVelocity(this.tracker)); // duplicate from !cancelled below
|
||||
+ }
|
||||
+
|
||||
+ });
|
||||
+ cancelled = true; // don't broadcast until the event has finished
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
if (!cancelled) {
|
||||
@@ -356,7 +371,9 @@ public class EntityTrackerEntry {
|
||||
if (!list.isEmpty()) {
|
||||
consumer.accept(new PacketPlayOutEntityEquipment(this.tracker.getId(), list));
|
||||
}
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> { // Airplane
|
||||
((EntityLiving) this.tracker).updateEquipment(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
|
||||
+ }); // Airplane
|
||||
}
|
||||
|
||||
// CraftBukkit start - Fix for nonsensical head yaw
|
||||
@@ -434,6 +451,10 @@ public class EntityTrackerEntry {
|
||||
// Paper end
|
||||
|
||||
private void broadcastIncludingSelf(Packet<?> packet) {
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ this.b.chunkProvider.playerChunkMap.trackerEnsureMain(() -> broadcastIncludingSelf(packet));
|
||||
+ return;
|
||||
+ }
|
||||
this.f.accept(packet);
|
||||
if (this.tracker instanceof EntityPlayer) {
|
||||
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc0f4a10cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -728,6 +728,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i));
|
||||
// Paper end
|
||||
}
|
||||
+ // Airplane start - since neither map can be updated during tracker tick, it's safe to allow direct retrieval here
|
||||
+ private PlayerChunk trackerGetVisibleChunk(long i) {
|
||||
+ return this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap) this.visibleChunks).safeGet(i);
|
||||
+ }
|
||||
+ // Airplane end
|
||||
|
||||
protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER
|
||||
protected IntSupplier c(long i) {
|
||||
@@ -2127,10 +2132,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
entity.tracker = null; // Paper - We're no longer tracked
|
||||
}
|
||||
|
||||
+ // Airplane start - tools to ensure main thread
|
||||
+ private final java.util.concurrent.ConcurrentLinkedQueue<Runnable> trackerMainQueue = new java.util.concurrent.ConcurrentLinkedQueue<>();
|
||||
+ private gg.airplane.structs.TrackQueue trackQueue;
|
||||
+
|
||||
+ void trackerEnsureMain(Runnable runnable) {
|
||||
+ if (this.world.serverThread == Thread.currentThread()) {
|
||||
+ runnable.run();
|
||||
+ } else {
|
||||
+ this.trackerMainQueue.add(runnable);
|
||||
+ }
|
||||
+ }
|
||||
+ // Airplane end
|
||||
+
|
||||
// Paper start - optimised tracker
|
||||
private final void processTrackQueue() {
|
||||
this.world.timings.tracker1.startTiming();
|
||||
try {
|
||||
+ // Airplane start - multithreaded tracker
|
||||
+ if (this.trackQueue == null) this.trackQueue = new gg.airplane.structs.TrackQueue(this.world.getChunkProvider().entityTickingChunks, trackerMainQueue);
|
||||
+ if (gg.airplane.AirplaneConfig.multithreadedEntityTracker) {
|
||||
+ this.trackQueue.start();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
|
||||
try {
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2392,7 +2417,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
public class EntityTracker {
|
||||
|
||||
final EntityTrackerEntry trackerEntry; // Paper - private -> package private
|
||||
- private final Entity tracker;
|
||||
+ protected final Entity tracker; // Airplane - public for chunk
|
||||
private final int trackingDistance;
|
||||
private SectionPosition e;
|
||||
// Paper start
|
||||
@@ -2411,7 +2436,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
// Paper start - use distance map to optimise tracker
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> lastTrackerCandidates;
|
||||
|
||||
- final void updatePlayers(com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> newTrackerCandidates) {
|
||||
+ synchronized final void tickEntry() { this.trackerEntry.tick(); } // Airplane - move entry tick into sync block
|
||||
+
|
||||
+ synchronized final void updatePlayers(com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> newTrackerCandidates) { // Airplane
|
||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> oldTrackerCandidates = this.lastTrackerCandidates;
|
||||
this.lastTrackerCandidates = newTrackerCandidates;
|
||||
|
||||
@@ -2452,7 +2479,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
return this.tracker.getId();
|
||||
}
|
||||
|
||||
- public void broadcast(Packet<?> packet) {
|
||||
+ public synchronized void broadcast(Packet<?> packet) { // Airplane - synchronized for tracked player
|
||||
+ // Airplane start
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ trackerEnsureMain(() -> broadcast(packet));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
Iterator iterator = this.trackedPlayers.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2464,6 +2497,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
}
|
||||
|
||||
public void broadcastIncludingSelf(Packet<?> packet) {
|
||||
+ // Airplane start
|
||||
+ if (!gg.airplane.AirplaneConfig.entityTrackerAsyncPackets && !org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ trackerEnsureMain(() -> broadcastIncludingSelf(packet));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
this.broadcast(packet);
|
||||
if (this.tracker instanceof EntityPlayer) {
|
||||
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
|
||||
@@ -2490,8 +2529,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
|
||||
}
|
||||
|
||||
- public void updatePlayer(EntityPlayer entityplayer) {
|
||||
- org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
|
||||
+ public synchronized void updatePlayer(EntityPlayer entityplayer) { // Airplane - sync for access to map
|
||||
+ //org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot // Airplane - allow sync for tracker
|
||||
if (entityplayer != this.tracker) {
|
||||
// Paper start - remove allocation of Vec3D here
|
||||
//Vec3D vec3d = entityplayer.getPositionVector().d(this.tracker.getPositionVector()); // MC-155077, SPIGOT-5113
|
||||
@@ -2512,7 +2551,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
*/
|
||||
int x = this.tracker.chunkX, z = this.tracker.chunkZ;
|
||||
long chunkcoordintpair = ChunkCoordIntPair.pair(x, z);
|
||||
- PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair);
|
||||
+ PlayerChunk playerchunk = PlayerChunkMap.this.trackerGetVisibleChunk(chunkcoordintpair); // Airplane
|
||||
|
||||
if (playerchunk != null && playerchunk.getSendingChunk() != null) { // Paper - no-tick view distance
|
||||
flag1 = PlayerChunkMap.someDistanceCalculation(x, z, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable the Snooper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 33d43478b1bc4b0ca3f16ba80e0cd99bc6f5311e..d4dc05a1066bfcd4cdc1bfa04e46aa2d8d6e2fe5 100644
|
||||
index 17591457a33e6994cd26bb1487a7879a11411a9c..e9c0556af0a8ffd4d85e87bcccf2908444d967eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1322,6 +1322,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1329,6 +1329,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
//} // Paper
|
||||
|
||||
this.methodProfiler.enter("snooper");
|
||||
@ -17,7 +17,7 @@ index 33d43478b1bc4b0ca3f16ba80e0cd99bc6f5311e..d4dc05a1066bfcd4cdc1bfa04e46aa2d
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
||||
this.snooper.a();
|
||||
}
|
||||
@@ -1329,6 +1331,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1336,6 +1338,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.ticks % 6000 == 0) { // Spigot
|
||||
this.snooper.b();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ This patch is licensed under the MIT License.
|
||||
License: https://opensource.org/licenses/MIT
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityLectern.java b/src/main/java/net/minecraft/server/TileEntityLectern.java
|
||||
index cb6f55c4d870ea1ce146f64ac13e7090f2de3bc8..f7b54111ba86d9ee131e320f573f568cf45fa660 100644
|
||||
index 4b414763d7ecfe48cc196176e00e2ab209813c2e..cb628464d04d65c611a228b9d8ca07a54ec28f2f 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityLectern.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityLectern.java
|
||||
@@ -19,6 +19,11 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
|
||||
@ -90,7 +90,7 @@ index cb6f55c4d870ea1ce146f64ac13e7090f2de3bc8..f7b54111ba86d9ee131e320f573f568c
|
||||
if (this.world != null) BlockLectern.a(this.getWorld(), this.getPosition(), this.getBlock()); // CraftBukkit
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 2318d19b21514effe28b4d21c0196c8f778d22db..a106069e9122313d73b0d23d689b0d1e70025cc8 100644
|
||||
index fc1cf7cc6b26171c0baf623f04f6b495d5adf517..fb3af03ca8b23a401efd56891b4efea510d1a449 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -31,6 +31,7 @@ import net.minecraft.server.PacketPlayInCloseWindow;
|
||||
@ -114,10 +114,10 @@ index 2318d19b21514effe28b4d21c0196c8f778d22db..a106069e9122313d73b0d23d689b0d1e
|
||||
|
||||
if (iinventory instanceof ITileInventory) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
index ad91eabb47511268d0cf307d941070800ce9bd3f..ea4692ddd3422145d0d33771f5a387b47700d865 100644
|
||||
index b99ce1217461595f5ccc8c7565ec3b65d1df83d9..efcc5b534bbfdcacf883940e274f00ea11f957a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
@@ -126,8 +126,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
|
||||
@@ -159,8 +159,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
|
||||
|
||||
@Override
|
||||
public IInventory getTileEntity() {
|
||||
|
@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: chickeneer <emcchickeneer@gmail.com>
|
||||
Date: Tue, 16 Feb 2021 16:28:00 -0600
|
||||
Subject: [PATCH] Prevent grindstones from overstacking items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
|
||||
index 39f809a37b58e008e7ef32c0759eeecbde26bc94..458d9828a9e3023dd469f76320a1d513c85fd892 100644
|
||||
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
|
||||
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
|
||||
@@ -183,7 +183,7 @@ public class ContainerGrindstone extends Container {
|
||||
i = Math.max(item.getMaxDurability() - l, 0);
|
||||
itemstack2 = this.b(itemstack, itemstack1);
|
||||
if (!itemstack2.e()) {
|
||||
- if (!ItemStack.matches(itemstack, itemstack1)) {
|
||||
+ if (!ItemStack.matches(itemstack, itemstack1) || itemstack2.getMaxStackSize() == 1) { // Paper
|
||||
this.resultInventory.setItem(0, ItemStack.b);
|
||||
this.c();
|
||||
return;
|
@ -150,10 +150,10 @@ index bfc7a1c234b5fe4aa58b48c3673f473d26561077..4ffaf36b40b32be25bd1944d8b8ddbc3
|
||||
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
|
||||
this.generator = gen;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dfe6777db04bb550ae0e761addd26b2d5abf3baf..48dd6de4acf0ef0536a4c562f3eb5f2f90878924 100644
|
||||
index f9fd40d33ac72f859a0a7012dbab348fca40c375..12b92ee0491c82a72d1646d14116e187dd965fe6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -862,6 +862,7 @@ public final class CraftServer implements Server {
|
||||
@@ -866,6 +866,7 @@ public final class CraftServer implements Server {
|
||||
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||
@ -161,7 +161,7 @@ index dfe6777db04bb550ae0e761addd26b2d5abf3baf..48dd6de4acf0ef0536a4c562f3eb5f2f
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldDataServer.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -898,6 +899,7 @@ public final class CraftServer implements Server {
|
||||
@@ -902,6 +903,7 @@ public final class CraftServer implements Server {
|
||||
world.paperConfig.init(); // Paper
|
||||
world.tuinityConfig.init(); // Tuinity - Server Config
|
||||
world.purpurConfig.init(); // Purpur
|
||||
|
@ -9,14 +9,13 @@ chain.
|
||||
- Only set check cooldown if it's bigger than already set cooldown
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index a1a585f5b4b2c10c41b184636149c8dde2a3ae51..70490d7b7e0dd5fbb5ef475c20223670dc8cf1b2 100644
|
||||
index a1a585f5b4b2c10c41b184636149c8dde2a3ae51..f02eb8478cef4ffccee83a1ec4ae5ffbfb0591c1 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -120,6 +120,13 @@ public final class OrigamiConfig {
|
||||
@@ -120,6 +120,12 @@ public final class OrigamiConfig {
|
||||
Bukkit.getLogger().info("Returning matching chunk rom fast search directly instead of loading it.");
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public boolean tickEmptyHoppers = false;
|
||||
+ public int fullHopperCooldown = 128;
|
||||
+ private void hopperOptimizations() {
|
||||
@ -28,10 +27,10 @@ index a1a585f5b4b2c10c41b184636149c8dde2a3ae51..70490d7b7e0dd5fbb5ef475c20223670
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockComposter.java b/src/main/java/net/minecraft/server/BlockComposter.java
|
||||
index ccb61d656b57f02efaeb60df4a70169aef302eed..55a5999080b831217b88ed3657e95218fe982c18 100644
|
||||
index e0dc2f799634d43023dfb37a70620dc8c20c63aa..115eb270c5b5f19432e30eec41a652939a61dd94 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockComposter.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockComposter.java
|
||||
@@ -250,6 +250,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
||||
@@ -251,6 +251,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
|
||||
if ((Integer) iblockdata.get(BlockComposter.a) == 7) {
|
||||
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockComposter.a), 3);
|
||||
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.BLOCK_COMPOSTER_READY, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
@ -40,10 +39,10 @@ index ccb61d656b57f02efaeb60df4a70169aef302eed..55a5999080b831217b88ed3657e95218
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index ec37d2c3b0393c43097bdfc6064ebe3ab8bc28ce..954d37ca9e1079616836d3f441845b37c5a541f3 100644
|
||||
index c25dce9a75b0e79f9b59f31892d863f46e2565e9..7d2c2e6e58741a6da10117c62a809ae47ee341ee 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -138,6 +138,13 @@ public class EntityItem extends Entity {
|
||||
@@ -139,6 +139,13 @@ public class EntityItem extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,10 +57,10 @@ index ec37d2c3b0393c43097bdfc6064ebe3ab8bc28ce..954d37ca9e1079616836d3f441845b37
|
||||
// CraftBukkit start - fire ItemDespawnEvent
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||
index 574838bd33a46e464ff7d801345613a3351f487f..9b5146fcf618f5bebc71fdfd8e06294a0226e8c2 100644
|
||||
index 8e13aebb7043ddfb4b1c02bac46081eb15e906bf..d65044ef409f6a8a05626b655aa88c4e6d434e86 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||
@@ -137,7 +137,6 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
@@ -138,7 +138,6 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
if (!itemstack.isEmpty() && itemstack.getCount() > this.getMaxStackSize()) {
|
||||
itemstack.setCount(this.getMaxStackSize());
|
||||
}
|
||||
@ -69,7 +68,7 @@ index 574838bd33a46e464ff7d801345613a3351f487f..9b5146fcf618f5bebc71fdfd8e06294a
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,7 +150,25 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
@@ -152,7 +151,25 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -97,7 +96,7 @@ index 574838bd33a46e464ff7d801345613a3351f487f..9b5146fcf618f5bebc71fdfd8e06294a
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityContainer.java b/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
index 74390aebd353c969353a6efc0904bafe30774d65..9ce4f340d097132401054a1bb38abb73aa6a5fb1 100644
|
||||
index 74390aebd353c969353a6efc0904bafe30774d65..b88df070e8e496be43e869b17d312ddf7f788595 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
@@ -84,4 +84,14 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
|
||||
@ -109,7 +108,7 @@ index 74390aebd353c969353a6efc0904bafe30774d65..9ce4f340d097132401054a1bb38abb73
|
||||
+ @Override
|
||||
+ public void update() {
|
||||
+ super.update();
|
||||
+ if (world != null) {
|
||||
+ if (world != null && !world.origamiConfig.tickEmptyHoppers) {
|
||||
+ TileEntityHopper.enableTicking(world.getTileEntity(position.shift(EnumDirection.DOWN)), world.spigotConfig.hopperCheck);
|
||||
+ }
|
||||
+ }
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable observer clocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index 70490d7b7e0dd5fbb5ef475c20223670dc8cf1b2..bf6b9f4dbd8c3f649b4e059f41c0e72e0d0f70c6 100644
|
||||
index f02eb8478cef4ffccee83a1ec4ae5ffbfb0591c1..047e7d42ce54aa1cb28cfe8b194bf5c6c75824ad 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -127,6 +127,11 @@ public final class OrigamiConfig {
|
||||
@@ -126,6 +126,11 @@ public final class OrigamiConfig {
|
||||
tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
|
||||
fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't wake up entities when damage event is cancelled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 95ccaab19b46785dd515b9d444557ae56de8ab89..a198bdf26b60caea8c8b105cb0e4b82c0340fede 100644
|
||||
index 88d5fb46b3fa8c148293ac6c2c8206fc480b5521..6bfd3a92e7b760c780e756ecbc5323d10235da9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1118,9 +1118,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix exp drop of zombie pigmen (MC-56653)
|
||||
|
||||
|
||||
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
index bf6b9f4dbd8c3f649b4e059f41c0e72e0d0f70c6..f452cc575adf9137f3b9f1eef1904f8116c7a7ec 100644
|
||||
index 047e7d42ce54aa1cb28cfe8b194bf5c6c75824ad..27599f422be266ad2fdbda49617661801c2c1991 100644
|
||||
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
|
||||
@@ -132,6 +132,10 @@ public final class OrigamiConfig {
|
||||
@@ -131,6 +131,10 @@ public final class OrigamiConfig {
|
||||
private void observerClock() {
|
||||
disableObserverClocks = getBoolean("disable-observer-clocks", disableObserverClocks);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Purpur config files
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index b45ad8df8b7a44c9e6d12326e5ea85e8d166a16c..c69143ba156f6aa3cf3ffb9ee3f6d461867982c5 100644
|
||||
index b3e7b2a8eaa3980e34bc74a846320b7871dc6e4b..c4aa05ae1fbc67b455f82ca6c08c7706659269ad 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1490,6 +1490,18 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1603,6 +1603,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Tuinity end - add config to timings report
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow inventory resizing
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index f1e9bc9bc797b7216336d3470e3c696a06f2b21a..2351283df16dac808d77b840aa88732d7b28c0a1 100644
|
||||
index 090d22bd30f7947103771aaaf09a2398970ac337..ca660dde2010098e8c77141d05c2d4d5470adf81 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -132,7 +132,7 @@ public enum InventoryType {
|
||||
@ -17,8 +17,8 @@ index f1e9bc9bc797b7216336d3470e3c696a06f2b21a..2351283df16dac808d77b840aa88732d
|
||||
private final String title;
|
||||
private final boolean isCreatable;
|
||||
|
||||
@@ -146,6 +146,12 @@ public enum InventoryType {
|
||||
this.isCreatable = isCreatable;
|
||||
@@ -159,6 +159,12 @@ public enum InventoryType {
|
||||
this.defaultTitleComponent = net.kyori.adventure.text.Component.text(defaultTitle); // Paper - Adventure
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
|
@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..0c8b3e5e4ba412624357ea5662a78862
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index cb6464c89e02d29484554a9a2184996a256925d2..7fd2085fa24779df1eab354532611d3642b37a27 100644
|
||||
index 2ea531eaef8c455fdd503f0c0258813fe9136085..53e10ef71fcd904d59c9c9825b2a736b6b35027c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1938,4 +1938,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2076,4 +2076,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Bring back server name
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index fecd7b14d317f55eb1ce7b5c6af9913917971427..d070b420f4cb90610d7018a7fbbc88074268b02b 100644
|
||||
index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..7eab52112a488150636a1457f5d7aba84da6cbf5 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1817,4 +1817,15 @@ public final class Bukkit {
|
||||
@@ -1943,4 +1943,15 @@ public final class Bukkit {
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
@ -25,10 +25,10 @@ index fecd7b14d317f55eb1ce7b5c6af9913917971427..d070b420f4cb90610d7018a7fbbc8807
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index c69143ba156f6aa3cf3ffb9ee3f6d461867982c5..dce7d8126c4a628270b09608e4561c419238b0f4 100644
|
||||
index c4aa05ae1fbc67b455f82ca6c08c7706659269ad..ce2909995791f3b334d253afc382baea9e49dd1d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1602,4 +1602,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1719,4 +1719,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
|
||||
// Paper end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index d070b420f4cb90610d7018a7fbbc88074268b02b..ba8eb67291c9848b367419f4c8110161ac7fab0d 100644
|
||||
index 7eab52112a488150636a1457f5d7aba84da6cbf5..801bef2a060962b5c4f92234401e5bc34a62141a 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1827,5 +1827,14 @@ public final class Bukkit {
|
||||
@@ -1953,5 +1953,14 @@ public final class Bukkit {
|
||||
public static String getServerName() {
|
||||
return server.getServerName();
|
||||
}
|
||||
@ -24,10 +24,10 @@ index d070b420f4cb90610d7018a7fbbc88074268b02b..ba8eb67291c9848b367419f4c8110161
|
||||
// Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index dce7d8126c4a628270b09608e4561c419238b0f4..05b47c2462a00451fc64c79c3eda116fc8003a9f 100644
|
||||
index ce2909995791f3b334d253afc382baea9e49dd1d..28a1fe3af1546daa779df46468e0ff8ad823f9ca 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1610,5 +1610,12 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1727,5 +1727,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull
|
||||
String getServerName();
|
||||
|
@ -5,11 +5,11 @@ Subject: [PATCH] ItemFactory#getMonsterEgg
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 3f23927e58e0ccf8cf04d4beb4d83346e3f84730..23d55f756b2bb5a557bfae102d7039d8394fbe69 100644
|
||||
index eab52f8615b329a795b3fe3a3719e5687e105061..0c5e488fca4370a18fede705f58bff25f3a7b4cb 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -215,4 +215,15 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
@@ -233,4 +233,15 @@ public interface ItemFactory {
|
||||
@Deprecated
|
||||
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
|
||||
// Paper end
|
||||
+
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player invulnerabilities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 7fd2085fa24779df1eab354532611d3642b37a27..a79703115da811397ee6b7c6c079846af537fd12 100644
|
||||
index 53e10ef71fcd904d59c9c9825b2a736b6b35027c..a2a58dea8bdb5597fc0617e7b5b4fb8ab9d77641 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1958,5 +1958,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2096,5 +2096,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Reset the idle timer back to 0
|
||||
*/
|
||||
void resetIdleTimer();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 2a3becabbd10fa8ffd19f35a3f6d8a6bfcb388c3..f71c9fd069309ef330d9065760b80ec10de7e18b 100644
|
||||
index 7b77c7132723a01e8c38ddaa616b363be300b653..c6b1131b1700797e0515045f4e5c81f85aa3449f 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -8642,4 +8642,36 @@ public enum Material implements Keyed {
|
||||
@@ -8649,4 +8649,36 @@ public enum Material implements Keyed {
|
||||
// </editor-fold>
|
||||
}
|
||||
}
|
||||
@ -46,7 +46,7 @@ index 2a3becabbd10fa8ffd19f35a3f6d8a6bfcb388c3..f71c9fd069309ef330d9065760b80ec1
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 4f2520f7a4ca6d57a85924ada1068a055b9a01fb..23cef1e67236a879525f39da994efc9a9c5cd289 100644
|
||||
index 878f09d5e587bc4bd70443fbdb89dac29e5a538d..f0c17f1342d9c70cb4fe1fc46dd8b9006037e860 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -68,8 +68,8 @@ index 4f2520f7a4ca6d57a85924ada1068a055b9a01fb..23cef1e67236a879525f39da994efc9a
|
||||
|
||||
/**
|
||||
* Represents a stack of items.
|
||||
@@ -792,4 +804,627 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
return itemMeta.hasItemFlag(flag);
|
||||
@@ -810,4 +822,627 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
return itemMeta != null && itemMeta.hasItemFlag(flag);
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
|
@ -169,10 +169,10 @@ index 0000000000000000000000000000000000000000..c0ec5a130985e8da4cc9e596a6b70503
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 76e857c364fe79e20cf9bde54b65e5b7108174fd..5f7947cd6f3bf9f76e8b3bac339f61b9afadaaad 100644
|
||||
index 428daeb04d0a35a443467e2f657d2356bcfdd7d7..7dc06b28af9fa45b2b49a6d37c1ed829257f812a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -698,4 +698,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -704,4 +704,35 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
public boolean isTicking();
|
||||
// Paper end
|
||||
|
@ -448,7 +448,7 @@ index 525ede42137cc27cf20cf713478e85292455676e..a0279fcbfc76ad97a61fc191424e876d
|
||||
|
||||
WATER,
|
||||
diff --git a/src/main/java/org/bukkit/Nameable.java b/src/main/java/org/bukkit/Nameable.java
|
||||
index fee814e01a653d2b53c56e8b566383ca44aa5346..cda8b54d73edf47ef8d5a1bba25478b187fe1cde 100644
|
||||
index 2acdf2a6d3955923c721222b9da784f3278f6418..737c3b053060e38f6776a5a508948cc300bbe6f4 100644
|
||||
--- a/src/main/java/org/bukkit/Nameable.java
|
||||
+++ b/src/main/java/org/bukkit/Nameable.java
|
||||
@@ -2,6 +2,9 @@ package org.bukkit;
|
||||
@ -460,7 +460,7 @@ index fee814e01a653d2b53c56e8b566383ca44aa5346..cda8b54d73edf47ef8d5a1bba25478b1
|
||||
+ */
|
||||
public interface Nameable {
|
||||
|
||||
/**
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
index 3afd5f5c0208a4ee93b5dbfc2aab2b9d2e8a7544..7838731e0e16bdccfb79e74ceb64148f7c52db79 100644
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@ -476,10 +476,10 @@ index 3afd5f5c0208a4ee93b5dbfc2aab2b9d2e8a7544..7838731e0e16bdccfb79e74ceb64148f
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 05b47c2462a00451fc64c79c3eda116fc8003a9f..26c1953d23efd370ac7fd47fc3432edba4724139 100644
|
||||
index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011fa7f125ac 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1455,6 +1455,9 @@ public interface Server extends PluginMessageRecipient {
|
||||
@@ -1568,6 +1568,9 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
UnsafeValues getUnsafe();
|
||||
|
||||
// Spigot start
|
||||
@ -490,10 +490,10 @@ index 05b47c2462a00451fc64c79c3eda116fc8003a9f..26c1953d23efd370ac7fd47fc3432edb
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 931ffa38faab86445a5d63364a47cb653ca3d4ed..97b9ade0e771eae663fb42f91e15545034d58fc9 100644
|
||||
index f486d7c819f6330223980793c9b086fded0af059..632e53338c4d902aea7e8589152b1c1b6e6dde6a 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -80,6 +80,8 @@ public interface UnsafeValues {
|
||||
@@ -81,6 +81,8 @@ public interface UnsafeValues {
|
||||
|
||||
/**
|
||||
* Called once by the version command on first use, then cached.
|
||||
@ -502,7 +502,7 @@ index 931ffa38faab86445a5d63364a47cb653ca3d4ed..97b9ade0e771eae663fb42f91e155450
|
||||
*/
|
||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||
@@ -98,6 +100,8 @@ public interface UnsafeValues {
|
||||
@@ -99,6 +101,8 @@ public interface UnsafeValues {
|
||||
/**
|
||||
* Return the translation key for the Material, so the client can translate it into the active
|
||||
* locale when using a TranslatableComponent.
|
||||
@ -511,7 +511,7 @@ index 931ffa38faab86445a5d63364a47cb653ca3d4ed..97b9ade0e771eae663fb42f91e155450
|
||||
* @return the translation key
|
||||
*/
|
||||
String getTranslationKey(Material mat);
|
||||
@@ -105,6 +109,8 @@ public interface UnsafeValues {
|
||||
@@ -106,6 +110,8 @@ public interface UnsafeValues {
|
||||
/**
|
||||
* Return the translation key for the Block, so the client can translate it into the active
|
||||
* locale when using a TranslatableComponent.
|
||||
@ -520,7 +520,7 @@ index 931ffa38faab86445a5d63364a47cb653ca3d4ed..97b9ade0e771eae663fb42f91e155450
|
||||
* @return the translation key
|
||||
*/
|
||||
String getTranslationKey(org.bukkit.block.Block block);
|
||||
@@ -113,6 +119,8 @@ public interface UnsafeValues {
|
||||
@@ -114,6 +120,8 @@ public interface UnsafeValues {
|
||||
* Return the translation key for the EntityType, so the client can translate it into the active
|
||||
* locale when using a TranslatableComponent.<br>
|
||||
* This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
|
||||
@ -529,7 +529,7 @@ index 931ffa38faab86445a5d63364a47cb653ca3d4ed..97b9ade0e771eae663fb42f91e155450
|
||||
* @return the translation key
|
||||
*/
|
||||
String getTranslationKey(org.bukkit.entity.EntityType type);
|
||||
@@ -121,6 +129,8 @@ public interface UnsafeValues {
|
||||
@@ -122,6 +130,8 @@ public interface UnsafeValues {
|
||||
* Creates and returns the next EntityId available.
|
||||
* <p>
|
||||
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
||||
@ -553,10 +553,10 @@ index afb7b136b461202026290624836446cff9f9e45d..087579fdff09237409c9f80446e7a15a
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java
|
||||
index 6e6945dd4c770be04ec09da3958fae751717527a..7d1030d4573e3843cae9ad4e39cef8baa2af39b0 100644
|
||||
index 3802bf39c2b8330ab64f90f91c88741500caaa64..28e251388d90d00b0111c847ea3d5adc4766aedf 100644
|
||||
--- a/src/main/java/org/bukkit/WorldCreator.java
|
||||
+++ b/src/main/java/org/bukkit/WorldCreator.java
|
||||
@@ -238,11 +238,8 @@ public class WorldCreator {
|
||||
@@ -293,11 +293,8 @@ public class WorldCreator {
|
||||
* is as follows:
|
||||
* <code>{"structures": {"structures": {"village": {"salt": 8015723, "spacing": 32, "separation": 8}}}, "layers": [{"block": "stone", "height": 1}, {"block": "grass", "height": 1}], "biome":"plains"}</code>
|
||||
*
|
||||
@ -599,7 +599,7 @@ index d1757f3d456ff9efce26ce8baa1d16d896908cc2..a5db52386e11e4b5511ae417a0e7ac92
|
||||
TASK(ChatColor.GREEN),
|
||||
CHALLENGE(ChatColor.DARK_PURPLE),
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 0c72d00ad238ab69d7ae0941e3ecb6c86e71624d..73cf7437795ef185860bfefe51d9481fa297a939 100644
|
||||
index 85ff6ce3bf75ab78f066a508d130def5913fff0e..c1f9114d1c0ac3457461c9326420a4afc00ce970 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -183,6 +183,9 @@ public interface Block extends Metadatable {
|
||||
@ -679,10 +679,10 @@ index 70274f2e2a1d6f27c4febd9d5d5fa3ee1b49f100..3b98e6e3e6dea0df5fb9462c78e8c142
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
index de4370233e0358da30d3704145044a99d8369f52..29d2077926620786c74b1f2f6ec6067a818d6e82 100644
|
||||
index fb0e608fa92dae99b9eee8fc1cbdf4b91a33e620..ca6d3afd6fa51c0822e289356025b51bc50f55a7 100644
|
||||
--- a/src/main/java/org/bukkit/command/CommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
@@ -55,6 +55,9 @@ public interface CommandSender extends Permissible {
|
||||
@@ -62,6 +62,9 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
|
||||
public String getName();
|
||||
|
||||
// Spigot start
|
||||
@ -735,7 +735,7 @@ index 2e17b2d4f759531fbe9ee8e9b00c839186af09ca..9382234722792b5920a2456187e07958
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
index 8ca6c9eba926f436203af211c6e274a59ddb15e8..f61419d3ce15bd553a864e4e9cd988b57d8f9695 100644
|
||||
index 2f0c6af7fa6688a98d6aa0bd3f0e6556af8330d0..b38c69482e3112e0cd626bcb17f4523c541b748f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
@@ -7,6 +7,9 @@ import org.bukkit.util.EulerAngle;
|
||||
@ -798,7 +798,7 @@ index d9be83961b28b927a587f6dbb339b531520e4865..1ff4c5e283ac05c405c09bd4b8530664
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 5f7947cd6f3bf9f76e8b3bac339f61b9afadaaad..08dbe8208fad174f03a0e08c26bb48a0729ec0ce 100644
|
||||
index 7dc06b28af9fa45b2b49a6d37c1ed829257f812a..c51d545e137eec2017c9f2ff944db70f2fdffdfc 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -622,6 +622,9 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@ -811,7 +811,7 @@ index 5f7947cd6f3bf9f76e8b3bac339f61b9afadaaad..08dbe8208fad174f03a0e08c26bb48a0
|
||||
public class Spigot extends CommandSender.Spigot {
|
||||
|
||||
}
|
||||
@@ -665,36 +668,50 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -671,36 +674,50 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
|
||||
/**
|
||||
* Check if entity is in rain
|
||||
@ -932,10 +932,10 @@ index a6a7429ed2e1eefb2b12b7480ed74fcc3963a864..e8027e1d505dda6effbb1698550016e8
|
||||
|
||||
NORMAL(false),
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index a79703115da811397ee6b7c6c079846af537fd12..5ad9de1f34b1cca3e31b8a142e3831739a3e824a 100644
|
||||
index a2a58dea8bdb5597fc0617e7b5b4fb8ab9d77641..2911b629b8ad1ad36090bdbf87a41f2eec888a0b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1776,6 +1776,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1898,6 +1898,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void resetCooldown();
|
||||
|
||||
/**
|
||||
@ -944,7 +944,7 @@ index a79703115da811397ee6b7c6c079846af537fd12..5ad9de1f34b1cca3e31b8a142e383173
|
||||
* @return the client option value of the player
|
||||
*/
|
||||
@NotNull
|
||||
@@ -1807,6 +1809,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1937,6 +1939,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
@ -1052,7 +1052,7 @@ index ceb3e2c5117740ce284e893fff8e41a002d78649..fab5c3c90f55c113cae2bca2354a94e8
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
index 63c80b4ee1f7adc8a9efc3b607993104b1991f90..b5d6dc0d864833880b59fc52a0b49d37b0904f98 100644
|
||||
index 91cab8b13d5bba34007f124838b32a1df58c5ac7..078228106b299a8e38495f7f881d38de4f87bc95 100644
|
||||
--- a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
+++ b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
@@ -4,6 +4,9 @@ import org.bukkit.entity.Minecart;
|
||||
@ -1143,7 +1143,7 @@ index 4aaa78afdda2d2351f8c4ed46a52e0cf77ec437c..4d2d821003840b7fc1ca412d71b84134
|
||||
/**
|
||||
* Player emptying the cauldron by filling their bucket.
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java b/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java
|
||||
index 7d23333e71482920cc42a4d8f3f38a7525aefe1f..765aa67f4cbb535128070d3310d1be9ecede3bf8 100644
|
||||
index 76ad715961c1b373ba276c61ced728affd4dbec1..27ce18199100b181a0502bc6de12cc7dfc430f86 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityTransformEvent.java
|
||||
@@ -79,6 +79,9 @@ public class EntityTransformEvent extends EntityEvent implements Cancellable {
|
||||
@ -1213,10 +1213,10 @@ index 21ad8888c0e403bfc63518502577d651c02dda05..295cbe558ace7b55c80fc84256808d2f
|
||||
/**
|
||||
* Unknown reason
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index 2351283df16dac808d77b840aa88732d7b28c0a1..007d3e45095a5b6e35b6af681e6e042830a5432d 100644
|
||||
index ca660dde2010098e8c77141d05c2d4d5470adf81..129eac25da4f27489038fb15ab1aeecb172b60cc 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -171,6 +171,9 @@ public enum InventoryType {
|
||||
@@ -185,6 +185,9 @@ public enum InventoryType {
|
||||
return isCreatable;
|
||||
}
|
||||
|
||||
@ -1241,10 +1241,10 @@ index efd29d198dd847e22988963f70ad57e1b810aeb7..b5de6e77a030057f923a5d82ea0054b9
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean repair;
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java
|
||||
index af52a5dfb452da11e51cad9c882cae1533cba520..30a7ac800096866d2a09dd304ffd17c42c5b2d9a 100644
|
||||
index b6016aa1e91863efc252eecab69ade6f54c89f27..e43acfb570036adb73d195136573620378cc6a61 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java
|
||||
@@ -60,6 +60,9 @@ public class PlayerQuitEvent extends PlayerEvent {
|
||||
@@ -94,6 +94,9 @@ public class PlayerQuitEvent extends PlayerEvent {
|
||||
return this.reason;
|
||||
}
|
||||
|
||||
@ -1352,10 +1352,10 @@ index c7b17eabf07b829a02afe7c1f27a5127b6bfea70..d4e2bcf8ce8fc2af851b471490147f00
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 23d55f756b2bb5a557bfae102d7039d8394fbe69..50e58cf9a494c2cf17b7f55918e3d21f63437b3c 100644
|
||||
index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..ffe8a6dcb13d917a7c295dfa6123da9e29e66d6d 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -169,7 +169,7 @@ public interface ItemFactory {
|
||||
@@ -179,7 +179,7 @@ public interface ItemFactory {
|
||||
/**
|
||||
* Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying.
|
||||
*
|
||||
@ -1418,10 +1418,10 @@ index e7d905b1146b2bdd2da5bdeb6bf3541fb181d59e..1fab68c9de96b0d362ebf85fd675cc19
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
|
||||
index 94852d50e88d0594b84b581cd627174043629995..c63257f38dffd05977e3676e7c341123f01fe282 100644
|
||||
index 0cfd4b02cc2095da56b4dc8d4ea4e9b4a95f513c..1378c8fc2fd187035fc159c8d025d58b5a61f535 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
|
||||
@@ -188,6 +188,9 @@ public interface BookMeta extends ItemMeta {
|
||||
@@ -305,6 +305,9 @@ public interface BookMeta extends ItemMeta, net.kyori.adventure.inventory.Book {
|
||||
BookMeta clone();
|
||||
|
||||
// Spigot start
|
||||
|
@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 97b9ade0e771eae663fb42f91e15545034d58fc9..0c9d3c8a28a791fe26bb1c014b568e955eca0e8f 100644
|
||||
index 632e53338c4d902aea7e8589152b1c1b6e6dde6a..e64d28359c6f5180f1dfd3896a5ba99fd30a943c 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -135,4 +135,28 @@ public interface UnsafeValues {
|
||||
@@ -136,4 +136,28 @@ public interface UnsafeValues {
|
||||
public int nextEntityId();
|
||||
|
||||
// Paper end
|
||||
@ -50,10 +50,10 @@ index 97b9ade0e771eae663fb42f91e15545034d58fc9..0c9d3c8a28a791fe26bb1c014b568e95
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 08dbe8208fad174f03a0e08c26bb48a0729ec0ce..2b7e8c7f24b2d9dd49db901f6279b8b5930a3006 100644
|
||||
index c51d545e137eec2017c9f2ff944db70f2fdffdfc..1e25f387e053b648477a3e9dace1a6c95e7f8cba 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -745,5 +745,24 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -751,5 +751,24 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return True if ridable in water
|
||||
*/
|
||||
boolean isRidableInWater();
|
||||
|
@ -48,10 +48,10 @@ index 229c3b0f0c650b501f31147adaa17194af57fedd..f88cf526d272fe47b5a474c0b344b748
|
||||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1768554b00ea0b7a57ebbed1f0bc5d8fd6f02f76..fe4ef4ea7117a6f38e4d068aae5b5ec6de06507b 100644
|
||||
index 7ac34a8959a797bf2af96f3f402fa65cffe3d666..80b7ef7c02c8f99b81a6c33d6d969690b933eb36 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1513,7 +1513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1520,7 +1520,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
@ -182,10 +182,10 @@ index 0000000000000000000000000000000000000000..d8b408f061d96e2fa8e2e587462e2221
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 44524e08bed8897e43e408b6f179bf798fed9b62..19a209cfc71e30edd3ff2d8c319df5e8b331e6cf 100644
|
||||
index f994e99ebc8fe22e6f6b45f6379ec410a598789f..eeae4862898f093ca4b9819d0d08fdaf219213a0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -231,7 +231,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
|
||||
import javax.annotation.Nonnull; // Paper
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@ -195,10 +195,10 @@ index 44524e08bed8897e43e408b6f179bf798fed9b62..19a209cfc71e30edd3ff2d8c319df5e8
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index ac5003dc827217bd1947c71044abcbcbd2210dcd..37c561fb775cf7dd955b185b4ea94fecc574be63 100644
|
||||
index 00e53d577b1dcaccb409e62d35165ee015de9330..7de7afae711800154735411947ff140c76d5171f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -370,7 +370,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -377,7 +377,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
|
@ -29,7 +29,7 @@ index 52c0ab1ce46e1f3233ef746d9bc699356fa9fae4..4d8740678049aa749b42618470e9cc83
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 673c40d952bae6ae9e92aac9742e58ffb6a8b1bb..ce14283dd1a1fddbea17c2fbaf1c4ef9d7a7479f 100644
|
||||
index c56e7fb18f9a56c8025eb70a524f028b5942da37..4b9fdb4f04b333ce32f7fca8f279bf989e6fd728 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -118,6 +118,11 @@ public class PaperConfig {
|
||||
@ -45,10 +45,10 @@ index 673c40d952bae6ae9e92aac9742e58ffb6a8b1bb..ce14283dd1a1fddbea17c2fbaf1c4ef9
|
||||
config.save(CONFIG_FILE);
|
||||
} catch (IOException ex) {
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index ecff0657e5666ddc2e6a5c3111bfb2b8dd2b78d3..3ee8d31c453105eca7b96bede39a9ebbf40e1c2c 100644
|
||||
index 2644b190813cc934914aeab78fbd6515d1a37c4a..e3721b53db68171665ba05201155d088ae3cb89f 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -167,6 +167,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@@ -173,6 +173,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
return false;
|
||||
}
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
@ -65,10 +65,10 @@ index ecff0657e5666ddc2e6a5c3111bfb2b8dd2b78d3..3ee8d31c453105eca7b96bede39a9ebb
|
||||
// Paper end
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((java.io.File) options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index de9ea6770b8afc5e1020bef04ac6cca93b6b420c..21d0570a59240e955ff148bac0226b220a7dec36 100644
|
||||
index bf9732058c7e55e8f1ed38b3b5e8831e6b21706c..90154d2180ebb6a54536884bf89187ca17d11da5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -166,7 +166,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -164,7 +164,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
protected void mobTick() { mobTick(false); }
|
||||
protected void mobTick(boolean inactive) {
|
||||
this.world.getMethodProfiler().enter("villagerBrain");
|
||||
@ -373,10 +373,10 @@ index 0000000000000000000000000000000000000000..4904be939c7a4b1d1583fd7b6232c930
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 19a209cfc71e30edd3ff2d8c319df5e8b331e6cf..8cd8db287bb4110e17ec0da57ee1547ca1f221d7 100644
|
||||
index eeae4862898f093ca4b9819d0d08fdaf219213a0..a64d375e16f033b875ca80e6678c3a3e198d0220 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -861,6 +861,7 @@ public final class CraftServer implements Server {
|
||||
@@ -865,6 +865,7 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
|
||||
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
|
||||
@ -384,7 +384,7 @@ index 19a209cfc71e30edd3ff2d8c319df5e8b331e6cf..8cd8db287bb4110e17ec0da57ee1547c
|
||||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldDataServer.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -896,6 +897,7 @@ public final class CraftServer implements Server {
|
||||
@@ -900,6 +901,7 @@ public final class CraftServer implements Server {
|
||||
world.spigotConfig.init(); // Spigot
|
||||
world.paperConfig.init(); // Paper
|
||||
world.tuinityConfig.init(); // Tuinity - Server Config
|
||||
@ -392,7 +392,7 @@ index 19a209cfc71e30edd3ff2d8c319df5e8b331e6cf..8cd8db287bb4110e17ec0da57ee1547c
|
||||
}
|
||||
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
@@ -914,6 +916,7 @@ public final class CraftServer implements Server {
|
||||
@@ -918,6 +920,7 @@ public final class CraftServer implements Server {
|
||||
reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
|
||||
@ -400,7 +400,7 @@ index 19a209cfc71e30edd3ff2d8c319df5e8b331e6cf..8cd8db287bb4110e17ec0da57ee1547c
|
||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2298,6 +2301,18 @@ public final class CraftServer implements Server {
|
||||
@@ -2357,6 +2360,18 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
// Tuinity end - add config to timings report
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 15 Aug 2020 03:49:33 -0500
|
||||
Subject: [PATCH] Add component util
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/ComponentUtil.java b/src/main/java/net/pl3x/purpur/ComponentUtil.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3f7bc68d1a6fb00758b178bb46113e38b8bc24bc
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/ComponentUtil.java
|
||||
@@ -0,0 +1,32 @@
|
||||
+package net.pl3x.purpur;
|
||||
+
|
||||
+import net.md_5.bungee.api.chat.BaseComponent;
|
||||
+import net.md_5.bungee.api.chat.TextComponent;
|
||||
+import net.md_5.bungee.chat.ComponentSerializer;
|
||||
+import net.minecraft.server.IChatBaseComponent;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+
|
||||
+import java.util.List;
|
||||
+
|
||||
+public class ComponentUtil {
|
||||
+ public static String fromComponent(IChatBaseComponent component) {
|
||||
+ String json = "";
|
||||
+ try {
|
||||
+ int chop;
|
||||
+ List<IChatBaseComponent> siblings = component.getSiblings();
|
||||
+ if (siblings.size() > 0) chop = siblings.get(0).getChatModifier().getColor() == null ? 4 : 2;
|
||||
+ else chop = component.getChatModifier().getColor() == null ? 2 : 0;
|
||||
+ json = IChatBaseComponent.ChatSerializer.componentToJson(component);
|
||||
+ BaseComponent[] parsed = ComponentSerializer.parse(json);
|
||||
+ return TextComponent.toLegacyText(parsed).substring(chop);
|
||||
+ } catch (Exception e) {
|
||||
+ MinecraftServer.LOGGER.warn("There was a problem processing a chat component!");
|
||||
+ MinecraftServer.LOGGER.warn("We have fallen back to legacy colorless string to prevent real errors");
|
||||
+ MinecraftServer.LOGGER.warn("Please report this to Purpur!");
|
||||
+ MinecraftServer.LOGGER.warn("JSON: " + json);
|
||||
+ MinecraftServer.LOGGER.warn("The following error describes what went wrong:");
|
||||
+ e.printStackTrace();
|
||||
+ return component.getString();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
@ -37,10 +37,10 @@ index 896d99d404419fef5bdf6f9083e07dfc978f4e67..9ab8336df4f1702e9cabefb63f279034
|
||||
}, BlockEnderChest.e));
|
||||
entityhuman.a(StatisticList.OPEN_ENDERCHEST);
|
||||
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
||||
index fa56d6e3a9f0bfad3961697a3bae98205f32ae9c..3fc6298a5ef81c4203a79f1d9e87b0a9913255b6 100644
|
||||
index 8e167a664431b48875a7466be3a440eae089092b..df11848a03d2c08e935624e46489a62bc56de1da 100644
|
||||
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
|
||||
@@ -19,11 +19,34 @@ public class InventoryEnderChest extends InventorySubcontainer {
|
||||
@@ -21,11 +21,34 @@ public class InventoryEnderChest extends InventorySubcontainer {
|
||||
}
|
||||
|
||||
public InventoryEnderChest(EntityHuman owner) {
|
||||
@ -77,10 +77,10 @@ index fa56d6e3a9f0bfad3961697a3bae98205f32ae9c..3fc6298a5ef81c4203a79f1d9e87b0a9
|
||||
this.a = tileentityenderchest;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityBarrel.java b/src/main/java/net/minecraft/server/TileEntityBarrel.java
|
||||
index a1c3942cbf9a6c0adc4943b05a1c3859c5f0aed6..953741c1cfd9b5c1e0eac80d1e4c7890f94e3bb1 100644
|
||||
index 31d0b40fb7b30b89be1aa923c54af77e40b90b19..e5703b7d37c5f37c850328e9c8bf186d15934bdb 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityBarrel.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityBarrel.java
|
||||
@@ -55,7 +55,7 @@ public class TileEntityBarrel extends TileEntityLootable {
|
||||
@@ -49,7 +49,7 @@ public class TileEntityBarrel extends TileEntityLootable {
|
||||
|
||||
private TileEntityBarrel(TileEntityTypes<?> tileentitytypes) {
|
||||
super(tileentitytypes);
|
||||
@ -89,7 +89,7 @@ index a1c3942cbf9a6c0adc4943b05a1c3859c5f0aed6..953741c1cfd9b5c1e0eac80d1e4c7890
|
||||
}
|
||||
|
||||
public TileEntityBarrel() {
|
||||
@@ -84,7 +84,7 @@ public class TileEntityBarrel extends TileEntityLootable {
|
||||
@@ -78,7 +78,7 @@ public class TileEntityBarrel extends TileEntityLootable {
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
@ -98,7 +98,7 @@ index a1c3942cbf9a6c0adc4943b05a1c3859c5f0aed6..953741c1cfd9b5c1e0eac80d1e4c7890
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,6 +104,7 @@ public class TileEntityBarrel extends TileEntityLootable {
|
||||
@@ -98,6 +98,7 @@ public class TileEntityBarrel extends TileEntityLootable {
|
||||
|
||||
@Override
|
||||
protected Container createContainer(int i, PlayerInventory playerinventory) {
|
||||
@ -143,10 +143,10 @@ index 00eb196f8caa2e4f2478972c14f4596071adbd2a..cb7e34924cb5dbff25d1ffe05cfe5bc2
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
index 8c714c7430c0a6b8fd7f4a158d9a271e1642bd7a..cae362bae9e1e253c34bc81813d251fece839de3 100644
|
||||
index 9c49d9c21630c48ae6783bfc0f9cbe455862d686..613912e014070382d66d1e3a2e805af1bc741966 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
@@ -198,8 +198,10 @@ public class CraftContainer extends Container {
|
||||
@@ -212,8 +212,10 @@ public class CraftContainer extends Container {
|
||||
case PLAYER:
|
||||
case CHEST:
|
||||
case ENDER_CHEST:
|
@ -102,10 +102,10 @@ index 1b29ca2ca0bc5d17673de43bdc854d5b4c96b8b6..47ffa669681da7512ee594ecb643f285
|
||||
double d0 = this.a.h((Entity) this.a.fD());
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
|
||||
index 3f94c5a9206e2da9c852d282e267ab4d9f7324c4..a02763480149dc7fb0f07f17ef8530a2e76d99bc 100644
|
||||
index 71faa1b38f613db468ee939a7ffac7aaed733d20..43536b0744e5618c10790ae9db399c0506567f2a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
|
||||
@@ -65,4 +65,48 @@ public class CraftLlama extends CraftChestedHorse implements Llama, CraftRangedE
|
||||
@@ -66,4 +66,48 @@ public class CraftLlama extends CraftChestedHorse implements Llama, CraftRangedE
|
||||
public EntityType getType() {
|
||||
return EntityType.LLAMA;
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] AFK API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 59b00c78f8d92bcceca35d0f25e4d94b3ebdc6e2..e0cf2af8fcbfc66fc32aa8e693b62160b24f8672 100644
|
||||
index cc2127b26e41182c14fa95afde878e9b5100a117..7cacaae4ec8b09d12d35f0f22c0e9ec5a48d46a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -82,6 +82,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -84,6 +84,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -25,10 +25,10 @@ index 59b00c78f8d92bcceca35d0f25e4d94b3ebdc6e2..e0cf2af8fcbfc66fc32aa8e693b62160
|
||||
super(EntityTypes.PLAYER, world);
|
||||
this.bL = ItemStack.b;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 173a210392d71cdfc551f095dc0d9c9040d22d3f..7d7a512ad752e15fbe0edce47da1da76c01df3b3 100644
|
||||
index cf14b83ec3c2b9a2812f50f3bca991e029bf7c67..5affcd13a9376e68ddeba467c4ed07b6002fdee8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1927,8 +1927,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1929,8 +1929,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
public void resetIdleTimer() {
|
||||
this.ca = SystemUtils.getMonotonicMillis();
|
||||
@ -149,10 +149,10 @@ index b5e1a860a2569d7668330827614d221b60f3fc78..5f85a1d513f4fdc21b64e1a2b6882e33
|
||||
// Paper start
|
||||
public static final Predicate<Entity> affectsSpawning = (entity) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 4185ec46435ddf48d9e25c4d71ac4e14eb6301cf..1d810a9b23d236493db121dde92c7ebce25a25fe 100644
|
||||
index 9146b60cff0aa06e2f6b6003bfe9e2be9d2f0d56..bba8dc8fd10dc34179ca3c8cf471fbb3739fa7b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -250,6 +250,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -252,6 +252,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (this.player.F() > 0L && this.minecraftServer.getIdleTimeout() > 0 && SystemUtils.getMonotonicMillis() - this.player.F() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
|
||||
@ -165,7 +165,7 @@ index 4185ec46435ddf48d9e25c4d71ac4e14eb6301cf..1d810a9b23d236493db121dde92c7ebc
|
||||
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
|
||||
}
|
||||
@@ -517,6 +523,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -521,6 +527,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.lastYaw = to.getYaw();
|
||||
this.lastPitch = to.getPitch();
|
||||
|
||||
@ -174,7 +174,7 @@ index 4185ec46435ddf48d9e25c4d71ac4e14eb6301cf..1d810a9b23d236493db121dde92c7ebc
|
||||
// Skip the first time we do this
|
||||
if (true) { // Spigot - don't skip any move events
|
||||
Location oldTo = to.clone();
|
||||
@@ -1253,7 +1261,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1257,7 +1265,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot
|
||||
flag1 = true; // Tuinity - diff on change, this should be moved wrongly
|
||||
@ -183,7 +183,7 @@ index 4185ec46435ddf48d9e25c4d71ac4e14eb6301cf..1d810a9b23d236493db121dde92c7ebc
|
||||
}
|
||||
|
||||
this.player.setLocation(d4, d5, d6, f, f1);
|
||||
@@ -1303,6 +1311,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1307,6 +1315,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.lastYaw = to.getYaw();
|
||||
this.lastPitch = to.getPitch();
|
||||
|
||||
@ -263,10 +263,10 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..2578a4677d1ee060f687be531e696b7c
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ed7b91bf703c7e7d5cbe323d9ab1c299c33ebad1..e319f3b1282af8019ae706f46e3978e789fbc877 100644
|
||||
index f965b071cd2f6a70a216679e4f19956115edee4f..8e69ad39102b8a91e664b31a7f07c5212822e961 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2222,4 +2222,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2427,4 +2427,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -289,10 +289,10 @@ index ed7b91bf703c7e7d5cbe323d9ab1c299c33ebad1..e319f3b1282af8019ae706f46e3978e7
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 6ade13fd88c381280f619daaa8d6b241c67dd9d9..f80526939be358ac46430f35f3fdc7f88038c262 100644
|
||||
index 18295dceeacefd2586f3e3fe8bd58790740ba14d..f2e978107ef1163ceadb3ea7594eba6e900a8a28 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -205,6 +205,7 @@ public class ActivationRange
|
||||
@@ -206,6 +206,7 @@ public class ActivationRange
|
||||
{
|
||||
|
||||
player.activatedTick = MinecraftServer.currentTick;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Bring back server name
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
||||
index 65961a03728852bd75367083a0de6fd0082b17cb..780474397acb4d0e7ecb4540e1a2db5721e59d3d 100644
|
||||
index 15a4f921b1ae2bbc66b7d58238b60151123a7eb3..fe5937d890762ab37a90f189c4992af389d2c41d 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
||||
@@ -10,6 +10,7 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
||||
@@ -14,6 +14,7 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
||||
public final boolean onlineMode = this.getBoolean("online-mode", true);
|
||||
public final boolean preventProxyConnections = this.getBoolean("prevent-proxy-connections", false);
|
||||
public final String serverIp = this.getString("server-ip", "");
|
||||
@ -17,10 +17,10 @@ index 65961a03728852bd75367083a0de6fd0082b17cb..780474397acb4d0e7ecb4540e1a2db57
|
||||
public final boolean spawnNpcs = this.getBoolean("spawn-npcs", true);
|
||||
public final boolean pvp = this.getBoolean("pvp", true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8cd8db287bb4110e17ec0da57ee1547ca1f221d7..529f50aa6755c202ac2d3a6d0e4dfd38c4eaf6e8 100644
|
||||
index a64d375e16f033b875ca80e6678c3a3e198d0220..011d0152ca629ea2e0986338e5f55c5d484cc36e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2451,4 +2451,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2520,4 +2520,11 @@ public final class CraftServer implements Server {
|
||||
return mobGoals;
|
||||
}
|
||||
// Paper end
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable server mod name
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index fe4ef4ea7117a6f38e4d068aae5b5ec6de06507b..2f5ef91a5732800d9b9a7acbb52ad29b5c0729a3 100644
|
||||
index 80b7ef7c02c8f99b81a6c33d6d969690b933eb36..5d64157b394b49d638e0295438f235c9492e1128 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1513,7 +1513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1520,7 +1520,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
@ -17,10 +17,10 @@ index 702242653a47051c9ed32304c427c27652af6157..9f4f56c47ecd4b35ebf33ca0bf9a0400
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
||||
index 2a91f07ca9c4dc0cb3b5aef5c9c1db7f69773530..7604fd83de9cfe93d427a9a1f6bbbee76aa861e8 100644
|
||||
index acbdaa097dfd1cba18add0a09ad54ca78d3e0c24..784819d252d94e8040a87f53431fcf2c7a19d1a7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
||||
@@ -210,7 +210,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
|
||||
@@ -211,7 +211,7 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
|
||||
|
||||
@Override
|
||||
protected int e(float f, float f1) {
|
||||
@ -30,7 +30,7 @@ index 2a91f07ca9c4dc0cb3b5aef5c9c1db7f69773530..7604fd83de9cfe93d427a9a1f6bbbee7
|
||||
|
||||
protected int getChestSlots() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 87b66c284208f12e9e7cd1c9950ada8d0fbf26a5..59699bb23a189b7e53737b2f8f5263608a64109c 100644
|
||||
index d568db532de83a85d5c387121cec151c160f36bf..ebe18e5926bb9e7d2dacdb09c213c0ad6fb847c4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -133,6 +133,7 @@ public abstract class EntityLiving extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2f5ef91a5732800d9b9a7acbb52ad29b5c0729a3..64cd02072536e69cd219932769bbade87b47601a 100644
|
||||
index 5d64157b394b49d638e0295438f235c9492e1128..d9513addae86bd5d2f0c50173318cf4d23ef2128 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -164,6 +164,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -167,6 +167,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public static final int TICK_TIME = 1000000000 / TPS;
|
||||
private static final int SAMPLE_INTERVAL = 20; // Paper
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
@ -16,7 +16,7 @@ index 2f5ef91a5732800d9b9a7acbb52ad29b5c0729a3..64cd02072536e69cd219932769bbade8
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
|
||||
@@ -985,6 +986,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -992,6 +993,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
recentTps[1] = tps5.getAverage();
|
||||
recentTps[2] = tps15.getAverage();
|
||||
// Paper end
|
||||
@ -41,10 +41,10 @@ index 4627261562a1482aecf4034b8717ecccc2dd9eb0..a34ed978596f1a466b0b48e7db92ac4f
|
||||
public static boolean enderChestSixRows = false;
|
||||
public static boolean enderChestPermissionRows = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 529f50aa6755c202ac2d3a6d0e4dfd38c4eaf6e8..cb54a5c340a8f2b82668fc7b8e3beeb977cd3c80 100644
|
||||
index 011d0152ca629ea2e0986338e5f55c5d484cc36e..ccacd2d84efdc72c3da645f30f8a9b1c2161cf9e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2457,5 +2457,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2526,5 +2526,10 @@ public final class CraftServer implements Server {
|
||||
public String getServerName() {
|
||||
return getProperties().serverName;
|
||||
}
|
@ -18,10 +18,10 @@ index a236e0441fc20270b4c44ed5a7d5b94297949226..eeac4aeaf21b43647aa643ec55a1ae84
|
||||
private final int c;
|
||||
private final EntityTypes<?> d;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index af84813c703813ec3a6ca89ff437d89e31a9100f..2d38a4782d85dd9c5e6097bea6c13c6185ea05ab 100644
|
||||
index c79623339cfe8fb8484bcc2a8c3eb119b9e83093..3a6a1f8ce0a30f2bdc08ec36fe9a2381439e7fa4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -388,4 +388,18 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -396,4 +396,18 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
new net.md_5.bungee.api.chat.TextComponent(customName));
|
||||
}
|
||||
// Paper end
|
@ -5,7 +5,7 @@ Subject: [PATCH] PlayerSetSpawnerTypeWithEggEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index bf914dc5ee7f2d4a324b6711ea273f5581ec84ad..1138981aebb7fbb3f3839dcd221e3ee850ab4456 100644
|
||||
index 93b5a6471cde31739d2bd5f2a9fc0e0d974d0eb0..36f572990a0c08f21df6f4dc40c5878b669ca00c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -143,6 +143,16 @@ public class EntityTypes<T extends Entity> {
|
||||
@ -25,7 +25,7 @@ index bf914dc5ee7f2d4a324b6711ea273f5581ec84ad..1138981aebb7fbb3f3839dcd221e3ee8
|
||||
public static MinecraftKey getName(EntityTypes<?> entitytypes) {
|
||||
return IRegistry.ENTITY_TYPE.getKey(entitytypes);
|
||||
}
|
||||
@@ -287,6 +297,16 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -301,6 +311,16 @@ public class EntityTypes<T extends Entity> {
|
||||
return this.bg;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index bf914dc5ee7f2d4a324b6711ea273f5581ec84ad..1138981aebb7fbb3f3839dcd221e3ee8
|
||||
public String getDescriptionId() { return f(); } // Paper - OBFHELPER
|
||||
public String f() {
|
||||
if (this.bo == null) {
|
||||
@@ -296,6 +316,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -310,6 +330,7 @@ public class EntityTypes<T extends Entity> {
|
||||
return this.bo;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 1138981aebb7fbb3f3839dcd221e3ee850ab4456..37b984a5b6c1c6e146e1c4b0947d1e39a051cfbb 100644
|
||||
index 36f572990a0c08f21df6f4dc40c5878b669ca00c..ed1e0bd379b95bc090c7cdf57de70ec9cc2dac5a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -187,19 +187,46 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -187,17 +187,31 @@ public class EntityTypes<T extends Entity> {
|
||||
|
||||
@Nullable
|
||||
public Entity spawnCreature(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1) {
|
||||
@ -39,6 +39,11 @@ index 1138981aebb7fbb3f3839dcd221e3ee850ab4456..37b984a5b6c1c6e146e1c4b0947d1e39
|
||||
+ @Nullable
|
||||
+ public T spawnCreature(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable NBTTagCompound nbttagcompound, @Nullable IChatBaseComponent ichatbasecomponent, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EnumMobSpawn enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
+ // Purpur end
|
||||
// Paper start - Call PreCreatureSpawnEvent
|
||||
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityTypes.getName(this).getKey());
|
||||
if (type != null) {
|
||||
@@ -214,6 +228,19 @@ public class EntityTypes<T extends Entity> {
|
||||
// Paper end
|
||||
T t0 = this.createCreature(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1);
|
||||
|
||||
+ // Purpur start
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player invulnerabilities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 7d7a512ad752e15fbe0edce47da1da76c01df3b3..9b09d68435290add2781a72e5bc62ce50a79e39f 100644
|
||||
index 5affcd13a9376e68ddeba467c4ed07b6002fdee8..633a33e19e41c56369bc18f7af5c91a5b69be3b7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -151,6 +151,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -154,6 +154,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.canPickUpLoot = true;
|
||||
this.maxHealthCache = this.getMaxHealth();
|
||||
this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
@ -17,7 +17,7 @@ index 7d7a512ad752e15fbe0edce47da1da76c01df3b3..9b09d68435290add2781a72e5bc62ce5
|
||||
}
|
||||
// Paper start
|
||||
public BlockPosition getPointInFront(double inFront) {
|
||||
@@ -992,6 +994,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -989,6 +991,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ index 7d7a512ad752e15fbe0edce47da1da76c01df3b3..9b09d68435290add2781a72e5bc62ce5
|
||||
@Override
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
if (this.isInvulnerable(damagesource)) {
|
||||
@@ -999,7 +1007,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -996,7 +1004,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
} else {
|
||||
boolean flag = this.server.j() && this.canPvP() && "fall".equals(damagesource.translationIndex);
|
||||
|
||||
@ -39,7 +39,7 @@ index 7d7a512ad752e15fbe0edce47da1da76c01df3b3..9b09d68435290add2781a72e5bc62ce5
|
||||
return false;
|
||||
} else {
|
||||
if (damagesource instanceof EntityDamageSource) {
|
||||
@@ -1175,6 +1183,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1172,6 +1180,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -47,7 +47,7 @@ index 7d7a512ad752e15fbe0edce47da1da76c01df3b3..9b09d68435290add2781a72e5bc62ce5
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -2345,9 +2354,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -2347,9 +2356,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public boolean isFrozen() { // Paper - protected > public
|
||||
@ -67,10 +67,10 @@ index 7d7a512ad752e15fbe0edce47da1da76c01df3b3..9b09d68435290add2781a72e5bc62ce5
|
||||
public Scoreboard getScoreboard() {
|
||||
return getBukkitEntity().getScoreboard().getHandle();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 1d810a9b23d236493db121dde92c7ebce25a25fe..218ebc7befca683607b0b9863384a5b5d6bd3a2f 100644
|
||||
index bba8dc8fd10dc34179ca3c8cf471fbb3739fa7b4..c586005b34c59710cf398e30924ff3653e0d62fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1733,6 +1733,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1737,6 +1737,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
|
||||
// Paper start
|
||||
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()];
|
||||
@ -79,10 +79,10 @@ index 1d810a9b23d236493db121dde92c7ebce25a25fe..218ebc7befca683607b0b9863384a5b5
|
||||
this.server.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getPlayer(), packStatus));
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index eabd1aa2b740bcb6db40be300cd6daf59674fa3f..46043d3a4f4056fff93b867c65d363ac1277db7a 100644
|
||||
index d03d0c13cca1762078617744253a9757b388958f..00db0f5fb098a4db4092f8ab75a4489cf466baac 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -915,6 +915,8 @@ public abstract class PlayerList {
|
||||
@@ -914,6 +914,8 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -108,10 +108,10 @@ index 2578a4677d1ee060f687be531e696b7c7be89e84..c441fcea9b2b5a77b801c8a69541cf42
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e319f3b1282af8019ae706f46e3978e789fbc877..62ef7bb712e91fed150bf9c16c11635a9aaaab67 100644
|
||||
index 8e69ad39102b8a91e664b31a7f07c5212822e961..ca15efea5da7be1717a211b9b3556c755788561a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2238,5 +2238,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2443,5 +2443,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetIdleTimer() {
|
||||
getHandle().resetIdleTimer();
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable villager brain ticks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 21d0570a59240e955ff148bac0226b220a7dec36..c034869310ca3dadbfe5425c45aaa80dac59ac88 100644
|
||||
index 90154d2180ebb6a54536884bf89187ca17d11da5..1c87bc91515490e2f8579a5321058845c7d30a56 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -58,6 +58,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -56,6 +56,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
}, MemoryModuleType.MEETING_POINT, (entityvillager, villageplacetype) -> {
|
||||
return villageplacetype == VillagePlaceType.s;
|
||||
});
|
||||
@ -16,7 +16,7 @@ index 21d0570a59240e955ff148bac0226b220a7dec36..c034869310ca3dadbfe5425c45aaa80d
|
||||
|
||||
public EntityVillager(EntityTypes<? extends EntityVillager> entitytypes, World world) {
|
||||
this(entitytypes, world, VillagerType.PLAINS);
|
||||
@@ -70,6 +71,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -68,6 +69,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
this.getNavigation().d(true);
|
||||
this.setCanPickupLoot(true);
|
||||
this.setVillagerData(this.getVillagerData().withType(villagertype).withProfession(VillagerProfession.NONE));
|
||||
@ -24,7 +24,7 @@ index 21d0570a59240e955ff148bac0226b220a7dec36..c034869310ca3dadbfe5425c45aaa80d
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -166,7 +168,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -164,7 +166,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
protected void mobTick() { mobTick(false); }
|
||||
protected void mobTick(boolean inactive) {
|
||||
this.world.getMethodProfiler().enter("villagerBrain");
|
@ -17,10 +17,10 @@ index 8e93f1540ba5f995489c1fbcec70d10b011cd9c3..470f92c4fb0919d052b19acff8dff533
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 218ebc7befca683607b0b9863384a5b5d6bd3a2f..dc93f0c8f65e2a796604b8e4488c1b3bd155b64e 100644
|
||||
index c586005b34c59710cf398e30924ff3653e0d62fd..be29ecfa00d53ad2067015a5261184b4157c604b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -84,6 +84,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -86,6 +86,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER
|
||||
private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER
|
||||
private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER
|
||||
@ -28,7 +28,7 @@ index 218ebc7befca683607b0b9863384a5b5d6bd3a2f..dc93f0c8f65e2a796604b8e4488c1b3b
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
@@ -218,6 +219,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -220,6 +221,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
long currentTime = SystemUtils.getMonotonicMillis();
|
||||
long elapsedTime = currentTime - this.getLastPing();
|
||||
|
||||
@ -50,7 +50,7 @@ index 218ebc7befca683607b0b9863384a5b5d6bd3a2f..dc93f0c8f65e2a796604b8e4488c1b3b
|
||||
if (this.isPendingPing()) {
|
||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
|
||||
@@ -2907,6 +2923,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2908,6 +2924,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
@Override
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
@ -4,26 +4,41 @@ Date: Thu, 9 May 2019 14:27:37 -0500
|
||||
Subject: [PATCH] Silk touch spawners
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
index c45d48cef53476fa1602cebaa57c72894bba10d3..8a8ad2a0dc50de1f7f911d0547480b65d03fee0c 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
@@ -82,6 +82,7 @@ public final class PaperAdventure {
|
||||
.build();
|
||||
public static final LegacyComponentSerializer LEGACY_SECTION_UXRC = LegacyComponentSerializer.builder().flattener(FLATTENER).hexColors().useUnusualXRepeatedCharacterHexFormat().build();
|
||||
public static final PlainComponentSerializer PLAIN = PlainComponentSerializer.builder().flattener(FLATTENER).build();
|
||||
+ public static final LegacyComponentSerializer LEGACY_AMPERSAND = LegacyComponentSerializer.builder().character(LegacyComponentSerializer.AMPERSAND_CHAR).hexColors().build(); // Purpur
|
||||
static final GsonComponentSerializer GSON = GsonComponentSerializer.builder()
|
||||
.legacyHoverEventSerializer(NBTLegacyHoverEventSerializer.INSTANCE)
|
||||
.build();
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockMobSpawner.java b/src/main/java/net/minecraft/server/BlockMobSpawner.java
|
||||
index 81e145ff0759322f74888c81df8d2133fece7144..91b92d95a961ba00ddd7026bb83d021bb1ac51ed 100644
|
||||
index 81e145ff0759322f74888c81df8d2133fece7144..567a6a064254d99ae6a931b91e6bdd94badb19fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockMobSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockMobSpawner.java
|
||||
@@ -1,5 +1,14 @@
|
||||
@@ -1,5 +1,17 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+// Purpur start
|
||||
+import net.md_5.bungee.api.ChatColor;
|
||||
+import net.md_5.bungee.api.chat.BaseComponent;
|
||||
+import net.md_5.bungee.api.chat.TextComponent;
|
||||
+import net.md_5.bungee.chat.ComponentSerializer;
|
||||
+import io.papermc.paper.adventure.PaperAdventure;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.TextReplacementConfig;
|
||||
+import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+
|
||||
+import java.util.List;
|
||||
+
|
||||
+import static net.kyori.adventure.text.format.TextDecoration.ITALIC;
|
||||
+// Purpur end
|
||||
+
|
||||
public class BlockMobSpawner extends BlockTileEntity {
|
||||
|
||||
protected BlockMobSpawner(BlockBase.Info blockbase_info) {
|
||||
@@ -11,6 +20,59 @@ public class BlockMobSpawner extends BlockTileEntity {
|
||||
@@ -11,6 +23,59 @@ public class BlockMobSpawner extends BlockTileEntity {
|
||||
return new TileEntityMobSpawner();
|
||||
}
|
||||
|
||||
@ -33,17 +48,19 @@ index 81e145ff0759322f74888c81df8d2133fece7144..91b92d95a961ba00ddd7026bb83d021b
|
||||
+ if (world.purpurConfig.silkTouchEnabled && entityhuman.getBukkitEntity().hasPermission("purpur.drop.spawners") && isSilkTouch(world, itemstack)) {
|
||||
+ MinecraftKey type = ((TileEntityMobSpawner) tileentity).getSpawner().getMobName();
|
||||
+ if (type != null) {
|
||||
+ String mobName = EntityTypes.getFromKey(type).getTranslatedName();
|
||||
+ final Component mobName = PaperAdventure.asAdventure(EntityTypes.getFromKey(type).getNameComponent());
|
||||
+ final TextReplacementConfig config = TextReplacementConfig.builder()
|
||||
+ .matchLiteral("{mob}")
|
||||
+ .replacement(mobName)
|
||||
+ .build();
|
||||
+
|
||||
+ NBTTagCompound display = new NBTTagCompound();
|
||||
+ boolean customDisplay = false;
|
||||
+
|
||||
+ String name = world.purpurConfig.silkTouchSpawnerName;
|
||||
+ if (name != null && !name.isEmpty() && !name.equals("Spawner")) {
|
||||
+ name = ChatColor.translateAlternateColorCodes('&', name
|
||||
+ .replace("{mob}", mobName));
|
||||
+ BaseComponent[] comp = TextComponent.fromLegacyText(name);
|
||||
+ display.set("Name", NBTTagString.create(ComponentSerializer.toString(comp)));
|
||||
+ final Component displayName = PaperAdventure.LEGACY_AMPERSAND.deserialize(name).replaceText(config).decoration(ITALIC, false);
|
||||
+ display.set("Name", NBTTagString.create(GsonComponentSerializer.gson().serialize(displayName)));
|
||||
+ customDisplay = true;
|
||||
+ }
|
||||
+
|
||||
@ -51,10 +68,8 @@ index 81e145ff0759322f74888c81df8d2133fece7144..91b92d95a961ba00ddd7026bb83d021b
|
||||
+ if (lore != null && !lore.isEmpty()) {
|
||||
+ NBTTagList list = new NBTTagList();
|
||||
+ for (String line : lore) {
|
||||
+ line = ChatColor.translateAlternateColorCodes('&', line
|
||||
+ .replace("{mob}", mobName));
|
||||
+ BaseComponent[] comp = TextComponent.fromLegacyText(line);
|
||||
+ list.add(NBTTagString.create(ComponentSerializer.toString(comp)));
|
||||
+ final Component lineComponent = PaperAdventure.LEGACY_AMPERSAND.deserialize(line).replaceText(config).decoration(ITALIC, false);
|
||||
+ list.add(NBTTagString.create(GsonComponentSerializer.gson().serialize(lineComponent)));
|
||||
+ }
|
||||
+ display.set("Lore", list);
|
||||
+ customDisplay = true;
|
||||
@ -83,7 +98,7 @@ index 81e145ff0759322f74888c81df8d2133fece7144..91b92d95a961ba00ddd7026bb83d021b
|
||||
@Override
|
||||
public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
||||
super.dropNaturally(iblockdata, worldserver, blockposition, itemstack);
|
||||
@@ -23,6 +85,7 @@ public class BlockMobSpawner extends BlockTileEntity {
|
||||
@@ -23,6 +88,7 @@ public class BlockMobSpawner extends BlockTileEntity {
|
||||
|
||||
@Override
|
||||
public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] MC-168772 Fix - Add turtle egg block options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockTurtleEgg.java b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
|
||||
index 553c8affab6228cb187549deb5b34f79ba8f912c..92cca6c44f12a9283988b84681aac760f1c38d7e 100644
|
||||
index 00c37493c28805558dea06a20973f32ab0359016..0f147dc938cef428452bd3137c68b52a78f9fbde 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockTurtleEgg.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
|
||||
@@ -163,6 +163,23 @@ public class BlockTurtleEgg extends Block {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Giants AI settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2b76b5a70280def08f239ff387407a9d328d484c..ceb30228fefee86d5706b3ac0c5f2ea83d336dfb 100644
|
||||
index 2ec48858be8eb2c522c9685b43bd36b3b581cf8b..7cafc89e048e43f339f5289f38674b18d052e70d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -136,7 +136,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@ -118,7 +118,7 @@ index a47217c020d2c2a3caddafa0549dc827373798dd..07908edcaffb5ee1be8a71f3f0affb91
|
||||
float f = difficultydamagescaler.d();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 59699bb23a189b7e53737b2f8f5263608a64109c..8ebfc9b8cf82ba914d5e56aca330033f176be334 100644
|
||||
index ebe18e5926bb9e7d2dacdb09c213c0ad6fb847c4..996242d7c62984b67b9443356c509d0c7c85e33a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -166,6 +166,7 @@ public abstract class EntityLiving extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Charged creeper naturally spawn
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
index 79ef955070b2982be79cc58e40093624bd088ff0..eb4a0ef0e7a8bc8e0cb648bc369815ce0efb6223 100644
|
||||
index b2f028422d9a7a84e49e383b78032feb887a85c0..ff80ac7db73b7c7dd6ac62ac128af1cab961d075 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
@@ -23,6 +23,17 @@ public class EntityCreeper extends EntityMonster {
|
||||
@@ -24,6 +24,17 @@ public class EntityCreeper extends EntityMonster {
|
||||
super(entitytypes, world);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix 'outdated server' showing in ping before server fully
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||
index 9beb6fad228ccb3081b661c845836f4f29404d86..b98d094422f09ddffe09bac7cf1a9c7e92ae5aa6 100644
|
||||
index d0fad346dd4511722f958a8c0bda67492184fb62..1df22ad7b35d6bd974e7fe805920542654c1b9d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
|
||||
@@ -133,6 +133,7 @@ public class PacketStatusListener implements PacketStatusInListener {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Dont send useless entity packets
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index 81869215876d10a84ab27c0e6f41963c1346fd1c..f3b37f5704d752d1ec4d4d916690907dace67183 100644
|
||||
index 2402c18e6a18221a43bea9fc68278da9d19eede4..e51b6bd0698593867e6821326d223770766d717f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -172,6 +172,7 @@ public class EntityTrackerEntry {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cows eat mushrooms
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index ceb30228fefee86d5706b3ac0c5f2ea83d336dfb..d16b3482914e1bd390c745b590f2b538c1a45601 100644
|
||||
index 7cafc89e048e43f339f5289f38674b18d052e70d..4edb489012ddc9454e412f06acc4587a3572c8d3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2778,6 +2778,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2791,6 +2791,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.invulnerable = flag;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ index 42e6761c8b18b79ffd3f4d5e853ea87a2c153c23..cfb009c811bd2908d38da1b0007cb7aa
|
||||
public EntityCow createChild(WorldServer worldserver, EntityAgeable entityageable) {
|
||||
return (EntityCow) EntityTypes.COW.a((World) worldserver);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 8ebfc9b8cf82ba914d5e56aca330033f176be334..ac9ac19c265e4be440531656a109b0468864637e 100644
|
||||
index 996242d7c62984b67b9443356c509d0c7c85e33a..8cc440e0e7108e2c7ca29b2f8a2fc5a723dcef0d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -81,7 +81,7 @@ public abstract class EntityLiving extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix cow rotation when shearing mooshroom
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
index 1aacbae04ce89be4da82d65116c494c493e71530..38df17bd206c908582ece2c4105235feaf0f2227 100644
|
||||
index c9112f783c81d58570e622a0e784da1e2a93d0ff..91cfe60f764a573e3724b48a9ae02e806c1e4fb8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
@@ -135,7 +135,13 @@ public class EntityMushroomCow extends EntityCow implements IShearable {
|
||||
@@ -136,7 +136,13 @@ public class EntityMushroomCow extends EntityCow implements IShearable {
|
||||
|
||||
entitycow.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
|
||||
entitycow.setHealth(this.getHealth());
|
@ -5,7 +5,7 @@ Subject: [PATCH] Pigs give saddle back
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
|
||||
index ee94c2827cfc53f7a37e61d8c1c0c30a52374cf8..7f52c39234e69b612b89993ce4503c20690064ed 100644
|
||||
index 01ca5983cade997b1f0d27fdf495c74c6daa0922..6ea3e4ffc3f42f4282adf3554944f24d92ca2079 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPig.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPig.java
|
||||
@@ -109,6 +109,18 @@ public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Snowman drop and put back pumpkin
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
index 48997367a67ffd1dbf29cdb048720610528f35cb..51396cbd18d0e053e788f82bf4a3bc2533f20e11 100644
|
||||
index a11c599a9779aa084a1d7d1b6b3485d5b9c23906..c39f3c06eb199a24f32a5c581e877073b580502c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
@@ -123,6 +123,14 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
|
||||
@@ -124,6 +124,14 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
|
||||
}
|
||||
|
||||
return EnumInteractionResult.a(this.world.isClientSide);
|
||||
@ -23,7 +23,7 @@ index 48997367a67ffd1dbf29cdb048720610528f35cb..51396cbd18d0e053e788f82bf4a3bc25
|
||||
} else {
|
||||
return EnumInteractionResult.PASS;
|
||||
}
|
||||
@@ -133,6 +141,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
|
||||
@@ -134,6 +142,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
|
||||
this.world.playSound((EntityHuman) null, (Entity) this, SoundEffects.ENTITY_SNOW_GOLEM_SHEAR, soundcategory, 1.0F, 1.0F);
|
||||
if (!this.world.s_()) {
|
||||
this.setHasPumpkin(false);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ender dragon always drop full exp
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
index de53af8c01f8fa9636386737b6bc071b32f87cd1..a5a2182455542bb8fd62941bd0da2f38ba698f35 100644
|
||||
index 7289d6c706b6c845584bac616c9babea80f8e885..f777aea69dc9949aae3251e9a530b8cffb251bad 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -564,7 +564,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
@ -27,10 +27,10 @@ index 3585fd82c14338a82302ca403e91e6cfe65e1c19..770ad5edfb44acb69e7da33226ca6bf7
|
||||
} else {
|
||||
return EnumInteractionResult.PASS;
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
index 2b9d5724c1b63f5e55010f9e3450004821c098a4..316766970243e8ac00e4c82f6c710de5edc3fa51 100644
|
||||
index 3c7847b1156a486e253a0e9f74a857e841d90619..1e6bb566c0a718bba289b2e727a832e0aa6b7f15 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
@@ -113,6 +113,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -112,6 +112,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
return this.isEditable;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Signs allow color codes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 9b09d68435290add2781a72e5bc62ce50a79e39f..1d69c07eb3890e61383928433db727bdb3de0202 100644
|
||||
index 633a33e19e41c56369bc18f7af5c91a5b69be3b7..0c384641dd840b3b04b93d2e33df7d75293d9351 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1452,6 +1452,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1449,6 +1449,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public void openSign(TileEntitySign tileentitysign) {
|
||||
@ -17,29 +17,38 @@ index 9b09d68435290add2781a72e5bc62ce50a79e39f..1d69c07eb3890e61383928433db727bd
|
||||
this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index dc93f0c8f65e2a796604b8e4488c1b3bd155b64e..eaddc933261aeccc963ac0f35eebb387c16ae6a0 100644
|
||||
index be29ecfa00d53ad2067015a5261184b4157c604b..4d0dcbcc00e44c4912302dd0e7331471f33cb370 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2904,6 +2904,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2902,6 +2902,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
+ // Purpur start
|
||||
+ if (worldserver.purpurConfig.signAllowColors) {
|
||||
+ lines[i] = currentLine;
|
||||
+ if (player.hasPermission("purpur.sign.color")) lines[i] = lines[i].replaceAll("(?i)&([0-9a-fr])", "\u00a7$1");
|
||||
+ if (player.hasPermission("purpur.sign.style")) lines[i] = lines[i].replaceAll("(?i)&([l-or])", "\u00a7$1");
|
||||
+ if (player.hasPermission("purpur.sign.magic")) lines[i] = lines[i].replaceAll("(?i)&([kr])", "\u00a7$1");
|
||||
+ final org.bukkit.entity.Player bukkitPlayer = player.getBukkitEntity();
|
||||
+ if (bukkitPlayer.hasPermission("purpur.sign.color")) currentLine = currentLine.replaceAll("(?i)&([0-9a-fr])", "\u00a7$1");
|
||||
+ if (bukkitPlayer.hasPermission("purpur.sign.style")) currentLine = currentLine.replaceAll("(?i)&([l-or])", "\u00a7$1");
|
||||
+ if (bukkitPlayer.hasPermission("purpur.sign.magic")) currentLine = currentLine.replaceAll("(?i)&([kr])", "\u00a7$1");
|
||||
+ lines.add(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(currentLine));
|
||||
+ } else
|
||||
+ // Purpur end
|
||||
lines[i] = SharedConstants.filterAllowedChatCharacters(currentLine); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created.
|
||||
lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterAllowedChatCharacters(currentLine))); // Paper - Replaced with anvil color stripping method to stop exploits that allow colored signs to be created.
|
||||
}
|
||||
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);
|
||||
SignChangeEvent event = new SignChangeEvent(org.bukkit.craftbukkit.block.CraftBlock.at(worldserver, blockposition), this.getPlayer(), lines);
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
index 316766970243e8ac00e4c82f6c710de5edc3fa51..852bb5db84ddd735f5e0d7f922918cc90b897e91 100644
|
||||
index 1e6bb566c0a718bba289b2e727a832e0aa6b7f15..cbbaf8ca4b6425e2ce58e500b13b3b5269704c3c 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
@@ -93,6 +93,18 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import javax.annotation.Nullable;
|
||||
+import io.papermc.paper.adventure.PaperAdventure; // Purpur
|
||||
|
||||
public class TileEntitySign extends TileEntity implements ICommandListener { // CraftBukkit - implements
|
||||
|
||||
@@ -92,6 +93,18 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
this.g[i] = null;
|
||||
}
|
||||
|
||||
@ -47,8 +56,8 @@ index 316766970243e8ac00e4c82f6c710de5edc3fa51..852bb5db84ddd735f5e0d7f922918cc9
|
||||
+ public PacketPlayOutTileEntityData getTranslatedUpdatePacket() {
|
||||
+ NBTTagCompound nbt = save(new NBTTagCompound());
|
||||
+ for (int i = 0; i < 4; ++i) {
|
||||
+ String line = net.pl3x.purpur.ComponentUtil.fromComponent(lines[i]).replace("\u00a7", "&");
|
||||
+ nbt.setString("Text" + (i + 1), IChatBaseComponent.ChatSerializer.componentToJson(org.bukkit.craftbukkit.util.CraftChatMessage.fromString(line)[0]));
|
||||
+ String line = PaperAdventure.LEGACY_AMPERSAND.serialize(PaperAdventure.asAdventure(lines[i]));
|
||||
+ nbt.setString("Text" + (i + 1), net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().serialize(net.kyori.adventure.text.Component.text(line)));
|
||||
+ }
|
||||
+ nbt.setString("PurpurEditor", "true");
|
||||
+ return new PacketPlayOutTileEntityData(position, 9, nbt);
|
@ -22,7 +22,7 @@ index 2291135eaef64c403183724cb6e413cd7e472672..bc61aaff65a7dc1e7534452b285953b8
|
||||
super(i, j, k);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index ac9ac19c265e4be440531656a109b0468864637e..4e2149b422a643bd30c8d8d13adc9e5f5f2a8cca 100644
|
||||
index 8cc440e0e7108e2c7ca29b2f8a2fc5a723dcef0d..46b1bc644c0584fe7006ea9f111d7f4837299dc9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -99,9 +99,9 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -39,7 +39,7 @@ index ac9ac19c265e4be440531656a109b0468864637e..4e2149b422a643bd30c8d8d13adc9e5f
|
||||
protected double aV;
|
||||
protected double aW;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
index 022dfdc5b6af4b243e7e4da8660e8e41d04e1a30..298af30b1a7f12d42216fc1b7ee801fd7be93d3c 100644
|
||||
index be859a1b41254b299a507d03e453dc8efee6f3dd..4de2877f30a9b231a5c8bbd1739416991e9d7633 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -445,16 +445,62 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
@ -106,10 +106,10 @@ index 022dfdc5b6af4b243e7e4da8660e8e41d04e1a30..298af30b1a7f12d42216fc1b7ee801fd
|
||||
this.move(EnumMoveType.SELF, this.getMot());
|
||||
if (!this.onGround) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 1d69c07eb3890e61383928433db727bdb3de0202..bc17e1867531f6d0021390cb1a10abac52479e5b 100644
|
||||
index 0c384641dd840b3b04b93d2e33df7d75293d9351..64de6be4f9e740a2a036b202789be0a28b175575 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1005,6 +1005,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1002,6 +1002,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (this.isInvulnerable(damagesource)) {
|
||||
return false;
|
||||
} else {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Disable loot drops on death by cramming
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 4e2149b422a643bd30c8d8d13adc9e5f5f2a8cca..762f65d7e12c020f4acdc8a0a9a102997442a45e 100644
|
||||
index 46b1bc644c0584fe7006ea9f111d7f4837299dc9..1dddf80e11db54a666de8c3b0d7a5c8a5f1f93ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1501,8 +1501,10 @@ public abstract class EntityLiving extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Players should not cram to death
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index bc17e1867531f6d0021390cb1a10abac52479e5b..6bc2ef56fb36fa86c4318ffe3cecd3e28c28d2c4 100644
|
||||
index 64de6be4f9e740a2a036b202789be0a28b175575..a609d62b6ad8b3be8fc6ae85dc3b1bcc0513a121 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1429,7 +1429,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1426,7 +1426,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public boolean isInvulnerable(DamageSource damagesource) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] End gateway should check if entity can use portal
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
index e0118a971e1ea3c52a1380f519146b8f46a425ea..ed8e91bf6c8b9d410d439bdddd5067d346a20a7e 100644
|
||||
index b740c9b66a77df1ff20fba794c49a1de4292ba88..e616b3759561e0d6e471f914f3dc843fe7464f2e 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
|
||||
@@ -127,6 +127,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
@@ -128,6 +128,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
||||
|
||||
public void b(Entity entity) {
|
||||
if (this.world instanceof WorldServer && !this.f()) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix the dead lagging the server
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index d16b3482914e1bd390c745b590f2b538c1a45601..a218a7b35514a59f0bc7ed65ce3547d383faaa41 100644
|
||||
index 4edb489012ddc9454e412f06acc4587a3572c8d3..05902a6e9b1dd326776cac3bd70c438f9e83da26 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1523,6 +1523,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1536,6 +1536,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
|
||||
this.lastYaw = this.yaw;
|
||||
this.lastPitch = this.pitch;
|
||||
@ -17,7 +17,7 @@ index d16b3482914e1bd390c745b590f2b538c1a45601..a218a7b35514a59f0bc7ed65ce3547d3
|
||||
|
||||
public void f(double d0, double d1, double d2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 762f65d7e12c020f4acdc8a0a9a102997442a45e..1ae5ac6ae52a2687469dfce547b53949f15adb28 100644
|
||||
index 1dddf80e11db54a666de8c3b0d7a5c8a5f1f93ab..b273b021b0e3484a3189c3d6d55284b3c45a41ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2500,7 +2500,7 @@ public abstract class EntityLiving extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for F3+N debug
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 46043d3a4f4056fff93b867c65d363ac1277db7a..726e3292318f6a0de474f68fe30da4a954c7600a 100644
|
||||
index 00db0f5fb098a4db4092f8ab75a4489cf466baac..86f534c871a3c9b9ca71b20daa7780dfdab9e76d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1074,6 +1074,7 @@ public abstract class PlayerList {
|
||||
@@ -1073,6 +1073,7 @@ public abstract class PlayerList {
|
||||
} else {
|
||||
b0 = (byte) (24 + i);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 64cd02072536e69cd219932769bbade87b47601a..b795128c5a69f65883fdd318a8a5b2a65512bb16 100644
|
||||
index d9513addae86bd5d2f0c50173318cf4d23ef2128..50f1841e3d5e92d6186db49ac4962c0bac943a8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1003,7 +1003,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1010,7 +1010,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.a(this::canSleepForTick);
|
||||
this.methodProfiler.exitEnter("nextTickWait");
|
||||
this.X = true;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add enderman and creeper griefing controls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
index eb4a0ef0e7a8bc8e0cb648bc369815ce0efb6223..2256b81624b12b6f6cb54250b24fa12ad6da621d 100644
|
||||
index ff80ac7db73b7c7dd6ac62ac128af1cab961d075..36bf307985624a3567eb1196e034470bd7002e1e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
@@ -215,7 +215,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
@@ -216,7 +216,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
|
||||
public void explode() {
|
||||
if (!this.world.isClientSide) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Villagers follow emerald blocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index c034869310ca3dadbfe5425c45aaa80dac59ac88..1cde71b812c7721298e7addb74de01e4ea297499 100644
|
||||
index 1c87bc91515490e2f8579a5321058845c7d30a56..3ae6e9fceb8feea8340fc542727423379a3f8863 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -74,6 +74,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -72,6 +72,13 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
this.brainTickOffset = getRandom().nextInt(100); // Purpur
|
||||
}
|
||||
|
||||
@ -23,10 +23,10 @@ index c034869310ca3dadbfe5425c45aaa80dac59ac88..1cde71b812c7721298e7addb74de01e4
|
||||
public BehaviorController<EntityVillager> getBehaviorController() {
|
||||
return (BehaviorController<EntityVillager>) super.getBehaviorController(); // CraftBukkit - decompile error
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerAbstract.java b/src/main/java/net/minecraft/server/EntityVillagerAbstract.java
|
||||
index b2a76db173ae12bff2e8a7de411cb489fdb2e9c7..2a5eda6a7e67d0b8682a96552248ea4e117c1196 100644
|
||||
index e0cc45a7494cd6f06169b64ee8ffc16aa1932f8f..baf74566ec8569677e6f03aef96645c13ec94d89 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillagerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerAbstract.java
|
||||
@@ -17,6 +17,8 @@ import io.papermc.paper.event.player.PlayerTradeEvent;
|
||||
@@ -18,6 +18,8 @@ import io.papermc.paper.event.player.PlayerTradeEvent;
|
||||
|
||||
public abstract class EntityVillagerAbstract extends EntityAgeable implements NPC, IMerchant {
|
||||
|
||||
@ -36,10 +36,10 @@ index b2a76db173ae12bff2e8a7de411cb489fdb2e9c7..2a5eda6a7e67d0b8682a96552248ea4e
|
||||
private CraftMerchant craftMerchant;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
index fa3e786cd6ef67da378a5d51583ca84a82677d8c..47a89bdd163d4690fa96f63d7a9723b3bcc9fa0b 100644
|
||||
index 250a4e5ddd626794482678a64023f0f5459520e1..d990aae60e5a6056b44249cb7039470c6757b7fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
@@ -41,6 +41,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -42,6 +42,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
this.goalSelector.a(1, new PathfinderGoalPanic(this, 0.5D));
|
||||
this.goalSelector.a(1, new PathfinderGoalLookAtTradingPlayer(this));
|
||||
this.goalSelector.a(2, new EntityVillagerTrader.a(this, 2.0D, 0.35D));
|
@ -17,10 +17,10 @@ index d38102bbf48dd498d80911e954e910a33d390daa..566d6a2551ffbcf4366596cab87a7239
|
||||
// Paper start - drop leash variable
|
||||
PlayerUnleashEntityEvent event = CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman, !entityhuman.abilities.canInstantlyBuild);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 1cde71b812c7721298e7addb74de01e4ea297499..e4aedb3df5d0a47b5bb9175627aa794fc1779639 100644
|
||||
index 3ae6e9fceb8feea8340fc542727423379a3f8863..1fa6cf564099323c8332e68cadf64c28dfc84998 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -79,6 +79,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -77,6 +77,11 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
protected void initPathfinder() {
|
||||
if (world.purpurConfig.villagerFollowEmeraldBlock) this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.0D, false, TEMPT_ITEMS));
|
||||
}
|
||||
@ -33,10 +33,10 @@ index 1cde71b812c7721298e7addb74de01e4ea297499..e4aedb3df5d0a47b5bb9175627aa794f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
index 47a89bdd163d4690fa96f63d7a9723b3bcc9fa0b..298d2b6f6e352bb82f3a5a307466bb6e8f47d9d3 100644
|
||||
index d990aae60e5a6056b44249cb7039470c6757b7fb..432956d9d5f2706014d67232b88e6b86011484f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
@@ -48,6 +48,13 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -49,6 +49,13 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Implement configurable search radius for villagers to spawn
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index e4aedb3df5d0a47b5bb9175627aa794fc1779639..c06425434c97645b914c07940528901a2979ce1b 100644
|
||||
index 1fa6cf564099323c8332e68cadf64c28dfc84998..8002c55497f772eadae3242cad06d529571e97bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -894,6 +894,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -892,6 +892,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
|
||||
@Nullable
|
||||
private EntityIronGolem d(WorldServer worldserver) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement infinite lava
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
||||
index d72a88e9275eb00eed35b6467538a46e5cee32d5..35d55bc15b179a8200082ca23fad04bbe550068d 100644
|
||||
index cf9d3faabe8732d27c436f4806c727592e475f81..46bdeca19a0da06a1fcbd7043a26689b64459d67 100644
|
||||
--- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
||||
+++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
||||
@@ -195,7 +195,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@@ -196,7 +196,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ index d72a88e9275eb00eed35b6467538a46e5cee32d5..35d55bc15b179a8200082ca23fad04bb
|
||||
IBlockData iblockdata2 = iworldreader.getType(blockposition.down());
|
||||
Fluid fluid1 = iblockdata2.getFluid();
|
||||
|
||||
@@ -266,6 +266,17 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@@ -267,6 +267,17 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
return (Fluid) this.e().h().set(FluidTypeFlowing.FALLING, flag);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add player death exp control options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index e0cf2af8fcbfc66fc32aa8e693b62160b24f8672..093df82d49bfa6c34f081a719b5212ec8a312657 100644
|
||||
index 7cacaae4ec8b09d12d35f0f22c0e9ec5a48d46a4..10365180f518042d56929d0c0061e5297b73cf9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -83,6 +83,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -85,6 +85,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
// CraftBukkit end
|
||||
|
||||
// Purpur start
|
||||
@ -17,7 +17,7 @@ index e0cf2af8fcbfc66fc32aa8e693b62160b24f8672..093df82d49bfa6c34f081a719b5212ec
|
||||
public void setAfk(boolean setAfk){
|
||||
}
|
||||
|
||||
@@ -1697,9 +1699,18 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1710,9 +1712,18 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@Override
|
||||
protected int getExpValue(EntityHuman entityhuman) {
|
||||
if (!this.world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY) && !this.isSpectator()) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user